more TDB
This commit is contained in:
parent
ca197e7113
commit
8d04fb6471
|
@ -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 @@
|
||||||
|
|
||||||
#include "tdbInt.h"
|
#include "tdbInt.h"
|
||||||
|
|
||||||
struct SBTree {
|
|
||||||
pgno_t root;
|
|
||||||
// TODO
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SBtCursor {
|
struct SBtCursor {
|
||||||
// TODO
|
// TODO
|
||||||
};
|
};
|
|
@ -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) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int tdbOpen(TDB **pDb) {
|
int tdbOpen(TDB **pDb, const char *fname, const char *dbname) {
|
||||||
// TODO
|
// TODO
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
};
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue