Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

CTTable::PartAdminByKey

Performs an administrative partition operation on the partition specified by key value.

Declaration

COUNT PartAdminByKey(pVOID key, CTPART_MODE_E partmode);

Description

PartAdminByKey() manages the partitions for a table.

  • keyval [in] - pointer to a partition key value that has been transformed
  • partmode [in] - partition operation mode. partmode is one of:

     

    CTPART_PURGE

    delete a partition

     

    CTPART_ADD

    add a partition

     

    CTPART_ARCHIVE

    archive a partition

     

    CTPART_BASE

    modify the lower limit partition number value

     

    CTPART_ACTIVATE

    activate an archived partition

     

    CTPART_STATUS

    return the partition status in partstatus

Return Values

CTDBRET_NOERROR is returned if no error.

If CTPART_STATUS is passed as a partition mode, then one of the following partstatus values is returned:

pmSTATUSnone

0

partition member does not exist

pmSTATUSexst

1

partition member is active

pmSTATUSopnd

2

partition member is active and currently open

pmSTATUSarhv

3

partition member is archived

pmSTATUSpurg

4

partition member was purged

pmSTATUSparc

19

partition member is pending archive

pmSTATUSppnd

20

partition member is pending purge

See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values.

See Also

CTTable::PartAdminByName(), CTTable::PartAdminByNumber()

TOCIndex