Set the specified CTDB runtime behavior status.
Declaration
CTDBRET ctDECL ctdbSetBehavior(CTHANDLE Handle, LONG item, CTBOOL state)
Parameters
Valid Item values include:
Item |
Description |
Default |
CTDB_BEHAVE_CHECKDATETIME |
Check for valid date/time during ctdbSetFieldAs* calls |
YES |
CTDB_BEHAVE_ZERODATE_ISNULL |
Set the field to NULL when the date value is 0 |
NO |
CTDB_BEHAVE_NUMERIC_CHECK_DEF |
When setting a CT_NUMBER field value, impose the defined scale and precision, rounding if necessary |
NO |
CTDB_BEHAVE_CTJSON_CHECK_VALUE |
When setting a CTJSON field value, validate it as valid JSON |
YES |
CTDB_BEHAVE_OBJECT_NAME_TRIM_CHECK |
Check for valid name (trimmed) |
YES |
CTDB_BEHAVE_DODA_CHECK |
Check for valid DODA field lengths |
YES |
CTDB_BEHAVE_PAD_FIXED_BINARY |
Pad with 0x00 fixed binary fields |
YES |
CTDB_BEHAVE_DODA_CHECK_STRING_MIN1 |
String length definition in DODA is either 0, or accounts for at least 1 significant byte |
YES |
Returns
ctdbSetBehavior returns CTDBRET_OK on success, or a FairCom DB API error on failure.
See also