提交 98a1762a 编写于 作者: H Hongze Cheng

more TDB

上级 e19fdafd
......@@ -34,6 +34,8 @@ int tdbEnvCreate(TENV **ppEnv);
int tdbEnvOpen(TENV **ppEnv);
int tdbEnvClose(TENV *pEnv);
int tdbEnvCommit(TENV *pEnv);
int tdbEnvSetPageSize(TENV *pEnv, pgsz_t szPage);
int tdbEnvSetCacheSize(TENV *pEnv, cachesz_t szCache);
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 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
#ifdef __cplusplus
......
......@@ -31,6 +31,7 @@ int btreeClose(SBTree *pBt);
int btreeCursorOpen(SBtCursor *pBtCur, SBTree *pBt);
int btreeCursorClose(SBtCursor *pBtCur);
int btreeCursorMoveTo(SBtCursor *pBtCur, int kLen, const void *pKey);
int btreeCursorNext(SBtCursor *pBtCur);
struct SBTree {
pgno_t root;
......
......@@ -93,6 +93,19 @@ typedef TD_DLIST(SPgFile) SPgFileList;
} \
} 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 "btree.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册