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

more TDB

上级 ca197e71
......@@ -23,10 +23,11 @@ extern "C" {
#endif
typedef struct STDb TDB;
typedef struct STDbEnv TENV;
int tdbCreate(TDB **ppDb);
int tdbDestroy(TDB *pDb);
int tdbOpen(TDB **pDb);
int tdbOpen(TDB **pDb, const char *fname, const char *dbname);
int tdbClose(TDB *pDb);
#ifdef __cplusplus
......
......@@ -15,11 +15,6 @@
#include "tdbInt.h"
struct SBTree {
pgno_t root;
// TODO
};
struct SBtCursor {
// TODO
};
\ No newline at end of file
......@@ -16,8 +16,8 @@
#include "tdbInt.h"
struct STDb {
// TODO
SBTree *pBt;
SBTree btree; // current access method
SPgFile *pPgFile; // backend page file this DB is using
};
int tdbCreate(TDB **ppDb) {
......@@ -41,7 +41,7 @@ int tdbDestroy(TDB *pDb) {
return 0;
}
int tdbOpen(TDB **pDb) {
int tdbOpen(TDB **pDb, const char *fname, const char *dbname) {
// TODO
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);
int btreeCursorClose(SBtCursor *pBtCur);
int btreeCursorMoveTo(SBtCursor *pBtCur);
struct SBTree {
pgno_t root;
};
#ifdef __cplusplus
}
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册