more TDB
This commit is contained in:
parent
9842da7909
commit
df0ab85f80
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include "tdbInt.h"
|
||||
|
||||
#if 0
|
||||
struct SBtCursor {
|
||||
SBTree *pBtree;
|
||||
SPgno pgno;
|
||||
|
@ -39,9 +40,9 @@ typedef struct __attribute__((__packed__)) {
|
|||
|
||||
typedef int (*BtreeCmprFn)(const void *, const void *);
|
||||
|
||||
#define BTREE_PAGE_HDR(pPage) NULL /* TODO */
|
||||
#define BTREE_PAGE_HDR(pPage) NULL /* TODO */
|
||||
#define BTREE_PAGE_PAYLOAD_AT(pPage, idx) NULL /*TODO*/
|
||||
#define BTREE_PAGE_IS_LEAF(pPage) 0 /* TODO */
|
||||
#define BTREE_PAGE_IS_LEAF(pPage) 0 /* TODO */
|
||||
|
||||
static int btreeCreate(SBTree **ppBt);
|
||||
static int btreeDestroy(SBTree *pBt);
|
||||
|
@ -161,4 +162,5 @@ static int btreeCursorMoveToChild(SBtCursor *pBtCur, SPgno pgno) {
|
|||
SPgFile *pPgFile;
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,12 @@
|
|||
|
||||
#include "tdbInt.h"
|
||||
|
||||
struct STEnv {
|
||||
char * rootDir;
|
||||
SPCache *pCache;
|
||||
int jfd;
|
||||
};
|
||||
|
||||
#if 0
|
||||
struct STDbEnv {
|
||||
char * rootDir; // root directory of the environment
|
||||
|
|
|
@ -23,6 +23,7 @@ extern "C" {
|
|||
typedef struct SBTree SBTree;
|
||||
typedef struct SBtCursor SBtCursor;
|
||||
|
||||
#if 0
|
||||
// SBTree
|
||||
int btreeOpen(SBTree **ppBt, SPgFile *pPgFile);
|
||||
int btreeClose(SBTree *pBt);
|
||||
|
@ -36,6 +37,7 @@ int btreeCursorNext(SBtCursor *pBtCur);
|
|||
struct SBTree {
|
||||
SPgno root;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
const char* tdbEnvGetRootDir(TENV* pEnv);
|
||||
SPgFile* tdbEnvGetPageFile(TENV* pEnv, const uint8_t fileid[]);
|
||||
SPgCache* tdbEnvGetPgCache(TENV* pEnv);
|
||||
int tdbEnvRgstPageFile(TENV* pEnv, SPgFile* pPgFile);
|
||||
int tdbEnvRgstDB(TENV* pEnv, TDB* pDb);
|
||||
#endif
|
||||
typedef struct STEnv STEnv;
|
||||
|
||||
int tdbEnvOpen(STEnv **ppEnv);
|
||||
int tdbEnvClose(STEnv *pEnv);
|
||||
|
||||
int tdbEnvBegin(STEnv *pEnv);
|
||||
int tdbEnvCommit(STEnv *pEnv);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -116,13 +116,13 @@ typedef TD_DLIST_NODE(SPgFile) SPgFileListNode;
|
|||
|
||||
#include "tdbUtil.h"
|
||||
|
||||
// #include "tdbBtree.h"
|
||||
#include "tdbBtree.h"
|
||||
|
||||
#include "tdbPCache.h"
|
||||
|
||||
#include "tdbPFile.h"
|
||||
|
||||
// #include "tdbEnv.h"
|
||||
#include "tdbEnv.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue