Home > Class Reference > ENSLIB namespace > %Net.DB.Iris
Private  

%Net.DB.Iris

class %Net.DB.Iris extends %RegisteredObject

This class implements the primary set of functions IRIS Native API for Object Script. The only other members of the IRIS Native API that are not implemented by this class are implemented by %Net.DB.DataSource and %Net.DB.Connection. This class should never be instantiated directly. The proper way to instantiate this class is to invoke the CreateIris() method using an instance of %Net.DB.Connection.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
22

Summary

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
ClassMethodValue ClassMethodVoid Function Get
GetBoolean GetNext GetObject GetRecordMetadata
GetSchema GetTLevel Increment IsDefined
Kill Lock Procedure ReleaseAllLocks
Set TCommit TRollback TRollbackOne
TStart Unlock

Methods

method ClassMethodValue(className, methodName, args...) as %RawString

Calls a class method, passing zero or more arguments and returning the method's return value. Trailing arguments may be omitted, causing default values to be used for those arguments.

This method throws an exception when an error condition is encountered.

className input The name of the class that implements the method to be called.
methodName input The name of the method to be called.
args input... The arguments to be passed to the method.
return The value returned by the methodName method.

method ClassMethodVoid(className, methodName, args...)

Calls a class method with no return value, passing zero or more arguments. Trailing arguments may be omitted, causing default values to be used for those arguments.

This method throws an exception when an error condition is encountered.

className input The name of the class that implements the method to be called.
methodName input The name of the method to be called.
args input... The arguments to be passed to the method.

method Function(routineName, functionName, args...) as %RawString

Calls a function (label^routine), passing zero or more arguments and returning the function's return value. Trailing arguments may be omitted, causing default values to be used for those arguments.

This method throws an exception when an error condition is encountered.

routineName input The name of the routine that implements the function to be called.
functionName input The name of the function to be invoked.
args input... The arguments to be passed to the method.
return The value returned by the functionName function.

method Get(globalName As %String(MAXLEN=220), subscripts...) as %RawString

Return the value of a global array node. The global array node reference is defined by a globalName and a variable number of subscripts.

This method throws an exception if the global array node is not defined.

globalName input The name of the global array.
subscripts input... The subscripts to the global named by the first parameter. Together with the global name they form the full global reference.
return The value of the global array node.

method GetBoolean(globalName As %String(MAXLEN=220), subscripts...) as %Boolean

Return the boolean value of a global array node. The global array node reference is defined by a globalName and a variable number of subscripts.

This method throws an exception if the global array node is not defined.

globalName input The name of the global array.
subscripts input... The subscripts to the global named by the first parameter. Together with the global name they form the full global reference.
return The value of the global array node.

method GetNext(returnSubscript As %Boolean = 1, returnValue As %Boolean = 0, isReversed As %Boolean = 0, globalName As %String(MAXLEN=220), subscripts...) as %RawString

Iterates to the next subscript in the $ORDER sense and returns the subscript, the value or both based on returnSubscript and returnValue flags. The global array node reference is defined by a globalName and a variable number of subscripts.

This method throws an exception when an error condition is encountered.

returnSubscript input If true, the value of the subscript is returned, defaults to 1 (true).
returnValue input If true, the value of the global array node at the position defined by subscripts... is returned, defaults to 0 (false).
isReveresed input If true, the iteration is in reverse order, defaults to 0 (forward).
globalName input The name of the global array.
subscripts input... The subscripts to the global named by the first parameter. Together with the global name they form the full global reference.
return The subscript and/or value of the global array node at the position defined by $order of the subscripts.... If both the value and the subscript are returned then a $list with the subscript in element position 1 and the value in element position 2 is returned. If the $order advances to the end and there are no further subscripts defined then the return value is null.

method GetObject(className As %String(MAXLEN=220)="", id) as %Library.DynamicAbstractObject

GetObject returns an object from the connected data source. This method accepts the name of the persistent class in the remote IRIS namespace and the ID of the requested object. The return value is an instance of %Library.DynamicAbstractObject. All properties defined in the requested class will be present in the result object except streams and relationships are not yet supported. The remote class must have a unified schema defined. Any properties whose type class is a subclass of %Library.SerialObject must also have a defined unified schema. Unified schemas are instances of %FOI.Schema.

This method throws an exception when an error condition is encountered.

method GetRecordMetadata(schemaName As %String(MAXLEN=220)) as %Library.DynamicAbstractObject
%FOI.Schema instances are specific to a connection - url, port, and namespace. Remote schemas are cached by the Native instance (client? or is that a bad word?). The cache only lasts as long as the Native instance.

This method throws an exception when an error condition is encountered.

