提交 8d04fb64 编写于 作者: H Hongze Cheng

more TDB

上级 ca197e71
...@@ -23,10 +23,11 @@ extern "C" { ...@@ -23,10 +23,11 @@ extern "C" {
#endif #endif
typedef struct STDb TDB; typedef struct STDb TDB;
typedef struct STDbEnv TENV;
int tdbCreate(TDB **ppDb); int tdbCreate(TDB **ppDb);
int tdbDestroy(TDB *pDb); int tdbDestroy(TDB *pDb);
int tdbOpen(TDB **pDb); int tdbOpen(TDB **pDb, const char *fname, const char *dbname);
int tdbClose(TDB *pDb); int tdbClose(TDB *pDb);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -15,11 +15,6 @@ ...@@ -15,11 +15,6 @@
#include "tdbInt.h" #include "tdbInt.h"
struct SBTree {
pgno_t root;
// TODO
};
struct SBtCursor { struct SBtCursor {
// TODO // TODO
}; };
\ No newline at end of file
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include "tdbInt.h" #include "tdbInt.h"
struct STDb { struct STDb {
// TODO SBTree btree; // current access method
SBTree *pBt; SPgFile *pPgFile; // backend page file this DB is using
}; };
int tdbCreate(TDB **ppDb) { int tdbCreate(TDB **ppDb) {
...@@ -41,7 +41,7 @@ int tdbDestroy(TDB *pDb) { ...@@ -41,7 +41,7 @@ int tdbDestroy(TDB *pDb) {
return 0; return 0;
} }
int tdbOpen(TDB **pDb) { int tdbOpen(TDB **pDb, const char *fname, const char *dbname) {
// TODO // TODO
return 0; return 0;
} }
......
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "tdbInt.h"
struct STDbEnv {
TDB * dbList; // TDB list
SPgFile *pgFileList; // SPgFile list
};
\ No newline at end of file
...@@ -32,6 +32,10 @@ int btreeCursorOpen(SBtCursor *pBtCur, SBTree *pBt); ...@@ -32,6 +32,10 @@ int btreeCursorOpen(SBtCursor *pBtCur, SBTree *pBt);
int btreeCursorClose(SBtCursor *pBtCur); int btreeCursorClose(SBtCursor *pBtCur);
int btreeCursorMoveTo(SBtCursor *pBtCur); int btreeCursorMoveTo(SBtCursor *pBtCur);
struct SBTree {
pgno_t root;
};
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册