⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 btree.h

📁 sqlite-3.4.1,嵌入式数据库.是一个功能强大的开源数据库,给学习和研发以及小型公司的发展带来了全所未有的好处.
💻 H
字号:
/*** 2001 September 15**** The author disclaims copyright to this source code.  In place of** a legal notice, here is a blessing:****    May you do good and not evil.**    May you find forgiveness for yourself and forgive others.**    May you share freely, never taking more than you give.***************************************************************************** This header file defines the interface that the sqlite B-Tree file** subsystem.  See comments in the source code for a detailed description** of what each interface routine does.**** @(#) $Id: btree.h,v 1.82 2007/05/08 21:45:27 drh Exp $*/#ifndef _BTREE_H_#define _BTREE_H_/* TODO: This definition is just included so other modules compile. It** needs to be revisited.*/#define SQLITE_N_BTREE_META 10/*** If defined as non-zero, auto-vacuum is enabled by default. Otherwise** it must be turned on for each database using "PRAGMA auto_vacuum = 1".*/#ifndef SQLITE_DEFAULT_AUTOVACUUM  #define SQLITE_DEFAULT_AUTOVACUUM 0#endif#define BTREE_AUTOVACUUM_NONE 0        /* Do not do auto-vacuum */#define BTREE_AUTOVACUUM_FULL 1        /* Do full auto-vacuum */#define BTREE_AUTOVACUUM_INCR 2        /* Incremental vacuum *//*** Forward declarations of structure*/typedef struct Btree Btree;typedef struct BtCursor BtCursor;typedef struct BtShared BtShared;int sqlite3BtreeOpen(  const char *zFilename,   /* Name of database file to open */  sqlite3 *db,             /* Associated database connection */  Btree **,                /* Return open Btree* here */  int flags                /* Flags */);/* The flags parameter to sqlite3BtreeOpen can be the bitwise or of the** following values.**** NOTE:  These values must match the corresponding PAGER_ values in** pager.h.*/#define BTREE_OMIT_JOURNAL  1  /* Do not use journal.  No argument */#define BTREE_NO_READLOCK   2  /* Omit readlocks on readonly files */#define BTREE_MEMORY        4  /* In-memory DB.  No argument */int sqlite3BtreeClose(Btree*);int sqlite3BtreeSetBusyHandler(Btree*,BusyHandler*);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 *);/* The flags parameter to sqlite3BtreeCreateTable can be the bitwise OR** of the following flags:*/#define BTREE_INTKEY     1    /* Table has only 64-bit signed integer keys */#define BTREE_ZERODATA   2    /* Table has keys only - no data */#define BTREE_LEAFDATA   4    /* Data stored in leaves only.  Implies INTKEY */int sqlite3BtreeDropTable(Btree*, int, int*);int sqlite3BtreeClearTable(Btree*, int);int sqlite3BtreeGetMeta(Btree*, int idx, u32 *pValue);int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value);int sqlite3BtreeCursor(  Btree*,                              /* BTree containing table to open */  int iTable,                          /* Index of root page */  int wrFlag,                          /* 1 for writing.  0 for read-only */  int(*)(void*,int,const void*,int,const void*),  /* Key comparison function */  void*,                               /* First argument to compare function */  BtCursor **ppCursor                  /* Returned cursor */);int sqlite3BtreeCloseCursor(BtCursor*);int sqlite3BtreeMoveto(BtCursor*,const void *pKey,i64 nKey,int bias,int *pRes);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*);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 Pager *sqlite3BtreePager(Btree*);int sqlite3BtreePutData(BtCursor*, u32 offset, u32 amt, void*);void sqlite3BtreeCacheOverflow(BtCursor *);#ifdef SQLITE_TESTint sqlite3BtreeCursorInfo(BtCursor*, int*, int);void sqlite3BtreeCursorList(Btree*);int sqlite3BtreePageDump(Btree*, int, int recursive);#endif#endif /* _BTREE_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -