提交 3206461e 编写于 作者: H Hongze Cheng

more

上级 81b0634f
...@@ -29,7 +29,9 @@ struct SBtCursor { ...@@ -29,7 +29,9 @@ struct SBtCursor {
}; };
typedef struct SBPage { typedef struct SBPage {
/* TODO */ u8 isInit;
u8 isLeaf;
SPgno pgno;
} SBPage; } SBPage;
int tdbBtreeOpen(SPgno root, SBTree **ppBt) { int tdbBtreeOpen(SPgno root, SBTree **ppBt) {
...@@ -55,10 +57,16 @@ int tdbBtreeCursorMoveTo(SBtCursor *pCur) { ...@@ -55,10 +57,16 @@ int tdbBtreeCursorMoveTo(SBtCursor *pCur) {
} }
static int tdbBtreeCursorMoveToRoot(SBtCursor *pCur) { static int tdbBtreeCursorMoveToRoot(SBtCursor *pCur) {
SPFile *pFile = pCur->pBt->pFile; SPFile *pFile;
SPgHdr *pPage;
pFile = pCur->pBt->pFile;
pPage = tdbPFileGet(pFile, pCur->pBt->root);
if (pPage == NULL) {
return -1;
}
tdbPFileGet(pFile, pCur->pBt->root);
/* TODO */
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册