ctdbNextRecord
Get the next record on a table.
Declaration
CTDBRET ctdbNextRecord(CTHANDLE Handle)
Description
ctdbNextRecord() retrieves the next record on a table and copies the record data from disk into the specified record handle’s record buffer, and advances the current record to the next record of that table. Note that if session-wide record locking is enabled, this function will also lock the record it retrieves.
If sets are enabled by ctdbRecordSetOn(), ctdbNextRecord() will retrieve the next record in the set. Use ctdbFirstRecord() to retrieve the first record on a table, ctdbPrevRecord() to retrieve the previous record on a table, and ctdbLastRecord() to retrieve the last record on a table. Use ctdbFindRecord() to find a specific record on a table. ctdbNextRecord() and ctdbPrevRecord() must be used after at least one call was done to ctdbFirstRecord(), ctdbLastRecord(), or ctdbFindRecord().
Returns
ctdbNextRecord() returns CTDBRET_OK on success, or INOT_ERR (101) if the current record was the last record of the table, or ICUR_ERR (100) if there is no current record, or a c-treeDB API error on failure.
See also
ctdbAllocRecord(), ctdbFirstRecord(), ctdbPrevRecord(), ctdbLastRecord(), ctdbFindRecord(), ctdbRecordSetOn()