![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <stdlib.h>#include <string.h>#include <stdio.h>#include <assert.h>#include "sqlite3.h"#include <ctype.h>#include <stdarg.h>#include <signal.h>#include <pwd.h>#include <unistd.h>#include <dirent.h>#include <sys/types.h>#include <sys/stat.h>#include <sys/time.h>#include <sys/resource.h>#include <fcntl.h>#include <utime.h>#include <time.h>#include <errno.h>
Go to the source code of this file.
Classes | |
| struct | ShellText |
| struct | SHA3Context |
| struct | FsdirLevel |
| struct | fsdir_cursor |
| struct | fsdir_tab |
| struct | completion_vtab |
| struct | completion_cursor |
| struct | ApndFile |
| struct | IdxConstraint |
| struct | IdxScan |
| struct | IdxColumn |
| struct | IdxTable |
| struct | IdxWrite |
| struct | IdxStatement |
| struct | IdxHashEntry |
| struct | IdxHash |
| struct | sqlite3expert |
| struct | ExpertVtab |
| struct | ExpertCsr |
| struct | IdxSampleCtx |
| struct | IdxRemCtx |
| struct | IdxRemCtx::IdxRemSlot |
| struct | SavedModeInfo |
| struct | ExpertInfo |
| struct | EQPGraphRow |
| struct | EQPGraph |
| struct | ShellState |
| struct | ImportCtx |
Macros | |
| #define | SQLITE_OS_WINRT 0 |
| #define | _LARGE_FILE 1 |
| #define | _FILE_OFFSET_BITS 64 |
| #define | _LARGEFILE_SOURCE 1 |
| #define | GETPID getpid |
| #define | shell_read_history(X) |
| #define | shell_write_history(X) |
| #define | shell_stifle_history(X) |
| #define | SHELL_USE_LOCAL_GETLINE 1 |
| #define | IsSpace(X) isspace((unsigned char)X) |
| #define | IsDigit(X) isdigit((unsigned char)X) |
| #define | ToLower(X) (char)tolower((unsigned char)X) |
| #define | setBinaryMode(X, Y) |
| #define | setTextMode(X, Y) |
| #define | BEGIN_TIMER beginTimer() |
| #define | END_TIMER endTimer() |
| #define | HAS_TIMER 1 |
| #define | UNUSED_PARAMETER(x) (void)(x) |
| #define | ArraySize(X) (int)(sizeof(X)/sizeof(X[0])) |
| #define | utf8_printf fprintf |
| #define | raw_printf fprintf |
| #define | SQLITE_EXTENSION_INIT1 |
| #define | SQLITE_EXTENSION_INIT2(X) (void)(X) |
| #define | SHA3_BYTEORDER 0 |
| #define | a00 (p->u.s[0]) |
| #define | a01 (p->u.s[1]) |
| #define | a02 (p->u.s[2]) |
| #define | a03 (p->u.s[3]) |
| #define | a04 (p->u.s[4]) |
| #define | a10 (p->u.s[5]) |
| #define | a11 (p->u.s[6]) |
| #define | a12 (p->u.s[7]) |
| #define | a13 (p->u.s[8]) |
| #define | a14 (p->u.s[9]) |
| #define | a20 (p->u.s[10]) |
| #define | a21 (p->u.s[11]) |
| #define | a22 (p->u.s[12]) |
| #define | a23 (p->u.s[13]) |
| #define | a24 (p->u.s[14]) |
| #define | a30 (p->u.s[15]) |
| #define | a31 (p->u.s[16]) |
| #define | a32 (p->u.s[17]) |
| #define | a33 (p->u.s[18]) |
| #define | a34 (p->u.s[19]) |
| #define | a40 (p->u.s[20]) |
| #define | a41 (p->u.s[21]) |
| #define | a42 (p->u.s[22]) |
| #define | a43 (p->u.s[23]) |
| #define | a44 (p->u.s[24]) |
| #define | ROL64(a, x) ((a<<x)|(a>>(64-x))) |
| #define | FSDIR_SCHEMA "(name,mode,mtime,data,path HIDDEN,dir HIDDEN)" |
| #define | FSDIR_COLUMN_NAME 0 /* Name of the file */ |
| #define | FSDIR_COLUMN_MODE 1 /* Access mode */ |
| #define | FSDIR_COLUMN_MTIME 2 /* Last modification time */ |
| #define | FSDIR_COLUMN_DATA 3 /* File content */ |
| #define | FSDIR_COLUMN_PATH 4 /* Path to top of search */ |
| #define | FSDIR_COLUMN_DIR 5 /* Path is relative to this directory */ |
| #define | COMPLETION_FIRST_PHASE 1 |
| #define | COMPLETION_KEYWORDS 1 |
| #define | COMPLETION_PRAGMAS 2 |
| #define | COMPLETION_FUNCTIONS 3 |
| #define | COMPLETION_COLLATIONS 4 |
| #define | COMPLETION_INDEXES 5 |
| #define | COMPLETION_TRIGGERS 6 |
| #define | COMPLETION_DATABASES 7 |
| #define | COMPLETION_TABLES 8 /* Also VIEWs and TRIGGERs */ |
| #define | COMPLETION_COLUMNS 9 |
| #define | COMPLETION_MODULES 10 |
| #define | COMPLETION_EOF 11 |
| #define | COMPLETION_COLUMN_CANDIDATE 0 /* Suggested completion of the input */ |
| #define | COMPLETION_COLUMN_PREFIX 1 /* Prefix of the word to be completed */ |
| #define | COMPLETION_COLUMN_WHOLELINE 2 /* Entire line seen so far */ |
| #define | COMPLETION_COLUMN_PHASE 3 /* ePhase - used for debugging only */ |
| #define | APND_MARK_PREFIX "Start-Of-SQLite3-" |
| #define | APND_MARK_PREFIX_SZ 17 |
| #define | APND_MARK_SIZE 25 |
| #define | APND_MAX_SIZE (65536*15259) |
| #define | ORIGVFS(p) ((sqlite3_vfs*)((p)->pAppData)) |
| #define | ORIGFILE(p) ((sqlite3_file*)(((ApndFile*)(p))+1)) |
| #define | SQLITEEXPERT_H 1 |
| #define | EXPERT_CONFIG_SAMPLE 1 /* int */ |
| #define | EXPERT_REPORT_SQL 1 |
| #define | EXPERT_REPORT_INDEXES 2 |
| #define | EXPERT_REPORT_PLAN 3 |
| #define | EXPERT_REPORT_CANDIDATES 4 |
| #define | STRLEN (int)strlen |
| #define | UNIQUE_TABLE_NAME "t592690916721053953805701627921227776" |
| #define | IDX_HASH_SIZE 1023 |
| #define | AUTOEQP_off 0 /* Automatic EXPLAIN QUERY PLAN is off */ |
| #define | AUTOEQP_on 1 /* Automatic EQP is on */ |
| #define | AUTOEQP_trigger 2 /* On and also show plans for triggers */ |
| #define | AUTOEQP_full 3 /* Show full EXPLAIN */ |
| #define | SHELL_OPEN_UNSPEC 0 /* No open-mode specified */ |
| #define | SHELL_OPEN_NORMAL 1 /* Normal database file */ |
| #define | SHELL_OPEN_APPENDVFS 2 /* Use appendvfs */ |
| #define | SHELL_OPEN_ZIPFILE 3 /* Use the zipfile virtual table */ |
| #define | SHELL_OPEN_READONLY 4 /* Open a normal database read-only */ |
| #define | SHELL_OPEN_DESERIALIZE 5 /* Open using sqlite3_deserialize() */ |
| #define | SHELL_OPEN_HEXDB 6 /* Use "dbtotxt" output as data source */ |
| #define | SHELL_TRACE_PLAIN 0 /* Show input SQL text */ |
| #define | SHELL_TRACE_EXPANDED 1 /* Show expanded SQL text */ |
| #define | SHELL_TRACE_NORMALIZED 2 /* Show normalized SQL text */ |
| #define | SHELL_PROGRESS_QUIET 0x01 /* Omit announcing every progress callback */ |
| #define | SHELL_PROGRESS_RESET |
| #define | SHELL_PROGRESS_ONCE 0x04 /* Cancel the --limit after firing once */ |
| #define | SHFLG_Pagecache 0x00000001 /* The --pagecache option is used */ |
| #define | SHFLG_Lookaside 0x00000002 /* Lookaside memory is used */ |
| #define | SHFLG_Backslash 0x00000004 /* The --backslash option is used */ |
| #define | SHFLG_PreserveRowid 0x00000008 /* .dump preserves rowid values */ |
| #define | SHFLG_Newlines 0x00000010 /* .dump --newline flag */ |
| #define | SHFLG_CountChanges 0x00000020 /* .changes setting */ |
| #define | SHFLG_Echo 0x00000040 /* .echo or --echo setting */ |
| #define | ShellHasFlag(P, X) (((P)->shellFlgs & (X))!=0) |
| #define | ShellSetFlag(P, X) ((P)->shellFlgs|=(X)) |
| #define | ShellClearFlag(P, X) ((P)->shellFlgs&=(~(X))) |
| #define | MODE_Line 0 /* One column per line. Blank line between records */ |
| #define | MODE_Column 1 /* One record per line in neat columns */ |
| #define | MODE_List 2 /* One record per line with a separator */ |
| #define | MODE_Semi 3 /* Same as MODE_List but append ";" to each line */ |
| #define | MODE_Html 4 /* Generate an XHTML table */ |
| #define | MODE_Insert 5 /* Generate SQL "insert" statements */ |
| #define | MODE_Quote 6 /* Quote values as for SQL */ |
| #define | MODE_Tcl 7 /* Generate ANSI-C or TCL quoted elements */ |
| #define | MODE_Csv 8 /* Quote strings, numbers are plain */ |
| #define | MODE_Explain 9 /* Like MODE_Column, but do not truncate data */ |
| #define | MODE_Ascii 10 /* Use ASCII unit and record separators (0x1F/0x1E) */ |
| #define | MODE_Pretty 11 /* Pretty-print schemas */ |
| #define | MODE_EQP 12 /* Converts EXPLAIN QUERY PLAN output into a graph */ |
| #define | SEP_Column "|" |
| #define | SEP_Row "\n" |
| #define | SEP_Tab "\t" |
| #define | SEP_Space " " |
| #define | SEP_Comma "," |
| #define | SEP_CrLf "\r\n" |
| #define | SEP_Unit "\x1F" |
| #define | SEP_Record "\x1E" |
| #define | session_close_all(X) |
| #define | OPEN_DB_KEEPALIVE 0x001 /* Return after error if true */ |
| #define | OPEN_DB_ZIPFILE 0x002 /* Open as ZIP if name matches *.zip */ |
| #define | CTIMEOPT_VAL_(opt) #opt |
| #define | CTIMEOPT_VAL(opt) CTIMEOPT_VAL_(opt) |
| #define | SQLITE_SHELL_IS_UTF8 (1) |
Functions | |
| int | isatty (int) |
| FILE * | popen (const char *, const char *) |
| int | pclose (FILE *) |
| static sqlite3_int64 | timeOfDay (void) |
| static void | beginTimer (void) |
| static double | timeDiff (struct timeval *pStart, struct timeval *pEnd) |
| static void | endTimer (void) |
| static void | shell_out_of_memory (void) |
| static void | utf8_width_print (FILE *pOut, int w, const char *zUtf) |
| static int | isNumber (const char *z, int *realnum) |
| static int | strlen30 (const char *z) |
| static int | strlenChar (const char *z) |
| static char * | local_getline (char *zLine, FILE *in) |
| static char * | one_input_line (FILE *in, char *zPrior, int isContinuation) |
| static int | hexDigitValue (char c) |
| static sqlite3_int64 | integerValue (const char *zArg) |
| static void | initText (ShellText *p) |
| static void | freeText (ShellText *p) |
| static void | appendText (ShellText *p, char const *zAppend, char quote) |
| static char | quoteChar (const char *zName) |
| static char * | shellFakeSchema (sqlite3 *db, const char *zSchema, const char *zName) |
| static void | shellModuleSchema (sqlite3_context *pCtx, int nVal, sqlite3_value **apVal) |
| static void | shellAddSchemaName (sqlite3_context *pCtx, int nVal, sqlite3_value **apVal) |
| static void | KeccakF1600Step (SHA3Context *p) |
| static void | SHA3Init (SHA3Context *p, int iSize) |
| static void | SHA3Update (SHA3Context *p, const unsigned char *aData, unsigned int nData) |
| static unsigned char * | SHA3Final (SHA3Context *p) |
| static void | sha3Func (sqlite3_context *context, int argc, sqlite3_value **argv) |
| static void | hash_step_vformat (SHA3Context *p, const char *zFormat,...) |
| static void | sha3QueryFunc (sqlite3_context *context, int argc, sqlite3_value **argv) |
| int | sqlite3_shathree_init (sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi) |
| static void | readFileContents (sqlite3_context *ctx, const char *zName) |
| static void | readfileFunc (sqlite3_context *context, int argc, sqlite3_value **argv) |
| static void | ctxErrorMsg (sqlite3_context *ctx, const char *zFmt,...) |
| static int | fileStat (const char *zPath, struct stat *pStatBuf) |
| static int | fileLinkStat (const char *zPath, struct stat *pStatBuf) |
| static int | makeDirectory (const char *zFile) |
| static int | writeFile (sqlite3_context *pCtx, const char *zFile, sqlite3_value *pData, mode_t mode, sqlite3_int64 mtime) |
| static void | writefileFunc (sqlite3_context *context, int argc, sqlite3_value **argv) |
| static void | lsModeFunc (sqlite3_context *context, int argc, sqlite3_value **argv) |
| static int | fsdirConnect (sqlite3 *db, void *pAux, int argc, const char *const *argv, sqlite3_vtab **ppVtab, char **pzErr) |
| static int | fsdirDisconnect (sqlite3_vtab *pVtab) |
| static int | fsdirOpen (sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor) |
| static void | fsdirResetCursor (fsdir_cursor *pCur) |
| static int | fsdirClose (sqlite3_vtab_cursor *cur) |
| static void | fsdirSetErrmsg (fsdir_cursor *pCur, const char *zFmt,...) |
| static int | fsdirNext (sqlite3_vtab_cursor *cur) |
| static int | fsdirColumn (sqlite3_vtab_cursor *cur, sqlite3_context *ctx, int i) |
| static int | fsdirRowid (sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid) |
| static int | fsdirEof (sqlite3_vtab_cursor *cur) |
| static int | fsdirFilter (sqlite3_vtab_cursor *cur, int idxNum, const char *idxStr, int argc, sqlite3_value **argv) |
| static int | fsdirBestIndex (sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo) |
| static int | fsdirRegister (sqlite3 *db) |
| int | sqlite3_fileio_init (sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi) |
| static int | completionConnect (sqlite3 *db, void *pAux, int argc, const char *const *argv, sqlite3_vtab **ppVtab, char **pzErr) |
| static int | completionDisconnect (sqlite3_vtab *pVtab) |
| static int | completionOpen (sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor) |
| static void | completionCursorReset (completion_cursor *pCur) |
| static int | completionClose (sqlite3_vtab_cursor *cur) |
| static int | completionNext (sqlite3_vtab_cursor *cur) |
| static int | completionColumn (sqlite3_vtab_cursor *cur, sqlite3_context *ctx, int i) |
| static int | completionRowid (sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid) |
| static int | completionEof (sqlite3_vtab_cursor *cur) |
| static int | completionFilter (sqlite3_vtab_cursor *pVtabCursor, int idxNum, const char *idxStr, int argc, sqlite3_value **argv) |
| static int | completionBestIndex (sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo) |
| int | sqlite3CompletionVtabInit (sqlite3 *db) |
| int | sqlite3_completion_init (sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi) |
| static int | apndClose (sqlite3_file *) |
| static int | apndRead (sqlite3_file *, void *, int iAmt, sqlite3_int64 iOfst) |
| static int | apndWrite (sqlite3_file *, const void *, int iAmt, sqlite3_int64 iOfst) |
| static int | apndTruncate (sqlite3_file *, sqlite3_int64 size) |
| static int | apndSync (sqlite3_file *, int flags) |
| static int | apndFileSize (sqlite3_file *, sqlite3_int64 *pSize) |
| static int | apndLock (sqlite3_file *, int) |
| static int | apndUnlock (sqlite3_file *, int) |
| static int | apndCheckReservedLock (sqlite3_file *, int *pResOut) |
| static int | apndFileControl (sqlite3_file *, int op, void *pArg) |
| static int | apndSectorSize (sqlite3_file *) |
| static int | apndDeviceCharacteristics (sqlite3_file *) |
| static int | apndShmMap (sqlite3_file *, int iPg, int pgsz, int, void volatile **) |
| static int | apndShmLock (sqlite3_file *, int offset, int n, int flags) |
| static void | apndShmBarrier (sqlite3_file *) |
| static int | apndShmUnmap (sqlite3_file *, int deleteFlag) |
| static int | apndFetch (sqlite3_file *, sqlite3_int64 iOfst, int iAmt, void **pp) |
| static int | apndUnfetch (sqlite3_file *, sqlite3_int64 iOfst, void *p) |
| static int | apndOpen (sqlite3_vfs *, const char *, sqlite3_file *, int, int *) |
| static int | apndDelete (sqlite3_vfs *, const char *zName, int syncDir) |
| static int | apndAccess (sqlite3_vfs *, const char *zName, int flags, int *) |
| static int | apndFullPathname (sqlite3_vfs *, const char *zName, int, char *zOut) |
| static void * | apndDlOpen (sqlite3_vfs *, const char *zFilename) |
| static void | apndDlError (sqlite3_vfs *, int nByte, char *zErrMsg) |
| static void | apndDlClose (sqlite3_vfs *, void *) |
| static int | apndRandomness (sqlite3_vfs *, int nByte, char *zOut) |
| static int | apndSleep (sqlite3_vfs *, int microseconds) |
| static int | apndCurrentTime (sqlite3_vfs *, double *) |
| static int | apndGetLastError (sqlite3_vfs *, int, char *) |
| static int | apndCurrentTimeInt64 (sqlite3_vfs *, sqlite3_int64 *) |
| static int | apndSetSystemCall (sqlite3_vfs *, const char *, sqlite3_syscall_ptr) |
| static sqlite3_syscall_ptr | apndGetSystemCall (sqlite3_vfs *, const char *z) |
| static const char * | apndNextSystemCall (sqlite3_vfs *, const char *zName) |
| static int | apndWriteMark (ApndFile *p, sqlite3_file *pFile) |
| static int | apndIsOrdinaryDatabaseFile (sqlite3_int64 sz, sqlite3_file *pFile) |
| static sqlite3_int64 | apndReadMark (sqlite3_int64 sz, sqlite3_file *pFile) |
| int | sqlite3_appendvfs_init (sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi) |
| static void * | memtraceMalloc (int n) |
| static void | memtraceFree (void *p) |
| static void * | memtraceRealloc (void *p, int n) |
| static int | memtraceSize (void *p) |
| static int | memtraceRoundup (int n) |
| static int | memtraceInit (void *p) |
| static void | memtraceShutdown (void *p) |
| int | sqlite3MemTraceActivate (FILE *out) |
| int | sqlite3MemTraceDeactivate (void) |
| static int | uintCollFunc (void *notUsed, int nKey1, const void *pKey1, int nKey2, const void *pKey2) |
| int | sqlite3_uint_init (sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi) |
| sqlite3expert * | sqlite3_expert_new (sqlite3 *db, char **pzErr) |
| int | sqlite3_expert_config (sqlite3expert *p, int op,...) |
| int | sqlite3_expert_sql (sqlite3expert *p, const char *zSql, char **pzErr) |
| int | sqlite3_expert_analyze (sqlite3expert *p, char **pzErr) |
| int | sqlite3_expert_count (sqlite3expert *) |
| const char * | sqlite3_expert_report (sqlite3expert *, int iStmt, int eReport) |
| void | sqlite3_expert_destroy (sqlite3expert *) |
| static void * | idxMalloc (int *pRc, int nByte) |
| static void | idxHashInit (IdxHash *pHash) |
| static void | idxHashClear (IdxHash *pHash) |
| static int | idxHashString (const char *z, int n) |
| static int | idxHashAdd (int *pRc, IdxHash *pHash, const char *zKey, const char *zVal) |
| static IdxHashEntry * | idxHashFind (IdxHash *pHash, const char *zKey, int nKey) |
| static const char * | idxHashSearch (IdxHash *pHash, const char *zKey, int nKey) |
| static IdxConstraint * | idxNewConstraint (int *pRc, const char *zColl) |
| static void | idxDatabaseError (sqlite3 *db, char **pzErrmsg) |
| static int | idxPrepareStmt (sqlite3 *db, sqlite3_stmt **ppStmt, char **pzErrmsg, const char *zSql) |
| static int | idxPrintfPrepareStmt (sqlite3 *db, sqlite3_stmt **ppStmt, char **pzErrmsg, const char *zFmt,...) |
| static char * | expertDequote (const char *zIn) |
| static int | expertConnect (sqlite3 *db, void *pAux, int argc, const char *const *argv, sqlite3_vtab **ppVtab, char **pzErr) |
| static int | expertDisconnect (sqlite3_vtab *pVtab) |
| static int | expertBestIndex (sqlite3_vtab *pVtab, sqlite3_index_info *pIdxInfo) |
| static int | expertUpdate (sqlite3_vtab *pVtab, int nData, sqlite3_value **azData, sqlite_int64 *pRowid) |
| static int | expertOpen (sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor) |
| static int | expertClose (sqlite3_vtab_cursor *cur) |
| static int | expertEof (sqlite3_vtab_cursor *cur) |
| static int | expertNext (sqlite3_vtab_cursor *cur) |
| static int | expertRowid (sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid) |
| static int | expertColumn (sqlite3_vtab_cursor *cur, sqlite3_context *ctx, int i) |
| static int | expertFilter (sqlite3_vtab_cursor *cur, int idxNum, const char *idxStr, int argc, sqlite3_value **argv) |
| static int | idxRegisterVtab (sqlite3expert *p) |
| static void | idxFinalize (int *pRc, sqlite3_stmt *pStmt) |
| static int | idxGetTableInfo (sqlite3 *db, const char *zTab, IdxTable **ppOut, char **pzErrmsg) |
| static char * | idxAppendText (int *pRc, char *zIn, const char *zFmt,...) |
| static int | idxIdentifierRequiresQuotes (const char *zId) |
| static char * | idxAppendColDefn (int *pRc, char *zIn, IdxTable *pTab, IdxConstraint *pCons) |
| static int | idxFindCompatible (int *pRc, sqlite3 *dbm, IdxScan *pScan, IdxConstraint *pEq, IdxConstraint *pTail) |
| static int | idxCreateFromCons (sqlite3expert *p, IdxScan *pScan, IdxConstraint *pEq, IdxConstraint *pTail) |
| static int | idxFindConstraint (IdxConstraint *pList, IdxConstraint *p) |
| static int | idxCreateFromWhere (sqlite3expert *p, IdxScan *pScan, IdxConstraint *pTail) |
| static int | idxCreateCandidates (sqlite3expert *p) |
| static void | idxConstraintFree (IdxConstraint *pConstraint) |
| static void | idxScanFree (IdxScan *pScan, IdxScan *pLast) |
| static void | idxStatementFree (IdxStatement *pStatement, IdxStatement *pLast) |
| static void | idxTableFree (IdxTable *pTab) |
| static void | idxWriteFree (IdxWrite *pTab) |
| int | idxFindIndexes (sqlite3expert *p, char **pzErr) |
| static int | idxAuthCallback (void *pCtx, int eOp, const char *z3, const char *z4, const char *zDb, const char *zTrigger) |
| static int | idxProcessOneTrigger (sqlite3expert *p, IdxWrite *pWrite, char **pzErr) |
| static int | idxProcessTriggers (sqlite3expert *p, char **pzErr) |
| static int | idxCreateVtabSchema (sqlite3expert *p, char **pzErrmsg) |
| static void | idxSampleFunc (sqlite3_context *pCtx, int argc, sqlite3_value **argv) |
| static void | idxRemFunc (sqlite3_context *pCtx, int argc, sqlite3_value **argv) |
| static int | idxLargestIndex (sqlite3 *db, int *pnMax, char **pzErr) |
| static int | idxPopulateOneStat1 (sqlite3expert *p, sqlite3_stmt *pIndexXInfo, sqlite3_stmt *pWriteStat, const char *zTab, const char *zIdx, char **pzErr) |
| static int | idxBuildSampleTable (sqlite3expert *p, const char *zTab) |
| static int | idxPopulateStat1 (sqlite3expert *p, char **pzErr) |
| static void | shellLog (void *pArg, int iErrCode, const char *zMsg) |
| static void | shellPutsFunc (sqlite3_context *pCtx, int nVal, sqlite3_value **apVal) |
| static void | editFunc (sqlite3_context *context, int argc, sqlite3_value **argv) |
| static void | outputModePush (ShellState *p) |
| static void | outputModePop (ShellState *p) |
| static void | output_hex_blob (FILE *out, const void *pBlob, int nBlob) |
| static const char * | unused_string (const char *z, const char *zA, const char *zB, char *zBuf) |
| static void | output_quoted_string (FILE *out, const char *z) |
| static void | output_quoted_escaped_string (FILE *out, const char *z) |
| static void | output_c_string (FILE *out, const char *z) |
| static void | output_html_string (FILE *out, const char *z) |
| static void | output_csv (ShellState *p, const char *z, int bSep) |
| static void | interrupt_handler (int NotUsed) |
| static int | shellAuth (void *pClientData, int op, const char *zA1, const char *zA2, const char *zA3, const char *zA4) |
| static void | printSchemaLine (FILE *out, const char *z, const char *zTail) |
| static void | printSchemaLineN (FILE *out, char *z, int n, const char *zTail) |
| static int | wsToEol (const char *z) |
| static void | eqp_append (ShellState *p, int iEqpId, int p2, const char *zText) |
| static void | eqp_reset (ShellState *p) |
| static EQPGraphRow * | eqp_next_row (ShellState *p, int iEqpId, EQPGraphRow *pOld) |
| static void | eqp_render_level (ShellState *p, int iEqpId) |
| static void | eqp_render (ShellState *p) |
| static int | progress_handler (void *pClientData) |
| static int | shell_callback (void *pArg, int nArg, char **azArg, char **azCol, int *aiType) |
| static int | callback (void *pArg, int nArg, char **azArg, char **azCol) |
| static int | captureOutputCallback (void *pArg, int nArg, char **azArg, char **az) |
| static void | createSelftestTable (ShellState *p) |
| static void | set_table_name (ShellState *p, const char *zName) |
| static int | run_table_dump_query (ShellState *p, const char *zSelect) |
| static char * | save_err_msg (sqlite3 *db) |
| static void | displayStatLine (ShellState *p, char *zLabel, char *zFormat, int iStatusCtrl, int bReset) |
| static int | display_stats (sqlite3 *db, ShellState *pArg, int bReset) |
| static void | display_scanstats (sqlite3 *db, ShellState *pArg) |
| static int | str_in_array (const char *zStr, const char **azArray) |
| static void | explain_data_prepare (ShellState *p, sqlite3_stmt *pSql) |
| static void | explain_data_delete (ShellState *p) |
| static void | disable_debug_trace_modes (void) |
| static void | restore_debug_trace_modes (void) |
| static void | bind_table_init (ShellState *p) |
| static void | bind_prepared_stmt (ShellState *pArg, sqlite3_stmt *pStmt) |
| static void | exec_prepared_stmt (ShellState *pArg, sqlite3_stmt *pStmt) |
| static int | expertHandleSQL (ShellState *pState, const char *zSql, char **pzErr) |
| static int | expertFinish (ShellState *pState, int bCancel, char **pzErr) |
| static int | expertDotCommand (ShellState *pState, char **azArg, int nArg) |
| static int | shell_exec (ShellState *pArg, const char *zSql, char **pzErrMsg) |
| static void | freeColumnList (char **azCol) |
| static char ** | tableColumnList (ShellState *p, const char *zTab) |
| static void | toggleSelectOrder (sqlite3 *db) |
| static int | dump_callback (void *pArg, int nArg, char **azArg, char **azNotUsed) |
| static int | run_schema_dump_query (ShellState *p, const char *zQuery) |
| static int | showHelp (FILE *out, const char *zPattern) |
| static int | process_input (ShellState *p) |
| static char * | readFile (const char *zName, int *pnByte) |
| int | deduceDatabaseType (const char *zName, int dfltZip) |
| static void | shellInt32 (sqlite3_context *context, int argc, sqlite3_value **argv) |
| static void | shellIdQuote (sqlite3_context *context, int argc, sqlite3_value **argv) |
| static void | shellEscapeCrnl (sqlite3_context *context, int argc, sqlite3_value **argv) |
| static void | open_db (ShellState *p, int openFlags) |
| void | close_db (sqlite3 *db) |
| static void | resolve_backslashes (char *z) |
| static int | booleanValue (const char *zArg) |
| static void | setOrClearFlag (ShellState *p, unsigned mFlag, const char *zArg) |
| static void | output_file_close (FILE *f) |
| static FILE * | output_file_open (const char *zFile, int bTextMode) |
| static int | sql_trace_callback (unsigned mType, void *pArg, void *pP, void *pX) |
| static void | test_breakpoint (void) |
| static void | import_append_char (ImportCtx *p, int c) |
| static char * | csv_read_one_field (ImportCtx *p) |
| static char * | ascii_read_one_field (ImportCtx *p) |
| static void | tryToCloneData (ShellState *p, sqlite3 *newDb, const char *zTable) |
| static void | tryToCloneSchema (ShellState *p, sqlite3 *newDb, const char *zWhere, void(*xForEach)(ShellState *, sqlite3 *, const char *)) |
| static void | tryToClone (ShellState *p, const char *zNewDb) |
| static void | output_reset (ShellState *p) |
| static int | db_int (ShellState *p, const char *zSql) |
| static unsigned int | get2byteInt (unsigned char *a) |
| static unsigned int | get4byteInt (unsigned char *a) |
| static int | shell_dbinfo_command (ShellState *p, int nArg, char **azArg) |
| static int | shellDatabaseError (sqlite3 *db) |
| static int | testcase_glob (const char *zGlob, const char *z) |
| static int | optionMatch (const char *zStr, const char *zOpt) |
| int | shellDeleteFile (const char *zFilename) |
| static void | clearTempFile (ShellState *p) |
| static void | newTempFile (ShellState *p, const char *zSuffix) |
| static void | shellFkeyCollateClause (sqlite3_context *pCtx, int nVal, sqlite3_value **apVal) |
| static int | lintFkeyIndexes (ShellState *pState, char **azArg, int nArg) |
| static int | lintDotCommand (ShellState *pState, char **azArg, int nArg) |
| static void | shellPrepare (sqlite3 *db, int *pRc, const char *zSql, sqlite3_stmt **ppStmt) |
| void | shellPreparePrintf (sqlite3 *db, int *pRc, sqlite3_stmt **ppStmt, const char *zFmt,...) |
| void | shellFinalize (int *pRc, sqlite3_stmt *pStmt) |
| void | shellReset (int *pRc, sqlite3_stmt *pStmt) |
| static int | do_meta_command (char *zLine, ShellState *p) |
| static int | line_contains_semicolon (const char *z, int N) |
| static int | _all_whitespace (const char *z) |
| static int | line_is_command_terminator (const char *zLine) |
| static int | line_is_complete (char *zSql, int nSql) |
| static int | runOneSqlLine (ShellState *p, char *zSql, FILE *in, int startline) |
| static char * | find_home_dir (int clearFlag) |
| static void | process_sqliterc (ShellState *p, const char *sqliterc_override) |
| static void | usage (int showDetail) |
| static void | verify_uninitialized (void) |
| static void | main_init (ShellState *data) |
| static void | printBold (const char *zText) |
| static char * | cmdline_option_value (int argc, char **argv, int i) |
| int | main (int argc, char **argv) |
Variables | |
| static int | enableTimer = 0 |
| static struct rusage | sBegin |
| static sqlite3_int64 | iBegin |
| static int | bail_on_error = 0 |
| static int | stdin_is_interactive = 1 |
| static int | stdout_is_console = 1 |
| static sqlite3 * | globalDb = 0 |
| static volatile int | seenInterrupt = 0 |
| static char * | Argv0 |
| static char | mainPrompt [20] |
| static char | continuePrompt [20] |
| static sqlite3_module | completionModule |
| static void(*)(void) | apndDlSym (sqlite3_vfs *pVfs, void *p, const char *zSym) |
| static sqlite3_vfs | apnd_vfs |
| static const sqlite3_io_methods | apnd_io_methods |
| static sqlite3_mem_methods | memtraceBase |
| static FILE * | memtraceOut |
| static sqlite3_mem_methods | ersaztMethods |
| static const char * | modeDescr [] |
| static const char | needCsvQuote [] |
| static const char * | azHelp [] |
| static const char | zOptions [] |
| #define a00 (p->u.s[0]) |
| #define a01 (p->u.s[1]) |
| #define a02 (p->u.s[2]) |
| #define a03 (p->u.s[3]) |
| #define a04 (p->u.s[4]) |
| #define a10 (p->u.s[5]) |
| #define a11 (p->u.s[6]) |
| #define a12 (p->u.s[7]) |
| #define a13 (p->u.s[8]) |
| #define a14 (p->u.s[9]) |
| #define a20 (p->u.s[10]) |
| #define a21 (p->u.s[11]) |
| #define a22 (p->u.s[12]) |
| #define a23 (p->u.s[13]) |
| #define a24 (p->u.s[14]) |
| #define a30 (p->u.s[15]) |
| #define a31 (p->u.s[16]) |
| #define a32 (p->u.s[17]) |
| #define a33 (p->u.s[18]) |
| #define a34 (p->u.s[19]) |
| #define a40 (p->u.s[20]) |
| #define a41 (p->u.s[21]) |
| #define a42 (p->u.s[22]) |
| #define a43 (p->u.s[23]) |
| #define a44 (p->u.s[24]) |
| #define AUTOEQP_off 0 /* Automatic EXPLAIN QUERY PLAN is off */ |
| #define AUTOEQP_trigger 2 /* On and also show plans for triggers */ |
| #define BEGIN_TIMER beginTimer() |
| #define COMPLETION_COLUMN_CANDIDATE 0 /* Suggested completion of the input */ |
| #define COMPLETION_COLUMN_PHASE 3 /* ePhase - used for debugging only */ |
| #define COMPLETION_COLUMN_PREFIX 1 /* Prefix of the word to be completed */ |
| #define COMPLETION_COLUMN_WHOLELINE 2 /* Entire line seen so far */ |
| #define CTIMEOPT_VAL | ( | opt | ) | CTIMEOPT_VAL_(opt) |
| #define CTIMEOPT_VAL_ | ( | opt | ) | #opt |
| #define FSDIR_COLUMN_DIR 5 /* Path is relative to this directory */ |
| #define FSDIR_SCHEMA "(name,mode,mtime,data,path HIDDEN,dir HIDDEN)" |
| #define MODE_Ascii 10 /* Use ASCII unit and record separators (0x1F/0x1E) */ |
| #define MODE_Column 1 /* One record per line in neat columns */ |
| #define MODE_EQP 12 /* Converts EXPLAIN QUERY PLAN output into a graph */ |
| #define MODE_Explain 9 /* Like MODE_Column, but do not truncate data */ |
| #define MODE_Insert 5 /* Generate SQL "insert" statements */ |
| #define MODE_Line 0 /* One column per line. Blank line between records */ |
| #define MODE_List 2 /* One record per line with a separator */ |
| #define MODE_Semi 3 /* Same as MODE_List but append ";" to each line */ |
| #define MODE_Tcl 7 /* Generate ANSI-C or TCL quoted elements */ |
| #define OPEN_DB_KEEPALIVE 0x001 /* Return after error if true */ |
| #define OPEN_DB_ZIPFILE 0x002 /* Open as ZIP if name matches *.zip */ |
| #define ORIGFILE | ( | p | ) | ((sqlite3_file*)(((ApndFile*)(p))+1)) |
| #define ORIGVFS | ( | p | ) | ((sqlite3_vfs*)((p)->pAppData)) |
| #define ROL64 | ( | a, | |
| x | |||
| ) | ((a<<x)|(a>>(64-x))) |
| #define SHELL_OPEN_DESERIALIZE 5 /* Open using sqlite3_deserialize() */ |
| #define SHELL_OPEN_HEXDB 6 /* Use "dbtotxt" output as data source */ |
| #define SHELL_OPEN_READONLY 4 /* Open a normal database read-only */ |
| #define SHELL_OPEN_ZIPFILE 3 /* Use the zipfile virtual table */ |
| #define SHELL_PROGRESS_ONCE 0x04 /* Cancel the --limit after firing once */ |
| #define SHELL_PROGRESS_QUIET 0x01 /* Omit announcing every progress callback */ |
| #define SHELL_PROGRESS_RESET |
| #define SHELL_TRACE_EXPANDED 1 /* Show expanded SQL text */ |
| #define SHELL_TRACE_NORMALIZED 2 /* Show normalized SQL text */ |
| #define SHFLG_Backslash 0x00000004 /* The --backslash option is used */ |
| #define SHFLG_CountChanges 0x00000020 /* .changes setting */ |
| #define SHFLG_Echo 0x00000040 /* .echo or --echo setting */ |
| #define SHFLG_Lookaside 0x00000002 /* Lookaside memory is used */ |
| #define SHFLG_Newlines 0x00000010 /* .dump --newline flag */ |
| #define SHFLG_Pagecache 0x00000001 /* The --pagecache option is used */ |
| #define SHFLG_PreserveRowid 0x00000008 /* .dump preserves rowid values */ |
| #define UNIQUE_TABLE_NAME "t592690916721053953805701627921227776" |
| typedef struct sqlite3_vfs ApndVfs |
| typedef struct completion_cursor completion_cursor |
| typedef struct completion_vtab completion_vtab |
| typedef struct EQPGraphRow EQPGraphRow |
| typedef struct ExpertInfo ExpertInfo |
| typedef struct ExpertVtab ExpertVtab |
| typedef struct fsdir_cursor fsdir_cursor |
| typedef struct FsdirLevel FsdirLevel |
| typedef sqlite3_int64 i64 |
| typedef struct IdxConstraint IdxConstraint |
| typedef struct IdxHashEntry IdxHashEntry |
| typedef struct IdxStatement IdxStatement |
| typedef struct SavedModeInfo SavedModeInfo |
| typedef struct SHA3Context SHA3Context |
| typedef struct ShellState ShellState |
| typedef struct sqlite3expert sqlite3expert |
| typedef sqlite3_uint64 u64 |
|
static |
Definition at line 18576 of file shell.c.
References IsSpace.
Referenced by line_is_command_terminator(), and process_input().
|
static |
|
static |
Definition at line 3910 of file shell.c.
References ORIGFILE, sqlite3_file::pMethods, and sqlite3_io_methods::xCheckReservedLock.
|
static |
Definition at line 3794 of file shell.c.
References ORIGFILE, sqlite3_file::pMethods, and sqlite3_io_methods::xClose.
|
static |
|
static |
|
static |
|
static |
Definition at line 3940 of file shell.c.
References ORIGFILE, sqlite3_file::pMethods, and sqlite3_io_methods::xDeviceCharacteristics.
|
static |
|
static |
|
static |
|
static |
Definition at line 3976 of file shell.c.
References ApndFile::iPgOne, ORIGFILE, sqlite3_file::pMethods, and sqlite3_io_methods::xFetch.
|
static |
Definition at line 3918 of file shell.c.
References ApndFile::iPgOne, ORIGFILE, sqlite3_file::pMethods, sqlite3_mprintf, SQLITE_FCNTL_VFSNAME, SQLITE_OK, and sqlite3_io_methods::xFileControl.
|
static |
Definition at line 3880 of file shell.c.
References APND_MARK_SIZE, ApndFile::iPgOne, ORIGFILE, sqlite3_file::pMethods, SQLITE_OK, and sqlite3_io_methods::xFileSize.
|
static |
|
static |
|
static |
|
static |
Definition at line 3997 of file shell.c.
References sqlite3_file::pMethods, and sqlite3_io_methods::xRead.
Referenced by apndOpen().
|
static |
Definition at line 3894 of file shell.c.
References ORIGFILE, sqlite3_file::pMethods, and sqlite3_io_methods::xLock.
|
static |
|
static |
Definition at line 4031 of file shell.c.
References apnd_io_methods, apndIsOrdinaryDatabaseFile(), apndReadMark(), ApndFile::base, ApndFile::iMark, ApndFile::iPgOne, ORIGFILE, ORIGVFS, sqlite3_file::pMethods, SQLITE_CANTOPEN, SQLITE_OK, SQLITE_OPEN_CREATE, SQLITE_OPEN_MAIN_DB, sqlite3_vfs::szOsFile, sqlite3_io_methods::xClose, sqlite3_io_methods::xFileSize, sqlite3_vfs::xOpen, and zName.
|
static |
|
static |
Definition at line 3802 of file shell.c.
References ApndFile::iPgOne, ORIGFILE, sqlite3_file::pMethods, and sqlite3_io_methods::xRead.
|
static |
Definition at line 4012 of file shell.c.
References APND_MARK_PREFIX, APND_MARK_PREFIX_SZ, APND_MARK_SIZE, sqlite3_file::pMethods, and sqlite3_io_methods::xRead.
Referenced by apndOpen().
|
static |
Definition at line 3932 of file shell.c.
References ORIGFILE, sqlite3_file::pMethods, and sqlite3_io_methods::xSectorSize.
|
static |
|
static |
Definition at line 3964 of file shell.c.
References ORIGFILE, sqlite3_file::pMethods, and sqlite3_io_methods::xShmBarrier.
|
static |
Definition at line 3958 of file shell.c.
References offset, ORIGFILE, sqlite3_file::pMethods, and sqlite3_io_methods::xShmLock.
|
static |
Definition at line 3946 of file shell.c.
References ORIGFILE, sqlite3_file::pMethods, and sqlite3_io_methods::xShmMap.
|
static |
Definition at line 3970 of file shell.c.
References ORIGFILE, sqlite3_file::pMethods, and sqlite3_io_methods::xShmUnmap.
|
static |
|
static |
Definition at line 3872 of file shell.c.
References ORIGFILE, sqlite3_file::pMethods, and sqlite3_io_methods::xSync.
|
static |
Definition at line 3857 of file shell.c.
References APND_MARK_SIZE, apndWriteMark(), ApndFile::iMark, ApndFile::iPgOne, ORIGFILE, sqlite3_file::pMethods, size, SQLITE_OK, and sqlite3_io_methods::xTruncate.
|
static |
Definition at line 3988 of file shell.c.
References ApndFile::iPgOne, ORIGFILE, sqlite3_file::pMethods, and sqlite3_io_methods::xUnfetch.
|
static |
Definition at line 3902 of file shell.c.
References ORIGFILE, sqlite3_file::pMethods, and sqlite3_io_methods::xUnlock.
|
static |
Definition at line 3829 of file shell.c.
References APND_MARK_SIZE, APND_MAX_SIZE, apndWriteMark(), ApndFile::iMark, ApndFile::iPgOne, ORIGFILE, sqlite3_file::pMethods, SQLITE_FULL, SQLITE_OK, sqlite3_io_methods::xFileSize, and sqlite3_io_methods::xWrite.
|
static |
Definition at line 3816 of file shell.c.
References APND_MARK_PREFIX, APND_MARK_PREFIX_SZ, APND_MARK_SIZE, ApndFile::iMark, ApndFile::iPgOne, sqlite3_file::pMethods, and sqlite3_io_methods::xWrite.
Referenced by apndTruncate(), and apndWrite().
|
static |
Definition at line 819 of file shell.c.
References ShellText::n, ShellText::nAlloc, shell_out_of_memory(), strlen30(), and ShellText::z.
Referenced by captureOutputCallback(), do_meta_command(), dump_callback(), and shellFakeSchema().
|
static |
Definition at line 13390 of file shell.c.
References ImportCtx::cColSep, ImportCtx::cRowSep, ImportCtx::cTerm, import_append_char(), ImportCtx::in, ImportCtx::n, ImportCtx::nLine, seenInterrupt, and ImportCtx::z.
Referenced by do_meta_command().
|
static |
Definition at line 277 of file shell.c.
References enableTimer, iBegin, sBegin, and timeOfDay().
|
static |
Definition at line 11524 of file shell.c.
References ShellState::db, sqlite3_bind_null, sqlite3_bind_parameter_count, sqlite3_bind_parameter_name, sqlite3_bind_text, sqlite3_bind_value, sqlite3_column_value, sqlite3_finalize, sqlite3_prepare_v2, sqlite3_reset, sqlite3_snprintf, sqlite3_step, sqlite3_table_column_metadata, SQLITE_OK, SQLITE_ROW, and SQLITE_STATIC.
Referenced by shell_exec().
|
static |
Definition at line 11495 of file shell.c.
References ShellState::db, sqlite3_db_config, sqlite3_exec, SQLITE_DBCONFIG_DEFENSIVE, and SQLITE_DBCONFIG_WRITABLE_SCHEMA.
Referenced by do_meta_command().
|
static |
Definition at line 13131 of file shell.c.
References hexDigitValue(), integerValue(), sqlite3_stricmp, and utf8_printf.
Referenced by do_meta_command(), and setOrClearFlag().
|
static |
Definition at line 10933 of file shell.c.
References NULL, and shell_callback().
Referenced by do_meta_command().
|
static |
Definition at line 10942 of file shell.c.
References appendText(), ShellText::n, and UNUSED_PARAMETER.
|
static |
Definition at line 13926 of file shell.c.
References ShellState::doXdgOpen, shellDeleteFile(), sqlite3_free, and ShellState::zTempFile.
Referenced by do_meta_command(), main(), newTempFile(), and process_input().
| void close_db | ( | sqlite3 * | db | ) |
Definition at line 12995 of file shell.c.
References sqlite3_close, sqlite3_errmsg, and utf8_printf.
Referenced by do_meta_command(), main(), and tryToClone().
|
static |
|
static |
Definition at line 3508 of file shell.c.
References sqlite3_index_info::aConstraint, sqlite3_index_info::aConstraintUsage, sqlite3_index_info::sqlite3_index_constraint_usage::argvIndex, COMPLETION_COLUMN_PREFIX, COMPLETION_COLUMN_WHOLELINE, sqlite3_index_info::estimatedCost, sqlite3_index_info::estimatedRows, sqlite3_index_info::idxNum, sqlite3_index_info::nConstraint, sqlite3_index_info::sqlite3_index_constraint_usage::omit, SQLITE_INDEX_CONSTRAINT_EQ, and SQLITE_OK.
|
static |
Definition at line 3277 of file shell.c.
References completionCursorReset(), sqlite3_free, and SQLITE_OK.
|
static |
Definition at line 3405 of file shell.c.
References COMPLETION_COLUMN_CANDIDATE, COMPLETION_COLUMN_PHASE, COMPLETION_COLUMN_PREFIX, COMPLETION_COLUMN_WHOLELINE, completion_cursor::ePhase, sqlite3_result_int, sqlite3_result_text, SQLITE_OK, SQLITE_TRANSIENT, completion_cursor::szRow, completion_cursor::zCurrentRow, completion_cursor::zLine, and completion_cursor::zPrefix.
|
static |
Definition at line 3204 of file shell.c.
References completion_vtab::db, sqlite3_declare_vtab, sqlite3_malloc, sqlite3_vtab_config, SQLITE_NOMEM, SQLITE_OK, and SQLITE_VTAB_INNOCUOUS.
|
static |
Definition at line 3267 of file shell.c.
References completion_cursor::j, completion_cursor::nLine, completion_cursor::nPrefix, completion_cursor::pStmt, sqlite3_finalize, sqlite3_free, completion_cursor::zLine, and completion_cursor::zPrefix.
Referenced by completionClose(), and completionFilter().
|
static |
Definition at line 3246 of file shell.c.
References sqlite3_free, and SQLITE_OK.
|
static |
Definition at line 3446 of file shell.c.
References COMPLETION_EOF, and completion_cursor::ePhase.
|
static |
Definition at line 3457 of file shell.c.
References COMPLETION_FIRST_PHASE, completionCursorReset(), completionNext(), completion_cursor::ePhase, completion_cursor::iRowid, completion_cursor::nLine, completion_cursor::nPrefix, sqlite3_mprintf, sqlite3_value_bytes, sqlite3_value_text, SQLITE_NOMEM, completion_cursor::zLine, and completion_cursor::zPrefix.
|
static |
Definition at line 3297 of file shell.c.
References COMPLETION_COLUMNS, COMPLETION_DATABASES, COMPLETION_EOF, COMPLETION_KEYWORDS, COMPLETION_TABLES, completion_cursor::db, completion_cursor::ePhase, completion_cursor::iRowid, completion_cursor::j, completion_cursor::nPrefix, completion_cursor::pStmt, sqlite3_column_bytes, sqlite3_column_text, sqlite3_finalize, sqlite3_free, sqlite3_keyword_count, sqlite3_keyword_name, sqlite3_mprintf, sqlite3_prepare_v2, sqlite3_step, sqlite3_strnicmp, SQLITE_NOMEM, SQLITE_OK, SQLITE_ROW, completion_cursor::szRow, completion_cursor::zCurrentRow, and completion_cursor::zPrefix.
Referenced by completionFilter().
|
static |
Definition at line 3254 of file shell.c.
References completion_cursor::base, completion_cursor::db, sqlite3_malloc, SQLITE_NOMEM, and SQLITE_OK.
|
static |
Definition at line 3436 of file shell.c.
References completion_cursor::iRowid, and SQLITE_OK.
|
static |
Definition at line 10958 of file shell.c.
References ShellState::db, sqlite3_exec, sqlite3_free, and utf8_printf.
|
static |
Definition at line 13300 of file shell.c.
References ImportCtx::bNotFirst, ImportCtx::cColSep, ImportCtx::cRowSep, ImportCtx::cTerm, import_append_char(), ImportCtx::in, ImportCtx::n, ImportCtx::nLine, seenInterrupt, utf8_printf, ImportCtx::z, and ImportCtx::zFile.
Referenced by do_meta_command().
|
static |
Definition at line 2292 of file shell.c.
References sqlite3_free, sqlite3_result_error, and sqlite3_vmprintf.
Referenced by writefileFunc().
|
static |
Definition at line 13671 of file shell.c.
References ShellState::db, sqlite3_column_int, sqlite3_finalize, sqlite3_prepare_v2, sqlite3_step, and SQLITE_ROW.
Referenced by shell_dbinfo_command().
| int deduceDatabaseType | ( | const char * | zName, |
| int | dfltZip | ||
| ) |
Definition at line 12598 of file shell.c.
References SEEK_END, SHELL_OPEN_APPENDVFS, SHELL_OPEN_NORMAL, SHELL_OPEN_UNSPEC, SHELL_OPEN_ZIPFILE, sqlite3_strlike, and zName.
Referenced by open_db().
|
static |
Definition at line 11475 of file shell.c.
Referenced by shell_exec().
|
static |
Definition at line 11297 of file shell.c.
References ShellState::out, ShellState::pStmt, raw_printf, sqlite3_stmt_scanstatus(), SQLITE_SCANSTAT_EST, SQLITE_SCANSTAT_EXPLAIN, SQLITE_SCANSTAT_NLOOP, SQLITE_SCANSTAT_NVISIT, SQLITE_SCANSTAT_SELECTID, UNUSED_PARAMETER, and utf8_printf.
Referenced by shell_exec().
|
static |
Definition at line 11166 of file shell.c.
Referenced by shell_exec().
|
static |
Definition at line 11140 of file shell.c.
References ShellState::out, raw_printf, sqlite3_snprintf, and sqlite3_status64.
|
static |
Definition at line 15687 of file shell.c.
References appendText(), ArraySize, ascii_read_one_field(), ShellState::autoEQP, AUTOEQP_full, AUTOEQP_on, AUTOEQP_trigger, ShellState::autoEQPtest, ShellState::autoEQPtrace, ShellState::autoExplain, bail_on_error, bind_table_init(), booleanValue(), callback(), ImportCtx::cColSep, clearTempFile(), close_db(), ShellState::cMode, ShellState::cnt, ShellState::colSeparator, continuePrompt, ImportCtx::cRowSep, csv_read_one_field(), ImportCtx::cTerm, ShellState::db, ShellState::doXdgOpen, ShellState::expert, expertDotCommand(), expertFinish(), ShellState::flgProgress, freeText(), import_append_char(), ShellState::in, ImportCtx::in, initText(), integerValue(), IsDigit, IsSpace, ShellState::lineno, lintDotCommand(), mainPrompt, ShellState::mode, MODE_Ascii, MODE_Column, MODE_Csv, MODE_Explain, MODE_Html, MODE_Insert, MODE_Line, MODE_List, MODE_Pretty, MODE_Quote, MODE_Semi, MODE_Tcl, modeDescr, ShellState::mxProgress, ShellState::nCheck, ShellState::nErr, ImportCtx::nErr, newTempFile(), ImportCtx::nLine, ShellState::normalMode, ShellState::nProgress, ImportCtx::nRow, NULL, ShellState::nullValue, open_db(), OPEN_DB_KEEPALIVE, ShellState::openFlags, ShellState::openMode, optionMatch(), ShellState::out, ShellState::outCount, ShellState::outfile, output_c_string(), output_file_close(), output_file_open(), output_reset(), outputModePush(), pclose(), ExpertInfo::pExpert, ShellState::pLog, popen(), process_input(), progress_handler(), quoteChar(), raw_printf, readFile(), resolve_backslashes(), ShellState::rowSeparator, run_schema_dump_query(), run_table_dump_query(), ShellState::scanstatsOn, seenInterrupt, SEP_Column, SEP_Comma, SEP_CrLf, SEP_Record, SEP_Row, SEP_Space, SEP_Tab, SEP_Unit, session_close_all, set_table_name(), setBinaryMode, setOrClearFlag(), setTextMode, shell_dbinfo_command(), shell_exec(), SHELL_OPEN_APPENDVFS, SHELL_OPEN_DESERIALIZE, SHELL_OPEN_HEXDB, SHELL_OPEN_READONLY, SHELL_OPEN_UNSPEC, SHELL_OPEN_ZIPFILE, shell_out_of_memory(), SHELL_PROGRESS_ONCE, SHELL_PROGRESS_QUIET, SHELL_PROGRESS_RESET, shellAuth(), ShellClearFlag, shellDeleteFile(), ShellState::shellFlgs, ShellSetFlag, SHFLG_CountChanges, SHFLG_Echo, SHFLG_Newlines, SHFLG_PreserveRowid, ShellState::showHeader, showHelp(), sqlite3_backup_finish, sqlite3_backup_init, sqlite3_backup_step, sqlite3_bind_null, sqlite3_bind_text, sqlite3_column_count, sqlite3_column_int, sqlite3_column_text, sqlite3_db_config, sqlite3_errmsg, sqlite3_exec, sqlite3_file_control, sqlite3_finalize, sqlite3_free, sqlite3_get_autocommit, sqlite3_limit, sqlite3_load_extension, sqlite3_malloc64, sqlite3_mprintf, sqlite3_open, sqlite3_open_v2, sqlite3_prepare_v2, sqlite3_progress_handler, sqlite3_reset, sqlite3_set_authorizer, sqlite3_sleep, sqlite3_snprintf, sqlite3_step, sqlite3_strglob, sqlite3_stricmp, sqlite3_strlike, sqlite3_strnicmp, sqlite3_test_control, SQLITE_API, SQLITE_BUSY, SQLITE_CDECL, SQLITE_DBCONFIG_DEFENSIVE, SQLITE_DBCONFIG_DQS_DDL, SQLITE_DBCONFIG_DQS_DML, SQLITE_DBCONFIG_ENABLE_FKEY, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, SQLITE_DBCONFIG_ENABLE_QPSG, SQLITE_DBCONFIG_ENABLE_TRIGGER, SQLITE_DBCONFIG_ENABLE_VIEW, SQLITE_DBCONFIG_LEGACY_ALTER_TABLE, SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE, SQLITE_DBCONFIG_RESET_DATABASE, SQLITE_DBCONFIG_TRIGGER_EQP, SQLITE_DBCONFIG_TRUSTED_SCHEMA, SQLITE_DBCONFIG_WRITABLE_SCHEMA, SQLITE_DONE, SQLITE_FCNTL_CHUNK_SIZE, SQLITE_FCNTL_HAS_MOVED, SQLITE_FCNTL_LOCK_TIMEOUT, SQLITE_FCNTL_PERSIST_WAL, SQLITE_FCNTL_POWERSAFE_OVERWRITE, SQLITE_FCNTL_RESERVE_BYTES, SQLITE_FCNTL_SIZE_LIMIT, SQLITE_FCNTL_TEMPFILENAME, SQLITE_LIMIT_ATTACHED, SQLITE_LIMIT_COLUMN, SQLITE_LIMIT_COMPOUND_SELECT, SQLITE_LIMIT_EXPR_DEPTH, SQLITE_LIMIT_FUNCTION_ARG, SQLITE_LIMIT_LENGTH, SQLITE_LIMIT_LIKE_PATTERN_LENGTH, SQLITE_LIMIT_SQL_LENGTH, SQLITE_LIMIT_TRIGGER_DEPTH, SQLITE_LIMIT_VARIABLE_NUMBER, SQLITE_LIMIT_VDBE_OP, SQLITE_LIMIT_WORKER_THREADS, SQLITE_LOCKED, SQLITE_OK, SQLITE_OPEN_CREATE, SQLITE_OPEN_NOFOLLOW, SQLITE_OPEN_READWRITE, SQLITE_ROW, SQLITE_TESTCTRL_IMPOSTER, SQLITE_TRANSIENT, strlen30(), ShellState::szMax, test_breakpoint(), testcase_glob(), tryToClone(), utf8_printf, ShellState::writableSchema, ShellText::z, ImportCtx::z, ShellState::zDbFilename, ShellState::zDestTable, ImportCtx::zFile, ShellState::zFreeOnClose, zName, ShellState::zTempFile, and ShellState::zTestcase.
Referenced by main(), and process_input().
|
static |
Definition at line 12048 of file shell.c.
References appendText(), ShellState::cMode, ShellState::db, freeColumnList(), freeText(), initText(), ShellState::mode, MODE_Insert, ShellState::nErr, ShellState::out, printSchemaLine(), quoteChar(), raw_printf, shell_exec(), sqlite3_free, sqlite3_mprintf, sqlite3_strglob, SQLITE_CORRUPT, tableColumnList(), toggleSelectOrder(), UNUSED_PARAMETER, utf8_printf, ShellState::writableSchema, ShellText::z, and ShellState::zDestTable.
Referenced by run_schema_dump_query().
|
static |
Definition at line 9944 of file shell.c.
References context, SEEK_END, sqlite3_context_db_handle, sqlite3_file_control, sqlite3_free, sqlite3_malloc64, sqlite3_mprintf, sqlite3_randomness, sqlite3_result_blob64, sqlite3_result_error, sqlite3_result_error_nomem, sqlite3_result_text64, sqlite3_value_blob, sqlite3_value_bytes, sqlite3_value_text, sqlite3_value_type, SQLITE_BLOB, SQLITE_FCNTL_TEMPFILENAME, SQLITE_NULL, and SQLITE_UTF8.
Referenced by open_db().
|
static |
Definition at line 293 of file shell.c.
References enableTimer, iBegin, sBegin, timeDiff(), and timeOfDay().
|
static |
Definition at line 10456 of file shell.c.
References ShellState::autoEQPtest, EQPGraphRow::iEqpId, EQPGraphRow::iParentId, ShellState::out, EQPGraph::pLast, EQPGraphRow::pNext, EQPGraph::pRow, ShellState::sGraph, shell_out_of_memory(), sqlite3_malloc64, strlen30(), utf8_printf, and EQPGraphRow::zText.
Referenced by shell_callback(), and shell_exec().
|
static |
Definition at line 10492 of file shell.c.
References EQPGraphRow::iParentId, EQPGraphRow::pNext, EQPGraph::pRow, and ShellState::sGraph.
Referenced by eqp_render_level().
|
static |
Definition at line 10521 of file shell.c.
References eqp_render_level(), eqp_reset(), ShellState::out, EQPGraphRow::pNext, EQPGraph::pRow, ShellState::sGraph, sqlite3_free, utf8_printf, EQPGraph::zPrefix, and EQPGraphRow::zText.
Referenced by shell_exec().
|
static |
Definition at line 10501 of file shell.c.
References eqp_next_row(), EQPGraphRow::iEqpId, ShellState::out, ShellState::sGraph, strlen30(), utf8_printf, EQPGraph::zPrefix, and EQPGraphRow::zText.
Referenced by eqp_render().
|
static |
Definition at line 10480 of file shell.c.
References EQPGraphRow::pNext, EQPGraph::pRow, ShellState::sGraph, and sqlite3_free.
Referenced by eqp_render().
|
static |
Definition at line 11561 of file shell.c.
References ShellState::cMode, MODE_Insert, shell_callback(), sqlite3_column_count, sqlite3_column_name, sqlite3_column_text, sqlite3_column_type, sqlite3_free, sqlite3_malloc64, sqlite3_step, SQLITE_ABORT, SQLITE_BLOB, SQLITE_NOMEM, SQLITE_NULL, and SQLITE_ROW.
Referenced by shell_exec().
|
static |
Definition at line 7310 of file shell.c.
References IdxTable::aCol, sqlite3_index_info::aConstraint, sqlite3_index_info::aConstraintUsage, sqlite3_index_info::aOrderBy, sqlite3_index_info::sqlite3_index_constraint_usage::argvIndex, IdxConstraint::bDesc, IdxConstraint::bRange, sqlite3_index_info::sqlite3_index_orderby::desc, sqlite3_index_info::estimatedCost, IdxConstraint::iCol, sqlite3_index_info::sqlite3_index_orderby::iColumn, idxMalloc(), idxNewConstraint(), IdxColumn::iPk, sqlite3_index_info::nConstraint, sqlite3_index_info::nOrderBy, IdxScan::pEq, ExpertVtab::pExpert, IdxConstraint::pLink, IdxConstraint::pNext, IdxScan::pNextScan, IdxScan::pOrder, IdxScan::pRange, sqlite3expert::pScan, IdxScan::pTab, ExpertVtab::pTab, sqlite3_vtab_collation, SQLITE_INDEX_CONSTRAINT_EQ, SQLITE_INDEX_CONSTRAINT_GE, SQLITE_INDEX_CONSTRAINT_GT, SQLITE_INDEX_CONSTRAINT_LE, SQLITE_INDEX_CONSTRAINT_LT, SQLITE_OK, and IdxColumn::zColl.
Referenced by idxRegisterVtab().
|
static |
Definition at line 7405 of file shell.c.
References ExpertCsr::pData, sqlite3_finalize, sqlite3_free, and SQLITE_OK.
Referenced by idxRegisterVtab().
|
static |
Definition at line 7454 of file shell.c.
References ExpertCsr::pData, sqlite3_column_value, sqlite3_result_value, and SQLITE_OK.
Referenced by idxRegisterVtab().
|
static |
Definition at line 7268 of file shell.c.
References expertDequote(), idxMalloc(), ExpertVtab::pExpert, ExpertVtab::pTab, sqlite3expert::pTable, sqlite3_declare_vtab, sqlite3_free, sqlite3_mprintf, sqlite3_stricmp, SQLITE_ERROR, SQLITE_NOMEM, SQLITE_OK, and IdxTable::zName.
Referenced by idxRegisterVtab().
|
static |
Definition at line 7236 of file shell.c.
References sqlite3_malloc, and STRLEN.
Referenced by expertConnect().
|
static |
Definition at line 7304 of file shell.c.
References sqlite3_free, and SQLITE_OK.
Referenced by idxRegisterVtab().
|
static |
Definition at line 11694 of file shell.c.
References ExpertInfo::bVerbose, ShellState::db, ShellState::expert, EXPERT_CONFIG_SAMPLE, integerValue(), ExpertInfo::pExpert, raw_printf, sqlite3_expert_config(), sqlite3_expert_new(), SQLITE_ERROR, SQLITE_OK, and strlen30().
Referenced by do_meta_command().
|
static |
Definition at line 7418 of file shell.c.
References ExpertCsr::pData.
Referenced by idxRegisterVtab().
|
static |
Definition at line 7467 of file shell.c.
References ExpertVtab::base, sqlite3expert::db, expertNext(), idxPrintfPrepareStmt(), ExpertCsr::pData, ExpertVtab::pExpert, ExpertVtab::pTab, sqlite3_vtab_cursor::pVtab, sqlite3_finalize, SQLITE_OK, sqlite3_vtab::zErrMsg, and IdxTable::zName.
Referenced by idxRegisterVtab().
|
static |
Definition at line 11649 of file shell.c.
References ShellState::expert, ExpertInfo::pExpert, and SQLITE_OK.
Referenced by do_meta_command(), and shell_exec().
|
static |
Definition at line 11629 of file shell.c.
References ShellState::expert, ExpertInfo::pExpert, and sqlite3_expert_sql().
Referenced by shell_exec().
|
static |
Definition at line 7426 of file shell.c.
References ExpertCsr::pData, sqlite3_finalize, sqlite3_step, SQLITE_OK, and SQLITE_ROW.
Referenced by expertFilter(), and idxRegisterVtab().
|
static |
Definition at line 7393 of file shell.c.
References idxMalloc(), and SQLITE_OK.
Referenced by idxRegisterVtab().
|
static |
|
static |
|
static |
Definition at line 11457 of file shell.c.
References ShellState::aiIndent, ShellState::iIndent, ShellState::nIndent, and sqlite3_free.
Referenced by shell_exec().
|
static |
Definition at line 11374 of file shell.c.
References ShellState::aiIndent, ArraySize, ShellState::cMode, ShellState::iIndent, ShellState::mode, ShellState::nIndent, shell_out_of_memory(), sqlite3_column_count, sqlite3_column_int, sqlite3_column_name, sqlite3_column_text, sqlite3_free, sqlite3_realloc64, sqlite3_reset, sqlite3_sql, sqlite3_step, sqlite3_strnicmp, SQLITE_ROW, and str_in_array().
Referenced by shell_exec().
|
static |
Definition at line 2380 of file shell.c.
Referenced by fsdirFilter(), and fsdirNext().
|
static |
Definition at line 2362 of file shell.c.
Referenced by makeDirectory(), and writeFile().
|
static |
Definition at line 18774 of file shell.c.
References NULL, sqlite3_snprintf, and strlen30().
Referenced by main(), and process_sqliterc().
|
static |
Definition at line 11915 of file shell.c.
References sqlite3_free.
Referenced by dump_callback(), and tableColumnList().
|
static |
Definition at line 806 of file shell.c.
References initText(), and ShellText::z.
Referenced by do_meta_command(), dump_callback(), and shellFakeSchema().
|
static |
Definition at line 2973 of file shell.c.
References sqlite3_index_info::aConstraint, sqlite3_index_info::aConstraintUsage, sqlite3_index_info::sqlite3_index_constraint_usage::argvIndex, sqlite3_index_info::estimatedCost, sqlite3_index_info::estimatedRows, FSDIR_COLUMN_DIR, FSDIR_COLUMN_PATH, sqlite3_index_info::idxNum, sqlite3_index_info::nConstraint, sqlite3_index_info::sqlite3_index_constraint_usage::omit, SQLITE_CONSTRAINT, SQLITE_INDEX_CONSTRAINT_EQ, and SQLITE_OK.
Referenced by fsdirRegister().
|
static |
Definition at line 2744 of file shell.c.
References fsdirResetCursor(), sqlite3_free, and SQLITE_OK.
Referenced by fsdirRegister().
|
static |
Definition at line 2831 of file shell.c.
References FSDIR_COLUMN_DATA, FSDIR_COLUMN_MODE, FSDIR_COLUMN_MTIME, FSDIR_COLUMN_NAME, FSDIR_COLUMN_PATH, fsdir_cursor::nBase, readFileContents(), sqlite3_free, sqlite3_malloc64, sqlite3_result_error_nomem, sqlite3_result_int64, sqlite3_result_null, sqlite3_result_text, SQLITE_NOMEM, SQLITE_OK, SQLITE_TRANSIENT, fsdir_cursor::sStat, and fsdir_cursor::zPath.
Referenced by fsdirRegister().
|
static |
Definition at line 2673 of file shell.c.
References FSDIR_SCHEMA, sqlite3_declare_vtab, sqlite3_malloc, sqlite3_vtab_config, SQLITE_NOMEM, SQLITE_OK, and SQLITE_VTAB_DIRECTONLY.
Referenced by fsdirRegister().
|
static |
Definition at line 2700 of file shell.c.
References sqlite3_free, and SQLITE_OK.
Referenced by fsdirRegister().
|
static |
Definition at line 2906 of file shell.c.
References fsdir_cursor::zPath.
Referenced by fsdirRegister().
|
static |
Definition at line 2917 of file shell.c.
References fileLinkStat(), fsdirResetCursor(), fsdirSetErrmsg(), fsdir_cursor::nBase, sqlite3_mprintf, sqlite3_value_text, SQLITE_ERROR, SQLITE_NOMEM, SQLITE_OK, fsdir_cursor::sStat, fsdir_cursor::zBase, and fsdir_cursor::zPath.
Referenced by fsdirRegister().
|
static |
Definition at line 2767 of file shell.c.
References fsdir_cursor::aLvl, fileLinkStat(), fsdirSetErrmsg(), fsdir_cursor::iLvl, fsdir_cursor::iRowid, fsdir_cursor::nLvl, FsdirLevel::pDir, sqlite3_free, sqlite3_mprintf, sqlite3_realloc64, SQLITE_ERROR, SQLITE_NOMEM, SQLITE_OK, fsdir_cursor::sStat, FsdirLevel::zDir, and fsdir_cursor::zPath.
Referenced by fsdirRegister().
|
static |
Definition at line 2708 of file shell.c.
References fsdir_cursor::base, fsdir_cursor::iLvl, sqlite3_malloc, SQLITE_NOMEM, and SQLITE_OK.
Referenced by fsdirRegister().
|
static |
Definition at line 3039 of file shell.c.
References fsdirBestIndex(), fsdirClose(), fsdirColumn(), fsdirConnect(), fsdirDisconnect(), fsdirEof(), fsdirFilter(), fsdirNext(), fsdirOpen(), fsdirRowid(), and sqlite3_create_module.
|
static |
Definition at line 2723 of file shell.c.
References fsdir_cursor::aLvl, fsdir_cursor::iLvl, fsdir_cursor::iRowid, fsdir_cursor::nBase, fsdir_cursor::nLvl, FsdirLevel::pDir, sqlite3_free, fsdir_cursor::zBase, FsdirLevel::zDir, and fsdir_cursor::zPath.
Referenced by fsdirClose(), and fsdirFilter().
|
static |
Definition at line 2896 of file shell.c.
References fsdir_cursor::iRowid, and SQLITE_OK.
Referenced by fsdirRegister().
|
static |
Definition at line 2756 of file shell.c.
References fsdir_cursor::base, sqlite3_vtab_cursor::pVtab, sqlite3_vmprintf, and sqlite3_vtab::zErrMsg.
Referenced by fsdirFilter(), and fsdirNext().
|
static |
Definition at line 13685 of file shell.c.
Referenced by shell_dbinfo_command().
|
static |
Definition at line 13688 of file shell.c.
Referenced by shell_dbinfo_command().
|
static |
Definition at line 1910 of file shell.c.
References SHA3Update(), and sqlite3_vsnprintf.
Referenced by sha3QueryFunc().
|
static |
Definition at line 737 of file shell.c.
Referenced by booleanValue(), and integerValue().
|
static |
Definition at line 7679 of file shell.c.
References IdxTable::aCol, IdxConstraint::bDesc, IdxConstraint::iCol, idxAppendText(), idxIdentifierRequiresQuotes(), sqlite3_stricmp, IdxConstraint::zColl, IdxColumn::zColl, and IdxColumn::zName.
Referenced by idxCreateFromCons().
|
static |
Definition at line 7629 of file shell.c.
References sqlite3_free, sqlite3_malloc, sqlite3_vmprintf, SQLITE_NOMEM, SQLITE_OK, and STRLEN.
Referenced by idxAppendColDefn(), idxCreateVtabSchema(), idxFindIndexes(), idxPopulateOneStat1(), idxProcessOneTrigger(), and sqlite3_expert_analyze().
|
static |
Definition at line 8051 of file shell.c.
References IdxWrite::eOp, idxMalloc(), IdxTable::pNext, IdxWrite::pNext, IdxWrite::pTab, sqlite3expert::pTable, sqlite3expert::pWrite, sqlite3_stricmp, SQLITE_DELETE, SQLITE_INSERT, SQLITE_OK, SQLITE_UPDATE, and IdxTable::zName.
Referenced by sqlite3_expert_new().
|
static |
Definition at line 8490 of file shell.c.
References sqlite3expert::dbv, sqlite3_exec, sqlite3_free, sqlite3_mprintf, SQLITE_NOMEM, SQLITE_OK, and UNIQUE_TABLE_NAME.
Referenced by idxPopulateStat1().
|
static |
Definition at line 7909 of file shell.c.
References IdxConstraint::pNext, and sqlite3_free.
Referenced by idxScanFree().
|
static |
Definition at line 7892 of file shell.c.
References idxCreateFromWhere(), IdxScan::pNextScan, IdxScan::pOrder, sqlite3expert::pScan, and SQLITE_OK.
Referenced by sqlite3_expert_analyze().
|
static |
Definition at line 7784 of file shell.c.
References sqlite3expert::dbm, sqlite3expert::hIdx, idxAppendColDefn(), idxFindCompatible(), idxHashAdd(), idxIdentifierRequiresQuotes(), IdxConstraint::pLink, IdxScan::pTab, sqlite3expert::pzErrmsg, sqlite3_exec, sqlite3_free, sqlite3_mprintf, SQLITE_NOMEM, SQLITE_OK, IdxTable::zName, and zName.
Referenced by idxCreateFromWhere().
|
static |
Definition at line 7853 of file shell.c.
References idxCreateFromCons(), idxFindConstraint(), IdxScan::pEq, IdxConstraint::pLink, IdxConstraint::pNext, IdxScan::pRange, and SQLITE_OK.
Referenced by idxCreateCandidates().
|
static |
Definition at line 8189 of file shell.c.
References IdxTable::aCol, sqlite3expert::db, sqlite3expert::dbv, idxAppendText(), idxFinalize(), idxGetTableInfo(), idxPrepareStmt(), idxRegisterVtab(), IdxTable::nCol, IdxTable::pNext, sqlite3expert::pTable, sqlite3_column_text, sqlite3_exec, sqlite3_free, sqlite3_step, SQLITE_OK, SQLITE_ROW, IdxColumn::zColl, IdxColumn::zName, and zName.
Referenced by sqlite3_expert_new().
|
static |
Definition at line 7170 of file shell.c.
References sqlite3_errmsg, and sqlite3_mprintf.
Referenced by idxPrepareStmt(), idxProcessOneTrigger(), and sqlite3_expert_sql().
|
static |
Definition at line 7533 of file shell.c.
References sqlite3_finalize, and SQLITE_OK.
Referenced by idxCreateVtabSchema(), idxFindCompatible(), idxFindIndexes(), idxGetTableInfo(), idxLargestIndex(), idxPopulateOneStat1(), idxPopulateStat1(), idxProcessOneTrigger(), and sqlite3_expert_new().
|
static |
Definition at line 7717 of file shell.c.
References IdxConstraint::bFlag, IdxConstraint::iCol, idxFinalize(), idxPrintfPrepareStmt(), IdxConstraint::pLink, IdxScan::pTab, sqlite3_column_int, sqlite3_column_text, sqlite3_finalize, sqlite3_step, sqlite3_stricmp, SQLITE_OK, SQLITE_ROW, IdxConstraint::zColl, and IdxTable::zName.
Referenced by idxCreateFromCons().
|
static |
Definition at line 7845 of file shell.c.
References IdxConstraint::iCol, and IdxConstraint::pLink.
Referenced by idxCreateFromWhere().
| int idxFindIndexes | ( | sqlite3expert * | p, |
| char ** | pzErr | ||
| ) |
Definition at line 7981 of file shell.c.
References sqlite3expert::dbm, sqlite3expert::hIdx, idxAppendText(), idxFinalize(), idxHashAdd(), idxHashClear(), idxHashInit(), idxHashSearch(), idxPrintfPrepareStmt(), IdxHash::pFirst, IdxStatement::pNext, IdxHashEntry::pNext, sqlite3expert::pStatement, sqlite3_column_text, sqlite3_step, SQLITE_OK, SQLITE_ROW, STRLEN, IdxStatement::zEQP, IdxStatement::zIdx, IdxHashEntry::zKey, and IdxStatement::zSql.
Referenced by sqlite3_expert_analyze().
|
static |
Definition at line 7548 of file shell.c.
References IdxTable::aCol, idxFinalize(), idxMalloc(), idxPrintfPrepareStmt(), IdxColumn::iPk, IdxTable::nCol, sqlite3_column_int, sqlite3_column_text, sqlite3_free, sqlite3_reset, sqlite3_step, sqlite3_table_column_metadata, SQLITE_OK, SQLITE_ROW, STRLEN, IdxColumn::zColl, IdxColumn::zName, and IdxTable::zName.
Referenced by idxCreateVtabSchema().
|
static |
Definition at line 7086 of file shell.c.
References IdxHash::aHash, idxHashString(), idxMalloc(), IdxHash::pFirst, IdxHashEntry::pHashNext, IdxHashEntry::pNext, STRLEN, IdxHashEntry::zKey, and IdxHashEntry::zVal.
Referenced by idxCreateFromCons(), and idxFindIndexes().
|
static |
Definition at line 7054 of file shell.c.
References IdxHash::aHash, IDX_HASH_SIZE, IdxHashEntry::pHashNext, sqlite3_free, and IdxHashEntry::zVal2.
Referenced by idxFindIndexes().
|
static |
Definition at line 7123 of file shell.c.
References IdxHash::aHash, idxHashString(), IdxHashEntry::pHashNext, STRLEN, and IdxHashEntry::zKey.
Referenced by idxHashSearch(), and idxPopulateOneStat1().
|
static |
Definition at line 7047 of file shell.c.
Referenced by idxFindIndexes().
|
static |
Definition at line 7143 of file shell.c.
References idxHashFind(), and IdxHashEntry::zVal.
Referenced by idxFindIndexes().
|
static |
Definition at line 7072 of file shell.c.
References IDX_HASH_SIZE.
Referenced by idxHashAdd(), and idxHashFind().
|
static |
Definition at line 7661 of file shell.c.
Referenced by idxAppendColDefn(), and idxCreateFromCons().
|
static |
Definition at line 8370 of file shell.c.
References idxFinalize(), idxPrepareStmt(), sqlite3_column_int, sqlite3_step, SQLITE_OK, and SQLITE_ROW.
Referenced by idxPopulateStat1().
|
static |
Definition at line 7031 of file shell.c.
References sqlite3_malloc, SQLITE_NOMEM, and SQLITE_OK.
Referenced by expertBestIndex(), expertConnect(), expertOpen(), idxAuthCallback(), idxGetTableInfo(), idxHashAdd(), idxNewConstraint(), idxPopulateOneStat1(), idxPopulateStat1(), sqlite3_expert_new(), and sqlite3_expert_sql().
|
static |
Definition at line 7153 of file shell.c.
References idxMalloc(), SQLITE_OK, STRLEN, and IdxConstraint::zColl.
Referenced by expertBestIndex().
|
static |
Definition at line 8390 of file shell.c.
References sqlite3expert::db, sqlite3expert::dbv, sqlite3expert::hIdx, idxAppendText(), idxFinalize(), idxHashFind(), idxMalloc(), idxPrepareStmt(), sqlite3expert::iSample, sqlite3_bind_text, sqlite3_column_int, sqlite3_column_text, sqlite3_free, sqlite3_mprintf, sqlite3_reset, sqlite3_step, SQLITE_NOMEM, SQLITE_OK, SQLITE_ROW, SQLITE_STATIC, STRLEN, UNIQUE_TABLE_NAME, zName, and IdxHashEntry::zVal2.
Referenced by idxPopulateStat1().
|
static |
Definition at line 8514 of file shell.c.
References IdxRemCtx::aSlot, sqlite3expert::db, sqlite3expert::dbm, sqlite3expert::dbv, idxBuildSampleTable(), idxFinalize(), idxLargestIndex(), idxMalloc(), idxPopulateOneStat1(), idxPrepareStmt(), idxRemFunc(), idxSampleFunc(), sqlite3expert::iSample, IdxSampleCtx::iTarget, IdxSampleCtx::nRet, IdxSampleCtx::nRow, IdxRemCtx::nSlot, sqlite3_column_int64, sqlite3_column_text, sqlite3_create_function, sqlite3_exec, sqlite3_free, sqlite3_step, SQLITE_OK, SQLITE_ROW, SQLITE_UTF8, IdxSampleCtx::target, UNIQUE_TABLE_NAME, and IdxRemCtx::IdxRemSlot::z.
Referenced by sqlite3_expert_analyze().
|
static |
Definition at line 7180 of file shell.c.
References idxDatabaseError(), sqlite3_prepare_v2, and SQLITE_OK.
Referenced by idxCreateVtabSchema(), idxLargestIndex(), idxPopulateOneStat1(), and idxPopulateStat1().
|
static |
Definition at line 7197 of file shell.c.
Referenced by expertFilter(), idxFindCompatible(), idxFindIndexes(), idxGetTableInfo(), idxProcessOneTrigger(), and sqlite3_expert_new().
|
static |
Definition at line 8089 of file shell.c.
References IdxTable::aCol, sqlite3expert::db, sqlite3expert::dbv, IdxWrite::eOp, idxAppendText(), idxDatabaseError(), idxFinalize(), idxPrintfPrepareStmt(), IdxTable::nCol, IdxWrite::pTab, sqlite3_column_text, sqlite3_exec, sqlite3_free, sqlite3_mprintf, sqlite3_prepare_v2, sqlite3_step, SQLITE_DELETE, SQLITE_INSERT, SQLITE_NOMEM, SQLITE_OK, SQLITE_ROW, SQLITE_UPDATE, UNIQUE_TABLE_NAME, IdxColumn::zName, and IdxTable::zName.
Referenced by idxProcessTriggers().
|
static |
Definition at line 8171 of file shell.c.
References idxProcessOneTrigger(), IdxWrite::pNext, sqlite3expert::pWrite, and SQLITE_OK.
Referenced by sqlite3_expert_analyze().
|
static |
Definition at line 7495 of file shell.c.
References sqlite3expert::dbv, expertBestIndex(), expertClose(), expertColumn(), expertConnect(), expertDisconnect(), expertEof(), expertFilter(), expertNext(), expertOpen(), expertRowid(), expertUpdate(), and sqlite3_create_module.
Referenced by idxCreateVtabSchema().
|
static |
Definition at line 8297 of file shell.c.
References IdxRemCtx::aSlot, sqlite3_realloc, sqlite3_result_blob, sqlite3_result_double, sqlite3_result_error_nomem, sqlite3_result_int64, sqlite3_result_text, sqlite3_user_data, sqlite3_value_blob, sqlite3_value_bytes, sqlite3_value_double, sqlite3_value_int, sqlite3_value_int64, sqlite3_value_text, sqlite3_value_type, SQLITE_BLOB, SQLITE_FLOAT, SQLITE_INTEGER, SQLITE_NULL, SQLITE_TEXT, and SQLITE_TRANSIENT.
Referenced by idxPopulateStat1().
|
static |
Definition at line 8256 of file shell.c.
References IdxSampleCtx::iTarget, IdxSampleCtx::nRet, IdxSampleCtx::nRow, sqlite3_randomness, sqlite3_result_int, sqlite3_user_data, and IdxSampleCtx::target.
Referenced by idxPopulateStat1().
Definition at line 7923 of file shell.c.
References idxConstraintFree(), IdxScan::pEq, IdxScan::pNextScan, IdxScan::pOrder, IdxScan::pRange, and sqlite3_free.
Referenced by sqlite3_expert_sql().
|
static |
Definition at line 7939 of file shell.c.
References IdxStatement::pNext, sqlite3_free, IdxStatement::zEQP, and IdxStatement::zIdx.
Referenced by sqlite3_expert_sql().
|
static |
Definition at line 7953 of file shell.c.
References IdxTable::pNext, and sqlite3_free.
|
static |
Definition at line 7965 of file shell.c.
References IdxWrite::pNext, and sqlite3_free.
|
static |
Definition at line 13278 of file shell.c.
References ImportCtx::n, ImportCtx::nAlloc, shell_out_of_memory(), sqlite3_realloc64, and ImportCtx::z.
Referenced by ascii_read_one_field(), csv_read_one_field(), and do_meta_command().
|
static |
Definition at line 803 of file shell.c.
Referenced by do_meta_command(), dump_callback(), freeText(), and shellFakeSchema().
|
static |
Definition at line 747 of file shell.c.
References ArraySize, hexDigitValue(), IsDigit, and sqlite3_stricmp.
Referenced by booleanValue(), do_meta_command(), expertDotCommand(), and main().
|
static |
Definition at line 10347 of file shell.c.
References globalDb, seenInterrupt, sqlite3_interrupt, and UNUSED_PARAMETER.
Referenced by main().
| int isatty | ( | int | ) |
Referenced by main().
|
static |
|
static |
|
static |
Definition at line 18567 of file shell.c.
Referenced by process_input().
|
static |
Definition at line 18602 of file shell.c.
References _all_whitespace(), IsSpace, and ToLower.
Referenced by process_input().
|
static |
Definition at line 18628 of file shell.c.
References sqlite3_complete.
Referenced by process_input().
|
static |
Definition at line 14202 of file shell.c.
References lintFkeyIndexes(), raw_printf, sqlite3_strnicmp, SQLITE_ERROR, strlen30(), and usage().
Referenced by do_meta_command().
|
static |
Definition at line 14026 of file shell.c.
References ShellState::db.
Referenced by lintDotCommand().
|
static |
|
static |
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 19024 of file shell.c.
References Argv0, ShellState::autoEQP, AUTOEQP_full, AUTOEQP_on, bail_on_error, clearTempFile(), close_db(), cmdline_option_value(), ShellState::cMode, ShellState::colSeparator, ShellState::db, do_meta_command(), ShellState::doXdgOpen, find_home_dir(), GETPID, ShellState::in, integerValue(), interrupt_handler(), isatty(), main_init(), ShellState::mode, MODE_Ascii, MODE_Column, MODE_Csv, MODE_Html, MODE_Line, MODE_List, MODE_Quote, ShellState::nullValue, open_db(), OPEN_DB_ZIPFILE, ShellState::openFlags, ShellState::openMode, ShellState::out, output_reset(), printBold(), process_input(), process_sqliterc(), raw_printf, ShellState::rowSeparator, ShellState::scanstatsOn, SEP_Record, SEP_Unit, session_close_all, set_table_name(), setBinaryMode, shell_exec(), SHELL_OPEN_APPENDVFS, SHELL_OPEN_DESERIALIZE, SHELL_OPEN_READONLY, SHELL_OPEN_ZIPFILE, shell_out_of_memory(), shell_read_history, shell_stifle_history, shell_write_history, ShellState::shellFlgs, ShellSetFlag, SHFLG_Backslash, SHFLG_Echo, SHFLG_Lookaside, SHFLG_Pagecache, ShellState::showHeader, sqlite3_appendvfs_init(), sqlite3_config(), sqlite3_free, sqlite3_initialize(), sqlite3_libversion, sqlite3_shutdown(), sqlite3_snprintf, sqlite3_sourceid, sqlite3_vfs_find, sqlite3_vfs_register, sqlite3MemTraceActivate(), SQLITE_CDECL, SQLITE_CONFIG_HEAP, SQLITE_CONFIG_LOOKASIDE, SQLITE_CONFIG_MMAP_SIZE, SQLITE_CONFIG_PAGECACHE, SQLITE_CONFIG_SORTERREF_SIZE, SQLITE_OPEN_NOFOLLOW, SQLITE_SOURCE_ID, ShellState::statsOn, stdin_is_interactive, stdout_is_console, strlen30(), ShellState::szMax, TRUE, usage(), utf8_printf, verify_uninitialized(), ShellState::zDbFilename, and ShellState::zFreeOnClose.
|
static |
Definition at line 18962 of file shell.c.
References ShellState::autoExplain, ShellState::cMode, ShellState::colSeparator, continuePrompt, mainPrompt, ShellState::mode, MODE_List, ShellState::normalMode, ShellState::rowSeparator, SEP_Column, SEP_Row, ShellState::shellFlgs, shellLog(), SHFLG_Lookaside, ShellState::showHeader, sqlite3_config(), sqlite3_snprintf, SQLITE_CONFIG_LOG, SQLITE_CONFIG_MULTITHREAD, SQLITE_CONFIG_URI, and verify_uninitialized().
Referenced by main().
|
static |
Definition at line 2404 of file shell.c.
References fileStat(), sqlite3_free, sqlite3_mprintf, SQLITE_ERROR, SQLITE_NOMEM, and SQLITE_OK.
Referenced by writefileFunc().
|
static |
Definition at line 4216 of file shell.c.
References memtraceBase, memtraceOut, sqlite3_mem_methods::xFree, and sqlite3_mem_methods::xSize.
Referenced by memtraceRealloc().
|
static |
Definition at line 4241 of file shell.c.
References memtraceBase, and sqlite3_mem_methods::xInit.
|
static |
Definition at line 4209 of file shell.c.
References memtraceBase, memtraceOut, sqlite3_mem_methods::xMalloc, and sqlite3_mem_methods::xRoundup.
Referenced by memtraceRealloc().
|
static |
Definition at line 4223 of file shell.c.
References memtraceBase, memtraceFree(), memtraceMalloc(), memtraceOut, sqlite3_mem_methods::xRealloc, sqlite3_mem_methods::xRoundup, and sqlite3_mem_methods::xSize.
|
static |
Definition at line 4238 of file shell.c.
References memtraceBase, and sqlite3_mem_methods::xRoundup.
|
static |
Definition at line 4244 of file shell.c.
References memtraceBase, and sqlite3_mem_methods::xShutdown.
|
static |
Definition at line 4235 of file shell.c.
References memtraceBase, and sqlite3_mem_methods::xSize.
|
static |
Definition at line 13937 of file shell.c.
References clearTempFile(), ShellState::db, raw_printf, sqlite3_file_control, sqlite3_free, sqlite3_mprintf, sqlite3_randomness, SQLITE_FCNTL_TEMPFILENAME, and ShellState::zTempFile.
Referenced by do_meta_command().
|
static |
Definition at line 712 of file shell.c.
Referenced by process_input().
|
static |
Definition at line 12879 of file shell.c.
References ShellState::db, deduceDatabaseType(), editFunc(), globalDb, OPEN_DB_KEEPALIVE, OPEN_DB_ZIPFILE, ShellState::openFlags, ShellState::openMode, readFile(), SHELL_OPEN_APPENDVFS, SHELL_OPEN_DESERIALIZE, SHELL_OPEN_HEXDB, SHELL_OPEN_NORMAL, SHELL_OPEN_READONLY, SHELL_OPEN_UNSPEC, SHELL_OPEN_ZIPFILE, shellAddSchemaName(), shellEscapeCrnl(), shellIdQuote(), shellInt32(), shellModuleSchema(), shellPutsFunc(), sqlite3_completion_init(), sqlite3_create_function, sqlite3_deserialize(), sqlite3_enable_load_extension(), sqlite3_errcode, sqlite3_errmsg, sqlite3_exec, sqlite3_file_control, sqlite3_fileio_init(), sqlite3_free, sqlite3_mprintf, sqlite3_open, sqlite3_open_v2, sqlite3_shathree_init(), sqlite3_uint_init(), SQLITE_DESERIALIZE_FREEONCLOSE, SQLITE_DESERIALIZE_RESIZEABLE, SQLITE_FCNTL_SIZE_LIMIT, SQLITE_OK, SQLITE_OPEN_CREATE, SQLITE_OPEN_READONLY, SQLITE_OPEN_READWRITE, SQLITE_UTF8, ShellState::szMax, utf8_printf, and ShellState::zDbFilename.
Referenced by do_meta_command(), main(), and shell_dbinfo_command().
|
static |
Definition at line 13900 of file shell.c.
Referenced by do_meta_command().
|
static |
Definition at line 10224 of file shell.c.
Referenced by do_meta_command(), shell_callback(), and shellAuth().
|
static |
Definition at line 10316 of file shell.c.
Referenced by shell_callback().
|
static |
Definition at line 13164 of file shell.c.
Referenced by do_meta_command(), and output_reset().
|
static |
|
static |
Definition at line 10090 of file shell.c.
Referenced by shell_callback().
|
static |
Definition at line 10256 of file shell.c.
Referenced by shell_callback().
|
static |
Definition at line 10163 of file shell.c.
Referenced by shell_callback().
|
static |
Definition at line 10124 of file shell.c.
Referenced by shell_callback().
|
static |
Definition at line 13631 of file shell.c.
References ShellState::doXdgOpen, ShellState::out, ShellState::outfile, output_file_close(), outputModePop(), pclose(), sqlite3_free, sqlite3_mprintf, sqlite3_sleep, utf8_printf, and ShellState::zTempFile.
Referenced by do_meta_command(), main(), and process_input().
|
static |
Definition at line 10080 of file shell.c.
Referenced by output_reset().
|
static |
Definition at line 10074 of file shell.c.
References ShellState::colSeparator, ShellState::colSepPrior, ShellState::mode, ShellState::modePrior, ShellState::priorShFlgs, and ShellState::shellFlgs.
Referenced by do_meta_command().
| int pclose | ( | FILE * | ) |
Referenced by do_meta_command(), and output_reset().
| FILE* popen | ( | const char * | , |
| const char * | |||
| ) |
Referenced by do_meta_command().
|
static |
|
static |
Definition at line 10422 of file shell.c.
Referenced by dump_callback(), and shell_callback().
|
static |
Definition at line 10431 of file shell.c.
Referenced by shell_callback().
|
static |
Definition at line 18684 of file shell.c.
References _all_whitespace(), bail_on_error, clearTempFile(), do_meta_command(), ShellState::in, IsSpace, line_contains_semicolon(), line_is_command_terminator(), line_is_complete(), ShellState::lineno, one_input_line(), ShellState::out, ShellState::outCount, output_reset(), runOneSqlLine(), seenInterrupt, shell_out_of_memory(), ShellHasFlag, SHFLG_Echo, sqlite3_complete, stdin_is_interactive, and strlen30().
Referenced by do_meta_command(), main(), and process_sqliterc().
|
static |
Definition at line 18845 of file shell.c.
References find_home_dir(), ShellState::in, ShellState::lineno, NULL, process_input(), raw_printf, sqlite3_free, sqlite3_mprintf, stdin_is_interactive, and utf8_printf.
Referenced by main().
|
static |
Definition at line 10545 of file shell.c.
References ShellState::flgProgress, ShellState::mxProgress, ShellState::nProgress, ShellState::out, raw_printf, SHELL_PROGRESS_ONCE, SHELL_PROGRESS_QUIET, and SHELL_PROGRESS_RESET.
Referenced by do_meta_command().
|
static |
Definition at line 863 of file shell.c.
References sqlite3_keyword_check, and zName.
Referenced by do_meta_command(), dump_callback(), set_table_name(), shell_callback(), and shellFakeSchema().
|
static |
Definition at line 12520 of file shell.c.
Referenced by do_meta_command(), and open_db().
|
static |
Definition at line 2234 of file shell.c.
Referenced by fsdirColumn(), and readfileFunc().
|
static |
Definition at line 2276 of file shell.c.
References context, readFileContents(), sqlite3_value_text, and zName.
|
static |
Definition at line 13083 of file shell.c.
Referenced by do_meta_command().
|
static |
Definition at line 11485 of file shell.c.
Referenced by shell_exec().
|
static |
Definition at line 12160 of file shell.c.
References ShellState::db, dump_callback(), ShellState::out, raw_printf, sqlite3_exec, sqlite3_free, sqlite3_snprintf, SQLITE_CORRUPT, strlen30(), and utf8_printf.
Referenced by do_meta_command().
|
static |
Definition at line 11045 of file shell.c.
References ShellState::db, ShellState::nErr, ShellState::out, raw_printf, sqlite3_column_count, sqlite3_column_text, sqlite3_errmsg, sqlite3_finalize, sqlite3_prepare_v2, sqlite3_step, SQLITE_CORRUPT, SQLITE_OK, SQLITE_ROW, and utf8_printf.
Referenced by do_meta_command().
|
static |
Definition at line 18641 of file shell.c.
Referenced by process_input().
|
static |
Definition at line 11090 of file shell.c.
References sqlite3_errmsg, sqlite3_malloc64, and strlen30().
Referenced by shell_exec().
|
static |
Definition at line 11009 of file shell.c.
References quoteChar(), shell_out_of_memory(), strlen30(), ShellState::zDestTable, and zName.
Referenced by do_meta_command(), and main().
|
static |
Definition at line 13153 of file shell.c.
References booleanValue(), ShellClearFlag, and ShellSetFlag.
Referenced by do_meta_command().
|
static |
Definition at line 1849 of file shell.c.
References SHA3Context::ixMask, SHA3Context::nLoaded, SHA3Context::nRate, SHA3Update(), SHA3Context::u, and SHA3Context::x.
Referenced by sha3Func(), and sha3QueryFunc().
|
static |
Definition at line 1878 of file shell.c.
References context, eType, SHA3Final(), SHA3Init(), SHA3Update(), sqlite3_result_blob, sqlite3_result_error, sqlite3_value_blob, sqlite3_value_bytes, sqlite3_value_int, sqlite3_value_text, sqlite3_value_type, SQLITE_BLOB, SQLITE_NULL, and SQLITE_TRANSIENT.
Referenced by sqlite3_shathree_init().
|
static |
Definition at line 1781 of file shell.c.
References SHA3Context::ixMask, and SHA3Context::nRate.
Referenced by sha3Func(), and sha3QueryFunc().
|
static |
Definition at line 1957 of file shell.c.
References context, hash_step_vformat(), SHA3Final(), SHA3Init(), SHA3Update(), sqlite3_column_blob, sqlite3_column_bytes, sqlite3_column_count, sqlite3_column_double, sqlite3_column_int64, sqlite3_column_text, sqlite3_column_type, sqlite3_context_db_handle, sqlite3_errmsg, sqlite3_finalize, sqlite3_free, sqlite3_mprintf, sqlite3_prepare_v2, sqlite3_result_blob, sqlite3_result_error, sqlite3_sql, sqlite3_step, sqlite3_stmt_readonly, sqlite3_value_int, sqlite3_value_text, SQLITE_BLOB, SQLITE_FLOAT, SQLITE_INTEGER, SQLITE_NULL, SQLITE_ROW, SQLITE_TEXT, and SQLITE_TRANSIENT.
Referenced by sqlite3_shathree_init().
|
static |
Definition at line 1810 of file shell.c.
References SHA3Context::ixMask, KeccakF1600Step(), SHA3Context::nLoaded, SHA3Context::nRate, SHA3Context::s, SHA3Context::u, and SHA3Context::x.
Referenced by hash_step_vformat(), SHA3Final(), sha3Func(), and sha3QueryFunc().
|
static |
Definition at line 10565 of file shell.c.
References ShellState::actualWidth, ShellState::aiIndent, ArraySize, ShellState::cMode, ShellState::cnt, ShellState::colSeparator, ShellState::colWidth, eqp_append(), ShellState::iIndent, isNumber(), IsSpace, MODE_Ascii, MODE_Column, MODE_Csv, MODE_EQP, MODE_Explain, MODE_Html, MODE_Insert, MODE_Line, MODE_List, MODE_Pretty, MODE_Quote, MODE_Semi, MODE_Tcl, ShellState::nIndent, ShellState::nullValue, ShellState::out, output_c_string(), output_csv(), output_hex_blob(), output_html_string(), output_quoted_escaped_string(), output_quoted_string(), printSchemaLine(), printSchemaLineN(), ShellState::pStmt, quoteChar(), raw_printf, ShellState::rowSeparator, SEP_Row, setBinaryMode, setTextMode, ShellHasFlag, SHFLG_Newlines, ShellState::showHeader, sqlite3_column_blob, sqlite3_column_bytes, sqlite3_column_double, sqlite3_free, sqlite3_mprintf, sqlite3_snprintf, sqlite3_strlike, SQLITE_BLOB, SQLITE_FLOAT, SQLITE_INTEGER, SQLITE_NULL, SQLITE_TEXT, strlen30(), strlenChar(), utf8_printf, utf8_width_print(), wsToEol(), and ShellState::zDestTable.
Referenced by callback(), and exec_prepared_stmt().
|
static |
Definition at line 13697 of file shell.c.
References ArraySize, ShellState::db, db_int(), get2byteInt(), get4byteInt(), open_db(), ShellState::out, raw_printf, sqlite3_bind_text, sqlite3_column_blob, sqlite3_column_bytes, sqlite3_errmsg, sqlite3_file_control, sqlite3_finalize, sqlite3_free, sqlite3_mprintf, sqlite3_prepare_v2, sqlite3_step, SQLITE_FCNTL_DATA_VERSION, SQLITE_ROW, SQLITE_STATIC, utf8_printf, and zName.
Referenced by do_meta_command().
|
static |
Definition at line 11758 of file shell.c.
References ShellState::autoEQP, AUTOEQP_full, AUTOEQP_trigger, ShellState::autoExplain, bind_prepared_stmt(), ShellState::cMode, ShellState::cnt, ShellState::db, disable_debug_trace_modes(), display_scanstats(), display_stats(), eqp_append(), eqp_render(), exec_prepared_stmt(), ShellState::expert, expertFinish(), expertHandleSQL(), explain_data_delete(), explain_data_prepare(), IsSpace, ShellState::mode, MODE_EQP, MODE_Explain, NULL, ShellState::out, ExpertInfo::pExpert, ShellState::pStmt, restore_debug_trace_modes(), save_err_msg(), ShellState::scanstatsOn, ShellHasFlag, SHFLG_Echo, sqlite3_column_int, sqlite3_column_text, sqlite3_db_config, sqlite3_finalize, sqlite3_free, sqlite3_mprintf, sqlite3_prepare_v2, sqlite3_sql, sqlite3_step, sqlite3_stmt_isexplain, SQLITE_DBCONFIG_TRIGGER_EQP, SQLITE_NOMEM, SQLITE_OK, SQLITE_ROW, ShellState::statsOn, and utf8_printf.
Referenced by do_meta_command(), dump_callback(), and main().
|
static |
Definition at line 490 of file shell.c.
References raw_printf.
Referenced by appendText(), do_meta_command(), eqp_append(), explain_data_prepare(), import_append_char(), main(), process_input(), set_table_name(), tableColumnList(), and tryToCloneData().
|
static |
|
static |
Definition at line 10374 of file shell.c.
References ShellState::out, output_c_string(), raw_printf, SQLITE_OK, and utf8_printf.
Referenced by do_meta_command().
|
static |
Definition at line 13792 of file shell.c.
References sqlite3_errmsg, and utf8_printf.
| int shellDeleteFile | ( | const char * | zFilename | ) |
Definition at line 13910 of file shell.c.
References sqlite3_free.
Referenced by clearTempFile(), and do_meta_command().
|
static |
Definition at line 12784 of file shell.c.
References context, sqlite3_free, sqlite3_malloc64, sqlite3_result_error_nomem, sqlite3_result_text, sqlite3_result_value, sqlite3_value_bytes, sqlite3_value_text, SQLITE_TRANSIENT, UNUSED_PARAMETER, and unused_string().
Referenced by open_db().
|
static |
Definition at line 876 of file shell.c.
References appendText(), freeText(), initText(), quoteChar(), sqlite3_column_text, sqlite3_finalize, sqlite3_free, sqlite3_mprintf, sqlite3_prepare_v2, sqlite3_step, sqlite3_stricmp, SQLITE_ROW, ShellText::z, and zName.
Referenced by shellModuleSchema().
| void shellFinalize | ( | int * | pRc, |
| sqlite3_stmt * | pStmt | ||
| ) |
Definition at line 14274 of file shell.c.
References raw_printf, sqlite3_db_handle, sqlite3_errmsg, sqlite3_finalize, and SQLITE_OK.
|
static |
Definition at line 13985 of file shell.c.
References sqlite3_context_db_handle, sqlite3_free, sqlite3_mprintf, sqlite3_result_text, sqlite3_stricmp, sqlite3_table_column_metadata, sqlite3_value_text, SQLITE_OK, SQLITE_STATIC, and SQLITE_TRANSIENT.
|
static |
Definition at line 12758 of file shell.c.
References context, sqlite3_free, sqlite3_mprintf, sqlite3_result_text, sqlite3_value_text, UNUSED_PARAMETER, and zName.
Referenced by open_db().
|
static |
Definition at line 12730 of file shell.c.
References context, sqlite3_result_int64, sqlite3_value_blob, sqlite3_value_bytes, sqlite3_value_int, and UNUSED_PARAMETER.
Referenced by open_db().
|
static |
Definition at line 9903 of file shell.c.
References ShellState::pLog, and utf8_printf.
Referenced by main_init().
|
static |
Definition at line 924 of file shell.c.
References shellFakeSchema(), sqlite3_context_db_handle, sqlite3_free, sqlite3_mprintf, sqlite3_result_text, sqlite3_value_text, UNUSED_PARAMETER, and zName.
Referenced by open_db().
|
static |
Definition at line 14220 of file shell.c.
References raw_printf, sqlite3_errcode, sqlite3_errmsg, sqlite3_prepare_v2, and SQLITE_OK.
Referenced by shellPreparePrintf().
| void shellPreparePrintf | ( | sqlite3 * | db, |
| int * | pRc, | ||
| sqlite3_stmt ** | ppStmt, | ||
| const char * | zFmt, | ||
| ... | |||
| ) |
Definition at line 14245 of file shell.c.
References shellPrepare(), sqlite3_free, sqlite3_vmprintf, SQLITE_NOMEM, and SQLITE_OK.
|
static |
Definition at line 9916 of file shell.c.
References ShellState::out, sqlite3_result_value, sqlite3_user_data, sqlite3_value_text, and utf8_printf.
Referenced by open_db().
| void shellReset | ( | int * | pRc, |
| sqlite3_stmt * | pStmt | ||
| ) |
Definition at line 14296 of file shell.c.
References raw_printf, sqlite3_db_handle, sqlite3_errmsg, sqlite3_reset, and SQLITE_OK.
|
static |
Definition at line 12441 of file shell.c.
Referenced by do_meta_command().
|
static |
Definition at line 13194 of file shell.c.
References ShellState::eTraceType, SHELL_TRACE_EXPANDED, SHELL_TRACE_NORMALIZED, sqlite3_expanded_sql, sqlite3_normalized_sql, sqlite3_sql, SQLITE_TRACE_CLOSE, SQLITE_TRACE_PROFILE, SQLITE_TRACE_ROW, SQLITE_TRACE_STMT, strlen30(), ShellState::traceOut, and utf8_printf.
| int sqlite3_appendvfs_init | ( | sqlite3 * | db, |
| char ** | pzErrMsg, | ||
| const sqlite3_api_routines * | pApi | ||
| ) |
Definition at line 4151 of file shell.c.
References apnd_vfs, sqlite3_vfs::iVersion, sqlite3_vfs::pAppData, sqlite3_auto_extension, sqlite3_vfs_find, sqlite3_vfs_register, SQLITE_EXTENSION_INIT2, SQLITE_OK, SQLITE_OK_LOAD_PERMANENTLY, and sqlite3_vfs::szOsFile.
Referenced by main().
| int sqlite3_completion_init | ( | sqlite3 * | db, |
| char ** | pzErrMsg, | ||
| const sqlite3_api_routines * | pApi | ||
| ) |
| int sqlite3_expert_analyze | ( | sqlite3expert * | p, |
| char ** | pzErr | ||
| ) |
Definition at line 8741 of file shell.c.
References sqlite3expert::bRun, sqlite3expert::hIdx, idxAppendText(), idxCreateCandidates(), idxFindIndexes(), idxPopulateStat1(), idxProcessTriggers(), IdxHash::pFirst, IdxHashEntry::pNext, SQLITE_OK, sqlite3expert::zCandidates, IdxHashEntry::zVal, and IdxHashEntry::zVal2.
| int sqlite3_expert_config | ( | sqlite3expert * | p, |
| int | op, | ||
| ... | |||
| ) |
Definition at line 8672 of file shell.c.
References EXPERT_CONFIG_SAMPLE, sqlite3expert::iSample, SQLITE_NOTFOUND, and SQLITE_OK.
Referenced by expertDotCommand().
| int sqlite3_expert_count | ( | sqlite3expert * | p | ) |
Definition at line 8782 of file shell.c.
References IdxStatement::iId, and sqlite3expert::pStatement.
| void sqlite3_expert_destroy | ( | sqlite3expert * | p | ) |
Definition at line 8817 of file shell.c.
Referenced by sqlite3_expert_new().
| sqlite3expert * sqlite3_expert_new | ( | sqlite3 * | db, |
| char ** | pzErr | ||
| ) |
Definition at line 8611 of file shell.c.
References sqlite3expert::db, sqlite3expert::dbm, sqlite3expert::dbv, idxAuthCallback(), idxCreateVtabSchema(), idxFinalize(), idxMalloc(), idxPrintfPrepareStmt(), sqlite3expert::iSample, sqlite3_column_text, sqlite3_db_config, sqlite3_exec, sqlite3_expert_destroy(), sqlite3_open, sqlite3_set_authorizer, sqlite3_step, SQLITE_DBCONFIG_TRIGGER_EQP, SQLITE_OK, and SQLITE_ROW.
Referenced by expertDotCommand().
| const char * sqlite3_expert_report | ( | sqlite3expert * | p, |
| int | iStmt, | ||
| int | eReport | ||
| ) |
Definition at line 8791 of file shell.c.
References sqlite3expert::bRun, EXPERT_REPORT_CANDIDATES, EXPERT_REPORT_INDEXES, EXPERT_REPORT_PLAN, EXPERT_REPORT_SQL, IdxStatement::iId, IdxStatement::pNext, sqlite3expert::pStatement, sqlite3expert::zCandidates, IdxStatement::zEQP, IdxStatement::zIdx, and IdxStatement::zSql.
| int sqlite3_expert_sql | ( | sqlite3expert * | p, |
| const char * | zSql, | ||
| char ** | pzErr | ||
| ) |
Definition at line 8696 of file shell.c.
References sqlite3expert::bRun, sqlite3expert::dbv, idxDatabaseError(), idxMalloc(), idxScanFree(), idxStatementFree(), IdxStatement::iId, IdxStatement::pNext, sqlite3expert::pScan, sqlite3expert::pStatement, sqlite3_finalize, sqlite3_prepare_v2, sqlite3_sql, SQLITE_MISUSE, SQLITE_OK, STRLEN, and IdxStatement::zSql.
Referenced by expertHandleSQL().
| int sqlite3_fileio_init | ( | sqlite3 * | db, |
| char ** | pzErrMsg, | ||
| const sqlite3_api_routines * | pApi | ||
| ) |
| int sqlite3_shathree_init | ( | sqlite3 * | db, |
| char ** | pzErrMsg, | ||
| const sqlite3_api_routines * | pApi | ||
| ) |
Definition at line 2071 of file shell.c.
References sha3Func(), sha3QueryFunc(), sqlite3_create_function, SQLITE_DETERMINISTIC, SQLITE_DIRECTONLY, SQLITE_EXTENSION_INIT2, SQLITE_INNOCUOUS, SQLITE_OK, and SQLITE_UTF8.
Referenced by open_db().
| int sqlite3_uint_init | ( | sqlite3 * | db, |
| char ** | pzErrMsg, | ||
| const sqlite3_api_routines * | pApi | ||
| ) |
Definition at line 4371 of file shell.c.
References sqlite3_create_collation, SQLITE_EXTENSION_INIT2, SQLITE_UTF8, and uintCollFunc().
Referenced by open_db().
| int sqlite3CompletionVtabInit | ( | sqlite3 * | db | ) |
Definition at line 3582 of file shell.c.
References completionModule, sqlite3_create_module, and SQLITE_OK.
| int sqlite3MemTraceActivate | ( | FILE * | out | ) |
| int sqlite3MemTraceDeactivate | ( | void | ) |
Definition at line 4274 of file shell.c.
References memtraceBase, memtraceOut, sqlite3_config(), SQLITE_CONFIG_MALLOC, SQLITE_OK, and sqlite3_mem_methods::xMalloc.
|
static |
Definition at line 11348 of file shell.c.
Referenced by explain_data_prepare().
|
static |
Definition at line 626 of file shell.c.
Referenced by appendText(), do_meta_command(), eqp_append(), eqp_render_level(), expertDotCommand(), find_home_dir(), lintDotCommand(), main(), process_input(), run_schema_dump_query(), save_err_msg(), set_table_name(), shell_callback(), sql_trace_callback(), and tryToCloneData().
|
static |
Definition at line 636 of file shell.c.
Referenced by shell_callback().
|
static |
Definition at line 11937 of file shell.c.
References ShellState::db, freeColumnList(), shell_out_of_memory(), ShellHasFlag, SHFLG_PreserveRowid, sqlite3_column_int, sqlite3_column_text, sqlite3_finalize, sqlite3_free, sqlite3_mprintf, sqlite3_prepare_v2, sqlite3_realloc, sqlite3_step, sqlite3_stricmp, sqlite3_table_column_metadata, SQLITE_OK, and SQLITE_ROW.
Referenced by dump_callback().
|
static |
Definition at line 13253 of file shell.c.
Referenced by do_meta_command().
|
static |
Definition at line 13821 of file shell.c.
References IsDigit, and IsSpace.
Referenced by do_meta_command().
|
static |
Definition at line 285 of file shell.c.
Referenced by endTimer().
|
static |
Definition at line 243 of file shell.c.
Referenced by beginTimer(), and endTimer().
|
static |
Definition at line 12028 of file shell.c.
References sqlite3_column_int, sqlite3_exec, sqlite3_finalize, sqlite3_prepare_v2, sqlite3_snprintf, sqlite3_step, and SQLITE_ROW.
Referenced by dump_callback().
|
static |
Definition at line 13602 of file shell.c.
References close_db(), ShellState::db, sqlite3_errmsg, sqlite3_exec, sqlite3_open, tryToCloneData(), tryToCloneSchema(), and utf8_printf.
Referenced by do_meta_command().
|
static |
Definition at line 13417 of file shell.c.
References ShellState::db, shell_out_of_memory(), sqlite3_bind_blob, sqlite3_bind_double, sqlite3_bind_int64, sqlite3_bind_null, sqlite3_bind_text, sqlite3_column_blob, sqlite3_column_bytes, sqlite3_column_count, sqlite3_column_double, sqlite3_column_int64, sqlite3_column_text, sqlite3_column_type, sqlite3_errmsg, sqlite3_extended_errcode, sqlite3_finalize, sqlite3_free, sqlite3_malloc64, sqlite3_mprintf, sqlite3_prepare_v2, sqlite3_reset, sqlite3_snprintf, sqlite3_step, SQLITE_BLOB, SQLITE_DONE, SQLITE_FLOAT, SQLITE_INTEGER, SQLITE_NULL, SQLITE_OK, SQLITE_ROW, SQLITE_STATIC, SQLITE_TEXT, strlen30(), and utf8_printf.
Referenced by tryToClone().
|
static |
Definition at line 13527 of file shell.c.
References ShellState::db, sqlite3_column_text, sqlite3_errmsg, sqlite3_exec, sqlite3_extended_errcode, sqlite3_finalize, sqlite3_free, sqlite3_mprintf, sqlite3_prepare_v2, sqlite3_step, SQLITE_DONE, SQLITE_ROW, utf8_printf, and zName.
Referenced by tryToClone().
|
static |
Definition at line 4327 of file shell.c.
Referenced by sqlite3_uint_init().
|
static |
Definition at line 10105 of file shell.c.
References sqlite3_snprintf.
Referenced by shellEscapeCrnl().
|
static |
Definition at line 18935 of file shell.c.
References Argv0, raw_printf, utf8_printf, and zOptions.
Referenced by lintDotCommand(), and main().
|
static |
|
static |
Definition at line 18952 of file shell.c.
References sqlite3_config(), SQLITE_MISUSE, and utf8_printf.
Referenced by main(), and main_init().
|
static |
Definition at line 2444 of file shell.c.
References fileStat(), and sqlite3_value_text.
Referenced by writefileFunc().
|
static |
Definition at line 2558 of file shell.c.
References context, ctxErrorMsg(), makeDirectory(), sqlite3_result_error, sqlite3_value_int, sqlite3_value_int64, sqlite3_value_text, SQLITE_OK, and writeFile().
|
static |
|
static |
Definition at line 3767 of file shell.c.
Referenced by apndOpen().
|
static |
Definition at line 3742 of file shell.c.
Referenced by sqlite3_appendvfs_init().
|
static |
|
static |
Definition at line 408 of file shell.c.
Referenced by do_meta_command(), main(), and process_input().
|
static |
Definition at line 3553 of file shell.c.
Referenced by sqlite3CompletionVtabInit().
|
static |
Definition at line 455 of file shell.c.
Referenced by do_meta_command(), and main_init().
|
static |
Definition at line 240 of file shell.c.
Referenced by beginTimer(), and endTimer().
|
static |
|
static |
Definition at line 428 of file shell.c.
Referenced by interrupt_handler(), and open_db().
|
static |
Definition at line 272 of file shell.c.
Referenced by beginTimer(), and endTimer().
|
static |
Definition at line 454 of file shell.c.
Referenced by do_meta_command(), and main_init().
|
static |
Definition at line 4205 of file shell.c.
Referenced by memtraceFree(), memtraceInit(), memtraceMalloc(), memtraceRealloc(), memtraceRoundup(), memtraceShutdown(), memtraceSize(), and sqlite3MemTraceDeactivate().
|
static |
Definition at line 4206 of file shell.c.
Referenced by memtraceFree(), memtraceMalloc(), memtraceRealloc(), and sqlite3MemTraceDeactivate().
|
static |
Definition at line 9871 of file shell.c.
Referenced by do_meta_command().
|
static |
|
static |
Definition at line 243 of file shell.c.
Referenced by beginTimer(), and endTimer().
|
static |
Definition at line 433 of file shell.c.
Referenced by ascii_read_one_field(), csv_read_one_field(), do_meta_command(), interrupt_handler(), and process_input().
|
static |
Definition at line 414 of file shell.c.
Referenced by main(), process_input(), and process_sqliterc().