Classes | Macros | Typedefs | Functions | Variables
shell.c File Reference
#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 <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
Include dependency graph for shell.c:

Go to the source code of this file.

Classes

struct  ImportCtx
 
struct  SavedModeInfo
 
struct  ShellState
 

Macros

#define _FILE_OFFSET_BITS   64
 
#define _LARGE_FILE   1
 
#define _LARGEFILE_SOURCE   1
 
#define ArraySize(X)   (int)(sizeof(X)/sizeof(X[0]))
 
#define BEGIN_TIMER   beginTimer()
 
#define END_TIMER   endTimer()
 
#define HAS_TIMER   1
 
#define IsDigit(X)   isdigit((unsigned char)X)
 
#define IsSpace(X)   isspace((unsigned char)X)
 
#define MODE_Ascii   9 /* Use ASCII unit and record separators (0x1F/0x1E) */
 
#define MODE_Column   1 /* One record per line in neat columns */
 
#define MODE_Csv   7 /* Quote strings, numbers are plain */
 
#define MODE_Explain   8 /* Like MODE_Column, but do not truncate data */
 
#define MODE_Html   4 /* Generate an XHTML table */
 
#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_Pretty   10 /* Pretty-print schemas */
 
#define MODE_Semi   3 /* Same as MODE_List but append ";" to each line */
 
#define MODE_Tcl   6 /* Generate ANSI-C or TCL quoted elements */
 
#define raw_printf   fprintf
 
#define SEP_Column   "|"
 
#define SEP_Comma   ","
 
#define SEP_CrLf   "\r\n"
 
#define SEP_Record   "\x1E"
 
#define SEP_Row   "\n"
 
#define SEP_Space   " "
 
#define SEP_Tab   "\t"
 
#define SEP_Unit   "\x1F"
 
#define session_close_all(X)
 
#define setBinaryMode(X, Y)
 
#define setTextMode(X, Y)
 
#define shell_read_history(X)
 
#define shell_stifle_history(X)
 
#define SHELL_USE_LOCAL_GETLINE   1
 
#define shell_write_history(X)
 
#define SHFLG_Lookaside   0x00004 /* Lookaside memory is used */
 
#define SHFLG_Pagecache   0x00002 /* The --pagecache option is used */
 
#define SHFLG_Scratch   0x00001 /* The --scratch option is used */
 
#define SQLITE_SHELL_IS_UTF8   (1)
 
#define ToLower(X)   (char)tolower((unsigned char)X)
 
#define UNUSED_PARAMETER(x)   (void)(x)
 
#define utf8_printf   fprintf
 

Typedefs

typedef struct ImportCtx ImportCtx
 
typedef struct SavedModeInfo SavedModeInfo
 
typedef struct ShellState ShellState
 

Functions

static int _all_whitespace (const char *z)
 
static char * appendText (char *zIn, char const *zAppend, char quote)
 
static char *SQLITE_CDECL ascii_read_one_field (ImportCtx *p)
 
static void beginTimer (void)
 
static int booleanValue (char *zArg)
 
static int callback (void *pArg, int nArg, char **azArg, char **azCol)
 
static char * cmdline_option_value (int argc, char **argv, int i)
 
static char *SQLITE_CDECL csv_read_one_field (ImportCtx *p)
 
static int db_int (ShellState *p, const char *zSql)
 
static void disable_debug_trace_modes (void)
 
static void display_scanstats (sqlite3 *db, ShellState *pArg)
 
static int display_stats (sqlite3 *db, ShellState *pArg, int bReset)
 
static int do_meta_command (char *zLine, ShellState *p)
 
static int dump_callback (void *pArg, int nArg, char **azArg, char **azCol)
 
static void endTimer (void)
 
static void exec_prepared_stmt (ShellState *pArg, sqlite3_stmt *pStmt, int(*xCallback)(void *, int, char **, char **, int *))
 
static void explain_data_delete (ShellState *p)
 
static void explain_data_prepare (ShellState *p, sqlite3_stmt *pSql)
 
static char * find_home_dir (int clearFlag)
 
static unsigned int get2byteInt (unsigned char *a)
 
static unsigned int get4byteInt (unsigned char *a)
 
static int hexDigitValue (char c)
 
static void import_append_char (ImportCtx *p, int c)
 
static sqlite3_int64 integerValue (const char *zArg)
 
int isatty (int)
 
static int isNumber (const char *z, int *realnum)
 
static int line_contains_semicolon (const char *z, int N)
 
static int line_is_command_terminator (const char *zLine)
 
