more TDB
This commit is contained in:
parent
2b6210aec3
commit
d4cb8e981d
|
@ -42,6 +42,7 @@ typedef struct STqCfg {
|
||||||
|
|
||||||
typedef struct SVnodeCfg {
|
typedef struct SVnodeCfg {
|
||||||
int32_t vgId;
|
int32_t vgId;
|
||||||
|
int64_t dbId;
|
||||||
SDnode * pDnode;
|
SDnode * pDnode;
|
||||||
STfs * pTfs;
|
STfs * pTfs;
|
||||||
uint64_t wsize;
|
uint64_t wsize;
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
#include "tlist.h"
|
#include "tlist.h"
|
||||||
#include "tlockfree.h"
|
#include "tlockfree.h"
|
||||||
#include "tmacro.h"
|
#include "tmacro.h"
|
||||||
#include "wal.h"
|
|
||||||
#include "tq.h"
|
#include "tq.h"
|
||||||
|
#include "wal.h"
|
||||||
|
|
||||||
#include "vnode.h"
|
#include "vnode.h"
|
||||||
|
|
||||||
|
@ -175,7 +175,6 @@ void* vmaMalloc(SVMemAllocator* pVMA, uint64_t size);
|
||||||
void vmaFree(SVMemAllocator* pVMA, void* ptr);
|
void vmaFree(SVMemAllocator* pVMA, void* ptr);
|
||||||
bool vmaIsFull(SVMemAllocator* pVMA);
|
bool vmaIsFull(SVMemAllocator* pVMA);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,6 +22,13 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef struct STDb TDB;
|
||||||
|
|
||||||
|
int tdbCreate(TDB **ppDb);
|
||||||
|
int tdbDestroy(TDB *pDb);
|
||||||
|
int tdbOpen(TDB **pDb);
|
||||||
|
int tdbClose(TDB *pDb);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,3 +19,34 @@ struct STDb {
|
||||||
// TODO
|
// TODO
|
||||||
SBTree *pBt;
|
SBTree *pBt;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int tdbCreate(TDB **ppDb) {
|
||||||
|
TDB *pDb;
|
||||||
|
|
||||||
|
pDb = (TDB *)calloc(1, sizeof(*pDb));
|
||||||
|
if (pDb == NULL) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TODO */
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int tdbDestroy(TDB *pDb) {
|
||||||
|
if (pDb) {
|
||||||
|
free(pDb);
|
||||||
|
}
|
||||||
|
/* TODO */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int tdbOpen(TDB **pDb) {
|
||||||
|
// TODO
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int tdbClose(TDB *pDb) {
|
||||||
|
// TODO
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -28,6 +28,9 @@ int btreeOpen(SBTree **ppBt);
|
||||||
int btreeClose(SBTree *pBt);
|
int btreeClose(SBTree *pBt);
|
||||||
|
|
||||||
// SBtCursor
|
// SBtCursor
|
||||||
|
int btreeCursorOpen(SBtCursor *pBtCur, SBTree *pBt);
|
||||||
|
int btreeCursorClose(SBtCursor *pBtCur);
|
||||||
|
int btreeCursorMoveTo(SBtCursor *pBtCur);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue