btree.h File Reference

Go to the source code of this file.

Classes

struct  BtreeMutexArray

Defines

#define SQLITE_N_BTREE_META   10
#define SQLITE_DEFAULT_AUTOVACUUM   0
#define BTREE_AUTOVACUUM_NONE   0
#define BTREE_AUTOVACUUM_FULL   1
#define BTREE_AUTOVACUUM_INCR   2
#define BTREE_OMIT_JOURNAL   1
#define BTREE_NO_READLOCK   2
#define BTREE_MEMORY   4
#define BTREE_READONLY   8
#define BTREE_READWRITE   16
#define BTREE_CREATE   32
#define BTREE_INTKEY   1
#define BTREE_ZERODATA   2
#define BTREE_LEAFDATA   4
#define sqlite3BtreeEnter(X)
#define sqlite3BtreeLeave(X)
#define sqlite3BtreeEnterCursor(X)
#define sqlite3BtreeLeaveCursor(X)
#define sqlite3BtreeEnterAll(X)
#define sqlite3BtreeLeaveAll(X)
#define sqlite3BtreeMutexArrayEnter(X)
#define sqlite3BtreeMutexArrayLeave(X)
#define sqlite3BtreeMutexArrayInsert(X, Y)

Typedefs

typedef struct Btree Btree
typedef struct BtCursor BtCursor
typedef struct BtShared BtShared
typedef struct BtreeMutexArray BtreeMutexArray

Functions

int sqlite3BtreeOpen (const char *zFilename, sqlite3 *db, Btree **, int flags, int vfsFlags)
int sqlite3BtreeClose (Btree *)
int sqlite3BtreeSetCacheSize (Btree *, int)
int sqlite3BtreeSetSafetyLevel (Btree *, int, int)
int sqlite3BtreeSyncDisabled (Btree *)
int sqlite3BtreeSetPageSize (Btree *, int, int)
int sqlite3BtreeGetPageSize (Btree *)
int sqlite3BtreeMaxPageCount (Btree *, int)
int sqlite3BtreeGetReserve (Btree *)
int sqlite3BtreeSetAutoVacuum (Btree *, int)
int sqlite3BtreeGetAutoVacuum (Btree *)
int sqlite3BtreeBeginTrans (Btree *, int)
int sqlite3BtreeCommitPhaseOne (Btree *, const char *zMaster)
int sqlite3BtreeCommitPhaseTwo (Btree *)
int sqlite3BtreeCommit (Btree *)
int sqlite3BtreeRollback (Btree *)
int sqlite3BtreeBeginStmt (Btree *)
int sqlite3BtreeCommitStmt (Btree *)
int sqlite3BtreeRollbackStmt (Btree *)
int sqlite3BtreeCreateTable (Btree *, int *, int flags)
int sqlite3BtreeIsInTrans (Btree *)
int sqlite3BtreeIsInStmt (Btree *)
int sqlite3BtreeIsInReadTrans (Btree *)
void * sqlite3BtreeSchema (Btree *, int, void(*)(void *))
int sqlite3BtreeSchemaLocked (Btree *)
int sqlite3BtreeLockTable (Btree *, int, u8)
const char * sqlite3BtreeGetFilename (Btree *)
const char * sqlite3BtreeGetDirname (Btree *)
const char * sqlite3BtreeGetJournalname (Btree *)
int sqlite3BtreeCopyFile (Btree *, Btree *)
int sqlite3BtreeIncrVacuum (Btree *)
int sqlite3BtreeDropTable (Btree *, int, int *)
int sqlite3BtreeClearTable (Btree *, int, int *)
int sqlite3BtreeGetMeta (Btree *, int idx, u32 *pValue)
int sqlite3BtreeUpdateMeta (Btree *, int idx, u32 value)
void sqlite3BtreeTripAllCursors (Btree *, int)
int sqlite3BtreeCursor (Btree *, int iTable, int wrFlag, struct KeyInfo *, BtCursor *pCursor)
int sqlite3BtreeCursorSize (void)
int sqlite3BtreeCloseCursor (BtCursor *)
int sqlite3BtreeMoveto (BtCursor *, const void *pKey, i64 nKey, int bias, int *pRes)
int sqlite3BtreeMovetoUnpacked (BtCursor *, UnpackedRecord *pUnKey, i64 intKey, int bias, int *pRes)
int sqlite3BtreeCursorHasMoved (BtCursor *, int *)
int sqlite3BtreeDelete (BtCursor *)
int sqlite3BtreeInsert (BtCursor *, const void *pKey, i64 nKey, const void *pData, int nData, int nZero, int bias)
int sqlite3BtreeFirst (BtCursor *, int *pRes)
int sqlite3BtreeLast (BtCursor *, int *pRes)
int sqlite3BtreeNext (BtCursor *, int *pRes)
int sqlite3BtreeEof (BtCursor *)
int sqlite3BtreeFlags (BtCursor *)
int sqlite3BtreePrevious (BtCursor *, int *pRes)
int sqlite3BtreeKeySize (BtCursor *, i64 *pSize)
int sqlite3BtreeKey (BtCursor *, u32 offset, u32 amt, void *)
sqlite3sqlite3BtreeCursorDb (const BtCursor *)
const void * sqlite3BtreeKeyFetch (BtCursor *, int *pAmt)
const void * sqlite3BtreeDataFetch (BtCursor *, int *pAmt)
int sqlite3BtreeDataSize (BtCursor *, u32 *pSize)
int sqlite3BtreeData (BtCursor *, u32 offset, u32 amt, void *)
char * sqlite3BtreeIntegrityCheck (Btree *, int *aRoot, int nRoot, int, int *)
struct Pagersqlite3BtreePager (Btree *)
int sqlite3BtreePutData (BtCursor *, u32 offset, u32 amt, void *)
void sqlite3BtreeCacheOverflow (BtCursor *)
void sqlite3BtreeClearCursor (BtCursor *)

Define Documentation

#define BTREE_AUTOVACUUM_FULL   1

Definition at line 35 of file btree.h.

Referenced by getAutoVacuum(), and sqlite3BtreeGetAutoVacuum().

#define BTREE_AUTOVACUUM_INCR   2

Definition at line 36 of file btree.h.

Referenced by getAutoVacuum(), and sqlite3BtreeGetAutoVacuum().

#define BTREE_AUTOVACUUM_NONE   0

Definition at line 34 of file btree.h.

Referenced by getAutoVacuum(), and sqlite3BtreeGetAutoVacuum().

#define BTREE_CREATE   32

Definition at line 77 of file btree.h.

#define BTREE_INTKEY   1

Definition at line 115 of file btree.h.

Referenced by sqlite3VdbeExec().

#define BTREE_LEAFDATA   4

Definition at line 117 of file btree.h.

Referenced by sqlite3VdbeExec().

#define BTREE_MEMORY   4

Definition at line 74 of file btree.h.

#define BTREE_NO_READLOCK   2

Definition at line 73 of file btree.h.

Referenced by sqlite3BtreeFactory().

#define BTREE_OMIT_JOURNAL   1

Definition at line 72 of file btree.h.

Referenced by sqlite3BtreeFactory().

#define BTREE_READONLY   8

Definition at line 75 of file btree.h.

#define BTREE_READWRITE   16

Definition at line 76 of file btree.h.

#define BTREE_ZERODATA   2

Definition at line 116 of file btree.h.

Referenced by sqlite3VdbeExec().

#define sqlite3BtreeEnter (  ) 
#define sqlite3BtreeEnterAll (  ) 
#define sqlite3BtreeEnterCursor (  ) 

Definition at line 210 of file btree.h.

Referenced by blobReadWrite(), and sqlite3_blob_open().

#define sqlite3BtreeLeave (  ) 
#define sqlite3BtreeLeaveAll (  ) 
#define sqlite3BtreeLeaveCursor (  ) 

Definition at line 211 of file btree.h.

Referenced by blobReadWrite(), and sqlite3_blob_open().

#define sqlite3BtreeMutexArrayEnter (  ) 

Definition at line 218 of file btree.h.

Referenced by sqlite3VdbeExec(), and sqlite3VdbeHalt().

#define sqlite3BtreeMutexArrayInsert ( X,
 ) 

Definition at line 220 of file btree.h.

Referenced by sqlite3VdbeUsesBtree().

#define sqlite3BtreeMutexArrayLeave (  ) 

Definition at line 219 of file btree.h.

Referenced by sqlite3VdbeExec(), and sqlite3VdbeHalt().

#define SQLITE_DEFAULT_AUTOVACUUM   0

Definition at line 31 of file btree.h.

Referenced by sqlite3BtreeOpen(), and sqlite3Pragma().

#define SQLITE_N_BTREE_META   10

Definition at line 24 of file btree.h.

Referenced by sqlite3VdbeExec().


Typedef Documentation

typedef struct BtCursor BtCursor

Definition at line 42 of file btree.h.

typedef struct Btree Btree

Definition at line 41 of file btree.h.

Definition at line 44 of file btree.h.

typedef struct BtShared BtShared

Definition at line 43 of file btree.h.


Function Documentation

int sqlite3BtreeBeginStmt ( Btree  ) 
int sqlite3BtreeBeginTrans ( Btree ,
int   
)
void sqlite3BtreeCacheOverflow ( BtCursor  ) 
void sqlite3BtreeClearCursor ( BtCursor  ) 
int sqlite3BtreeClearTable ( Btree ,
int  ,
int *   
)
int sqlite3BtreeClose ( Btree  ) 
int sqlite3BtreeCloseCursor ( BtCursor  ) 
int sqlite3BtreeCommit ( Btree  ) 
int sqlite3BtreeCommitPhaseOne ( Btree ,
const char *  zMaster 
)
int sqlite3BtreeCommitPhaseTwo ( Btree  ) 
int sqlite3BtreeCommitStmt ( Btree  ) 
int sqlite3BtreeCopyFile ( Btree ,
Btree  
)

Definition at line 7255 of file btree.c.

References btreeCopyFile(), sqlite3BtreeEnter, and sqlite3BtreeLeave.

Referenced by sqlite3RunVacuum().

int sqlite3BtreeCreateTable ( Btree ,
int *  ,
int  flags 
)

Definition at line 6197 of file btree.c.

References btreeCreateTable(), Btree::db, BtShared::db, Btree::pBt, sqlite3BtreeEnter, and sqlite3BtreeLeave.

Referenced by sqlite3VdbeExec().

int sqlite3BtreeCursor ( Btree ,
int  iTable,
int  wrFlag,
struct KeyInfo ,
BtCursor pCursor 
)
sqlite3* sqlite3BtreeCursorDb ( const BtCursor  ) 

Definition at line 3895 of file btree.c.

References Btree::db, sqlite3::mutex, BtCursor::pBtree, and sqlite3_mutex_held.

Referenced by sqlite3VdbeMemFromBtree().

int sqlite3BtreeCursorHasMoved ( BtCursor ,
int *   
)

Definition at line 415 of file btree.c.

References CURSOR_VALID, BtCursor::eState, restoreCursorPosition, BtCursor::skip, and SQLITE_OK.

Referenced by sqlite3VdbeCursorMoveto().

int sqlite3BtreeCursorSize ( void   ) 

Definition at line 2861 of file btree.c.

Referenced by allocateCursor(), schemaIsValid(), and sqlite3InitOne().

int sqlite3BtreeData ( BtCursor ,
u32  offset,
u32  amt,
void *   
)
const void* sqlite3BtreeDataFetch ( BtCursor ,
int *  pAmt 
)

Definition at line 3437 of file btree.c.

References CURSOR_VALID, BtCursor::eState, and fetchPayload().

Referenced by sqlite3VdbeExec(), and sqlite3VdbeMemFromBtree().

int sqlite3BtreeDataSize ( BtCursor ,
u32 pSize 
)
int sqlite3BtreeDelete ( BtCursor  ) 
int sqlite3BtreeDropTable ( Btree ,
int  ,
int *   
)

Definition at line 6414 of file btree.c.

References btreeDropTable(), Btree::db, BtShared::db, Btree::pBt, sqlite3BtreeEnter, and sqlite3BtreeLeave.

Referenced by sqlite3VdbeExec().

int sqlite3BtreeEof ( BtCursor  ) 

Definition at line 3884 of file btree.c.

References CURSOR_VALID, and BtCursor::eState.

Referenced by sqlite3VdbeExec().

int sqlite3BtreeFirst ( BtCursor ,
int *  pRes 
)
int sqlite3BtreeFlags ( BtCursor  ) 
int sqlite3BtreeGetAutoVacuum ( Btree  ) 
const char* sqlite3BtreeGetDirname ( Btree  ) 

Definition at line 7027 of file btree.c.

References Btree::pBt, BtShared::pPager, and sqlite3PagerDirname().

