#include "sqliteInt.h"
#include "pager.h"
#include "btree.h"
#include <assert.h>
Clases |
| struct | PageOne |
| struct | PageHdr |
| struct | CellHdr |
| struct | Cell |
| struct | FreeBlk |
| struct | OverflowPage |
| struct | FreelistInfo |
| struct | MemPage |
| union | MemPage::u_page_data |
| struct | Btree |
| struct | BtCursor |
| struct | IntegrityCk |
'defines' |
| #define | SWAB16(B, X) ((B)->needSwab? swab16((u16)X) : ((u16)X)) |
| #define | SWAB32(B, X) ((B)->needSwab? swab32(X) : (X)) |
| #define | SWAB_ADD(B, X, A) if((B)->needSwab){ X=swab32(swab32(X)+A); }else{ X += (A); } |
| #define | btree_native_byte_order 1 |
| #define | ROUNDUP(X) ((X+3) & ~3) |
| #define | MAGIC_SIZE (sizeof(zMagicHeader)) |
| #define | MAGIC 0xdae37528 |
| #define | NKEY(b, h) (SWAB16(b,h.nKey) + h.nKeyHi*65536) |
| #define | NDATA(b, h) (SWAB16(b,h.nData) + h.nDataHi*65536) |
| #define | MIN_CELL_SIZE (sizeof(CellHdr)+4) |
| #define | MX_CELL ((SQLITE_USABLE_SIZE-sizeof(PageHdr))/MIN_CELL_SIZE) |
| #define | USABLE_SPACE (SQLITE_USABLE_SIZE - sizeof(PageHdr)) |
| #define | MX_LOCAL_PAYLOAD ((USABLE_SPACE/4-(sizeof(CellHdr)+sizeof(Pgno)))&~3) |
| #define | OVERFLOW_SIZE (SQLITE_USABLE_SIZE-sizeof(Pgno)) |
| #define | EXTRA_SIZE (sizeof(MemPage)-sizeof(union u_page_data)) |
| #define | SKIP_NONE 0 |
| #define | SKIP_NEXT 1 |
| #define | SKIP_PREV 2 |
| #define | SKIP_INVALID 3 |
| #define | NN 1 |
| #define | NB (NN*2+1) |
'typedefs' |
| typedef struct PageOne | PageOne |
| typedef struct MemPage | MemPage |
| typedef struct PageHdr | PageHdr |
| typedef struct Cell | Cell |
| typedef struct CellHdr | CellHdr |
| typedef struct FreeBlk | FreeBlk |
| typedef struct OverflowPage | OverflowPage |
| typedef struct FreelistInfo | FreelistInfo |
| typedef Btree | Bt |
| typedef struct IntegrityCk | IntegrityCk |
Funciones |
| u16 | swab16 (u16 x) |
| u32 | swab32 (u32 x) |
| int | sqliteBtreeOpen (const char *zFilename, int omitJournal, int nCache, Btree **ppBtree) |
| char * | fileBtreeIntegrityCheck (Btree *pBt, int *aRoot, int nRoot) |
Documentación de los 'defines'
| #define btree_native_byte_order 1 |
| #define EXTRA_SIZE (sizeof(MemPage)-sizeof(union u_page_data)) |
| #define MAGIC_SIZE (sizeof(zMagicHeader)) |
| #define MIN_CELL_SIZE (sizeof(CellHdr)+4) |
| #define MX_CELL ((SQLITE_USABLE_SIZE-sizeof(PageHdr))/MIN_CELL_SIZE) |
| #define MX_LOCAL_PAYLOAD ((USABLE_SPACE/4-(sizeof(CellHdr)+sizeof(Pgno)))&~3) |
| #define NDATA |
( |
|
b, |
|
|
|
h |
|
) |
| (SWAB16(b,h.nData) + h.nDataHi*65536) |
| #define NKEY |
( |
|
b, |
|
|
|
h |
|
) |
| (SWAB16(b,h.nKey) + h.nKeyHi*65536) |
| #define OVERFLOW_SIZE (SQLITE_USABLE_SIZE-sizeof(Pgno)) |
| #define ROUNDUP |
( |
|
X | ) |
((X+3) & ~3) |
| #define SWAB16 |
( |
|
B, |
|
|
|
X |
|
) |
| ((B)->needSwab? swab16((u16)X) : ((u16)X)) |
| #define SWAB32 |
( |
|
B, |
|
|
|
X |
|
) |
| ((B)->needSwab? swab32(X) : (X)) |
| #define SWAB_ADD |
( |
|
B, |
|
|
|
X, |
|
|
|
A |
|
) |
| if((B)->needSwab){ X=swab32(swab32(X)+A); }else{ X += (A); } |
| #define USABLE_SPACE (SQLITE_USABLE_SIZE - sizeof(PageHdr)) |
Documentación de los 'typedefs'
Documentación de las funciones
| char* fileBtreeIntegrityCheck |
( |
Btree * |
pBt, |
|
|
int * |
aRoot, |
|
|
int |
nRoot |
|
) |
| |
| int sqliteBtreeOpen |
( |
const char * |
zFilename, |
|
|
int |
omitJournal, |
|
|
int |
nCache, |
|
|
Btree ** |
ppBtree |
|
) |
| |