static int line_is_complete (char *zSql, int nSql)
 
static char * local_getline (char *zLine, FILE *in)
 
int SQLITE_CDECL main (int argc, char **argv)
 
static void main_init (ShellState *data)
 
static char * one_input_line (FILE *in, char *zPrior, int isContinuation)
 
static void open_db (ShellState *p, int keepAlive)
 
static int optionMatch (const char *zStr, const char *zOpt)
 
static void output_c_string (FILE *out, const char *z)
 
static void output_csv (ShellState *p, const char *z, int bSep)
 
static void output_file_close (FILE *f)
 
static FILE * output_file_open (const char *zFile)
 
static void output_hex_blob (FILE *out, const void *pBlob, int nBlob)
 
static void output_html_string (FILE *out, const char *z)
 
static void output_quoted_string (FILE *out, const char *z)
 
static void output_reset (ShellState *p)
 
int pclose (FILE *)
 
FILE * popen (const char *, const char *)
 
static void printBold (const char *zText)
 
static int process_input (ShellState *p, FILE *in)
 
static void process_sqliterc (ShellState *p, const char *sqliterc_override)
 
static char * readFile (const char *zName)
 
static void readfileFunc (sqlite3_context *context, int argc, sqlite3_value **argv)
 
static void resolve_backslashes (char *z)
 
static void restore_debug_trace_modes (void)
 
static int run_schema_dump_query (ShellState *p, const char *zQuery)
 
static int run_table_dump_query (ShellState *p, const char *zSelect, const char *zFirstRow)
 
static char * save_err_msg (sqlite3 *db)
 
static void set_table_name (ShellState *p, const char *zName)
 
static int shell_callback (void *pArg, int nArg, char **azArg, char **azCol, int *aiType)
 
static int shell_dbinfo_command (ShellState *p, int nArg, char **azArg)
 
static int shell_exec (sqlite3 *db, const char *zSql, int(*xCallback)(void *, int, char **, char **, int *), ShellState *pArg, char **pzErrMsg)
 
static int shellAuth (void *pClientData, int op, const char *zA1, const char *zA2, const char *zA3, const char *zA4)
 
static int shellDatabaseError (sqlite3 *db)
 
int shellDeleteFile (const char *zFilename)
 
static void shellLog (void *pArg, int iErrCode, const char *zMsg)
 
static int shellNomemError (void)
 
static void shellstaticFunc (sqlite3_context *context, int argc, sqlite3_value **argv)
 
static int sql_trace_callback (unsigned mType, void *pArg, void *pP, void *pX)
 
static int str_in_array (const char *zStr, const char **azArray)
 
static int strlen30 (const char *z)
 
static void test_breakpoint (void)
 
static int testcase_glob (const char *zGlob, const char *z)
 
static double timeDiff (struct timeval *pStart, struct timeval *pEnd)
 
static sqlite3_int64 timeOfDay (void)
 
static void tryToClone (ShellState *p, const char *zNewDb)
 
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 usage (int showDetail)
 
static void writefileFunc (sqlite3_context *context, int argc, sqlite3_value **argv)
 

Variables

static char * Argv0
 
static int bail_on_error = 0
 
static char continuePrompt [20]
 
static int enableTimer = 0
 
static sqlite3globalDb = 0
 
static sqlite3_int64 iBegin
 
static char mainPrompt [20]
 
static const char * modeDescr []
 
static const char needCsvQuote []
 
static struct rusage sBegin
 
static volatile int seenInterrupt = 0
 
static int stdin_is_interactive = 1
 
static int stdout_is_console = 1
 
static char zHelp []
 
static const char zOptions []
 
static const char * zShellStatic = 0
 

Macro Definition Documentation

◆ _FILE_OFFSET_BITS

#define _FILE_OFFSET_BITS   64

Definition at line 40 of file shell.c.

◆ _LARGE_FILE

#define _LARGE_FILE   1

Definition at line 38 of file shell.c.

◆ _LARGEFILE_SOURCE

#define _LARGEFILE_SOURCE   1

Definition at line 42 of file shell.c.

◆ ArraySize

#define ArraySize (   X)    (int)(sizeof(X)/sizeof(X[0]))

Definition at line 707 of file shell.c.

◆ BEGIN_TIMER

#define BEGIN_TIMER   beginTimer()

Definition at line 236 of file shell.c.

◆ END_TIMER

#define END_TIMER   endTimer()

Definition at line 237 of file shell.c.

◆ HAS_TIMER

