ObjectSpace - Database Object Handle
Object space handles are necessary for accessing data in an object space. An object space can be considered as a database within a database. Each database has got a root object space on top. Below each object space any number of subordinated object spaces can be created.
Object spaces in a database are logically separated but not physically. Thus, it becomes possible to establish links between database instances in different object spaces. Each object space has got, however, its own extents containing the global instances of the object space.
The object space handle for the root object space is part of the database handle (-> Database) and need not to be opened explicitly.
A object space handle is required for opening extent property handles for accessing instances stored in extents of an object space.
The object space handle administrates transactions. Transactions can be started and stopped for each object space handle. The object space handle is not thread-save, i.e. object space handles cannot be used simultaneously in different threads.
The object space supports version slices, i.e. each object space may have its own current object space version.
In order to access an object space, it has to be created (constructor) and opened (open()). After being opened, an access object has been created for the object space handle. When calling the copy constructor, the new object space handle is referring to the same access object and need not to be opened again.
The are different ways of providing an object space handle. Since each database is a root object space, each database handle (Database) provides an object space handle (ObjectSpace). Moreover, an object space handle might be opened directly for a data source defined in a configuration file or data catalog.
In order to open subordinated object spaces in an object space hierarchy, one may open the subordinated object space by name (when a name has been assigned while creating the object space) or by object identity. The preferred way is referring to named objects. Names for subordinated object spaces have to be unique within the parent object space, only.
// fragment
// open root object space for sample database
ObjectSpace os;
os.Open(mainClient(),"Sample",write,automatic);
// create subordinated object space SubSample
ObjectSpace subOs;
subOs.Open(os,"SubSample",write,0,automatic);
- obhandle - Internal pointer to object handle
- 1. Administration - Administration functions
- 2. Access - Access functions
- 3. Transactions - Transactions in an object space
- 4. Context function support - Context support functions
- 5. Versions - Access versions versioning
- 9. Maintenance - Maintenance functions
- ObjectSpace - Create an Database Object handle
- accessMode - Get access mode for object space
- accessVersion - Get access version
- asDatabase - Get object space as database
- asDictionary - Get object space as dictionary
- beginTransaction - Start transaction
- close - Close Object Handle
- commitTransaction - Commit transaction
- connected - Is object space connected to server?
- contextEventHandling - Context event handling property
- createVersion - Create new object space version
- database - Database handle
- dictionary - Object space dictionary
- eraseExtent - Erase extent
- eraseExtentReference - Delete extent reference
- eventHandling - Event handling property
- executeExpression - Execute expression
- exportData - Export data
- extentCount - Get number of allocated extents
- extentExist - Does Extent exist in database object
- extentName - Provide extent form Database Object
- forceClose - Force closing an access handle
- importData - Import data from XML or OIF
- internalTransaction - Is internal transaction running
- isClient - Is object space a client handle?
- isDatabase - Is object space a database
- isDictionary - Is object space a dictionary
- isServer - Is object space a server handle?
- isValid - Is object space handle valid?
- majorAccessVersion - Major version number for access version currently set
- objectName - Get Database Object
- objectSpaceContext - Get object space context
- open - Open database object space handle
- operator!= - Are object space handles different?
- operator== - Are object space handles equal?
- overload - Object overload option
- overloadObjectSpace - Overload object space
- parentObject - Parent object space
- readTransactionLevel - Read transaction level
- renameExtentReference - Rename extent reference
- rollbackTransaction - Rollback transaction
- serverOption - Server options
- setAccessVersion - Set current access version
- setMajorVersion - Set current major version
- startReadTransaction - Start read transaction
- stopReadTransaction - Stop read transaction
- transactionLevel - Get current transaction level
- updateTimestamp - Enable/Disable time stamp updating
- updateVersion - Update object space version
- version - Get object space version
- ~ObjectSpace - Destructor