Previous Topic

Next Topic

Overview of the c-treeACE SQL Types SDK

c-treeDB is a high-level, easy to use API in addition to the traditional c-tree APIs: ISAM and low-level. c-treeDB is intended as the standard for c-treeACE programming. When compared to ISAM and low-level APIs, c-treeDB introduced a formal definition on the structure of data and index files, introduced concepts such as ROWID and NULL field support, and more specifically, a formal definition for each field type supported.

Existing application data and index files, i.e. data created prior to the publication of the c-treeDB API, may have implemented certain field types in a way that may be incompatible with c-treeDB. Hence, they will be incompatible with c-treeACE SQL as c-treeACE SQL relies upon c-treeDB functionality. Field types such as CT_DATE, CT_TIME and CT_TIMES are probably the most common examples of existing data that may be incompatible with c-treeDB.

The c-treeDB Callback feature was implemented to provide our customers a means to intercept certain c-treeDB operations and add custom code to manipulate record buffer layouts or change field data on the fly and make the record and field data compatible with c-treeDB. Please refer to the “c-treeDB Callback” document for detailed information concerning this new feature.

The c-treeDB Callback feature was introduced into c-treeACE SQL to allow for easy and transparent translation of customers’ existing ISAM or low-level native data to a data format that is compatible with c-treeACE SQL requirements. This new feature is called c-treeACE SQL Callbacks.

This section describes the utilization of the c-treeACE SQL Callback feature to introduce code to allow existing ISAM data to be used transparently with c-treeACE SQL. When c-treeACE SQL reads data from native ISAM tables, the callback code translates the data record to make every data field compatible with SQL. When c-treeACE SQL writes new data, or updates existing data, the callback code will translate the data in SQL format to comply with the native format used by the ISAM application. The ISAM table will be available for use with c-treeACE SQL, yet remains compatible with existing ISAM applications.