Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbAddRowIdSegment

Add a new index segment to an index, for the $ROWID$ field of a table.

Declaration

ctdbAddRowIdSegment(CTHANDLE Handle);

Description

This function provides a way to add a new segment to an index, specifying both the index and the table with a single index handle (the Handle parameter). The table is whichever table the index handle is already associated with (via the previous call to ctdbAddIndex()). The field is the $ROWID$ field of the table. This allows a part of the index key to be built from the internal $ROWID$ field value in the table.

Note that this function only works with indexes that are associated with tables that have $ROWID$ support. If you use this function against a table that doesn’t, the subsequent call to ctdbCreateTable() will fail with error CTDBRET_ROWIDSEG, indicating an attempt to create an index with a $ROWID$ reference on a table that has no $ROWID$ support.

Return Values

Value

Symbolic Constant

Explanation

0

NO_ERROR

Successful operation.

See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values.

TOCIndex