Product Documentation

c-treeDB API for C# - Developers Guide

Previous Topic

Next Topic

ROWID Index

Two indexes are created by default during the table creation: the ROWID and RECBYT indexes.

The ROWID index, formed by a field and an associated index, holds the auto increment value generated automatically by c-tree every time a new record is added to the table.

When a table is created with ROWID support, a ROWID index is automatically created for the table. The operation of the ROWID index is transparent to the c-treeDB .NET user. c-treeDB .NET will automatically update the index entries. The ROWID index will not appear in the list of indexes for a table. The user cannot alter or delete the components of the ROWID index.

Functions that deal with the ROWID index are:

  • CTTable.HasRowid() - to determine if the table has ROWID support;
  • CTRecord.GetRowid() - to retrieve the ROWID for a given record;
  • CTRecord.FindRowid() - to locate and retrieve a record, given the ROWID.

By default, all tables created with c-treeDB .NET have support for the ROWID index. If, for any reason, a table should be created without support for this index, the create mode CREATE_MODE.NOROWID_CREATE should be added in CTTable:Create() method.

TOCIndex