more TDB
This commit is contained in:
parent
e19fdafda7
commit
98a1762aba
|
@ -34,6 +34,8 @@ int tdbEnvCreate(TENV **ppEnv);
|
||||||
int tdbEnvOpen(TENV **ppEnv);
|
int tdbEnvOpen(TENV **ppEnv);
|
||||||
int tdbEnvClose(TENV *pEnv);
|
int tdbEnvClose(TENV *pEnv);
|
||||||
|
|
||||||
|
int tdbEnvCommit(TENV *pEnv);
|
||||||
|
|
||||||
int tdbEnvSetPageSize(TENV *pEnv, pgsz_t szPage);
|
int tdbEnvSetPageSize(TENV *pEnv, pgsz_t szPage);
|
||||||
int tdbEnvSetCacheSize(TENV *pEnv, cachesz_t szCache);
|
int tdbEnvSetCacheSize(TENV *pEnv, cachesz_t szCache);
|
||||||
pgsz_t tdbEnvGetPageSize(TENV *pEnv);
|
pgsz_t tdbEnvGetPageSize(TENV *pEnv);
|
||||||
|
@ -44,6 +46,14 @@ int tdbCreate(TDB **ppDb);
|
||||||
int tdbOpen(TDB **ppDb, const char *fname, const char *dbname, TENV *pEnv);
|
int tdbOpen(TDB **ppDb, const char *fname, const char *dbname, TENV *pEnv);
|
||||||
int tdbClose(TDB *pDb);
|
int tdbClose(TDB *pDb);
|
||||||
|
|
||||||
|
int tdbSetKeyLen(TDB *pDb, int klen);
|
||||||
|
int tdbSetValLen(TDB *pDb, int vlen);
|
||||||
|
int tdbSetDup(TDB *pDb, int dup);
|
||||||
|
|
||||||
|
int tdbGetKeyLen(TDB *pDb, int *pklen);
|
||||||
|
int tdbGetValLen(TDB *pDb, int *pvlen);
|
||||||
|
int tdbGetDup(TDB *pDb, int *pdup);
|
||||||
|
|
||||||
// TDBC
|
// TDBC
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -31,6 +31,7 @@ int btreeClose(SBTree *pBt);
|
||||||
int btreeCursorOpen(SBtCursor *pBtCur, SBTree *pBt);
|
int btreeCursorOpen(SBtCursor *pBtCur, SBTree *pBt);
|
||||||
int btreeCursorClose(SBtCursor *pBtCur);
|
int btreeCursorClose(SBtCursor *pBtCur);
|
||||||
int btreeCursorMoveTo(SBtCursor *pBtCur, int kLen, const void *pKey);
|
int btreeCursorMoveTo(SBtCursor *pBtCur, int kLen, const void *pKey);
|
||||||
|
int btreeCursorNext(SBtCursor *pBtCur);
|
||||||
|
|
||||||
struct SBTree {
|
struct SBTree {
|
||||||
pgno_t root;
|
pgno_t root;
|
||||||
|
|
|
@ -93,6 +93,19 @@ typedef TD_DLIST(SPgFile) SPgFileList;
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
#define TDB_VARIANT_LEN -1
|
||||||
|
|
||||||
|
#define TDB_DECODE_PAYLOAD(pPayload, keyLen, pKey, valLen, pVal) \
|
||||||
|
do { \
|
||||||
|
if ((keyLen) == TDB_VARIANT_LEN) { \
|
||||||
|
/* TODO */ \
|
||||||
|
} \
|
||||||
|
if ((valLen) == TDB_VARIANT_LEN) { \
|
||||||
|
/* TODO */ \
|
||||||
|
} \
|
||||||
|
/* TODO */ \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#include "tdbUtil.h"
|
#include "tdbUtil.h"
|
||||||
|
|
||||||
#include "btree.h"
|
#include "btree.h"
|
||||||
|
|
Loading…
Reference in New Issue