Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ROWID index

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

The ROWID 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 API user. c-treeDB API 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:

  • ctdbHasRowid() - to determine if the table has ROWID support;
  • ctdbGetRowid() - to retrieve the ROWID for a given record;
  • ctdbFindRowid() - to retrieve the record, given the ROWID.

By default, all c-treeDB API tables are created with support for the ROWID index. To create a table without ROWID support, the CTCREATE_NOROWID should be OR-ed into the create mode parameter to the ctdbCreateTable() function.

TOCIndex