Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbBatchMode

Retrieve the current batch mode.

DECLARATION

CTBATCH_MODE ctdbDECL ctdbBatchMode(CTHANDLE Handle);

DESCRIPTION

ctdbBatchMode() retrieves the current batch mode. The batch mode is set by calling ctdbSetBatch() function. If a batch operation is not active, ctdbBatchMode() return CTBATCH_NONE. Handle must be a record handle associated with an opened table.

RETURNS

ctdbBatchMode() returns the current batch mode or CTBATCH_NONE if no batch operation is currently active.

MODE

Description

CTBATCH_NONE

No active batch.

CTBATCH_GET

Retrieve a group of related records by partial key

CTBATCH_RANGE

Retrieve a group of related records based on an index range expression

CTBATCH_PHYS

Retrieve records from a table in physical order. The starting record for the batch retrieval may be specified.

CTBATCH_DEL

Delete a group of related records by partial key.

CTBATCH_INS

Insert a group of records

Refer to the c-treeDB API Batch Operations chapter for complete details concerning all of the optional batch modes.

EXAMPLE

/* check if a batch operation is in progress */

if (ctdbBatchMode(hRecord) != CTBATCH_NONE)

printf("Batch operation is underway\n");

else

printf("No batch operations\n");

SEE ALSO

ctdbBatchLoaded(), ctdbBatchLocked(), ctdbBatchTotal(), ctdbEndBatch(), ctdbInsertBatch(), ctdbIsBatchActive(), ctdbNextBatch(), ctdbSetBatch()

TOCIndex