more TDB
This commit is contained in:
parent
2d610f125b
commit
b3575d7c89
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue