diff --git a/source/dnode/vnode/src/vnd/vnodeRead.c b/source/libs/tkv/src/inc/tkvBtree.h
similarity index 72%
rename from source/dnode/vnode/src/vnd/vnodeRead.c
rename to source/libs/tkv/src/inc/tkvBtree.h
index 5e9f89ccd5568042e7dfd1d369a2e2849f678cce..6360e62c79fda0a2ce2af0163d4fc0c45fbf296a 100644
--- a/source/dnode/vnode/src/vnd/vnodeRead.c
+++ b/source/libs/tkv/src/inc/tkvBtree.h
@@ -13,4 +13,21 @@
* along with this program. If not, see .
*/
-#include "vnodeDef.h"
\ No newline at end of file
+#ifndef _TD_TKV_BTREE_H_
+#define _TD_TKV_BTREE_H_
+
+#include "tkvDef.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+ pgid_t root; // root page number
+} STkvBtree;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*_TD_TKV_BTREE_H_*/
\ No newline at end of file
diff --git a/source/libs/tkv/src/inc/tkvDB.h b/source/libs/tkv/src/inc/tkvDB.h
index 1a45702540728eb166cc172315002ca1c90408f1..fc8219db3fdcf3d9460077174aeb522ee6df7626 100644
--- a/source/libs/tkv/src/inc/tkvDB.h
+++ b/source/libs/tkv/src/inc/tkvDB.h
@@ -16,12 +16,26 @@
#ifndef _TD_TKV_DB_H_
#define _TD_TKV_DB_H_
+#include "tkvBtree.h"
+
#ifdef __cplusplus
extern "C" {
#endif
+typedef enum {
+ TDB_BTREE = 0,
+ TDB_HASH,
+ TDB_HEAP,
+} tdb_db_t;
+
struct TDB {
- // TODO
+ pgsize_t pageSize;
+
+ tdb_db_t type; // DB type
+
+ union {
+ STkvBtree btree;
+ } dbimpl;
};
#ifdef __cplusplus
diff --git a/source/dnode/vnode/src/inc/vnodeRead.h b/source/libs/tkv/src/inc/tkvHash.h
similarity index 81%
rename from source/dnode/vnode/src/inc/vnodeRead.h
rename to source/libs/tkv/src/inc/tkvHash.h
index 5ce84b2ebf3d5127cb4ed15b83d050779296033e..06343b7ac9da32339fd9c34cbd54231914a099dd 100644
--- a/source/dnode/vnode/src/inc/vnodeRead.h
+++ b/source/libs/tkv/src/inc/tkvHash.h
@@ -13,18 +13,21 @@
* along with this program. If not, see .
*/
-#ifndef _TD_VNODE_READ_H_
-#define _TD_VNODE_READ_H_
+#ifndef _TD_TKV_HAHS_H_
+#define _TD_TKV_HAHS_H_
+
+#include "tkvDef.h"
#ifdef __cplusplus
extern "C" {
#endif
-#include "vnodeInt.h"
-void vnodeProcessReadMsg(SVnode *pVnode, SVnodeMsg *pMsg);
+typedef struct STkvHash {
+ // TODO
+} STkvHash;
#ifdef __cplusplus
}
#endif
-#endif /*_TD_VNODE_READ_H_*/
+#endif /*_TD_TKV_HAHS_H_*/
\ No newline at end of file