提交 d6229165 编写于 作者: H Hongze Cheng

more TDB

上级 9a8f0b8d
...@@ -15,6 +15,12 @@ ...@@ -15,6 +15,12 @@
#include "tdbInt.h" #include "tdbInt.h"
#define TDB_BTREE_ROOT 0x1
#define TDB_BTREE_LEAF 0x2
#define TDB_BTREE_PAGE_IS_ROOT(flags) TDB_FLAG_HAS(flags, TDB_BTREE_ROOT)
#define TDB_BTREE_PAGE_IS_LEAF(flags) TDB_FLAG_HAS(flags, TDB_BTREE_LEAF)
struct SBTree { struct SBTree {
SPgno root; SPgno root;
int keyLen; int keyLen;
......
...@@ -128,6 +128,11 @@ typedef int (*FKeyComparator)(const void *pKey1, int kLen1, const void *pKey2, i ...@@ -128,6 +128,11 @@ typedef int (*FKeyComparator)(const void *pKey1, int kLen1, const void *pKey2, i
#define BTREE_MAX_DEPTH 20 #define BTREE_MAX_DEPTH 20
#define TDB_FLAG_HAS(flags, flag) (((flags) & (flag)) != 0)
#define TDB_FLAG_NO(flags, flag) ((flags) & (flag) == 0)
#define TDB_FLAG_ADD(flags, flag) ((flags) |= (flag))
#define TDB_FLAG_REMOVE(flags, flag) ((flags) &= (~(flag)))
typedef struct SPager SPager; typedef struct SPager SPager;
typedef struct SPCache SPCache; typedef struct SPCache SPCache;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册