xflminterface IF_DataVector : public XF_RefCount
This interface contains methods for managing elements in a vector. It extends XF_RefCount. It is used to access index keys and their key components in a database. Each index key is made up of one or more componentss, depending on the definition of the index. Many of the methods described here work on a specific component of the key. The uiElementNumber parameter identifies which component is involved in the method. The components are numbered, beginning at 0 for the first component and so forth. Although the index definitions vary from index to index, each index key will reference the document where the key was derived from. Additionally, each component of the key will reference the DOM node where that component was derived from. Using the IF_DataVector interface, it is possible to specify the basic index parameters to search for keys in an index.
Method Summary |
|
void |
setDocumentID - Method to set the document Id. |
RCODE |
setID - Method to set the node identifier of a key element. |
RCODE |
setNameId - Method to set the name Id of a key element. |
RCODE |
setINT - Method to set a key element to an integer value. |
RCODE |
setINT64 - Method to set a key element to a 64 bit integer value. |
RCODE |
setUINT - Method to set a key element to an unsigned integer. |
RCODE |
setUINT64 - Method to set a key element to a 64 bit unsigned integer. |
RCODE |
setUnicode - Method to set a key element to a unicode value. |
RCODE |
setNative - Method to set a key element to a native strign value. |
RCODE |
setUTF8 - Method to set a key element to a UTF8 string value. |
RCODE |
setBinary - Method to set a key element to a binary value. |
void
|
setRightTruncated - Method to set a flag to indicate that a key element is right truncated. |
void |
setLeftTruncated - Method to set a flag to indicate that a key element to is left truncated. |
void |
clearRightTruncated - Method to clear the right truncated flag of a key element. |
void |
clearLeftTruncated - Method to clear the left truncated flag of a key element. |
FLMUINT64 |
getDocumentID - Method to retrieve the document ID of the key. |
FLMUINT64 |
getID - Method to get the node ID of a key element. |
FLMUINT |
getNameId - Method to retrieve the nameId of a key element. |
FLMUINT |
isAttr - Method to find out if a key element is referencing an attribute node. |
FLMUINT |
isDataComponent - Method to find out if a key element is a data component of the key. |
FLMUINT |
isKeyComponent - Method to find out if a key element is a key component. |
FLMUINT |
getDataLength - Method to retrieve the data length of a key element. |
FLMUINT |
getDataType - Method to retrieve the data type of a key element. |
RCODE |
getUTF8Ptr - Method to retrieve the value of a key element as a UTF8 string. |
RCODE |
getINT - Method to retrieve the value of a key element as an integer. |
RCODE |
getINT64 - Method to retrieve the value of a key element as a 64 bit integer. |
RCODE |
getUINT - Method to retrieve the value of a key element as an unsigned integer. |
RCODE |
getUINT64 - Method to retrieve the value of a key element as an unsigned 64 bit integer. |
RCODE |
getUnicode(1) - Method to retrieve the value of a key element as a unicode string. |
RCODE |
getUnicode(2) - Method to retrieve the value of a key element as a unicode string. |
RCODE |
getNative - Method to retrieve the value of a key element as a native string. |
RCODE |
getUTF8 - Method to retrieve the value of a key element as a UTF8 string. |
RCODE |
getBinary - Method to retrieve the value of a key element as binary data. |
RCODE |
outputKey - Method to extract the key into a buffer that can be used to locate the actual entry in the index. |
RCODE |
outputData - Method to output the data component(s) of the key into a buffer. |
RCODE |
inputKey - Method to populate a DataVector using a key buffer. |
RCODE |
inputData - Method to input data into a DataVector using a data buffer. |
void |
reset - A method to reset the data vector to an initial state. |
void |
getDataPtr - A method to retrieve a pointer to an element of the vector. |
Method Detail |
RCODE setDocumentID( FLMUINT64 ui64DocumentID )
Method to set the document Id. Setting this parameter indicates that the search begin with keys that originate in the specified document. Depending on the type of search that is conducted, the resulting key(s) may or may not come from the document specified.
Parameters In:
FLMUINT64 ui64DocumentID The document Id.
Parameters Out: none.
See Also: setId, setNameId, getDocumentID, getID, getNameID
RCODE setID( FLMUINT uiElementNumber,
FLMUINT64 ui64ID )
Method to set the node identifier of a key element. Setting this parameter indicates that the search begin with keys that contain elements with this identifier.
Parameters In:
FLMUINT uiElementNumber The key element number. FLMUINT64 ui64ID The node Id of the key element.
Parameters Out: none.
Example Code:
. // Example code - query the use for a node Id to use in the search, then set it in the IF_DataVector (pVector).
.
.
if (RC_BAD( rc = editTextBuffer( &pszBuffer, uiBufSize * 2, &uiTermChar)))
{
goto Exit;
}
// Save the results?
if (uiTermChar == WPK_ENTER)
{
FLMUINT64 ui64Num = f_atou64( pszBuffer);
if (RC_BAD( rc = pVector->setID( uiElementNumber, ui64Num)))
{
goto Exit;
}
}
..
.
See Also: setDocumentID, setNameId, getDocumentID, getID, getNameID
RCODE
setNameId(
FLMUINT uiElementNumber,
FLMUINT uiNameId,
FLMBOOL bIsAttr,
FLMBOOL bIsData)
Method to set the name Id of a key element. Setting this parameter indicates that the search begin with keys that contain elements with this name identifier. The name identifier is the value that the XFlaim dictionary uses to represents the field.
Parameters In:
FLMUINT uiElementNumber The key element number. FLMUINT uiNameId The name Id FLMBOOL bIsAttr Boolean flag to indicate if the component is an attribute component FLMBOOL bIsData Boolean flag to indicate if the component is a data component.
Parameters Out: none.
Example Code:
// Store the name ID from an index component definition structure. The uiDictNum field in the pIcd is the nameId of the
// field as stored in the XFlaim dictionary.
IXD * pIxd = NULL;
ICD * pIxd = NULL;
// Retrieve the index def and index component def (not shown), then set the name id etc. query
..
.
if (RC_BAD( rc = pVector->setNameId( uiDataComponent + pIxd->uiNumKeyComponents,
pIcd->uiDictNum,
(FLMBOOL)((pIcd->uiFlags & ICD_IS_ATTRIBUTE)
? TRUE
: FALSE),TRUE)))
{
goto Exit;
}
See Also: setId, setDocumentId, getDocumentID, getID, getNameID
RCODE setINT( FLMUINT uiElementNumber,
FLMINT iNum )
Method to set a key element to an integer value. This is used to set a value in the key element when the element is an integer data type. Setting this value will cause the search to begin with keys that have elements that match this value.
Parameters In:
FLMUINT uiElementNumber The key element number. FLMINT iNum The integer value of the component.
Parameters Out: none.
See Also: setINT64, setUINT, setUINT64, setUnicode, setNative, setUTF8, setBinary, getUTF8, getINT, getINT64, getUINT, getUNIT64, getUnicode(1), getUnicode(2), getNative, getUTF8Ptr, getBinary
RCODE setINT64( FLMUINT uiElementNumber,
FLMINT64 i64Num )
Method to set a key element to a 64 bit integer value. This is used to set a value in the key element when the element is a 64 bit integer data type. Setting this value will cause the search to begin with keys that have elements that match this value.
Parameters In:
FLMUINT uiElementNumber The key element number. FLMINT64 i64Num The 64 bit integer value of the component.
Parameters Out: none.
See Also: setINT, setUINT, setUINT64, setUnicode, setNative, setUTF8, setBinary, getUTF8, getINT, getINT64, getUINT, getUNIT64, getUnicode(1), getUnicode(2), getNative, getUTF8Ptr, getBinary
RCODE setUINT( FLMUINT uiElementNumber,
FLMUINT uiNum )
Method to set a key element to an unsigned integer value. This is used to set a value in the key element when the element is an unsigned integer data type. Setting this value will cause the search to begin with keys that have elements that match this value.
Parameters In:
FLMUINT uiElementNumber The key element number. FLMUINT uiNum The unsigned integer value.
Parameters Out: none.
See Also: setINT, setINT64, setUINT64, setUnicode, setNative, setUTF8, setBinary, getUTF8, getINT, getINT64, getUINT, getUNIT64, getUnicode(1), getUnicode(2), getNative, getUTF8Ptr, getBinary
RCODE setUINT64( FLMUINT uiElementNumber,
FLMUINT64 ui64Num )
Method to set a key element to a 64 bit unsigned integer value. This is used to set a value in the key element when the element is a 64 bit unsigned integer data type. Setting this value will cause the search to begin with keys that have elements that match this value.
Parameters In:
FLMUINT uiElementNumber The key element number. FLMUINT64 ui64Num The 64 but unsigned number.
Parameters Out: none.
Example Code:
if (RC_BAD( rc = editTextBuffer( &pszBuffer, uiBufSize * 2, &uiTermChar)))
{
goto Exit;
}
// Save the results?
if (uiTermChar == WPK_ENTER)
{
switch ( pVector->getDataType( uiElementNumber))
{
case FLM_UNKNOWN_TYPE:
case XFLM_NODATA_TYPE:
case XFLM_TEXT_TYPE:
{
if (RC_BAD( rc = pVector->setNative( uiElementNumber, pszBuffer)))
{
goto Exit;
}
break;
}
case XFLM_NUMBER_TYPE:
{
FLMUINT64 ui64Num = f_atou64( pszBuffer);
if (RC_BAD( rc = pVector->setUINT64( uiElementNumber, ui64Num)))
{
goto Exit;
}
break;
}
}
}
See Also: setINT, setINT64, setUINT, setUnicode, setNative, setUTF8, setBinary, getUTF8, getINT, getINT64, getUINT, getUNIT64, getUnicode(1), getUnicode(2), getNative, getUTF8Ptr, getBinary
RCODE setUnicode( FLMUINT uiElementNumber,
FLMUNICODE * puzUnicode )
Method to set a key element to a unicode value. This is used to set a value in the key element when the element is a text data type. Setting this value will cause the search to begin with keys that have elements that match this value.
Parameters In:
FLMUINT uiElementNumber The key element number. FLMUNICODE * puzUnicode The unicode string value.
Parameters Out: none.
See Also: setINT, setINT64, setUINT, setUINT64, setNative, setUTF8, setBinary, getUTF8, getINT, getINT64, getUINT, getUNIT64, getUnicode(1), getUnicode(2), getNative, getUTF8Ptr, getBinary
RCODE setNative(
FLMUINT uiElementNumber,
FLMBYTE * pszNative )
Method to set a key element to a native string value. This is used to set a value in the key element when the element is a text data type. Setting this value will cause the search to begin with keys that have elements that match this value.
Parameters In:
FLMUINT uiElementNumber The key element number. FLMBYTE * pszNative The native string value.
Parameters Out: none.
Example Code: See example code for setUINT64.
See Also: setINT, setINT64, setUINT, setUINT64, setUnicode, setUTF8, setBinary, getUTF8, getINT, getINT64, getUINT, getUNIT64, getUnicode(1), getUnicode(2), getNative, getUTF8Ptr, getBinary
RCODE setUTF8(
FLMUINT uiElementNumber,
FLMBYTE * pszUtf8 )
Method to set a key element to a UTF8 string value. This is used to set a value in the key element when the element is a text data type. Setting this value will cause the search to begin with keys that have elements that match this value.
Parameters In:
FLMUINT uiElementNumber The key element number. FLMBYTE * pszUtf8 The UTF8 string value.
Parameters Out: none.
See Also: setINT, setINT64, setUNIT, setUINT64, setUnicode, setNative, setBinary, getUTF8, getINT, getINT64, getUINT, getUNIT64, getUnicode(1), getUnicode(2), getNative, getUTF8Ptr, getBinary
RCODE setBinary( FLMUINT uiElementNumber,
void * pvBinary,
FLMUINT uiBinaryLen )
Method to set a key element to a binary value. This is used to set a value in the key element when the element is a binary data type. Setting this value will cause the search to begin with keys that have elements that match this value.
Parameters In:
FLMUINT uiElementNumber The key element number. void * pvBinary The binary data buffer. FLMUINT uiBinaryLen The size of the binary data buffer (bytes).
Parameters Out: none.
See Also: setINT, setINT64, setUINT, setUINT64, setUnicode, setNative, setUTF8, getUTF8Ptr, getINT, getINT64, getUINT, getUNIT64, getUnicode(1), getUnicode(2), getNative, getUTF8, getBinary
void setRightTruncated( FLMUINT uiElementNumber )
Method to set a flag to indicate that a key element is right truncated.
Parameters In:
FLMUINT uiElementNumber The key element number.
Parameters Out: none.
See Also: setLeftTruncated, clearRightTruncated, clearLeftTruncated
void setLeftTruncated( FLMUINT uiElementNumber )
Method to set a flag to indicate that a key element is left truncated.
Parameters In:
FLMUINT uiElementNumber The key element number.
Parameters Out: none.
See Also: setRightTruncated, clearRightTruncated, clearLeftTruncated
void clearRightTruncated( FLMUINT uiElementNumber )
Method to clear the right truncated flag of a key element.
Parameters In:
FLMUINT uiElementNumber The key element number
Parameters Out: none.
See Also: setLeftTruncated, setRightTruncated, clearLeftTruncated
void clearLeftTruncated( FLMUINT uiElementNumber )
Method to clear the right truncated flag of a key element.
Parameters In:
FLMUINT uiElementNumber The key element number.
Parameters Out: none.
See Also: setLeftTruncated, clearRightTruncated, setRightTruncated
FLMUINT64 getDocumentID( void )
Method to retrieve the document ID of the key.
Parameters In: none.
Parameters Out: none.
See Also: setId, setNameId, setDocumentID, getID, getNameID
FLMUINT64 getID( FLMUINT uiElementNumber )
Method to get the node ID of a key element.
Parameters In:
FLMUINT uiElementNumber The key element number
Parameters Out: none.
Example Code:
RCODE F_DomEditor::editIndexNode(
DME_ROW_INFO * pCurRow
)
{
RCODE rc = NE_XFLM_OK;
FLMUNICODE * puzBuffer = NULL;
char * pszBuffer = NULL;
FLMUINT uiBufSize = 0;
FLMUINT uiTermChar;
IF_DataVector * pVector = pCurRow->pVector;
FLMUINT uiElementNumber = pCurRow->uiElementNumber;
FLMUINT64 ui64NodeId;
if (!pCurRow->bUseValue)
{
flmAssert( pVector);
ui64NodeId = pVector->getID( uiElementNumber);
uiBufSize = 23; // Largest number of charcters in a 64 bit number + 3.
if (RC_BAD( rc = f_calloc( uiBufSize, &pszBuffer)))
{
goto Exit;
}
f_sprintf( pszBuffer, "%I64u", ui64NodeId);
}
else
{
puzBuffer = pCurRow->puzValue;
pCurRow->puzValue = NULL;
uiBufSize = unicodeStrLen( puzBuffer);
if (RC_BAD( rc = unicodeToAscii( puzBuffer, pszBuffer, uiBufSize)))
{
goto Exit;
}
}
if (RC_BAD( rc = editTextBuffer( &pszBuffer, uiBufSize * 2, &uiTermChar)))
{
goto Exit;
}
// Save the results?
if (uiTermChar == WPK_ENTER)
{
FLMUINT64 ui64Num = f_atou64( pszBuffer);
if (RC_BAD( rc = pVector->setID( uiElementNumber, ui64Num)))
{
goto Exit;
}
}
else
{
pCurRow->puzValue = puzBuffer;
puzBuffer = NULL;
}
Exit:
f_free( &puzBuffer);
f_free( &pszBuffer);
return rc;
}
See Also: setId, setNameId, setDocumentID, getDocumentID, getNameID
FLMUINT getNameId( FLMUINT uiElementNumber )
Method to retrieve the nameId of a key element.
Parameters In:
FLMUINT uiElementNumber The key element number
Parameters Out: none.
See Also: setId, setNameId, setDocumentID, getDocumentID, getID
FLMUINT isAttr( FLMUINT uiElementNumber )
Method to find out if a key element is referencing an attribute node.
Parameters In:
FLMUINT uiElementNumber The key element number
Parameters Out: none.
Example Code:
IF_DataVector * pVector;
.
.
.
uiNameId = pVector->getNameId( uiElementNumber);
uiPrefixLen = 0;
if (pVector->isAttr( uiElementNumber))
{
uiType = ELM_ATTRIBUTE_TAG;
}
else
{
uiType = ELM_ELEMENT_TAG;
}
..
.
See Also: isDataComponent, isKeyComponent
FLMUINT isDataComponent( FLMUINT uiElementNumber )
Method to find out if a key element is a data component of the key.
Parameters In:
FLMUINT uiElementNumber The key element number
Parameters Out: none.
Example Code:
.
.
.
// Prepare the key component number
if (pVector->isDataComponent( uiElementNumber))
{
f_sprintf( pDispVals[ *puiNumVals].szString, "D)");
pDispVals[ *puiNumVals].uiCol = uiCol;
pDispVals[ *puiNumVals].uiForeground = WPS_CYAN;
pDispVals[ *puiNumVals].uiBackground = pDomEditor->isMonochrome() ? WPS_BLACK : WPS_BLUE;
uiCol += f_strlen( pDispVals[ *puiNumVals].szString) + 2;
(*puiNumVals)++;
}
else
{
f_sprintf( pDispVals[ *puiNumVals].szString, "K)");
pDispVals[ *puiNumVals].uiCol = uiCol;
pDispVals[ *puiNumVals].uiForeground = WPS_CYAN;
pDispVals[ *puiNumVals].uiBackground = pDomEditor->isMonochrome() ? WPS_BLACK : WPS_BLUE;
uiCol += f_strlen( pDispVals[ *puiNumVals].szString) + 2;
(*puiNumVals)++;
}
..
.
See Also: isAttr, isKeyComponent
FLMUINT isKeyComponent( FLMUINT uiElementNumber )
Method to find out if a key element is a key component of the key.
Parameters In:
FLMUINT uiElementNumber The key element number
Parameters Out: none.
See Also: isDataComponent, isAttr
FLMUINT getDataLength( FLMUINT uiElementNumber )
Method to retrieve the data length of a key element.
Parameters In:
FLMUINT uiElementNumber The key element number
Parameters Out: none.
See Also: getDataType
FLMUINT getDataType( FLMUINT uiElementNumber )
Method to retrieve the data type of a key element.
Parameters In:
FLMUINT uiElementNumber The key element number
Parameters Out: none.
Example Code: See example code for getUNIT64.
See Also:
RCODE getUTF8Ptr( FLMUINT uiElementNumber,
FLMBYTE ** ppszUTF8,
FLMUINT * puiBufLen )
Method to retrieve the value of a key element as a UTF8 string.
Parameters In:
FLMUINT uiElementNumber The key element number.
Parameters Out:
FLMBYTE ** ppszUTF8 A pointer to a UTF8 encoded string. FLMUINT * puiBufLen The size of the UTF8 buffer/string returned.
See Also: setINT, setINT64, setUNIT, setUINT64, setUnicode, setNative, setUTF8, setBinary, getINT, getINT64, getUINT, getUNIT64, getUnicode(1), getUnicode(2), getNative, getUTF8, getBinary
RCODE getINT( FLMUINT uiElementNumber,
FLMINT * piNum )
Method to retrieve the value of a key element as an integer.
Parameters In:
FLMUINT uiElementNumber The key element number.
Parameters Out:
FLMINT * piNum The value of the key component as an integer.
See Also: setINT, setINT64, setUNIT, setUINT64, setUnicode, setNative, setUTF8, setBinary, getUTF8Ptr, getINT64, getUINT, getUNIT64, getUnicode(1), getUnicode(2), getNative, getUTF8, getBinary
RCODE getINT64( FLMUINT uiElementNumber,
FLMINT64 * pi64Num )
Method to retrieve the value of a key element as a 64 bit integer.
Parameters In:
FLMUINT uiElementNumber The key element number.
Parameters Out:
FLMINT64 * pi64Num The value of the key component as a 64 bit integer.
See Also: setINT, setINT64, setUNIT, setUINT64, setUnicode, setNative, setUTF8, setBinary, getUTF8Ptr, getINT, getUINT, getUNIT64, getUnicode(1), getUnicode(2), getNative, getUTF8, getBinary
RCODE getUINT( FLMUINT uiElementNumber,
FLMUINT * puiNum )
Method to retrieve the value of a key element as an unsigned integer.
Parameters In:
FLMUINT uiElementNumber The key element number.
Parameters Out:
FLMUINT * puiNum The value of the key component as an unsigned integer.
See Also: setINT, setINT64, setUNIT, setUINT64, setUnicode, setNative, setUTF8, setBinary, getUTF8Ptr, getINT, getINT64, getUNIT64, getUnicode(1), getUnicode(2), getNative, getUTF8, getBinary
RCODE getId( FLMUINT uiElementNumber,
FLMUINT64 * pui64Num )
Method to retrieve the value of a key element as an unsigned 64 bit integer.
Parameters In:
FLMUINT uiElementNumber The key element number.
Parameters Out:
FLMUINT64 * pui64Num The value of the key component as a 64 bit unsigned integer.
Example Code:
// Get the current value in the buffer or display the one in the buffer.
switch ( pVector->getDataType( uiElementNumber))
{
case XFLM_NODATA_TYPE:
{
f_sprintf( pDispVals[ *puiNumVals].szString, "no data");
break;
}
case XFLM_TEXT_TYPE:
{
uiLen = pVector->getDataLength( uiElementNumber);
if (RC_BAD( rc = f_calloc( uiLen, &pszData)))
{
goto Exit;
}
if (RC_BAD( rc = pVector->getNative( uiElementNumber, pszData, &uiLen)))
{
goto Exit;
}
f_sprintf( pDispVals[ *puiNumVals].szString, "%*s", uiLen, pszData);
break;
}
case XFLM_NUMBER_TYPE:
{
FLMUINT64 ui64Num;
if (RC_BAD( rc = pVector->getUINT64( uiElementNumber, &ui64Num)))
{
goto Exit;
}
f_sprintf( pDispVals[ *puiNumVals].szString, "0x%I64x", ui64Num);
break;
}
case XFLM_BINARY_TYPE:
{
f_sprintf( pDispVals[ *puiNumVals].szString, "binary data type");
break;
}
case FLM_UNKNOWN_TYPE:
{
f_sprintf( pDispVals[ *puiNumVals].szString, "unknown data type");
break;
}
default:
{
f_sprintf( pDispVals[ *puiNumVals].szString, "invalid data type");
break;
}
}
See Also: setINT, setINT64, setUNIT, setUINT64, setUnicode, setNative, setUTF8, setBinary, getUTF8Ptr, getINT, getINT64, getUINT, getUnicode(1), getUnicode(2), getNative, getUTF8, getBinary
RCODE getUnicode( FLMUINT uiElementNumber,
FLMUNICODE ** ppuzUnicode )
Method to retrieve the value of a key element as a unicode string. The buffer is allocated before being returned to the caller. The caller is responsible for freeing the buffer when it is no longer needed. The way to free this buffer is to call freeMem which is a method of the IF_DbSystem interface.
Parameters In:
FLMUINT uiElementNumber The key element number
Parameters Out:
FLMUNICODE ** ppuzUnicode The value of the key component as a unicode string.
See Also: setINT, setINT64, setUNIT, setUINT64, setUnicode, setNative, setUTF8, setBinary, getUTF8Ptr, getINT, getINT64, getUINT, getUNIT64, getUnicode(2), getNative, getUTF8, getBinary
RCODE getUnicode( FLMUINT uiElementNumber,
FLMUNICODE * puzUnicode,
FLMUINT * puiBufLen )
Method to retrieve the value of a key element as a unicode string. The calling function is responsible for passing the unicode buffer and the buffer length. The actual number of unicode characters will be returned.
Parameters In:
FLMUINT uiElementNumber The key element number
Parameters Out:
FLMUNICODE * puzUnicode The value of the key component as a unicode string. FLMUINT * puiBufLen The number of unicode characters returned.
See Also: setINT, setINT64, setUNIT, setUINT64, setUnicode, setNative, setUTF8, setBinary, getUTF8Ptr, getINT, getINT64, getUINT, getUNIT64, getUnicode(1), getNative, getUTF8, getBinary
RCODE getNative( FLMUINT uiElementNumber,
FLMBYTE * pszNative,
FLMUINT * puiBufLen )
Method to retrieve the value of a key element as a native string.
Parameters In:
FLMUINT uiElementNumber The key element number
Parameters Out:
FLMBYTE * pszNative The value of the key component as a native string. FLMUINT * puiBufLen The number of native characters returned.
Example Code: See example code for getUINT64.
See Also: setINT, setINT64, setUNIT, setUINT64, setUnicode, setNative, setUTF8, setBinary, getUTF8Ptr, getINT, getINT64, getUINT, getUNIT64, getUnicode(1), getUnicode(2), getUTF8, getBinary
RCODE getUTF8(
FLMUINT uiElementNumber,
FLMBYTE * pszUTF8,
FLMUINT * puiBufLen )
Method to retrieve the value of a key element as a UTF8 string.
Parameters In:
FLMUINT uiElementNumber The key element number
Parameters Out:
FLMBYTE * pszUTF8 The value of the key component as a UTF8 encoded string. FLMUINT * puiBufLen The number of UTF8 characters returned.
See Also: setINT, setINT64, setUNIT, setUINT64, setUnicode, setNative, setUTF8, setBinary, getUTF8Ptr, getINT, getINT64, getUINT, getUNIT64, getUnicode(1), getUnicode(2), getNative, getBinary
RCODE getBinary(
FLMUINT uiElementNumber,
void * pvNative,
FLMUINT * puiBufLen )
Method to retrieve the value of a key element as binary data.
Parameters In:
FLMUINT uiElementNumber The key element number
Parameters Out:
void * pvNative The value of the key component as a binary stream. FLMUINT * puiBufLen The number of bytes returned in the binary stream (buffer)
See Also: setINT, setINT64, setUNIT, setUINT64, setUnicode, setNative, setUTF8, setBinary, getUTF8Ptr, getINT, getINT64, getUINT, getUNIT64, getUnicode(1), getUnicode(2), getNative, getUTF8
RCODE outputKey( IF_Db * idpDb,
FLMUINT uiIndexNum,
FLMBOOL bOutputIds,
FLMBYTE * pucKeyBuf,
FLMUINT uiKeyBufSize,
FLMUINT * puiKeyLen )
Method to extract the key into a buffer that can be used to locate the actual entry in the index.
Parameters In:
IF_Db * ifpDb Pointer to the thread's database object. FLMUINT uiIndexNum The number of the index. FLMBOOL bOutputIds A boolean flag to indicate if the Ids should be output. FLMUINT uiKeyBufSize The size of the key buffer (bytes)
Parameters Out:
FLMBYTE * pucKeyBuf The output key. This key is the key that can be used to search the database (index) for a match. FLMUINT * puiKeyLen The length of the output key (bytes).
See Also: outputData, inputKey, inputData
RCODE outputData( IF_Db * ifpDb,
FLMUINT uiIndexNum,
FLMBYTE * pucDataBuf,
FLMUINT uiDataBufSize,
FLMUINT * puiDataLen )
Method to output the data component(s) of the key into a buffer.
Parameters In:
IF_Db * ifpDb Pointer to the thread's database object. FLMUINT uiIndexNum The number of the index. FLMUINT uiDataBufSize The size of the data buffer (bytes)
Parameters Out:
FLMBYTE * pucDataBuf The output data. Some indexes may specify a data component. FLMUINT * puiDataLen The length of the output data (bytes).
See Also: outputKey, inputKey, inputData
RCODE inputKey( IF_Db * ifpDb,
FLMUINT uiIndexNum,
FLMBYTE * pucKey,
FLMUINT uiKeyLen )
Method to populate an IF_DataVector object using a key buffer.
Parameters In:
IF_Db * ifpDb Pointer to the thread's database object. FLMUINT uiIndexNum The number of the index. FLMBYTE * pucKey The key to be parsed into the F_DataVector object. FLMUINT uiKeyLen The length of the key (bytes).
Parameters Out: none.
See Also: outputData, outputKey, inputData
RCODE inputData(
IF_Db * ifpDb,
FLMUINT uiIndexNum,
FLMBYTE * pucData,
FLMUINT uiDataLen )
Method to input data into an IF_DataVector object using a data buffer.
Parameters In:
IF_Db * ifpDb Pointer to the thread's database object. FLMUINT uiIndexNum The number of the index. FLMBYTE * pucData The data buffer to be parsed into the F_DataVector object. FLMUINT uiDataLen The length of the data (bytes).
Parameters Out: none.
See Also: outputData, inputKey, outputKey
void inputData( void )
This is a method to reset the data vector to an initial state.
Parameters In: none.
Parameters Out: none.
See Also:
void getDataPtr( FLMUINT uiElementNumber )
This is a method to retrieve a pointer to an element of the vector.
Parameters In:
FLMUINT uiElementNumber The number of the vector element.
Parameters Out: none.
See Also: