%SYSTEM.DocDB
Class %SYSTEM.DocDB Extends Help [ Abstract, System = 4 ]
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()
Methods
CreateDatabase
ClassMethod CreateDatabase(databaseName As %String(MAXLEN="") = "", documentType As %String(MAXLEN=200), resource As %String(MAXLEN="")) As %DocDB.Database [ CodeMode = expression ]
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.
GetDatabase
ClassMethod GetDatabase(databaseName As %String(MAXLEN="") = "") As %DocDB.Database [ CodeMode = expression ]
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.
GetAllDatabases
ClassMethod GetAllDatabases() As %Library.DynamicArray [ CodeMode = expression ]
Return an array (%Library.DynamicArray) containing the names of all Databases defined in the current namespace.
DropDatabase
ClassMethod DropDatabase(databaseName As %String(MAXLEN="") = "") As %Library.Boolean [ CodeMode = expression ]
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.
DropAllDatabases
ClassMethod DropAllDatabases() As %Library.DynamicArray [ CodeMode = expression ]
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.
Exists
ClassMethod Exists(databaseName As %RawString = "") As %Boolean
Return 1 (true) if the databaseName database is defined in the current namespace, 0 (false) otherwise.