Product Documentation

V9 Update Guide

Previous Topic

Next Topic

Resources for c-treeDB

It can be advantageous at times to attach auxiliary information to a particular table that does not conform to the record structure of that table. For example, features such as versioning or special flags relating to the status of the table. Generally, this information is not repeated in every record of the table. You could create a special record with a special key value that you do not process as you do your regular records. Ultimately, however, this forces exception handling routines for this special case and can impose a heavy maintenance cost on the life cycle of the application.

FairCom DB provides a unique feature created for exactly this purpose: c-tree Plus Resources. Resources are special variable-length records stored within your data file, whether you use fixed or variable-length records. A set of API functions provide access to create, update and delete these resource records. These records do not require a key in an index, therefore your program does not access them via routine data handling functions.

Resources provide critical support for many advanced c-tree Plus features. FairCom defined resources allow seamless functionality of many of the c-tree Plus Drivers, Incremental ISAM functionality, conditional index support, c-treeDB and FairCom DB SQL. These resources continue to be important as new technology is added. Resources are added either automatically by some c-tree Plus features or manually by the developer. The use of resources requires the RESOURCES to be defined in the c-tree Plus library, which is the default.

c-treeDB now offers support for adding, managing and deleting c-tree resources. Review the complete documentation in the c-treeDB C and C++ Developer Guides for complete information on this new c-treeDB feature.

C API Functions

C++ CTResource Class Methods

  • ctdbAddResource
  • ctdbAllocResource
  • ctdbDeleteResource
  • ctdbFindResource
  • ctdbFirstResource
  • ctdbFreeResource
  • ctdbGetResourceData
  • ctdbGetResourceDataLength
  • ctdbGetResourceName
  • ctdbGetResourceNumber
  • ctdbGetResourceType
  • ctdbIsResourceLocked
  • ctdbNextResource
  • ctdbSetResourceData
  • ctdbSetResourceName
  • ctdbSetResourceNumber
  • ctdbSetResourceType
  • ctdbUnlockResource
  • ctdbUpdateResource
  • Add
  • Delete
  • Find
  • First
  • GetData
  • GetDataLength
  • GetName
  • GetNumber
  • GetType
  • IsLocked
  • Next
  • SetData
  • SetName
  • SetNumber
  • SetType
  • Unlock
  • Update

TOCIndex