method GetSchema(schemaName As %String(MAXLEN=220)) as %Library.DynamicAbstractObject

%FOI.Schema instances are specific to a connection - url, port, and namespace. Remote schemas are cached by the Connection instance (client? or is that a bad word?). The cache only lasts as long as the Connection instance.

There are no checks for stale cache entries at this time.

If a schema for the requested class or any of the embedded properties defined by that class does not exist then an exception is thrown. There is no database first feature implemented yet.

This method throws an exception when an error condition is encountered.

method GetTLevel() as %Integer

Get the level of the current nested transaction. Returns 1 if there is only a single transaction open. Returns 0 if there are no transactions open. This is equivalent to fetching the value of the $TLEVEL special variable.

This method throws an exception when an error condition is encountered.

method Increment(value, globalName As %String(MAXLEN=220), subscripts...) as %Integer

Increments a global node by the given integer value. Returns the new value of the node.

This method throws an exception when an error condition is encountered.

value input The value by which to increment the global array node.
globalName input The name of the global array.
subscripts input... The subscripts to the global named by the first parameter. Together with the global name they form the full global reference.
return The value of the global array node after incremented it by value.

method IsDefined(globalName As %String(MAXLEN=220), subscripts...) as %Integer

Checks if a a global contains data ($DATA).

This method throws an exception when an error condition is encountered.

globalName input The name of the global array.
subscripts input... The subscripts to the global named by the first parameter. Together with the global name they form the full global reference.
return 0 if the node is undefined, 1 if the global node exists and contains data, 10 if it's an array element that has descendants, 11 has data and descendants.

method Kill(globalName As %String(MAXLEN=220), subscripts...)

Kill the value of a global array node, including any descendants.

This method throws an exception when an error condition is encountered.

globalName input The name of the global array.
subscripts input... The subscripts to the global named by the first parameter. Together with the global name they form the full global reference.

method Lock(lockMode, timeout, globalName As %String(MAXLEN=220), subscripts...) as %Boolean

Lock the global node, returns true on success. Note that this method performs an incremental lock and not the implicit unlock before lock feature that is also offered in COS.

This method throws an exception when an error condition is encountered.

lockMode input A combination of the following chars, S for shared lock, E for escalating lock, default is empty string (exclusive and non-escalating).
timeout input The number of seconds to wait to acquire the lock. -1 means infinite (no) timeout.
globalName input The name of the global array.
subscripts input... The subscripts to the global named by the first parameter. Together with the global name they form the full global reference.
return 1 (true) if the lock is successfully acquired.

method Procedure(routineName, procedureName, args...)

Calls a procedure (label^routine) with no return value, passing zero or more arguments. Trailing arguments may be omitted, causing default values to be used for those arguments.

This method throws an exception when an error condition is encountered.

routineName input The name of the routine that implements the function to be called.

functionName input The name of the function to be invoked.
args input... The arguments to be passed to the method.

method ReleaseAllLocks() as %Status

Release all locks associated with the session.

This method throws an exception when an error condition is encountered.

method Set(value As %RawString, globalName As %String(MAXLEN=220), subscripts...) as %RawString

Set the value of a global array node. The global array node reference is defined by a globalName and a variable number of subscripts.

This method throws an exception when an error condition is encountered.

value input The value to be stored.
globalName input The name of the global array.
subscripts input... The subscripts to the global named by the first parameter. Together with the global name they form the full global reference.

method TCommit() as %Status

Commit the current transaction. This is equivalent to executing TCOMMIT in a InterSystems IRIS terminal.

This method throws an exception when an error condition is encountered.

method TRollback()

Roll back all open transactions in the session. This is equivalent to executing TROLLBACK in a InterSystems IRIS terminal.

This method throws an exception when an error condition is encountered.

method TRollbackOne()

Roll back the current level transaction only. If this is a nested transaction, any higher-level transactions will not be rolled back. This is equivalent to executing TROLLBACK 1 in a InterSystems IRIS terminal.

This method throws an exception when an error condition is encountered.

method TStart()

Start/open a transaction. This is equivalent to executing TSTART in a InterSystems IRIS terminal.

This method throws an exception when an error condition is encountered.

method Unlock(lockMode, globalName As %String(MAXLEN=220), subscripts...)

Unlock the global node. Note that this method performs an incremental unlock and not the implicit unlock before lock feature that is also offered in COS.

This method throws an exception when an error condition is encountered.

lockMode input A combination of the following chars, S for shared lock, E for escalating lock, I for immediate unlock, D for deferred unlock. default is empty string (exclusive and non-escalating).
globalName input The name of the global array.
subscripts input... The subscripts to the global named by the first parameter. Together with the global name they form the full global reference.