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

more TDB

上级 2d610f12
...@@ -50,11 +50,12 @@ int tdbClose(TDB *pDb); ...@@ -50,11 +50,12 @@ int tdbClose(TDB *pDb);
int tdbSetKeyLen(TDB *pDb, int klen); int tdbSetKeyLen(TDB *pDb, int klen);
int tdbSetValLen(TDB *pDb, int vlen); int tdbSetValLen(TDB *pDb, int vlen);
int tdbSetDup(TDB *pDb, int dup); int tdbSetDup(TDB *pDb, int dup);
int tdbGetKeyLen(TDB *pDb, int *pklen); int tdbGetKeyLen(TDB *pDb, int *pklen);
int tdbGetValLen(TDB *pDb, int *pvlen); int tdbGetValLen(TDB *pDb, int *pvlen);
int tdbGetDup(TDB *pDb, int *pdup); int tdbGetDup(TDB *pDb, int *pdup);
int tdbInsert(TDB *pDb, const void *pKey, int nKey, const void *pData, int nData);
// TDBC // TDBC
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -21,6 +21,10 @@ struct STDb { ...@@ -21,6 +21,10 @@ struct STDb {
TENV * pEnv; // TENV containing the DB TENV * pEnv; // TENV containing the DB
}; };
struct STDbCurosr {
SBtCursor *pBtCur;
};
int tdbCreate(TDB **ppDb) { int tdbCreate(TDB **ppDb) {
TDB *pDb; TDB *pDb;
......
...@@ -23,6 +23,7 @@ struct STDbEnv { ...@@ -23,6 +23,7 @@ struct STDbEnv {
SPgCache * pPgCache; // page cache SPgCache * pPgCache; // page cache
struct { struct {
} pgfht; // page file hash table; } pgfht; // page file hash table;
SJournal *pJournal;
}; };
static int tdbEnvDestroy(TENV *pEnv); static int tdbEnvDestroy(TENV *pEnv);
......
...@@ -39,6 +39,7 @@ struct SPgFile { ...@@ -39,6 +39,7 @@ struct SPgFile {
pgsz_t pgSize; pgsz_t pgSize;
int fd; int fd;
pgno_t pgFileSize; pgno_t pgFileSize;
TDB * pDb; // For a SPgFile for multiple databases, this is the <dbname, pgno> mapping DB.
}; };
int pgFileOpen(SPgFile **ppPgFile, const char *fname, SPgCache *pPgCache); int pgFileOpen(SPgFile **ppPgFile, const char *fname, SPgCache *pPgCache);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册