Class ODBPP::Schema

Used to represent a table within the database.
class Schema{
   unsigned short indexLockOrder;
   unsigned short indexCount;
   unsigned int tableID;
   unsigned int tableLockOrder;
   unsigned int fieldCount;
   unsigned int flags;
   char16_t *tableName;
   char16_t *indexPath;
   CODBPP::Field *fields;
   CODBPP::Index *indexes;


indexLockOrderthe index that the global locking order is to adhere to - 0 for the ObjectID.
indexCountthe amount of indexes - the length of the indexes array.
tableIDthe table's identifier.
tableLockOrderthe position that this table is in the global locking order.
fieldCountthe amount of fields - the length of the fields array.
flags0x01 - 64 bit Object IDs, 0 = no, 1 = yes
0x02 - Inverted index lock order, 0 = no, 1 = yes
tableName'' terminating string for the table name.
indexPath'' terminating string for the index file path - null if using the same directory as the table file.
fieldspointer to an array of fields.
indexespointer to an array of indexes.


Example Use
CODBPP database;
CODBPP::Schema schema;
CODBPP::Field fields[3];
schema.tableName = u"Table Name";
schema.fieldCount = 3;
schema.fields = &fields;
memset(schema.fields,0,schema.fieldCount * sizeof(CODBPP::Field));
schema.fields[0].type = CODBPP::UINT32;
schema.fields[0].name = u"First";
schema.fields[1].type = CODBPP::FLOAT64;
schema.fields[1].name = u"Second";
schema.fields[2].type = CODBPP::ASTR;
schema.fields[2].name = u"Third";
if(database.OpenDatabase(u"YourDatabase") == NO_ERROR){
   if((error = database.BeginTransaction(CODBPP::EXCLUSIVE)) == NO_ERROR){
      if((error = database.CreateTable(&schema)) == NO_ERROR){
   if(error && database.GetErrorMessage(&message) == NO_ERROR)

Also See

CreateTable, GetTableSchema, SetTableSchema
Comments (0)Listen All
Characters left: 2500

Contact Ekky Software

Thank you for your time and interest.
Ekky Software Customer Support Team.

Ekky Software Product Range
Ekky Software Homepage Ekky Software Homepage ObjectDatabase++ TScript Ekky Software Homepage Ekky Software Homepage ObjectDatabase++ TScript