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

more TDB

上级 fa72df13
......@@ -21,6 +21,11 @@ struct SBtCursor {
SPage * pPage; // current page traversing
};
typedef struct {
pgno_t pgno;
pgsize_t offset;
} SBtIdx;
static int btreeCreate(SBTree **pBt);
static int btreeDestroy(SBTree *pBt);
static int btreeCursorMoveToChild(SBtCursor *pBtCur, pgno_t pgno);
......@@ -63,9 +68,10 @@ int btreeCursorClose(SBtCursor *pBtCur) {
return 0;
}
int btreeCursorMoveTo(SBtCursor *pBtCur) {
int btreeCursorMoveTo(SBtCursor *pBtCur, int kLen, const void *pKey) {
SPage *pPage;
pgno_t childPgno;
int idx;
// 1. Move the cursor to the root page
......
......@@ -30,7 +30,7 @@ int btreeClose(SBTree *pBt);
// SBtCursor
int btreeCursorOpen(SBtCursor *pBtCur, SBTree *pBt);
int btreeCursorClose(SBtCursor *pBtCur);
int btreeCursorMoveTo(SBtCursor *pBtCur);
int btreeCursorMoveTo(SBtCursor *pBtCur, int kLen, const void *pKey);
struct SBTree {
pgno_t root;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册