Lines Matching refs:sqlite3
11 ** programs, you need this file and the "sqlite3.h" header file that defines
13 ** the "sqlite3.h" header file at hand, you will find a copy embedded within
14 ** the text of this file. Search for "Begin file sqlite3.h" to find the start
15 ** of the embedded sqlite3.h header file.) Additional code files may be needed
17 ** language. The code for the "sqlite3" command-line shell is also in a
552 /************** Include sqlite3.h in the middle of sqliteInt.h ***************/
553 /************** Begin file sqlite3.h *****************************************/
583 ** the version number) and changes its name to "sqlite3.h" as
639 ** ^(The [SQLITE_VERSION] C preprocessor macro in the sqlite3.h header
772 ** the opaque structure named "sqlite3". It is useful to think of an sqlite3
778 ** sqlite3 object.
780 typedef struct sqlite3 sqlite3;
822 ** ^The sqlite3_close() routine is the destructor for the [sqlite3] object.
823 ** ^Calls to sqlite3_close() return SQLITE_OK if the [sqlite3] object is
828 ** the [sqlite3] object prior to attempting to close the object. ^If
837 ** pointer or an [sqlite3] object pointer obtained
843 SQLITE_API int sqlite3_close(sqlite3 *);
914 sqlite3*, /* An open database */
1739 SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
2124 SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
2173 SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
2227 SQLITE_API int sqlite3_changes(sqlite3*);
2253 SQLITE_API int sqlite3_total_changes(sqlite3*);
2292 SQLITE_API void sqlite3_interrupt(sqlite3*);
2394 SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
2414 SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
2489 sqlite3 *db, /* An open database */
2798 sqlite3*,
2897 SQLITE_API void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
2898 SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*,
2931 SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
2941 ** if SQLite is unable to allocate memory to hold the [sqlite3] object,
2942 ** a NULL will be written into *ppDb instead of a pointer to the [sqlite3]
3129 sqlite3 **ppDb /* OUT: SQLite db handle */
3133 sqlite3 **ppDb /* OUT: SQLite db handle */
3137 sqlite3 **ppDb, /* OUT: SQLite db handle */
3195 SQLITE_API int sqlite3_errcode(sqlite3 *db);
3196 SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
3197 SQLITE_API const char *sqlite3_errmsg(sqlite3*);
3198 SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
3265 SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
3412 sqlite3 *db, /* Database handle */
3419 sqlite3 *db, /* Database handle */
3426 sqlite3 *db, /* Database handle */
3433 sqlite3 *db, /* Database handle */
4261 sqlite3 *db,
4271 sqlite3 *db,
4281 sqlite3 *db,
4446 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
4714 sqlite3*,
4721 sqlite3*,
4729 sqlite3*,
4763 sqlite3*,
4765 void(*)(void*,sqlite3*,int eTextRep,const char*)
4768 sqlite3*,
4770 void(*)(void*,sqlite3*,int eTextRep,const void*)
4782 sqlite3 *db, /* Database to be rekeyed */
4795 sqlite3 *db, /* Database to be rekeyed */
4889 SQLITE_API int sqlite3_get_autocommit(sqlite3*);
4901 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
4916 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
4962 SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
4963 SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5012 sqlite3*,
5186 sqlite3 *db, /* Connection handle */
5223 sqlite3 *db, /* Load the extension into this database connection */
5242 SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5259 ** sqlite3 *db,
5324 int (*xCreate)(sqlite3*, void *pAux,
5327 int (*xConnect)(sqlite3*, void *pAux,
5477 sqlite3 *db, /* SQLite connection to register module with */
5483 sqlite3 *db, /* SQLite connection to register module with */
5545 SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
5563 SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
5646 sqlite3*,
6079 SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
6113 SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6310 SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
6814 sqlite3 *pDest, /* Destination database handle */
6816 sqlite3 *pSource, /* Source database handle */
6939 sqlite3 *pBlocked, /* Waiting connection */
7014 sqlite3*,
7015 int(*)(void *,sqlite3*,const char*,int),
7044 SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
7062 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
7135 sqlite3 *db, /* Database handle */
7168 SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
7221 SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
7285 sqlite3 *db,
7312 /************** End of sqlite3.h *********************************************/
7966 sqlite3 *db, /* Associated database connection */
8128 SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3*);
8139 SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3*);
8143 SQLITE_PRIVATE int sqlite3BtreeHoldsAllMutexes(sqlite3*);
8144 SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3*,int,Schema*);
8523 SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(sqlite3*);
8544 SQLITE_PRIVATE void sqlite3VdbeDeleteObject(sqlite3*,Vdbe*);
8559 SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe*);
9320 ** the Schema for the TEMP databaes (sqlite3.aDb[1]) which is free-standing.
9330 ** holding a mutex on the sqlite3 connection pointer that owns the Btree.
9447 struct sqlite3 {
9494 int (*xWalCallback)(void *, sqlite3 *, const char *, int);
9497 void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*);
9498 void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*);
9539 ** mutex, not by sqlite3.mutex. They are used by code in notify.c.
9548 sqlite3 *pBlockingConnection; /* Connection that caused SQLITE_LOCKED */
9549 sqlite3 *pUnlockConnection; /* Connection to watch for unlock */
9552 sqlite3 *pNextBlocked; /* Next in list of all blocked connections */
9562 ** Possible values for the sqlite3.flags.
9593 ** Bits of the sqlite3.flags field that are used by the
9709 ** sqlite3.pSavepoint. The first element in the list is the most recently
9730 ** instance of the following structure, stored in the sqlite3.aModule
9843 ** structure for each database connection (sqlite3*) that uses the shared
9868 ** another linked list headed by the sqlite3.pDisconnect member of the
9869 ** corresponding sqlite3 structure. They are then deleted/xDisconnected
9870 ** next time a statement is prepared using said sqlite3*. This is done
9871 ** to avoid deadlock issues involving multiple sqlite3.mutex mutexes.
9873 ** explanation as to why it is safe to add an entry to an sqlite3.pDisconnect
9874 ** list without holding the corresponding sqlite3.mutex mutex.
9881 sqlite3 *db; /* Database connection associated with this table */
10057 sqlite3 *db; /* The database connection */
10766 int iDb; /* Index in sqlite3.aDb[] of database holding pTab */
10829 sqlite3 *db; /* The main database structure */
10948 * 1. In the "trigHash" hash table (part of the sqlite3* that represents the
11051 sqlite3 *db; /* Optional database for lookaside. Can be NULL */
11067 sqlite3 *db; /* The database being initialized */
11219 SQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3*, int);
11220 SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3*, int);
11221 SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3*,const char*);
11222 SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3*,const char*, int);
11224 SQLITE_PRIVATE void *sqlite3DbReallocOrFree(sqlite3 *, void *, int);
11225 SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *, void *, int);
11226 SQLITE_PRIVATE void sqlite3DbFree(sqlite3*, void*);
11228 SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3*, void*);
11285 SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3*,const char*, ...);
11286 SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3*,const char*, va_list);
11287 SQLITE_PRIVATE char *sqlite3MAppendf(sqlite3*,char*,const char*,...);
11294 SQLITE_PRIVATE void sqlite3SetString(char **, sqlite3*, const char*, ...);
11304 SQLITE_PRIVATE Expr *sqlite3ExprAlloc(sqlite3*,int,const Token*,int);
11305 SQLITE_PRIVATE Expr *sqlite3Expr(sqlite3*,int,const char*);
11306 SQLITE_PRIVATE void sqlite3ExprAttachSubtrees(sqlite3*,Expr*,Expr*,Expr*);
11308 SQLITE_PRIVATE Expr *sqlite3ExprAnd(sqlite3*,Expr*, Expr*);
11311 SQLITE_PRIVATE void sqlite3ExprDelete(sqlite3*, Expr*);
11315 SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3*, ExprList*);
11316 SQLITE_PRIVATE int sqlite3Init(sqlite3*, char**);
11319 SQLITE_PRIVATE void sqlite3ResetInternalSchema(sqlite3*, int);
11321 SQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3*);
11344 SQLITE_PRIVATE RowSet *sqlite3RowSetInit(sqlite3*, void*, unsigned int);
11359 SQLITE_PRIVATE void sqlite3DeleteTable(sqlite3*, Table*);
11368 SQLITE_PRIVATE void *sqlite3ArrayAllocate(sqlite3*,void*,int,int,int*,int*,int*);
11369 SQLITE_PRIVATE IdList *sqlite3IdListAppend(sqlite3*, IdList*, Token*);
11371 SQLITE_PRIVATE SrcList *sqlite3SrcListEnlarge(sqlite3*, SrcList*, int, int);
11372 SQLITE_PRIVATE SrcList *sqlite3SrcListAppend(sqlite3*, SrcList*, Token*, Token*);
11379 SQLITE_PRIVATE void sqlite3IdListDelete(sqlite3*, IdList*);
11380 SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3*, SrcList*);
11387 SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3*, Select*);
11416 SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3*,const char*, const char*);
11418 SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3*,const char*, const char*);
11419 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3*,int,const char*);
11420 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3*,int,const char*);
11422 SQLITE_PRIVATE int sqlite3RunVacuum(char**, sqlite3*);
11423 SQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3*, Token*);
11432 SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3*);
11439 SQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *);
11459 SQLITE_PRIVATE Expr *sqlite3ExprDup(sqlite3*,Expr*,int);
11460 SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3*,ExprList*,int);
11461 SQLITE_PRIVATE SrcList *sqlite3SrcListDup(sqlite3*,SrcList*,int);
11462 SQLITE_PRIVATE IdList *sqlite3IdListDup(sqlite3*,IdList*);
11463 SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3*,Select*,int);
11465 SQLITE_PRIVATE FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,int,u8,int);
11466 SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(sqlite3*);
11469 SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3*);
11470 SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3*);
11489 SQLITE_PRIVATE void sqlite3DeleteTriggerStep(sqlite3*, TriggerStep*);
11490 SQLITE_PRIVATE TriggerStep *sqlite3TriggerSelectStep(sqlite3*,Select*);
11491 SQLITE_PRIVATE TriggerStep *sqlite3TriggerInsertStep(sqlite3*,Token*, IdList*,
11493 SQLITE_PRIVATE TriggerStep *sqlite3TriggerUpdateStep(sqlite3*,Token*,ExprList*, Expr*, u8);
11494 SQLITE_PRIVATE TriggerStep *sqlite3TriggerDeleteStep(sqlite3*,Token*, Expr*);
11495 SQLITE_PRIVATE void sqlite3DeleteTrigger(sqlite3*, Trigger*);
11496 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3*,int,const char*);
11583 SQLITE_PRIVATE void sqlite3Error(sqlite3*, int, const char*,...);
11584 SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3*, const char *z, int n);
11589 SQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(sqlite3*,u8 enc, const char*,int);
11596 SQLITE_PRIVATE void sqlite3VdbeSetChanges(sqlite3 *, int);
11613 SQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *);
11614 SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *, const void*, int, u8);
11616 SQLITE_PRIVATE char *sqlite3Utf8to16(sqlite3 *, u8, char *, int, int *);
11618 SQLITE_PRIVATE int sqlite3ValueFromExpr(sqlite3 *, Expr *, u8, u8, sqlite3_value **);
11631 SQLITE_PRIVATE void sqlite3RootPageMoved(sqlite3*, int, int, int);
11637 SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3*);
11646 SQLITE_PRIVATE CollSeq *sqlite3GetCollSeq(sqlite3*, u8, CollSeq *, const char*);
11650 SQLITE_PRIVATE int sqlite3FindDb(sqlite3*, Token*);
11651 SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *, const char *);
11652 SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3*,int iDB);
11653 SQLITE_PRIVATE void sqlite3DeleteIndexSamples(sqlite3*,Index*);
11655 SQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3*, int);
11656 SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3*,Expr*,int*,char*);
11659 SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *, Btree *);
11660 SQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *);
11662 SQLITE_PRIVATE int sqlite3CreateFunc(sqlite3 *, const char *, int, int, void *,
11667 SQLITE_PRIVATE int sqlite3ApiExit(sqlite3 *db, int);
11675 SQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *, SrcList *, int, int);
11690 SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3*);
11692 SQLITE_PRIVATE void sqlite3CloseExtensions(sqlite3*);
11718 SQLITE_PRIVATE void sqlite3VtabClear(sqlite3 *db, Table*);
11719 SQLITE_PRIVATE int sqlite3VtabSync(sqlite3 *db, char **);
11720 SQLITE_PRIVATE int sqlite3VtabRollback(sqlite3 *db);
11721 SQLITE_PRIVATE int sqlite3VtabCommit(sqlite3 *db);
11724 SQLITE_PRIVATE void sqlite3VtabUnlockList(sqlite3*);
11725 SQLITE_PRIVATE int sqlite3VtabSavepoint(sqlite3 *, int, int);
11733 SQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3*, int, const char *, char **);
11735 SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3*, int, const char *);
11736 SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *, VTable *);
11737 SQLITE_PRIVATE FuncDef *sqlite3VtabOverloadFunction(sqlite3 *,FuncDef*, int nArg, Expr*);
11744 SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3*);
11745 SQLITE_PRIVATE VTable *sqlite3GetVTable(sqlite3*, Table*);
11747 SQLITE_PRIVATE int sqlite3Checkpoint(sqlite3*, int, int, int*, int*);
11748 SQLITE_PRIVATE int sqlite3WalDefaultHook(void*,sqlite3*,const char*,int);
11772 SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *, Table*);
11828 SQLITE_PRIVATE void sqlite3ConnectionBlocked(sqlite3 *, sqlite3 *);
11829 SQLITE_PRIVATE void sqlite3ConnectionUnlocked(sqlite3 *db);
11830 SQLITE_PRIVATE void sqlite3ConnectionClosed(sqlite3 *db);
12669 i64 lastRowid; /* Last insert rowid (sqlite3.lastRowid) */
12687 sqlite3 *db; /* The associated database connection */
12818 sqlite3 *db; /* The database connection that owns this statement */
12900 SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3*, BtCursor *, i64 *);
12952 SQLITE_PRIVATE int sqlite3VdbeSorterInit(sqlite3 *, VdbeCursor *);
12953 SQLITE_PRIVATE void sqlite3VdbeSorterClose(sqlite3 *, VdbeCursor *);
12955 SQLITE_PRIVATE int sqlite3VdbeSorterNext(sqlite3 *, VdbeCursor *, int *);
12956 SQLITE_PRIVATE int sqlite3VdbeSorterRewind(sqlite3 *, VdbeCursor *, int *);
12957 SQLITE_PRIVATE int sqlite3VdbeSorterWrite(sqlite3 *, VdbeCursor *, Mem *);
13079 sqlite3 *db, /* The database connection whose status is desired */
13502 sqlite3 *db = sqlite3_context_db_handle(context);
14089 sqlite3 *db;
14273 sqlite3 *db;
18531 static int isLookaside(sqlite3 *db, void *p){
18547 SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3 *db, void *p){
18581 SQLITE_PRIVATE void sqlite3DbFree(sqlite3 *db, void *p){
18681 SQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3 *db, int n){
18707 SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3 *db, int n){
18751 SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *db, void *p, int n){
18788 SQLITE_PRIVATE void *sqlite3DbReallocOrFree(sqlite3 *db, void *p, int n){
18804 SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3 *db, const char *z){
18818 SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3 *db, const char *z, int n){
18837 SQLITE_PRIVATE void sqlite3SetString(char **pz, sqlite3 *db, const char *zFormat, ...){
18862 SQLITE_PRIVATE int sqlite3ApiExit(sqlite3* db, int rc){
19731 SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3 *db, const char *zFormat, va_list ap){
19751 SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3 *db, const char *zFormat, ...){
19768 SQLITE_PRIVATE char *sqlite3MAppendf(sqlite3 *db, char *zStr, const char *zFormat, ...){
20493 SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte, u8 enc){
20521 SQLITE_PRIVATE char *sqlite3Utf8to16(sqlite3 *db, u8 enc, char *z, int n, int *pnOut){
20732 SQLITE_PRIVATE void sqlite3Error(sqlite3 *db, int err_code, const char *zFormat, ...){
20768 sqlite3 *db = pParse->db;
21624 SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3 *db, const char *z, int n){
21666 SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3 *db){
21683 SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3 *db){
25200 ** useful to the clients of the sqlite3 functions. Specifically, it is
37091 sqlite3 *db; /* The database connection */
37113 SQLITE_PRIVATE RowSet *sqlite3RowSetInit(sqlite3 *db, void *pSpace, unsigned int N){
47678 ** All fields in this structure are accessed under sqlite3.mutex.
47682 ** they often do so without holding sqlite3.mutex.
47685 sqlite3 *db; /* The database connection holding this btree */
47747 sqlite3 *db; /* Database connection currently using this Btree */
48157 SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
48166 SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3 *db){
48191 SQLITE_PRIVATE int sqlite3BtreeHoldsAllMutexes(sqlite3 *db){
48220 SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3 *db, int iDb, Schema *pSchema){
48247 SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
49963 sqlite3 *db, /* Associated database handle */
50797 sqlite3 *pBlock = 0;
56473 sqlite3* pDestDb; /* Destination database handle */
56479 sqlite3* pSrcDb; /* Source database handle */
56533 static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
56584 sqlite3* pDestDb, /* Database to write to */
56586 sqlite3* pSrcDb, /* Database connection to read from */
57701 sqlite3 *db = pMem->db;
58141 SQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *db){
58162 sqlite3 *db, /* The database connection */
58340 SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(sqlite3 *db){
58892 static void freeEphemeralFunction(sqlite3 *db, FuncDef *pDef){
58898 static void vdbeFreeOpArray(sqlite3 *, Op *, int);
58903 static void freeP4(sqlite3 *db, int p4type, void *p4){
58954 static void vdbeFreeOpArray(sqlite3 *db, Op *aOp, int nOp){
58983 sqlite3 *db = p->db;
59017 sqlite3 *db;
59308 sqlite3 *db;
59330 sqlite3 *db;
59373 sqlite3 *db = p->db;
59447 sqlite3 *db = p->db; /* The database connection */
59771 sqlite3 *db; /* The database connection */
59959 sqlite3 *db = p->db;
59983 sqlite3 *db = p->db;
60036 static int vdbeCommit(sqlite3 *db, Vdbe *p){
60257 ** This routine checks that the sqlite3.activeVdbeCnt count variable
60258 ** matches the number of vdbe's in the list sqlite3.pVdbe that are
60266 static void checkActiveVdbeCnt(sqlite3 *db){
60301 static void invalidateCursorsOnModifiedBtrees(sqlite3 *db){
60322 sqlite3 *const db = p->db;
60387 sqlite3 *db = p->db;
60413 sqlite3 *db = p->db;
60629 sqlite3 *db;
60739 SQLITE_PRIVATE void sqlite3VdbeDeleteObject(sqlite3 *db, Vdbe *p){
60763 sqlite3 *db;
61354 SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3 *db, BtCursor *pCur, i64 *rowid){
61468 SQLITE_PRIVATE void sqlite3VdbeSetChanges(sqlite3 *db, int nChange){
61492 SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3 *db){
61502 SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe *v){
61617 sqlite3 *db = v->db;
61859 static int doWalCallbacks(sqlite3 *db){
61886 sqlite3 *db;
62024 sqlite3 *db; /* The database connection */
62080 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){
62404 sqlite3 *db = p->db;
62807 ** Return the sqlite3* database handle to which the prepared statement given
62812 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *pStmt){
62830 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
62899 ** obtained from sqlite3DbMalloc(). If sqlite3.vdbeExecCnt is 1, then the
62901 ** their current bindings. Or, if sqlite3.vdbeExecCnt is greater than 1,
62920 sqlite3 *db; /* The database connection */
63080 ** field of the sqlite3 structure is set in order to simulate and interrupt.
63586 ** checks that the sqlite3.nTransaction variable is correctly set to
63588 ** linked list starting at sqlite3.pSavepoint.
63594 static int checkSavepointCount(sqlite3 *db){
63609 sqlite3 *db = p->db;
63655 sqlite3 *db = p->db; /* The database */
64637 /* If the SQLITE_CountRows flag is set in sqlite3.flags mask, then
67517 ** (sqlite3.xUpdateCallback) is invoked following a successful insert.
69225 ** P1 is the index of the database in sqlite3.aDb[] of the database
69839 sqlite3 *db; /* The associated database */
69916 sqlite3* db, /* The database connection */
70147 sqlite3 *db;
70174 sqlite3 *db;
70249 sqlite3 *db;
70422 static void vdbeSorterIterZero(sqlite3 *db, VdbeSorterIter *pIter){
70432 sqlite3 *db, /* Database handle (for sqlite3DbMalloc() ) */
70538 sqlite3 *db, /* Database handle */
70663 SQLITE_PRIVATE int sqlite3VdbeSorterInit(sqlite3 *db, VdbeCursor *pCsr){
70693 static void vdbeSorterRecordFree(sqlite3 *db, SorterRecord *pRecord){
70705 SQLITE_PRIVATE void sqlite3VdbeSorterClose(sqlite3 *db, VdbeCursor *pCsr){
70730 static int vdbeSorterOpenTempFile(sqlite3 *db, sqlite3_file **ppFile){
70825 static int vdbeSorterListToPMA(sqlite3 *db, VdbeCursor *pCsr){
70887 sqlite3 *db, /* Database handle */
70933 sqlite3 *db, /* Database handle */
70964 SQLITE_PRIVATE int sqlite3VdbeSorterRewind(sqlite3 *db, VdbeCursor *pCsr, int *pbEof){
71072 SQLITE_PRIVATE int sqlite3VdbeSorterNext(sqlite3 *db, VdbeCursor *pCsr, int *pbEof){
71857 sqlite3 *db; /* The database connection */
71939 sqlite3 *db = pParse->db; /* The database connection */
72209 SQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *db, SrcList *pSrc, int iSrc, int iCol){
72470 sqlite3 *db; /* Database connection */
72542 sqlite3 *db;
72632 sqlite3 *db = pParse->db;
72735 sqlite3 *db; /* Database connection */
73100 sqlite3 *db = pParse->db;
73128 sqlite3 *db = pParse->db;
73399 sqlite3 *db, /* Handle for sqlite3DbMallocZero() (may be null) */
73447 sqlite3 *db, /* Handle for sqlite3DbMallocZero() (may be null) */
73464 sqlite3 *db,
73518 SQLITE_PRIVATE Expr *sqlite3ExprAnd(sqlite3 *db, Expr *pLeft, Expr *pRight){
73536 sqlite3 *db = pParse->db;
73566 sqlite3 *db = pParse->db;
73636 SQLITE_PRIVATE void sqlite3ExprDelete(sqlite3 *db, Expr *p){
73766 static Expr *exprDup(sqlite3 *db, Expr *p, int flags, u8 **pzBuffer){
73867 SQLITE_PRIVATE Expr *sqlite3ExprDup(sqlite3 *db, Expr *p, int flags){
73870 SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3 *db, ExprList *p, int flags){
73906 SQLITE_PRIVATE SrcList *sqlite3SrcListDup(sqlite3 *db, SrcList *p, int flags){
73941 SQLITE_PRIVATE IdList *sqlite3IdListDup(sqlite3 *db, IdList *p){
73961 SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3 *db, Select *p, int flags){
73986 SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3 *db, Select *p, int flags){
74006 sqlite3 *db = pParse->db;
74077 sqlite3 *db = pParse->db;
74109 SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){
74464 sqlite3 *db = pParse->db; /* Database connection */
75285 sqlite3 *db = pParse->db; /* The database connection */
76515 static int addAggInfoColumn(sqlite3 *db, AggInfo *pInfo){
76533 static int addAggInfoFunc(sqlite3 *db, AggInfo *pInfo){
76828 sqlite3 *db = sqlite3_context_db_handle(context);
76884 sqlite3 *db = sqlite3_context_db_handle(context);
76948 sqlite3 *db = sqlite3_context_db_handle(context);
77041 static char *whereOrName(sqlite3 *db, char *zWhere, char *zConstant){
77086 sqlite3 *db = pParse->db;
77179 sqlite3 *db = pParse->db; /* Database connection */
77409 sqlite3 *db; /* The database connection; */
77531 sqlite3 *db = pParse->db;
77659 sqlite3 *db = pParse->db;
77716 sqlite3 *db = pParse->db; /* Database handle */
77988 sqlite3 *db = pParse->db;
78044 sqlite3 *db = pParse->db;
78106 sqlite3 *db;
78168 SQLITE_PRIVATE void sqlite3DeleteIndexSamples(sqlite3 *db, Index *pIdx){
78206 SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3 *db, int iDb){
78396 sqlite3 *db = sqlite3_context_db_handle(context);
78497 extern int sqlite3CodecAttach(sqlite3*, int, const void*, int);
78498 extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
78582 sqlite3 *db = sqlite3_context_db_handle(context);
78640 sqlite3* db = pParse->db;
78756 sqlite3 *db;
78956 sqlite3 *db,
78980 ** callback has been registered (i.e. that sqlite3.xAuth is not NULL).
78992 sqlite3 *db = pParse->db; /* Database handle */
79025 sqlite3 *db = pParse->db;
79083 sqlite3 *db = pParse->db;
79263 sqlite3 *db;
79369 sqlite3 *db = pParse->db;
79403 SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3 *db, const char *zName, const char *zDatabase){
79470 SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3 *db, const char *zName, const char *zDb){
79491 static void freeIndex(sqlite3 *db, Index *p){
79505 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3 *db, int iDb, const char *zIdxName){
79543 SQLITE_PRIVATE void sqlite3ResetInternalSchema(sqlite3 *db, int iDb){
79609 SQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3 *db){
79617 static void sqliteDeleteColumnNames(sqlite3 *db, Table *pTable){
79642 SQLITE_PRIVATE void sqlite3DeleteTable(sqlite3 *db, Table *pTable){
79688 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3 *db, int iDb, const char *zTabName){
79717 SQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3 *db, Token *pName){
79748 SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *db, const char *zName){
79769 SQLITE_PRIVATE int sqlite3FindDb(sqlite3 *db, Token *pName){
79801 sqlite3 *db = pParse->db;
79868 sqlite3 *db = pParse->db;
80085 sqlite3 *db = pParse->db;
80231 sqlite3 *db = pParse->db;
80339 sqlite3 *db = pParse->db;
80359 sqlite3 *db;
80407 sqlite3 *db = pParse->db;
80442 sqlite3 *db = pParse->db;
80507 static char *createTableStmt(sqlite3 *db, Table *p){
80598 sqlite3 *db = pParse->db;
80815 sqlite3 *db = pParse->db;
80882 sqlite3 *db = pParse->db; /* Database connection for malloc errors */
80972 static void sqliteViewResetAll(sqlite3 *db, int idx){
81008 SQLITE_PRIVATE void sqlite3RootPageMoved(sqlite3 *db, int iDb, int iFrom, int iTo){
81149 sqlite3 *db = pParse->db;
81324 sqlite3 *db = pParse->db;
81471 sqlite3 *db = pParse->db; /* The database connection */
81600 sqlite3 *db = pParse->db;
82091 sqlite3 *db = pParse->db;
82168 sqlite3 *db, /* Connection to notify of malloc failures */
82202 SQLITE_PRIVATE IdList *sqlite3IdListAppend(sqlite3 *db, IdList *pList, Token *pToken){
82229 SQLITE_PRIVATE void sqlite3IdListDelete(sqlite3 *db, IdList *pList){
82272 sqlite3 *db, /* Database connection to notify of OOM errors */
82354 sqlite3 *db, /* Connection to notify of malloc failures */
82406 SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3 *db, SrcList *pList){
82450 sqlite3 *db = pParse->db;
82528 sqlite3 *db;
82554 sqlite3 *db;
82574 sqlite3 *db;
82615 sqlite3 *db = pParse->db;
82674 sqlite3 *db = pToplevel->db;
82697 sqlite3 *db = pParse->db;
82819 sqlite3 *db = pParse->db; /* The database connection */
82855 sqlite3 *db = pParse->db; /* The database connection */
82916 sqlite3 *db = pParse->db;
82962 static void callCollNeeded(sqlite3 *db, int enc, const char *zName){
82991 static int synthCollSeq(sqlite3 *db, CollSeq *pColl){
83022 sqlite3* db, /* The database connection */
83061 sqlite3 *db = pParse->db;
83080 ** Each pointer stored in the sqlite3.aCollSeq hash table contains an
83089 sqlite3 *db, /* Database connection */
83142 sqlite3 *db,
83265 sqlite3 *db, /* An open database */
83379 SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *db, Btree *pBt){
83495 sqlite3 *db = pParse->db;
83634 sqlite3 *db; /* Main database structure */
84355 sqlite3 *db = sqlite3_context_db_handle(context);
84502 sqlite3 *db = sqlite3_context_db_handle(context);
84522 sqlite3 *db = sqlite3_context_db_handle(context);
84536 sqlite3 *db = sqlite3_context_db_handle(context);
84740 sqlite3 *db = sqlite3_context_db_handle(context);
85006 sqlite3 *db = sqlite3_context_db_handle(context);
85076 sqlite3 *db = sqlite3_context_db_handle(context);
85257 sqlite3 *db = sqlite3_context_db_handle(context);
85402 ** returns (void *)db, where db is the sqlite3* database pointer.
85443 sqlite3 *db = sqlite3_context_db_handle(context);
85482 SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(sqlite3 *db){
85493 static void setLikeOptFlag(sqlite3 *db, const char *zName, u8 flagVal){
85507 SQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3 *db, int caseSensitive){
85530 SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3 *db, Expr *pExpr, int *pIsNocase, char *aWc){
86139 sqlite3 *db = pParse->db; /* Database handle */
86266 static void fkTriggerDelete(sqlite3 *dbMem, Trigger *p){
86295 sqlite3 *db = pParse->db;
86361 sqlite3 *db = pParse->db; /* Database handle */
86635 sqlite3 *db = pParse->db; /* Database handle */
86842 SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *db, Table *pTab){
86903 int iDb, /* The database index in sqlite3.aDb[] */
86949 sqlite3 *db = sqlite3VdbeDb(v);
86990 sqlite3 *db = sqlite3VdbeDb(v);
87105 sqlite3 *db = pParse->db; /* The database connection */
87161 sqlite3 *db = pParse->db;
87321 sqlite3 *db; /* The main database structure */
88756 sqlite3 *db, /* The database on which the SQL executes */
88909 ** sqlite3.h.
88940 int (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
88941 int (*busy_timeout)(sqlite3*,int ms);
88942 int (*changes)(sqlite3*);
88943 int (*close)(sqlite3*);
88944 int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const char*));
88945 int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const void*));
88967 void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
88970 int (*create_collation)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*));
88971 int (*create_collation16)(sqlite3*,const void*,int,void*,int(*)(void*,int,const void*,int,const void*));
88972 int (*create_function)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
88973 int (*create_function16)(sqlite3*,const void*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
88974 int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
88976 sqlite3 * (*db_handle)(sqlite3_stmt*);
88977 int (*declare_vtab)(sqlite3*,const char*);
88979 int (*errcode)(sqlite3*db);
88980 const char * (*errmsg)(sqlite3*);
88981 const void * (*errmsg16)(sqlite3*);
88982 int (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
88987 int (*get_autocommit)(sqlite3*);
88989 int (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
88991 void (*interruptx)(sqlite3*);
88992 sqlite_int64 (*last_insert_rowid)(sqlite3*);
88997 int (*open)(const char*,sqlite3**);
88998 int (*open16)(const void*,sqlite3**);
88999 int (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
89000 int (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
89001 void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
89002 void (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
89017 void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
89018 int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,const char*,const char*),void*);
89022 int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,char const**,char const**,int*,int*,int*);
89024 int (*total_changes)(sqlite3*);
89025 void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
89027 void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,sqlite_int64),void*);
89043 int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
89045 int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
89046 int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
89049 int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,void (*xDestroy)(void *));
89054 int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,int,sqlite3_blob**);
89057 int (*create_collation_v2)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*),void(*)(void*));
89058 int (*file_control)(sqlite3*,const char*,int,void*);
89066 int (*open_v2)(const char*,sqlite3**,int,const char*);
89080 sqlite3 *(*context_db_handle)(sqlite3_context*);
89081 int (*extended_result_codes)(sqlite3*,int);
89082 int (*limit)(sqlite3*,int,int);
89083 sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
89087 sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);
89093 int (*create_function_v2)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*),void(*xDestroy)(void*));
89094 int (*db_config)(sqlite3*,int,...);
89095 sqlite3_mutex *(*db_mutex)(sqlite3*);
89096 int (*db_status)(sqlite3*,int,int*,int*,int);
89097 int (*extended_errcode)(sqlite3*);
89103 int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);
89104 int (*wal_autocheckpoint)(sqlite3*,int);
89105 int (*wal_checkpoint)(sqlite3*,const char*);
89106 void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
89108 int (*vtab_config)(sqlite3*,int op,...);
89109 int (*vtab_on_conflict)(sqlite3*);
89697 sqlite3 *db, /* Load the extension into this database connection */
89704 int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
89740 xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
89777 sqlite3 *db, /* Load the extension into this database connection */
89794 SQLITE_PRIVATE void sqlite3CloseExtensions(sqlite3 *db){
89807 SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){
89925 SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3 *db){
89928 int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
89945 xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
90070 sqlite3 *db = pParse->db;
90093 sqlite3 *db = pParse->db;
90168 sqlite3 *db = pParse->db;
90274 sqlite3 *db = pParse->db;
90460 ** Also, the sqlite3.dfltLockMode variable is set so that
91514 sqlite3 *db = pData->db;
91541 sqlite3 *db = pData->db;
91621 static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){
91741 ** main database, set sqlite3.enc to the encoding of the main database.
91743 ** as sqlite3.enc.
91870 SQLITE_PRIVATE int sqlite3Init(sqlite3 *db, char **pzErrMsg){
91913 sqlite3 *db = pParse->db;
91932 sqlite3 *db = pParse->db;
91980 SQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *pSchema){
92009 sqlite3 *db, /* Database handle. */
92169 sqlite3 *db, /* Database handle. */
92207 sqlite3 *db;
92241 sqlite3 *db, /* Database handle. */
92253 sqlite3 *db, /* Database handle. */
92271 sqlite3 *db, /* Database handle. */
92321 sqlite3 *db, /* Database handle. */
92333 sqlite3 *db, /* Database handle. */
92369 static void clearSelect(sqlite3 *db, Select *p){
92411 sqlite3 *db = pParse->db;
92448 SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3 *db, Select *p){
92595 sqlite3 *db = pParse->db;
93103 sqlite3 *db = pParse->db;
93521 sqlite3 *db = pParse->db;
93596 sqlite3 *db = pParse->db; /* Database connection */
93687 sqlite3 *db = pParse->db;
93720 sqlite3 *db = pParse->db;
93911 sqlite3 *db; /* Database connection */
94529 sqlite3 *db; /* Database connection */
94845 static void substExprList(sqlite3*, ExprList*, int, ExprList*);
94846 static void substSelect(sqlite3*, Select *, int, ExprList *);
94862 sqlite3 *db, /* Report malloc errors to this connection */
94894 sqlite3 *db, /* Report malloc errors here */
94906 sqlite3 *db, /* Report malloc errors here */
95060 sqlite3 *db = pParse->db;
95535 sqlite3 *db = pParse->db;
95860 sqlite3 *db;
96097 sqlite3 *db; /* The database connection */
97054 sqlite3 *db, /* The database on which the SQL executes */
97153 SQLITE_PRIVATE void sqlite3DeleteTriggerStep(sqlite3 *db, TriggerStep *pTriggerStep){
97229 sqlite3 *db = pParse->db; /* The database connection */
97412 sqlite3 *db = pParse->db; /* The database */
97485 SQLITE_PRIVATE TriggerStep *sqlite3TriggerSelectStep(sqlite3 *db, Select *pSelect){
97504 sqlite3 *db, /* Database connection */
97529 sqlite3 *db, /* The database connection */
97562 sqlite3 *db, /* The database connection */
97587 sqlite3 *db, /* Database connection */
97605 SQLITE_PRIVATE void sqlite3DeleteTrigger(sqlite3 *db, Trigger *pTrigger){
97629 sqlite3 *db = pParse->db;
97679 sqlite3 *db = pParse->db;
97734 SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3 *db, int iDb, const char *zName){
97826 sqlite3 *db = pParse->db;
97845 sqlite3 *db = pParse->db;
97955 sqlite3 *db = pParse->db; /* Database handle */
98363 sqlite3 *db; /* The database structure */
98873 sqlite3 *db = pParse->db; /* Database connection */
98955 static int vacuumFinalize(sqlite3 *db, sqlite3_stmt *pStmt, char **pzErrMsg){
98967 static int execSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
98986 static int execExecSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
99025 SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){
99101 extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
99296 ** sqlite3.pVtabCtx member variable is set to point to an instance of
99312 sqlite3 *db, /* Database in which module is registered */
99354 sqlite3 *db, /* Database in which module is registered */
99366 sqlite3 *db, /* Database in which module is registered */
99393 SQLITE_PRIVATE VTable *sqlite3GetVTable(sqlite3 *db, Table *pTab){
99405 sqlite3 *db = pVTab->db;
99423 ** p->pVTable list to the sqlite3.pDisconnect lists of their associated
99428 static VTable *vtabDisconnectAll(sqlite3 *db, Table *p){
99436 ** this makes it safe to access the sqlite3.pDisconnect list of any
99442 sqlite3 *db2 = pVTable->db;
99462 ** Disconnect all the virtual table objects in the sqlite3.pDisconnect list.
99466 ** caller. This is done to protect the sqlite3.pDisconnect list. The
99467 ** sqlite3.pDisconnect list is accessed only as follows:
99473 ** the sqlite3.pDisconnect list. In this case either the BtShared mutex
99478 ** As a result, a sqlite3.pDisconnect cannot be accessed simultaneously
99481 SQLITE_PRIVATE void sqlite3VtabUnlockList(sqlite3 *db){
99505 ** structure is associated with a single sqlite3* user of the schema.
99509 ** in the list are moved to the sqlite3.pDisconnect list of the associated
99512 SQLITE_PRIVATE void sqlite3VtabClear(sqlite3 *db, Table *p){
99529 static void addModuleArgument(sqlite3 *db, Table *pTable, char *zArg){
99562 sqlite3 *db; /* Database connection */
99602 sqlite3 *db = pParse->db;
99613 sqlite3 *db = pParse->db; /* The database connection */
99720 sqlite3 *db,
99723 int (*xConstruct)(sqlite3*,void*,int,const char*const*,sqlite3_vtab**,char**),
99828 sqlite3 *db = pParse->db;
99861 static int growVTrans(sqlite3 *db){
99864 /* Grow the sqlite3.aVTrans array if required */
99880 ** Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should
99883 static void addToVTrans(sqlite3 *db, VTable *pVTab){
99884 /* Add pVtab to the end of sqlite3.aVTrans */
99897 SQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3 *db, int iDb, const char *zTab, char **pzErr){
99938 SQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
100001 SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab){
100026 ** of each of the virtual tables in the sqlite3.aVTrans array. The method
100032 static void callFinaliser(sqlite3 *db, int offset){
100053 ** Invoke the xSync method of all virtual tables in the sqlite3.aVTrans
100060 SQLITE_PRIVATE int sqlite3VtabSync(sqlite3 *db, char **pzErrmsg){
100082 ** sqlite3.aVTrans array. Then clear the array itself.
100084 SQLITE_PRIVATE int sqlite3VtabRollback(sqlite3 *db){
100091 ** sqlite3.aVTrans array. Then clear the array itself.
100093 SQLITE_PRIVATE int sqlite3VtabCommit(sqlite3 *db){
100104 ** in the sqlite3.aVTrans array.
100106 SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){
100134 ** sqlite3.aVTrans[] array. */
100161 SQLITE_PRIVATE int sqlite3VtabSavepoint(sqlite3 *db, int op, int iSavepoint){
100208 sqlite3 *db, /* Database connection for reporting malloc problems */
100299 SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *db){
100314 SQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){
100625 static void whereOrInfoDelete(sqlite3 *db, WhereOrInfo *p){
100633 static void whereAndInfoDelete(sqlite3 *db, WhereAndInfo *p){
100645 sqlite3 *db = pWC->pParse->db;
100686 sqlite3 *db = pWC->pParse->db;
101007 sqlite3 *db = pParse->db; /* Database connection */
101203 sqlite3 *db = pParse->db; /* Database connection */
101465 sqlite3 *db = pParse->db; /* Database connection */
101944 sqlite3 *db = pParse->db;
102828 sqlite3 *db = pParse->db;
104001 static char *explainIndexRange(sqlite3 *db, WhereLevel *pLevel, Table *pTab){
104049 sqlite3 *db = pParse->db; /* Database handle */
104783 static void whereInfoFree(sqlite3 *db, WhereInfo *pWInfo){
104917 sqlite3 *db; /* Database connection */
105421 sqlite3 *db = pParse->db;
105651 sqlite3 *db = pParse->db;
109637 sqlite3 *db = pParse->db; /* The database connection */
110098 SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db);
110130 SQLITE_PRIVATE int sqlite3RtreeInit(sqlite3 *db);
110162 SQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db);
110608 static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){
110664 SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){
110671 SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){
110686 u32 mask; /* Mask of the bit in sqlite3.flags to set/clear */
110783 SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){
110790 SQLITE_API int sqlite3_changes(sqlite3 *db){
110797 SQLITE_API int sqlite3_total_changes(sqlite3 *db){
110806 SQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *db){
110823 static void functionDestroy(sqlite3 *db, FuncDef *p){
110837 SQLITE_API int sqlite3_close(sqlite3 *db){
110965 SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db){
111054 sqlite3 *db = (sqlite3 *)ptr;
111073 sqlite3 *db = (sqlite3 *)ptr;
111074 int timeout = ((sqlite3 *)ptr)->busyTimeout;
111107 sqlite3 *db,
111126 sqlite3 *db,
111150 SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){
111163 SQLITE_API void sqlite3_interrupt(sqlite3 *db){
111175 sqlite3 *db,
111269 sqlite3 *db,
111283 sqlite3 *db,
111320 sqlite3 *db,
111356 sqlite3 *db,
111381 SQLITE_API void *sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){
111399 sqlite3 *db,
111420 sqlite3 *db, /* Attach the hook to this database */
111438 sqlite3 *db, /* Attach the hook to this database */
111456 sqlite3 *db, /* Attach the hook to this database */
111473 ** is greater than sqlite3.pWalArg cast to an integer (the value configured by
111478 sqlite3 *db, /* Connection */
111502 SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){
111521 sqlite3 *db, /* Attach the hook to this db handle */
111522 int(*xCallback)(void *, sqlite3*, const char*, int),
111542 sqlite3 *db, /* Database handle */
111552 int iDb = SQLITE_MAX_ATTACHED; /* sqlite3.aDb[] index of db to checkpoint */
111588 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){
111612 SQLITE_PRIVATE int sqlite3Checkpoint(sqlite3 *db, int iDb, int eMode, int *pnLog, int *pnCkpt){
111656 SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3 *db){
111675 SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){
111702 SQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){
111748 SQLITE_API int sqlite3_errcode(sqlite3 *db){
111757 SQLITE_API int sqlite3_extended_errcode(sqlite3 *db){
111772 sqlite3* db,
111849 ** #defines in sqlite3.h.
111910 SQLITE_API int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
112184 sqlite3 **ppDb, /* OUT: Returned database handle */
112188 sqlite3 *db; /* Store allocated handle here */
112257 db = sqlite3MallocZero( sizeof(sqlite3) );
112374 extern int sqlite3Fts1Init(sqlite3*);
112381 extern int sqlite3Fts2Init(sqlite3*);
112444 sqlite3 **ppDb
112451 sqlite3 **ppDb, /* OUT: SQLite db handle */
112464 sqlite3 **ppDb
112500 sqlite3* db,
112519 sqlite3* db,
112540 sqlite3* db,
112566 sqlite3 *db,
112568 void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)
112584 sqlite3 *db,
112586 void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)
112615 SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){
112667 ** See comment in sqlite3.h (sqlite.h.in) for details.
112671 sqlite3 *db, /* Connection handle */
112797 SQLITE_API int sqlite3_extended_result_codes(sqlite3 *db, int onoff){
112807 SQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
112987 /* sqlite3_test_control(SQLITE_TESTCTRL_RESERVE, sqlite3 *db, int N)
112993 sqlite3 *db = va_arg(ap, sqlite3*);
113001 /* sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS, sqlite3 *db, int N)
113011 sqlite3 *db = va_arg(ap, sqlite3*);
113133 ** Head of a linked list of all sqlite3 objects created by this process
113134 ** for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection
113138 static sqlite3 *SQLITE_WSD sqlite3BlockedList = 0;
113155 static void checkListProperties(sqlite3 *db){
113156 sqlite3 *p;
113159 sqlite3 *p2;
113181 static void removeFromBlockedList(sqlite3 *db){
113182 sqlite3 **pp;
113196 static void addToBlockedList(sqlite3 *db){
113197 sqlite3 **pp;
113247 sqlite3 *db,
113269 sqlite3 *p;
113296 SQLITE_PRIVATE void sqlite3ConnectionBlocked(sqlite3 *db, sqlite3 *pBlocker){
113313 ** 1) If the sqlite3.pBlockingConnection member of a list entry is
113316 ** 2) If the sqlite3.pUnlockConnection member of a list entry is
113324 SQLITE_PRIVATE void sqlite3ConnectionUnlocked(sqlite3 *db){
113327 sqlite3 **pp; /* Iterator variable */
113337 sqlite3 *p = *pp;
113423 SQLITE_PRIVATE void sqlite3ConnectionClosed(sqlite3 *db){
114179 sqlite3 *db; /* The database connection */
114472 SQLITE_PRIVATE int sqlite3Fts3InitHashTable(sqlite3 *, Fts3Hash *, const char *);
114491 SQLITE_PRIVATE int sqlite3Fts3ExprInitTestInterface(sqlite3 *db);
114492 SQLITE_PRIVATE int sqlite3Fts3InitTerm(sqlite3 *db);
114496 SQLITE_PRIVATE int sqlite3Fts3InitAux(sqlite3 *db);
114705 sqlite3 *db, /* Database in which to run SQL */
114729 sqlite3 *db = p->db;
114799 sqlite3 *db = p->db; /* The database connection */
115139 sqlite3 *db, /* The SQLite database connection */
115408 sqlite3 *db, /* Database connection */
115418 sqlite3 *db, /* Database connection */
117291 sqlite3 *db = p->db; /* Database connection */
117428 SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db){
119051 sqlite3 *db,
119118 sqlite3 *db, /* Database connection */
119504 SQLITE_PRIVATE int sqlite3Fts3InitAux(sqlite3 *db){
120328 sqlite3 *db,
120431 sqlite3 *db = sqlite3_context_db_handle(context);
120495 SQLITE_PRIVATE int sqlite3Fts3ExprInitTestInterface(sqlite3* db){
121859 sqlite3 *db,
121881 sqlite3 *db,
121933 sqlite3 *db = (sqlite3 *)sqlite3_user_data(context);
121978 sqlite3 *db,
127174 sqlite3 *db; /* Host database connection */
127737 sqlite3 *, void *, int, const char *const*, sqlite3_vtab **, char **, int
127744 sqlite3 *db,
127757 sqlite3 *db,
129908 sqlite3 *db,
129985 static int getIntFromStmt(sqlite3 *db, const char *zSql, int *piVal){
130016 sqlite3 *db, /* Database handle */
130054 sqlite3 *db, /* Database connection */
130214 SQLITE_PRIVATE int sqlite3RtreeInit(sqlite3 *db){
130278 sqlite3 *db,
130300 sqlite3 *db,
130727 sqlite3 *db = (sqlite3 *)sqlite3_user_data(p);
130761 SQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db){
130802 sqlite3 *db,