Product Documentation

FairCom Callbacks Developer's Guide

Previous Topic

Next Topic

c-treeDB API Functions for User-Defined Hot Alter Table Field Conversion Callback

FairCom DB now supports passing the name of a shared library and name of a field conversion function to the hot alter table function. This permits application developers to set a user-defined field conversion function to convert field values from one version of a schema to another version.

We now extend our c-treeDB API to specify the conversion callback library at a table level and the callback conversion function name at a field level. If the callback library name at table level is not specified we retrieve the last one used. If no callback library has ever been specified we return an error.

c-treeDB C API Functions

ctdbSetFieldHotAlterCallbackFunction() sets the field hot alter table callback function.


CTDBRET ctdbDECL ctdbSetFieldHotAlterCallbackFunction(CTHANDLE Handle, pTEXT functionName)

Parameters: Handle [IN]*

Field handle **

funtionName [IN]* The name of the function in the library specified in the table handle**

Returns: CTDBRET_OK on success

ctdbSetTableHotAlterCallbackLib() sets the callback library name for hot alter table

CTBOOL ctdbDECL ctdbSetTableHotAlterCallbackLib(CTHANDLE Handle, pTEXT libName)

Parameters: Handle [IN]

Table handle.*

libName [IN]

Libarary name**

Returns: c-treeDB YES or NO

ctdbGetTableHotAlterCallbackLib() returns the callback library name for hot alter table

pTEXT ctdbDECL ctdbGetTableHotAlterCallbackLib(CTHANDLE Handle)

Parameters: Handle [IN]

Table handle.*

Returns: pointer to the internal library name buffer

TOCIndex