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

more TDB

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