This commit is contained in:
Hongze Cheng 2022-03-09 09:05:03 +00:00
parent 9663634555
commit ea7b4dcc53
2 changed files with 18 additions and 11 deletions

View File

@ -15,7 +15,7 @@
#include "tdbInt.h"
int tdbPageInsertCell(SPage *pPage, int idx, u8 *pCell, int szCell) {
int tdbPageInsertCell(SPage *pPage, int idx, SCell *pCell, int szCell) {
// TODO
return 0;
}

View File

@ -20,6 +20,12 @@
extern "C" {
#endif
typedef u8 SCell;
typedef struct __attribute__((__packed__)) {
u8 cksm[4];
} SPageFooter;
typedef struct __attribute__((__packed__)) {
u16 flags;
u16 nCells;
@ -39,6 +45,7 @@ struct SPage {
// Fields below used by pager and am
SPageHdr *pPageHdr;
SPageFooter *pPageFooter;
u16 *aCellIdx;
int kLen;
int vLen;
@ -88,7 +95,7 @@ struct SPage {
#endif
// APIs
int tdbPageInsertCell(SPage *pPage, int idx, u8 *pCell, int szCell);
int tdbPageInsertCell(SPage *pPage, int idx, SCell *pCell, int szCell);
int tdbPageDropCell(SPage *pPage, int idx);
#ifdef __cplusplus