more TDB
This commit is contained in:
parent
2b6210aec3
commit
d4cb8e981d
|
@ -42,8 +42,9 @@ typedef struct STqCfg {
|
||||||
|
|
||||||
typedef struct SVnodeCfg {
|
typedef struct SVnodeCfg {
|
||||||
int32_t vgId;
|
int32_t vgId;
|
||||||
SDnode *pDnode;
|
int64_t dbId;
|
||||||
STfs *pTfs;
|
SDnode * pDnode;
|
||||||
|
STfs * pTfs;
|
||||||
uint64_t wsize;
|
uint64_t wsize;
|
||||||
uint64_t ssize;
|
uint64_t ssize;
|
||||||
uint64_t lsize;
|
uint64_t lsize;
|
||||||
|
@ -59,9 +60,9 @@ typedef struct SVnodeCfg {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int32_t sver;
|
int32_t sver;
|
||||||
const char *timezone;
|
const char * timezone;
|
||||||
const char *locale;
|
const char * locale;
|
||||||
const char *charset;
|
const char * charset;
|
||||||
uint16_t nthreads; // number of commit threads. 0 for no threads and a schedule queue should be given (TODO)
|
uint16_t nthreads; // number of commit threads. 0 for no threads and a schedule queue should be given (TODO)
|
||||||
PutReqToVQueryQFp putReqToVQueryQFp;
|
PutReqToVQueryQFp putReqToVQueryQFp;
|
||||||
SendReqToDnodeFp sendReqToDnodeFp;
|
SendReqToDnodeFp sendReqToDnodeFp;
|
||||||
|
@ -70,16 +71,16 @@ typedef struct {
|
||||||
typedef struct STqReadHandle {
|
typedef struct STqReadHandle {
|
||||||
int64_t ver;
|
int64_t ver;
|
||||||
uint64_t tbUid;
|
uint64_t tbUid;
|
||||||
SHashObj *tbIdHash;
|
SHashObj * tbIdHash;
|
||||||
const SSubmitMsg *pMsg;
|
const SSubmitMsg *pMsg;
|
||||||
SSubmitBlk *pBlock;
|
SSubmitBlk * pBlock;
|
||||||
SSubmitMsgIter msgIter;
|
SSubmitMsgIter msgIter;
|
||||||
SSubmitBlkIter blkIter;
|
SSubmitBlkIter blkIter;
|
||||||
SMeta *pVnodeMeta;
|
SMeta * pVnodeMeta;
|
||||||
SArray *pColIdList; // SArray<int32_t>
|
SArray * pColIdList; // SArray<int32_t>
|
||||||
int32_t sver;
|
int32_t sver;
|
||||||
SSchemaWrapper *pSchemaWrapper;
|
SSchemaWrapper * pSchemaWrapper;
|
||||||
STSchema *pSchema;
|
STSchema * pSchema;
|
||||||
} STqReadHandle;
|
} STqReadHandle;
|
||||||
|
|
||||||
/* ------------------------ SVnode ------------------------ */
|
/* ------------------------ SVnode ------------------------ */
|
||||||
|
|
|
@ -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