#define HAS_TIMER   1

Definition at line 238 of file shell.c.

◆ IsDigit

#define IsDigit (   X)    isdigit((unsigned char)X)

Definition at line 136 of file shell.c.

◆ IsSpace

#define IsSpace (   X)    isspace((unsigned char)X)

Definition at line 135 of file shell.c.

◆ MODE_Ascii

#define MODE_Ascii   9 /* Use ASCII unit and record separators (0x1F/0x1E) */

Definition at line 674 of file shell.c.

◆ MODE_Column

#define MODE_Column   1 /* One record per line in neat columns */

Definition at line 666 of file shell.c.

◆ MODE_Csv

#define MODE_Csv   7 /* Quote strings, numbers are plain */

Definition at line 672 of file shell.c.

◆ MODE_Explain

#define MODE_Explain   8 /* Like MODE_Column, but do not truncate data */

Definition at line 673 of file shell.c.

◆ MODE_Html

#define MODE_Html   4 /* Generate an XHTML table */

Definition at line 669 of file shell.c.

◆ MODE_Insert

#define MODE_Insert   5 /* Generate SQL "insert" statements */

Definition at line 670 of file shell.c.

◆ MODE_Line

#define MODE_Line   0 /* One column per line. Blank line between records */

Definition at line 665 of file shell.c.

◆ MODE_List

#define MODE_List   2 /* One record per line with a separator */

Definition at line 667 of file shell.c.

◆ MODE_Pretty

#define MODE_Pretty   10 /* Pretty-print schemas */

Definition at line 675 of file shell.c.

◆ MODE_Semi

#define MODE_Semi   3 /* Same as MODE_List but append ";" to each line */

Definition at line 668 of file shell.c.

◆ MODE_Tcl

#define MODE_Tcl   6 /* Generate ANSI-C or TCL quoted elements */

Definition at line 671 of file shell.c.

◆ raw_printf

#define raw_printf   fprintf

Definition at line 401 of file shell.c.

◆ SEP_Column

#define SEP_Column   "|"

Definition at line 695 of file shell.c.

◆ SEP_Comma

#define SEP_Comma   ","

Definition at line 699 of file shell.c.

◆ SEP_CrLf

#define SEP_CrLf   "\r\n"

Definition at line 700 of file shell.c.

◆ SEP_Record

#define SEP_Record   "\x1E"

Definition at line 702 of file shell.c.

◆ SEP_Row

#define SEP_Row   "\n"

Definition at line 696 of file shell.c.

◆ SEP_Space

#define SEP_Space   " "

Definition at line 698 of file shell.c.

◆ SEP_Tab

#define SEP_Tab   "\t"

Definition at line 697 of file shell.c.

◆ SEP_Unit

#define SEP_Unit   "\x1F"

Definition at line 701 of file shell.c.

◆ session_close_all

#define session_close_all (   X)

Definition at line 2354 of file shell.c.

◆ setBinaryMode

#define setBinaryMode (   X,
 
)

Definition at line 165 of file shell.c.

◆ setTextMode

#define setTextMode (   X,
 
)

Definition at line 166 of file shell.c.

◆ shell_read_history

#define shell_read_history (   X)

Definition at line 93 of file shell.c.

◆ shell_stifle_history

#define shell_stifle_history (   X)

Definition at line 95 of file shell.c.

◆ SHELL_USE_LOCAL_GETLINE

#define SHELL_USE_LOCAL_GETLINE   1

Definition at line 97 of file shell.c.

◆ shell_write_history

#define shell_write_history (   X)

Definition at line 94 of file shell.c.

◆ SHFLG_Lookaside

#define SHFLG_Lookaside   0x00004 /* Lookaside memory is used */

Definition at line 660 of file shell.c.

◆ SHFLG_Pagecache

#define SHFLG_Pagecache   0x00002 /* The --pagecache option is used */

Definition at line 659 of file shell.c.

◆ SHFLG_Scratch

#define SHFLG_Scratch   0x00001 /* The --scratch option is used */

Definition at line 658 of file shell.c.

◆ SQLITE_SHELL_IS_UTF8

#define SQLITE_SHELL_IS_UTF8   (1)

Definition at line 5420 of file shell.c.

◆ ToLower

#define ToLower (   X)    (char)tolower((unsigned char)X)

Definition at line 137 of file shell.c.

◆ UNUSED_PARAMETER

#define UNUSED_PARAMETER (   x)    (void)(x)

Definition at line 326 of file shell.c.

◆ utf8_printf

#define utf8_printf   fprintf