Referenced by vdbeCommit().

const char* sqlite3BtreeGetFilename ( Btree  ) 

Definition at line 7016 of file btree.c.

References Btree::pBt, BtShared::pPager, and sqlite3PagerFilename().

Referenced by sqlite3Pragma(), and vdbeCommit().

const char* sqlite3BtreeGetJournalname ( Btree  ) 

Definition at line 7040 of file btree.c.

References Btree::pBt, BtShared::pPager, and sqlite3PagerJournalname().

Referenced by vdbeCommit().

int sqlite3BtreeGetMeta ( Btree ,
int  idx,
u32 pValue 
)
int sqlite3BtreeGetPageSize ( Btree  ) 

Definition at line 1649 of file btree.c.

References BtShared::pageSize, and Btree::pBt.

Referenced by sqlite3Pragma(), and sqlite3RunVacuum().

int sqlite3BtreeGetReserve ( Btree  ) 
int sqlite3BtreeIncrVacuum ( Btree  ) 
int sqlite3BtreeInsert ( BtCursor ,
const void *  pKey,
i64  nKey,
const void *  pData,
int  nData,
int  nZero,
int  bias 
)
char* sqlite3BtreeIntegrityCheck ( Btree ,
int *  aRoot,
int  nRoot,
int  ,
int *   
)
int sqlite3BtreeIsInReadTrans ( Btree  ) 

Definition at line 7286 of file btree.c.

References Btree::db, Btree::inTrans, sqlite3::mutex, sqlite3_mutex_held, and TRANS_NONE.

Referenced by detachFunc(), and invalidateTempStorage().

int sqlite3BtreeIsInStmt ( Btree  ) 

Definition at line 7278 of file btree.c.

References BtShared::inStmt, and Btree::pBt.

Referenced by sqlite3VdbeExec().

int sqlite3BtreeIsInTrans ( Btree  ) 
int sqlite3BtreeKey ( BtCursor ,
u32  offset,
u32  amt,
void *   
)
const void* sqlite3BtreeKeyFetch ( BtCursor ,
int *  pAmt 
)

Definition at line 3430 of file btree.c.

References CURSOR_VALID, BtCursor::eState, and fetchPayload().

Referenced by sqlite3VdbeExec(), and sqlite3VdbeMemFromBtree().

int sqlite3BtreeKeySize ( BtCursor ,
i64 pSize 
)
int sqlite3BtreeLast ( BtCursor ,
int *  pRes 
)
int sqlite3BtreeLockTable ( Btree ,
int  ,
u8   
)
int sqlite3BtreeMaxPageCount ( Btree ,
int   
)
int sqlite3BtreeMoveto ( BtCursor ,
const void *  pKey,
i64  nKey,
int  bias,
int *  pRes 
)
int sqlite3BtreeMovetoUnpacked ( BtCursor ,
UnpackedRecord pUnKey,
i64  intKey,
int  bias,
int *  pRes 
)
int sqlite3BtreeNext ( BtCursor ,
int *  pRes 
)
int sqlite3BtreeOpen ( const char *  zFilename,
sqlite3 db,
Btree **  ,
int  flags,
int  vfsFlags 
)
struct Pager* sqlite3BtreePager ( Btree  )  [read]
int sqlite3BtreePrevious ( BtCursor ,
int *  pRes 
)
int sqlite3BtreePutData ( BtCursor ,
u32  offset,
u32  amt,
void *   
)
int sqlite3BtreeRollback ( Btree  ) 
int sqlite3BtreeRollbackStmt ( Btree  ) 
void* sqlite3BtreeSchema ( Btree ,
int  ,
void(*)(void *)   
)
int sqlite3BtreeSchemaLocked ( Btree  ) 
int sqlite3BtreeSetAutoVacuum ( Btree ,
int   
)
int sqlite3BtreeSetCacheSize ( Btree ,
int   
)
int sqlite3BtreeSetPageSize ( Btree ,
int  ,
int   
)
int sqlite3BtreeSetSafetyLevel ( Btree ,
int  ,
int   
)
int sqlite3BtreeSyncDisabled ( Btree  ) 
void sqlite3BtreeTripAllCursors ( Btree ,
int   
)
int sqlite3BtreeUpdateMeta ( Btree ,
int  idx,
u32  value 
)

ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:58 2011 by Doxygen 1.6.1