Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbSetExtensionHint

Set extension hint in the handle to help with proper file name building at table open time.

Declaration

CTDBRET ctdbDECL ctdbSetExtensionHint(CTHANDLE Handle, EXT_INFO ExtHint)

Description

Calling ctdbSetExtensionHint(hDatabase,...) on a database handle allows setting the extension hint for ctdbAddTable() and ctdbAddTableXtd().

Parameters:

  • Handle [IN] - Table Handle.
  • ExtHint [IN] - The extension hint for ctdbOpen, ctdbAddTable, ctdbAddTableXtd:

    EXT_DETECT - Backward compatible behavior: FairCom DB API will detect if the file terminates with ".*" and remove it from the file name and then add the current table extension.

    EXT_PRESENT - File names contain file extension: The file name is specified with file extension; FairCom DB API will detect if the file terminates with ".*" and use what matches as extension, in case of no match the extension is set to "" (none).

    EXT_MISSING - File names do not contain file extension: The file name is specified without extension; FairCom DB API will add the current extension.

    For ctdbAddTableXtd only:

    EXT_PRESENT_L - Logical file name contains file extension; physical does not.

    EXT_PRESENT_P - Physical file name contains file extension; logical does not.

Return Values

Returns CTDBRET_OK on success, else returns the appropriate error code.

TOCIndex