- Description
Operations on McDBLib/McODBE/POET objects are done in a transactable (tentative pending resolution) manner. This functionality is achieved by performing object operations within a transaction context (McDBTransaction). The McDBTransactions collection represents all transactions that McDBLib is aware of (has issued).
Remarks
Each McDBTransaction object is associated with a string name, which should be unique in the McDBTransactions collection. Further, McDBTransaction objects may be nested. That is, each call to its Begin() method must be paired to a corresponding call to Commit() or Abort(), as appropriate.
-
Members
| Abort |
This method will abort the actions performed within this McDBTransaction and return database objects to their states in the enclosing Level. If this McDBTransaction is not nested (i.e. is at Level 1), the relevant database(s) are left unchanged. Any database objects locked because of actions performed in this McDBTransaction Level are unlocked. If this McDBTransaction is nested, this method will only undo the action(s) taken in the current Level, and enclosing Level(s) may still be Committed or Aborted independently.
|
| Activate |
Make this McDBTransaction the Current context for operations and objects.
|
| Begin |
This method will activate, then begin, this McDBTransaction. If the transaction is already running, the Level of nesting increases.
|
| Commit |
This method will commit the actions performed within this McDBTransaction to the enclosing Level. If this McDBTransaction is not nested (i.e. is at Level 1), the results of the McDBTransaction are actually written to the relevant McDBDatabase(s). If this McDBTransaction is nested, the actions in the active Level are only committed to the enclosing Level, and the net actions are still tentative, pending a Commit of enclosing Level(s).
|
| Level |  |
McDBTransaction objects may be nested. That is, by calling the Begin() method of already active McDBTransaction causes further actions to be tentative within an additional scoping level. This property returns the number of scoping/nesting levels encapsulated by this McDBTransaction. That is, this property's value is the number of times Commit must be called before the objects in memory (and/or changes to them) are written to their McDBDatabase(s).
|
| Name |  |
McDBTransaction objects are associated with a string name, which must be unique within the namespace of McDBTransactions issued on the McDBDatabases collection. This property, contains this friendly Name, which may be both read and written.
|
|