Definition at line 393 of file shell.c.

Typedef Documentation

◆ ImportCtx

typedef struct ImportCtx ImportCtx

Definition at line 2603 of file shell.c.

◆ SavedModeInfo

typedef struct SavedModeInfo SavedModeInfo

Definition at line 598 of file shell.c.

◆ ShellState

typedef struct ShellState ShellState

Definition at line 610 of file shell.c.

Function Documentation

◆ _all_whitespace()

static int _all_whitespace ( const char *  z)
static

Definition at line 5033 of file shell.c.

◆ appendText()

static char* appendText ( char *  zIn,
char const *  zAppend,
char  quote 
)
static

Definition at line 1314 of file shell.c.

◆ ascii_read_one_field()

static char* SQLITE_CDECL ascii_read_one_field ( ImportCtx p)
static

Definition at line 2716 of file shell.c.

◆ beginTimer()

static void beginTimer ( void  )
static

Definition at line 208 of file shell.c.

◆ booleanValue()

static int booleanValue ( char *  zArg)
static

Definition at line 2522 of file shell.c.

◆ callback()

static int callback ( void *  pArg,
int  nArg,
char **  azArg,
char **  azCol 
)
static

Definition at line 1263 of file shell.c.

◆ cmdline_option_value()

static char* cmdline_option_value ( int  argc,
char **  argv,
int  i 
)
static

Definition at line 5407 of file shell.c.

◆ csv_read_one_field()

static char* SQLITE_CDECL csv_read_one_field ( ImportCtx p)
static

Definition at line 2642 of file shell.c.

◆ db_int()

static int db_int ( ShellState p,
const char *  zSql 
)
static

Definition at line 2971 of file shell.c.

◆ disable_debug_trace_modes()

static void disable_debug_trace_modes ( void  )
static

Definition at line 1771 of file shell.c.

◆ display_scanstats()

static void display_scanstats ( sqlite3 db,
ShellState pArg 
)
static

Definition at line 1594 of file shell.c.

◆ display_stats()

static int display_stats ( sqlite3 db,
ShellState pArg,
int  bReset 
)
static

Definition at line 1463 of file shell.c.

◆ do_meta_command()

static int do_meta_command ( char *  zLine,
ShellState p 
)
static

Definition at line 3223 of file shell.c.

◆ dump_callback()

static int dump_callback ( void *  pArg,
int  nArg,
char **  azArg,
char **  azCol 
)
static

Definition at line 2003 of file shell.c.

◆ endTimer()

static void endTimer ( void  )
static

Definition at line 224 of file shell.c.

◆ exec_prepared_stmt()

static void exec_prepared_stmt ( ShellState pArg,
sqlite3_stmt pStmt,
int(*)(void *, int, char **, char **, int *)  xCallback 
)
static

Definition at line 1793 of file shell.c.

◆ explain_data_delete()

static void explain_data_delete ( ShellState p)
static

Definition at line 1753 of file shell.c.

◆ explain_data_prepare()

static void explain_data_prepare ( ShellState p,
sqlite3_stmt pSql 
)
static

Definition at line 1671 of file shell.c.

◆ find_home_dir()

static char* find_home_dir ( int  clearFlag)
static

Definition at line 5212 of file shell.c.

◆ get2byteInt()

static unsigned int get2byteInt ( unsigned char *  a)
static

Definition at line 2985 of file shell.c.

◆ get4byteInt()

static unsigned int get4byteInt ( unsigned char *  a)
static

Definition at line 2988 of file shell.c.

◆ hexDigitValue()

static int hexDigitValue ( char  c)
static

Definition at line 2465 of file shell.c.

◆ import_append_char()

static void import_append_char ( ImportCtx p,
int  c 
)
static

Definition at line 2617 of file shell.c.

◆ integerValue()

static sqlite3_int64 integerValue ( const char *  zArg)
static

Definition at line 2475 of file shell.c.

◆ isatty()

int isatty ( int  )

◆ isNumber()

static int isNumber ( const char *  z,
int *  realnum 
)
static

Definition at line 434 of file shell.c.

◆ line_contains_semicolon()

static int line_contains_semicolon ( const char *  z,
int  N 
)
static

Definition at line 5024 of file shell.c.

◆ line_is_command_terminator()

static int line_is_command_terminator ( const char *  zLine)
static

Definition at line 5059 of file shell.c.

◆ line_is_complete()

static int line_is_complete ( char *  zSql,
int  nSql 
)
static

Definition at line 5075 of file shell.c.

