Home > Class Reference > ENSLIB namespace > %Net.DB.Native
Private  Storage   

%Net.DB.Native


This class is for internal use only. An instance of %Net.DB.Native executes $system.IS/OS methods over an xDBC connection between two InterSystems IRIS processes. The connection itself is an instance of %Net.DB.Connection. You need to provide the connection object to the constructor of this class and it will be saved as a property of the instance. This class does not call the Connect or Disconnect methods of the connection class. Example: set conn = ##class(%Net.DB.Connection).%New("127.0.0.1",56773,"USER") set tSC = conn.Connect("_SYSTEM","SYS") set native = ##class(%Net.DB.Native).%New(conn) set tSC = native.Set("A","^testglobal",1) set tSC = native.Get(.output,"^testglobal",1) set tSC = conn.Disconnect()

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 24


Summary


Properties
Connection

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OnClose %OnNew
%OriginalNamespace %PackageName %RemoveFromSaveSet %SerializeObject
%SetModified %ValidateObject CopyGlobal Get
GetRows GetTlevel Increment IsDefined
Kill Lock ReleaseAllLocks Set
Tcommit Trollback TrollbackOne Tstart
Unlock valueClassMethod valueFunction voidClassMethod
voidProcedure


Properties


• property Connection as Connection;
------------- Constructor, Destructor --------------

Methods


• method %OnClose() as %Status
Note that there is no disconnect when this instance is killed. You have to call Disconnect on the connection object, not via this class.
• method %OnNew(connection) as %Status
Note that there is no connect when this instance is created. You have to call Connect on the connection object, not via this class.
• method CopyGlobal(globalName, rootName="") as %Status
Copies an entire global and resurrects it as a local or global variable. The globalName argument is required. It's name of the global on the remote server that you want to copy. It can include the "^" or not. The rootName argument is optional. It's the name of the local or global variable that you want to copy to. It must include the "^" to save it in a global, otherwise it will save it in a local variable. If you don't pass this argument or pass the empty string, then the global is copied into a global of the same name.
• method Get(Output reply, globalName, subscripts...) as %Status
-------------- GET, SET Methods -------------- Gets the value of a global node and returns it.
• method GetRows(Output reply, returnSubscripts As %Boolean = 0, returnValues As %Boolean = 1, globalName, subscripts...) as %Status
-------------- ORDER, GLOBAL TRANSFER Methods -------------- Iterates over all subscripts in the $ORDER sense and produces a $List of rows.
• method GetTlevel(Output reply) as %Status
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.
• method Increment(Output reply, value, globalName, subscripts...) as %Status
Increments a global node by the given integer value. Returns the new value of the node.
• method IsDefined(Output reply, globalName, subscripts...) as %Status
Checks if a a global contains data ($DATA). Returns 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, subscripts...) as %Status
-------------- KILL, INCREMENT, DATA Methods -------------- Kills a global node, including any descendants.
• method Lock(lockMode, timeout, globalName, subscripts...) as %Status
-------------- LOCK, UNLOCK Methods -------------- 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. The lockMode argument is a combination of the following chars, S for shared lock, E for escalating lock, default is empty string (exclusive and non-escalating). The timeout argument is the number of seconds to wait to acquire the lock.
• method ReleaseAllLocks() as %Status
Release all locks associated with the session.
• method Set(value, globalName, subscripts...) as %Status
Sets the value of a global node.
• method Tcommit() as %Status
Commit the current transaction. This is equivalent to executing TCOMMIT in a InterSystems IRIS terminal.
• method Trollback() as %Status
Roll back all open transactions in the session. This is equivalent to executing TROLLBACK in a InterSystems IRIS terminal.
• method TrollbackOne() as %Status
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.
• method Tstart() as %Status
-------------- TRANSACTION Methods -------------- Start/open a transaction. This is equivalent to executing TSTART in a InterSystems IRIS terminal.
• method Unlock(lockMode, globalName, subscripts...) as %Status
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. The lockMode argument is a combination of the following chars, S for shared lock, E for escalating lock,
• method valueClassMethod(Output reply, className, methodName, args...) as %Status
-------------- CLASS Methods -------------- 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.
• method valueFunction(Output reply, functionName, routineName, args...) as %Status
-------------- ROUTINE Methods -------------- 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.
• method voidClassMethod(className, methodName, args...) as %Status
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.
• method voidProcedure(procedureName, routineName, args...) as %Status
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.