Product Documentation

c-treeACE V11.0 Update Guide

Previous Topic

Next Topic

c-treeDB Callback Updates for Types SDK

An array of function callbacks are available in c-treeDB for table and field level control. These are extensively used by the c-treeACE SQL types SDK callback implementations. This is required, for example, when working with existing data types that are not compatible with expected SQL types. Several modifications were done to make this more effective across all data types.

When field callbacks are in place to manipulate field type and size, the SQL interface calls the following for LONG VARCHAR fields:

  1. ctdbGetFieldSize() - Given a record handle and a field number, it returns its defined field size from the table definition.
  2. ctdbGetFieldDataLength() - Given a record handle and a field number, it returns the field content size (the number of bytes actually being consumed by the data in the field).

To make these two functions work properly with field callback in place, these changes were made:

  1. ctdbGetFieldSize() now takes advantage of the existing CTDB_FIELD_GET_LENGTH callback.
  2. A new callback, CTDB_FIELD_DATA_LEN, is called by ctdbGetFieldDataLength().

TOCIndex