Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbGetFieldNullFlag

Read the SQL null flag for this field's column. This flag indicates whether the SQL layer allows NULL values to be written to the fields of this column or not.

Declaration

CTBOOL ctdbGetFieldNullFlag(CTHANDLE Handle)

Description

ctdbGetFieldNullFlag() retrieves the field null flag.

  • Handle [in] the Field Handle.

The c-treeDB API null flag controls the NOT NULL property of a column in the SQL layer. If the flag is TRUE, it means the SQL “NOT NULL” property of the column is enabled, which means that that column is not allowed to have NULL values. If the flag is FALSE, it means the SQL “NOT NULL” property of the column is disabled, which means that that column is allowed to have NULL values. Setting this column has no effect on individual record null values: it is NOT enforced at the c-treeDB API layer. It is useful to set this flag in c-tree data files before SQL import such that the property is maintained.

Note: This function has no direct relation to ctdbIsNullField(), which returns if the NULL bit is set for one field in one record.

Returns

ctdbGetFieldNullFlag() returns the field NULL flag.

See also

ctdbGetField(), ctdbGetFieldNbr(), ctdbGetFieldLength(), ctdbGetFieldName(), ctdbSetFieldNullFlag(), ctdbIsNullField()

TOCIndex