◆ local_getline()

static char* local_getline ( char *  zLine,
FILE *  in 
)
static

Definition at line 499 of file shell.c.

◆ main()

int SQLITE_CDECL main ( int  argc,
char **  argv 
)

Definition at line 5425 of file shell.c.

◆ main_init()

static void main_init ( ShellState data)
static

Definition at line 5368 of file shell.c.

◆ one_input_line()

static char* one_input_line ( FILE *  in,
char *  zPrior,
int  isContinuation 
)
static

Definition at line 561 of file shell.c.

◆ open_db()

static void open_db ( ShellState p,
int  keepAlive 
)
static

Definition at line 2376 of file shell.c.

◆ optionMatch()

static int optionMatch ( const char *  zStr,
const char *  zOpt 
)
static

Definition at line 3195 of file shell.c.

◆ output_c_string()

static void output_c_string ( FILE *  out,
const char *  z 
)
static

Definition at line 765 of file shell.c.

◆ output_csv()

static void output_csv ( ShellState p,
const char *  z,
int  bSep 
)
static

Definition at line 857 of file shell.c.

◆ output_file_close()

static void output_file_close ( FILE *  f)
static

Definition at line 2544 of file shell.c.

◆ output_file_open()

static FILE* output_file_open ( const char *  zFile)
static

Definition at line 2553 of file shell.c.

◆ output_hex_blob()

static void output_hex_blob ( FILE *  out,
const void *  pBlob,
int  nBlob 
)
static

Definition at line 722 of file shell.c.

◆ output_html_string()

static void output_html_string ( FILE *  out,
const char *  z 
)
static

Definition at line 797 of file shell.c.

◆ output_quoted_string()

static void output_quoted_string ( FILE *  out,
const char *  z 
)
static

Definition at line 733 of file shell.c.

◆ output_reset()

static void output_reset ( ShellState p)
static

Definition at line 2956 of file shell.c.

◆ pclose()

int pclose ( FILE *  )

◆ popen()

FILE* popen ( const char *  ,
const char *   
)

◆ printBold()

static void printBold ( const char *  zText)
static

Definition at line 5398 of file shell.c.

◆ process_input()

static int process_input ( ShellState p,
FILE *  in 
)
static

Definition at line 5094 of file shell.c.

◆ process_sqliterc()

static void process_sqliterc ( ShellState p,
const char *  sqliterc_override 
)
static

Definition at line 5283 of file shell.c.

◆ readFile()

static char* readFile ( const char *  zName)
static

Definition at line 2253 of file shell.c.

◆ readfileFunc()

static void readfileFunc ( sqlite3_context context,
int  argc,
sqlite3_value **  argv 
)
static

Definition at line 2279 of file shell.c.

◆ resolve_backslashes()

static void resolve_backslashes ( char *  z)
static

Definition at line 2417 of file shell.c.

◆ restore_debug_trace_modes()

static void restore_debug_trace_modes ( void  )
static

Definition at line 1781 of file shell.c.

◆ run_schema_dump_query()

static int run_schema_dump_query ( ShellState p,
const char *  zQuery 
)
static

Definition at line 2104 of file shell.c.

◆ run_table_dump_query()

static int run_table_dump_query ( ShellState p,
const char *  zSelect,
const char *  zFirstRow 
)
static

Definition at line 1362 of file shell.c.

◆ save_err_msg()

static char* save_err_msg ( sqlite3 db)
static

Definition at line 1412 of file shell.c.

◆ set_table_name()

static void set_table_name ( ShellState p,
const char *  zName 
)
static

Definition at line 1273 of file shell.c.

◆ shell_callback()

static int shell_callback ( void *  pArg,
int  nArg,
char **  azArg,
char **  azCol,
int *  aiType 
)
static

Definition at line 952 of file shell.c.

◆ shell_dbinfo_command()

static int shell_dbinfo_command ( ShellState p,
int  nArg,
char **  azArg 
)
static

Definition at line 2997 of file shell.c.

◆ shell_exec()

static int shell_exec ( sqlite3 db,
const char *  zSql,
int(*)(void *, int, char **, char **, int *)  xCallback,
ShellState pArg,
char **  pzErrMsg 
)
static

Definition at line 1867 of file shell.c.

◆ shellAuth()

static int shellAuth ( void *  pClientData,
int  op,
const char *  zA1,
const char *  zA2,
const char *  zA3,
const char *  zA4 
)
static

Definition at line 905 of file shell.c.

◆ shellDatabaseError()

