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 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 {
|
||||||
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 {
|
||||||
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 {
|
||||||
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);
|
||||||
|
|
Loading…
Reference in New Issue