more TDB
This commit is contained in:
parent
9663634555
commit
ea7b4dcc53
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
#include "tdbInt.h"
|
#include "tdbInt.h"
|
||||||
|
|
||||||
int tdbPageInsertCell(SPage *pPage, int idx, u8 *pCell, int szCell) {
|
int tdbPageInsertCell(SPage *pPage, int idx, SCell *pCell, int szCell) {
|
||||||
// TODO
|
// TODO
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,12 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef u8 SCell;
|
||||||
|
|
||||||
|
typedef struct __attribute__((__packed__)) {
|
||||||
|
u8 cksm[4];
|
||||||
|
} SPageFooter;
|
||||||
|
|
||||||
typedef struct __attribute__((__packed__)) {
|
typedef struct __attribute__((__packed__)) {
|
||||||
u16 flags;
|
u16 flags;
|
||||||
u16 nCells;
|
u16 nCells;
|
||||||
|
@ -38,15 +44,16 @@ struct SPage {
|
||||||
TDB_PCACHE_PAGE
|
TDB_PCACHE_PAGE
|
||||||
|
|
||||||
// Fields below used by pager and am
|
// Fields below used by pager and am
|
||||||
SPageHdr *pPageHdr;
|
SPageHdr *pPageHdr;
|
||||||
u16 *aCellIdx;
|
SPageFooter *pPageFooter;
|
||||||
int kLen;
|
u16 *aCellIdx;
|
||||||
int vLen;
|
int kLen;
|
||||||
int maxLocal;
|
int vLen;
|
||||||
int minLocal;
|
int maxLocal;
|
||||||
int nOverflow;
|
int minLocal;
|
||||||
void *apOvfl[4];
|
int nOverflow;
|
||||||
int aiOvfl[4];
|
void *apOvfl[4];
|
||||||
|
int aiOvfl[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
// Macros
|
// Macros
|
||||||
|
@ -88,7 +95,7 @@ struct SPage {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// APIs
|
// 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);
|
int tdbPageDropCell(SPage *pPage, int idx);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
Loading…
Reference in New Issue