Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbBuildTargetKey

Build a target key based on data in record buffer.

Declaration

CTDBRET ctdbBuildTargetKey(CTHANDLE Handle, CTFIND_MODE FindMode,

pVOID targetkey, pVRLEN targetlen)

Description

ctdbBuildTargetKey() builds a target key based on data in the record buffer.

  • Handle [in] the record handle.
  • FindMode [in] the find mode. Available values are found in c-treeDB API definitions.
  • targetkey [out] the target key.
  • targetlen [in/out] the target key length. Before calling ctdbBuildTargetKey() set targetlen with the size of the targetkey buffer.

Note: The FindMode CTFIND_EQ requires that the target contains values for all segments that compose the index and the index cannot allow duplicates.

Note: When using this function with the FindTarget() function, you must supress the transformation of the already-transformed key in FindTarget() since it must not be transformed. In order to do this, you may define a macro NOTRANSFORM with a value of 0x1000 and OR it into the mode passed to FindTarget().

Returns

ctdbBuildTargetKey() returns CTDBRET_OK on success, or c-treeDB API error code on failure.

TOCIndex