“6df8ed9f4eec85a66569b8247d89cfe156599431”上不存在“2.0/src/client/inc/tscSubquery.h”
提交 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;
...@@ -39,9 +40,9 @@ typedef struct __attribute__((__packed__)) { ...@@ -39,9 +40,9 @@ typedef struct __attribute__((__packed__)) {
typedef int (*BtreeCmprFn)(const void *, const void *); 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_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 btreeCreate(SBTree **ppBt);
static int btreeDestroy(SBTree *pBt); static int btreeDestroy(SBTree *pBt);
...@@ -161,4 +162,5 @@ static int btreeCursorMoveToChild(SBtCursor *pBtCur, SPgno pgno) { ...@@ -161,4 +162,5 @@ static int btreeCursorMoveToChild(SBtCursor *pBtCur, SPgno pgno) {
SPgFile *pPgFile; SPgFile *pPgFile;
// TODO // TODO
return 0; return 0;
} }
\ No newline at end of file #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.
先完成此消息的编辑!
想要评论请 注册