Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [%SYSTEM] >  [DocDB]
Private  Storage   

abstract class %SYSTEM.DocDB extends Help

The %SYSTEM.DocDB class provides an interface for managing Document Databases.

You can use it via the special $SYSTEM object:

You can call help to get a list of all entry points:

do $SYSTEM.DocDB.Help()

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
6


Summary

Methods
CreateDatabase DropAllDatabases DropDatabase Exists
GetAllDatabases GetDatabase Help


Methods

• classmethod CreateDatabase(databaseName As %String(MAXLEN="")="", documentType As %String(MAXLEN=200), resource As %String(MAXLEN="")) as %DocDB.Database
Create a new Database in the current namespace. If a Database of that name already exists then return an error. Accepts Database Name, Document Type, and Resource. Return value is an oref referencing the Database definition object.
• classmethod DropAllDatabases() as %Library.DynamicArray
Delete all Databases defined in the current namespace and their currently visible extent (user data). Returns an array containing the names of all Databases successfully dropped.
• classmethod DropDatabase(databaseName As %String(MAXLEN="")="") as %Library.Boolean
Delete the definition and currently visible extent of an existing Database. Return true if the Database exists and the drop is successful, false if the named Database does not exist. If an error is encountered during execution then an exception is thrown.
• classmethod Exists(databaseName As %RawString = "") as %Boolean

Return 1 (true) if the databaseName database is defined in the current namespace, 0 (false) otherwise.

• classmethod GetAllDatabases() as %Library.DynamicArray
Return an array (%Library.DynamicArray) containing the names of all Databases defined in the current namespace.
• classmethod GetDatabase(databaseName As %String(MAXLEN="")="") as %DocDB.Database
Retrieve the Database definition, this includes the Name, Class, Resource and Document Type Class. If the requested Database does not exist then an exception is thrown. Returns an oref referencing the Database definition object.


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.