static int shellDatabaseError ( sqlite3 db)
static

Definition at line 3079 of file shell.c.

◆ shellDeleteFile()

int shellDeleteFile ( const char *  zFilename)

Definition at line 3205 of file shell.c.

◆ shellLog()

static void shellLog ( void *  pArg,
int  iErrCode,
const char *  zMsg 
)
static

Definition at line 712 of file shell.c.

◆ shellNomemError()

static int shellNomemError ( void  )
static

Definition at line 3088 of file shell.c.

◆ shellstaticFunc()

static void shellstaticFunc ( sqlite3_context context,
int  argc,
sqlite3_value **  argv 
)
static

Definition at line 467 of file shell.c.

◆ sql_trace_callback()

static int sql_trace_callback ( unsigned  mType,
void *  pArg,
void *  pP,
void *  pX 
)
static

Definition at line 2573 of file shell.c.

◆ str_in_array()

static int str_in_array ( const char *  zStr,
const char **  azArray 
)
static

Definition at line 1645 of file shell.c.

◆ strlen30()

static int strlen30 ( const char *  z)
static

Definition at line 484 of file shell.c.

◆ test_breakpoint()

static void test_breakpoint ( void  )
static

Definition at line 2595 of file shell.c.

◆ testcase_glob()

static int testcase_glob ( const char *  zGlob,
const char *  z 
)
static

Definition at line 3116 of file shell.c.

◆ timeDiff()

static double timeDiff ( struct timeval *  pStart,
struct timeval *  pEnd 
)
static

Definition at line 216 of file shell.c.

◆ timeOfDay()

static sqlite3_int64 timeOfDay ( void  )
static

Definition at line 174 of file shell.c.

◆ tryToClone()

static void tryToClone ( ShellState p,
const char *  zNewDb 
)
static

Definition at line 2931 of file shell.c.

◆ tryToCloneData()

static void tryToCloneData ( ShellState p,
sqlite3 newDb,
const char *  zTable 
)
static

Definition at line 2743 of file shell.c.

◆ tryToCloneSchema()

static void tryToCloneSchema ( ShellState p,
sqlite3 newDb,
const char *  zWhere,
void(*)(ShellState *, sqlite3 *, const char *)  xForEach 
)
static

Definition at line 2856 of file shell.c.

◆ usage()

static void usage ( int  showDetail)
static

Definition at line 5352 of file shell.c.

◆ writefileFunc()

static void writefileFunc ( sqlite3_context context,
int  argc,
sqlite3_value **  argv 
)
static

Definition at line 2300 of file shell.c.

Variable Documentation

◆ Argv0

char* Argv0
static

Definition at line 363 of file shell.c.

◆ bail_on_error

int bail_on_error = 0
static

Definition at line 332 of file shell.c.

◆ continuePrompt

char continuePrompt[20]
static

Definition at line 370 of file shell.c.

◆ enableTimer

int enableTimer = 0
static

Definition at line 171 of file shell.c.

◆ globalDb

sqlite3* globalDb = 0
static

Definition at line 352 of file shell.c.

◆ iBegin

sqlite3_int64 iBegin
static

Definition at line 203 of file shell.c.

◆ mainPrompt

char mainPrompt[20]
static

Definition at line 369 of file shell.c.

◆ modeDescr

const char* modeDescr[]
static
Initial value:
= {
"line",
"column",
"list",
"semi",
"html",
"insert",
"tcl",
"csv",
"explain",
"ascii",
"prettyprint",
}

Definition at line 677 of file shell.c.

◆ needCsvQuote

const char needCsvQuote[]
static
Initial value:
= {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
}

Definition at line 832 of file shell.c.

◆ sBegin

struct rusage sBegin
static

Definition at line 202 of file shell.c.

◆ seenInterrupt

volatile int seenInterrupt = 0
static

Definition at line 357 of file shell.c.

◆ stdin_is_interactive

int stdin_is_interactive = 1
static

Definition at line 338 of file shell.c.

◆ stdout_is_console

int stdout_is_console = 1
static

Definition at line 345 of file shell.c.

◆ zHelp

char zHelp[]
static

Definition at line 2138 of file shell.c.

◆ zOptions

const char zOptions[]
static

Definition at line 5317 of file shell.c.

◆ zShellStatic

const char* zShellStatic = 0
static

Definition at line 466 of file shell.c.



asr_psm
Author(s): Braun Kai, Gehrung Joachim, Heizmann Heinrich, Meißner Pascal
autogenerated on Mon Feb 28 2022 21:52:14