company logo

Simple object space versioning

Simple object space versioning is a rather consistent versioning mode which might be used for databases that contain separate object spaces for different application clients. As long as object spaces do not contain relationships between instances in different object spaces, object space versioning is consistent.

Simple object space versioning allows creating new versions for an object space whenever required. Object spaceversions are not timestamped. In order to manage object space versions, the application may provide appropriate version lists. Each object space creates its own consecutive version numbers, i.e. the version number for an object space does not tell anything about the sequence of changes between different object spaces.

In order to activate object space versioning, the DBVersion utility or Database::versioningMode() might be called.

In order to preserve the state of an object space at a certain time point, an object space version can be created by calling ObjectSpace::createVersion(). New versions for subordinated database entries are created automatically before updating database entries with version number older than the object space version.

// DBVersion Utility: set version mode individual ao managed individual

  DBVersion.exe c:\Sample\sample.dat mode -M:P

// set version mode from within a program: ;

... fragment ( Database &dbh ) {

  dbh.versioningMode(objectspace);

}

Notes:

Rollback for object space versions to minor version may be implemented, but this seems not to be very urgent, so that it had been postponed.