Added support for large field values (up to 4 GB), async and direct I/O on Linux and Solaris, and performed major code cleanup.
git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@213 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
@@ -37,13 +37,13 @@ FSTATIC RCODE flmKeyRetrieveCS(
|
||||
FSTATIC RCODE flmNextKey(
|
||||
FDB * pDb,
|
||||
LFILE * pLFile,
|
||||
BTSK_p pStack,
|
||||
BTSK * pStack,
|
||||
FLMUINT * pudRefDrn);
|
||||
|
||||
|
||||
/*API~***********************************************************************
|
||||
/****************************************************************************
|
||||
Desc: Retrieves a key from an index based on a passed-in GEDCOM tree and DRN.
|
||||
*END************************************************************************/
|
||||
****************************************************************************/
|
||||
FLMEXP RCODE FLMAPI FlmKeyRetrieve(
|
||||
HFDB hDb,
|
||||
FLMUINT uiIndex,
|
||||
@@ -57,10 +57,10 @@ FLMEXP RCODE FLMAPI FlmKeyRetrieve(
|
||||
{
|
||||
BTSK stack[ BH_MAX_LEVELS];
|
||||
FLMBOOL bStackInitialized = FALSE;
|
||||
BTSK_p pStack = &stack[0];
|
||||
BTSK * pStack = &stack[0];
|
||||
DIN_STATE dinState;
|
||||
FDB * pDb = (FDB *)hDb;
|
||||
IXD_p pIxd = NULL;
|
||||
IXD * pIxd = NULL;
|
||||
LFILE * pLFile;
|
||||
FLMBYTE * pSearchKeyBuf = NULL;
|
||||
FLMBYTE * pKeyBuf = NULL;
|
||||
@@ -430,14 +430,11 @@ Exit_CS:
|
||||
return( rc);
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
Name : flmKeyRetrieveCS
|
||||
Area : RETRIEVAL
|
||||
Desc: Retrieves a key from an index based on a passed-in GEDCOM tree and DRN.
|
||||
VISIT: On reading data records and FO_EXCL, increment the DRN instead of
|
||||
positioning to the DRN and then scanning to the next record.
|
||||
*END************************************************************************/
|
||||
****************************************************************************/
|
||||
FSTATIC RCODE flmKeyRetrieveCS(
|
||||
FDB * pDb,
|
||||
FLMUINT uiIndex,
|
||||
@@ -483,7 +480,7 @@ FSTATIC RCODE flmKeyRetrieveCS(
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
if( pCSContext->uiServerFlaimVer >= FLM_VER_4_50)
|
||||
if( pCSContext->uiServerFlaimVer >= FLM_FILE_FORMAT_VER_4_50)
|
||||
{
|
||||
if( uiIndex)
|
||||
{
|
||||
@@ -586,7 +583,7 @@ Desc: Go to the next key given a valid cursor. Get & position to reference
|
||||
FSTATIC RCODE flmNextKey(
|
||||
FDB * pDb,
|
||||
LFILE * pLFile,
|
||||
BTSK_p pStack,
|
||||
BTSK * pStack,
|
||||
FLMUINT * puiRefDrn)
|
||||
{
|
||||
RCODE rc;
|
||||
@@ -636,3 +633,45 @@ FSTATIC RCODE flmNextKey(
|
||||
Exit:
|
||||
return( rc);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Desc: Given an input key tree a FLAIM collated key will be built and returned
|
||||
to the user.
|
||||
****************************************************************************/
|
||||
FLMEXP RCODE FLMAPI FlmKeyBuild(
|
||||
HFDB hDb,
|
||||
FLMUINT uiIxNum,
|
||||
FLMUINT uiContainer,
|
||||
FlmRecord * pRecord,
|
||||
FLMUINT uiFlag,
|
||||
FLMBYTE * pKeyBuf,
|
||||
FLMUINT * puiKeyLenRV)
|
||||
{
|
||||
RCODE rc;
|
||||
FDB * pDb = (FDB *)hDb;
|
||||
IXD * pIxd;
|
||||
FLMBOOL bImplicitTrans = FALSE;
|
||||
|
||||
if( RC_OK( rc = fdbInit( pDb, FLM_READ_TRANS,
|
||||
TRUE, 0, &bImplicitTrans)))
|
||||
{
|
||||
if( RC_OK( rc = fdictGetIndex(
|
||||
pDb->pDict, pDb->pFile->bInLimitedMode,
|
||||
uiIxNum, NULL, &pIxd)))
|
||||
{
|
||||
|
||||
/* Build the collated key */
|
||||
|
||||
rc = KYTreeToKey( pDb, pIxd, pRecord, uiContainer,
|
||||
pKeyBuf, puiKeyLenRV, uiFlag );
|
||||
}
|
||||
}
|
||||
|
||||
if( bImplicitTrans)
|
||||
{
|
||||
(void)flmAbortDbTrans( pDb);
|
||||
}
|
||||
|
||||
(void)fdbExit( pDb);
|
||||
return( rc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user