Product Documentation

c-treeACE V11.0 Update Guide

Previous Topic

Next Topic

c-treeDB Partition File API Support

Partitioned file support is extended to the c-treeDB API. While creating a file it is possible to call ctdbSetTablePartitionIndexNbr to set the partition index, ctdbSetTablePartitionNumberBits to set the number of bits reserved for partition numbers, and ctdbSetTablePartitionRule to set the partition rule.

On existing tables, after calling the above function you then call ctdbAlterTable forcing an CTDB_ALTER_FULL action.


ctdbSetTablePartitionRule

This c-treeDB function sets partition rules:

ctdbEXPORT CTDBRET ctdbDECL ctdbSetTablePartitionRule(CTHANDLE Handle, pTEXT expr);

  • expr - The expression, expr, will be evaluated against the key for the partition index. It must evaluate to an integer.

    The partition rule uses standard c-tree expression syntax.

TOCIndex