Database :: versioningMode - Versioning mode
The versioning mode indicates the type of versioning for an object space. After setting the versioning mode, it can be changed in a restricted way, only, when data versions have been created.
Depending on the versioning mode, several versioning functions react different. Thus, it might be useful in some cases, checking the versioning mode before calling version functions.
// fragment: Database dbh;
if ( dbj.versioningMode() == Consistent ||
dbh.versioningMode() == UndefinedVersioning )
dbh.createMajorVersion();
Versioning mode describes the type of versioning used in the database
Implementation overview
- Get versioning mode
Database :: versioningMode (  ) - Set versioning mode
Database :: versioningMode ( eVersioningMode )
Implementation details
-
Get versioning mode
odaba::VersioningModes Database  :: versioningMode (  )
The function returns the versioning mode set for the database.
to list
-
Set versioning mode
odaba::VersioningModes Database  :: versioningMode ( odaba::VersioningModes eVersioningMode )
The function sets the versioning mode of the database to the value passed in eVersioningMode . After changing the versioning mode, the database has to be re-opened. In general, the versioning mode cannot be changed after being set. Some exceptions (feature downgrade) are, however, accepted:
- database --> synchronized --> not synchronized (consistency feature)
- database --> objectspace --> owner --> instance (scope feature)
- managed... --> not managed... (level feature)
Other transitions are not allowed and will cause an exception. Especially, pure managed versioning mode (old schema databases) cannot be changed without copying the database, when major versions have already been created.
As long as there are no versions created for database entries or the database or object space, version modes may be change without restrictions.
Changing the versioning mode affects database access. After calling the function, selections in all property handles will be reset and instances have to be relocated. The access version is set to the current version, which is usually the last version created.
Notes:Managed versioning is supported in order to be compatible with older database versions, which use this type for schema versioning. For new databases, it is suggested to use ManagedConsistent , ManagedSynchronized , ManagedIndividual or ManagedLocal instead.
- eVersioningMode
- Versioning modes
Versioning mode describes the type of versioning used in the database
to list