Class ODBPP::Index

Used to represent a table index within the table schema.
class Index{
   unsigned char flags;
   unsigned char type;
   unsigned short segmentCount;
      unsigned int length;
         unsigned short binaryLength;
         unsigned short maxObjects;
	CODBPP::Segment *segments;


flagsboolean values for fixed or variable and multi-entry type index, 0x01 = variable, 0x02 = multientry.
typeCODBPP::IndexType value for the index.
segmentCounta counter for the number of segments in this index.
lengthif the index type equals CODBPP::B_TREE or CODBPP::S_TREE than the length for the fixed index or the average length for the variable index - (length * 4) = length in bytes.
binaryLengthif the index type equals CODBPP::A_LIST or CODBPP::U_LIST, the length in bytes of the pre-token binary section.
maxObjectsif the index type equals CODBPP::A_LIST or CODBPP::U_LIST, then pow(2,maxObjects) equals maximum object count before disregarding token value, typically token as "the" and "a" are removed from the index as they may provide too many hits. If this value is 0 then there is not maximum count.
segmentspointer to an array of segments.


Example Use
CODBPP database;
CODBPP::Schema schema;
CODBPP::Field fields[3];
schema.tableName = TEXT("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 = TEXT("First");
schema.fields[1].type = CODBPP::FLOAT64;
schema.fields[1].name = TEXT("Second");
schema.fields[2].type = CODBPP::ASTR;
schema.fields[2].name = TEXT("Third");
if(database.OpenDatabase(TEXT("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