Product Documentation

Automatic Data Aggregation

Previous Topic

Next Topic

FairCom DB C++ Support for Partitions and Auto-Purge

Support for creating partitions and Auto-Purge has been added to the FairCom DB C++ API. New methods have been implemented in the CTTable class to expose the c-treeDB partition file definition available in FairCom DB.

CTTable::GetPartitionIndexNbr

NINT CTTable::GetPartitionIndexNbr()

Get the Partition index number.

Returns:

The partition index number (-1 if none)

CTTable::SetPartitionIndexNbr

Set the Partition index number.

void CTTable::SetPartitionIndexNbr(NINT idxno)

Parameters:

  • idxno [IN] - The index number for partition key*

CTTable::SetPartitionNumberBits

Set the number of bits used to store the raw partition number. By default, 16 bits of the 64-bit record offset are used to reference the raw partition number, allowing each partitioned file to support up to 65535 member files over its lifetime. This function (when called before creating the file) allows adjusting this. A value of 0 defaults to 16 bits, values less than 4 bits default to 4 bits (maximum 15 member files), and 32 bits is the maximum value.

void CTTable::SetPartitionNumberBits(UCOUNT bitno)

Parameters:

  • bitno [IN] - Number of bits to be used for raw partition number

CTTable::SetPartitionRule

Set partition rule using an expression.

void CTTable::SetPartitionRule(pTEXT expr)

Parameters:

  • expr [IN] - Expression that evaluates into an integer that will be used as partition number

CTTable::SetPartitionMaximumActive

Set the number of maximum active partitions, when exceeding the maximum c-tree's auto purging feature takes care of purging.

void CTTable::SetPartitionMaximumActive(UCOUNT max)

Parameters:

  • max [IN] - Number of maximum active partition members

TOCIndex