Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

CTTable::GetStatus

Declaration

ULONG CTTable::GetStatus();

Description

Retrieves the table status. The table status indicates which rebuild action will be taken by an alter table operation.

Return Values

GetStatus() returns CTDB_REBUILD_NONE if the table is not changed or a bit mask of the values below describing the table status.

The possible rebuild status returns are:

Rebuild Status Value

Rebuild Status Symbolic Code

Explanation

0

CTDB_REBUILD_NONE

Nothing to be done, no changes to table

1

CTDB_REBUILD_DODA

Update the table DODA

2

CTDB_REBUILD_RESOURCE

Update table FC!DFLD resource

4

CTDB_REBUILD_INDEX

Add new indices to table

8

CTDB_REBUILD_ALL

Rebuild all indices

16

CTDB_REBUILD_FULL

Full table rebuild. A temporary table is created and all data is moved to new table and the indexes are built on the fly.

Example


ULONG status = hTable.GetStatus();

if (status & CTDB_REBUILD_ALL || status & CTDB_REBUILD_FULL)

hTable.Alter(CTDB_ALTER_FULL)

else if (status)

hTable.Alter(CTDB_ALTER_NORMAL);


See Also

CTIndex::GetStatus(), CTSegment::GetStatus(), CTTable::Alter()

TOCIndex