4.3.87 ctdbFindRecord
Find a record using the FindMode as the find strategy.
Declaration
CTDBRET ctdbFindRecord(CTHANDLE Handle, CTFIND_MODE FindMode)Description
ctdbFindRecord finds a record using the FindMode strategy.
- Handle [in] the record handle.
- FindMode [in] the mode to use to look for the record in the table. The find modes are listed in Section 4.1 "c-treeDB definitions" on page 4-1.
Before using ctdbFindRecord,
Note: The Find Mode CTFIND_EQ requires that the target contains values for all segments that compose the index and the index cannot allow duplicates.Use ctdbFirstRecord to retrieve the first record on a table, ctdbNextRecord to retrieve the next record on a table, ctdbPrevRecord to retrieve the previous record on a table, and ctdbLastRecord to retrieve the last record on a table. Use ctdbFindTarget to find a record using a given target key.
Returns
ctdbFindRecord returns CTDBRET_OK if the record was found or c-treeDB C API error on failure.
Example
ctdbClearRecord(hRec);ctdbSetDefaultIndex(hRec, 1);ctdbSetFieldAsString(hRec, ctdbGetFieldNumberByName(hRec, "Name"), name));ctdbFindRecord(hRec, CTFIND_EQ);See also
ctdbAllocRecord, ctdbFirstRecord, ctdbNextRecord, ctdbPrevRecord, ctdbLastRecord, ctdbFindTarget, ctdbClearRecord, ctdbSetDefaultIndex
|
FairCom Corporation www.faircom.com |