提交 df0ab85f 编写于 作者: H Hongze Cheng

more TDB

上级 9842da79
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "tdbInt.h" #include "tdbInt.h"
#if 0
struct SBtCursor { struct SBtCursor {
SBTree *pBtree; SBTree *pBtree;
SPgno pgno; SPgno pgno;
...@@ -162,3 +163,4 @@ static int btreeCursorMoveToChild(SBtCursor *pBtCur, SPgno pgno) { ...@@ -162,3 +163,4 @@ static int btreeCursorMoveToChild(SBtCursor *pBtCur, SPgno pgno) {
// TODO // TODO
return 0; return 0;
} }
#endif
\ No newline at end of file
...@@ -15,6 +15,12 @@ ...@@ -15,6 +15,12 @@
#include "tdbInt.h" #include "tdbInt.h"
struct STEnv {
char * rootDir;
SPCache *pCache;
int jfd;
};
#if 0 #if 0
struct STDbEnv { struct STDbEnv {
char * rootDir; // root directory of the environment char * rootDir; // root directory of the environment
......
...@@ -23,6 +23,7 @@ extern "C" { ...@@ -23,6 +23,7 @@ extern "C" {
typedef struct SBTree SBTree; typedef struct SBTree SBTree;
typedef struct SBtCursor SBtCursor; typedef struct SBtCursor SBtCursor;
#if 0
// SBTree // SBTree
int btreeOpen(SBTree **ppBt, SPgFile *pPgFile); int btreeOpen(SBTree **ppBt, SPgFile *pPgFile);
int btreeClose(SBTree *pBt); int btreeClose(SBTree *pBt);
...@@ -36,6 +37,7 @@ int btreeCursorNext(SBtCursor *pBtCur); ...@@ -36,6 +37,7 @@ int btreeCursorNext(SBtCursor *pBtCur);
struct SBTree { struct SBTree {
SPgno root; SPgno root;
}; };
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
extern "C" { extern "C" {
#endif #endif
#if 0 typedef struct STEnv STEnv;
const char* tdbEnvGetRootDir(TENV* pEnv);
SPgFile* tdbEnvGetPageFile(TENV* pEnv, const uint8_t fileid[]); int tdbEnvOpen(STEnv **ppEnv);
SPgCache* tdbEnvGetPgCache(TENV* pEnv); int tdbEnvClose(STEnv *pEnv);
int tdbEnvRgstPageFile(TENV* pEnv, SPgFile* pPgFile);
int tdbEnvRgstDB(TENV* pEnv, TDB* pDb); int tdbEnvBegin(STEnv *pEnv);
#endif int tdbEnvCommit(STEnv *pEnv);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -116,13 +116,13 @@ typedef TD_DLIST_NODE(SPgFile) SPgFileListNode; ...@@ -116,13 +116,13 @@ typedef TD_DLIST_NODE(SPgFile) SPgFileListNode;
#include "tdbUtil.h" #include "tdbUtil.h"
// #include "tdbBtree.h" #include "tdbBtree.h"
#include "tdbPCache.h" #include "tdbPCache.h"
#include "tdbPFile.h" #include "tdbPFile.h"
// #include "tdbEnv.h" #include "tdbEnv.h"
#ifdef __cplusplus #ifdef __cplusplus
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册