PRMIIDX82
Create an index with the data file open in shared mode.
Declaration
CTERR PRMIIDX82(pIFIL ifilptr, pXCREblk pxcreblk, ULONG numberOfExtendedCreateBlocks, ctINDEX_ATTRIBUTES *pIndexAttributes);
Description
Beginning with V13, a condition can be added to the index when creating the index with the data file open in shared mode. Use this function to add a permanent index to a data file. The function accepts ifilptr and pxcreblk parameters that are identical in usage to PRMIIDX8(). The two additional parameters indicate the number of extended create blocks in the pxcreblk array and provide the desired index attributes:
The ctINDEX_ATTRIBUTES structure contains a version so that it can be modified in future versions to support passing additional index attributes. Version 1 of the structure is defined as follows:
/* index attributes for PRMIIDX82 */
typedef struct ctIndexAttributes_t {
ULONG structureVersion;
ULONG numberOfExtendedKeySegments;
ULONG numberOfIndexConditions;
pctKSEGDEF *extendedKeySegments;
cpTEXT *indexConditions;
} ctINDEX_ATTRIBUTES;
To use the index attributes structure, set structureVersion to ctINDEX_ATTRIBUTES_VERS_V01, set numberOfExtendedKeySegments to the number of extended key segments in the extendedKeySegments array (specify zero and NULL if no extended key segments are supplied), and set numberOfIndexConditions to the number of index conditions in the indexConditions array (specify zero and NULL if no index conditions are specified).
Return Values
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
CTDBRET_OK |
Successful operation. |
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values.