Lines Matching refs:azArg
714 static int shell_callback(void *pArg, int nArg, char **azArg, char **azCol, int *aiType){
721 if( azArg==0 ) break;
729 azArg[i] ? azArg[i] : p->nullvalue);
746 n = strlen30(azArg && azArg[i] ? azArg[i] : p->nullvalue);
775 if( azArg==0 ) break;
783 if( p->mode==MODE_Explain && azArg[i] && strlen30(azArg[i])>w ){
784 w = strlen30(azArg[i]);
794 azArg[i] ? azArg[i] : p->nullvalue, i==nArg-1 ? "\n": " ");
797 azArg[i] ? azArg[i] : p->nullvalue, i==nArg-1 ? "\n": " ");
809 if( azArg==0 ) break;
811 char *z = azArg[i];
834 if( azArg==0 ) break;
838 output_html_string(p->out, azArg[i] ? azArg[i] : p->nullvalue);
852 if( azArg==0 ) break;
854 output_c_string(p->out, azArg[i] ? azArg[i] : p->nullvalue);
871 if( azArg>0 ){
873 output_csv(p, azArg[i], i<nArg-1);
885 if( azArg==0 ) break;
889 if( (azArg[i]==0) || (aiType && aiType[i]==SQLITE_NULL) ){
893 output_quoted_string(p->out, azArg[i]);
896 fprintf(p->out,"%s%s",zSep, azArg[i]);
902 }else if( isNumber(azArg[i], 0) ){
903 fprintf(p->out,"%s%s",zSep, azArg[i]);
906 output_quoted_string(p->out, azArg[i]);
920 static int callback(void *pArg, int nArg, char **azArg, char **azCol){
922 return shell_callback(pArg, nArg, azArg, azCol, NULL);
1450 static int dump_callback(void *pArg, int nArg, char **azArg, char **azCol){
1460 zTable = azArg[0];
1461 zType = azArg[1];
1462 zSql = azArg[2];
2250 char *azArg[50];
2254 while( zLine[i] && nArg<ArraySize(azArg) ){
2259 azArg[nArg++] = &zLine[i];
2267 if( delim=='"' ) resolve_backslashes(azArg[nArg-1]);
2269 azArg[nArg++] = &zLine[i];
2272 resolve_backslashes(azArg[nArg-1]);
2279 n = strlen30(azArg[0]);
2280 c = azArg[0][0];
2281 if( (c=='b' && n>=3 && strncmp(azArg[0], "backup", n)==0)
2282 || (c=='s' && n>=3 && strncmp(azArg[0], "save", n)==0)
2290 const char *z = azArg[j];
2295 fprintf(stderr, "unknown option: %s\n", azArg[j]);
2299 zDestFile = azArg[j];
2302 zDestFile = azArg[j];
2337 if( c=='b' && n>=3 && strncmp(azArg[0], "bail", n)==0 ){
2339 bail_on_error = booleanValue(azArg[1]);
2349 if( c=='b' && n>=3 && strncmp(azArg[0], "breakpoint", n)==0 ){
2353 if( c=='c' && strncmp(azArg[0], "clone", n)==0 ){
2355 tryToClone(p, azArg[1]);
2362 if( c=='d' && n>1 && strncmp(azArg[0], "databases", n)==0 ){
2381 if( c=='d' && strncmp(azArg[0], "dump", n)==0 ){
2412 zShellStatic = azArg[i];
2435 if( c=='e' && strncmp(azArg[0], "echo", n)==0 ){
2437 p->echoOn = booleanValue(azArg[1]);
2444 if( c=='e' && strncmp(azArg[0], "eqp", n)==0 ){
2446 p->autoEQP = booleanValue(azArg[1]);
2453 if( c=='e' && strncmp(azArg[0], "exit", n)==0 ){
2454 if( nArg>1 && (rc = (int)integerValue(azArg[1]))!=0 ) exit(rc);
2458 if( c=='e' && strncmp(azArg[0], "explain", n)==0 ){
2459 int val = nArg>=2 ? booleanValue(azArg[1]) : 1;
2493 if( c=='f' && strncmp(azArg[0], "fullschema", n)==0 ){
2544 if( c=='h' && strncmp(azArg[0], "headers", n)==0 ){
2546 p->showHeader = booleanValue(azArg[1]);
2553 if( c=='h' && strncmp(azArg[0], "help", n)==0 ){
2557 if( c=='i' && strncmp(azArg[0], "import", n)==0 ){
2574 zFile = azArg[1];
2575 zTable = azArg[2];
2714 if( c=='i' && strncmp(azArg[0], "indices", n)==0 ){
2732 zShellStatic = azArg[1];
2759 if( c=='i' && strncmp(azArg[0], "iotrace", n)==0 ){
2765 }else if( strcmp(azArg[1], "-")==0 ){
2769 iotrace = fopen(azArg[1], "w");
2771 fprintf(stderr, "Error: cannot open \"%s\"\n", azArg[1]);
2782 if( c=='l' && strncmp(azArg[0], "load", n)==0 ){
2790 zFile = azArg[1];
2791 zProc = nArg>=3 ? azArg[2] : 0;
2802 if( c=='l' && strncmp(azArg[0], "log", n)==0 ){
2807 const char *zFile = azArg[1];
2813 if( c=='m' && strncmp(azArg[0], "mode", n)==0 ){
2814 const char *zMode = nArg>=2 ? azArg[1] : "";
2817 if( c2=='l' && n2>2 && strncmp(azArg[1],"lines",n2)==0 ){
2819 }else if( c2=='c' && strncmp(azArg[1],"columns",n2)==0 ){
2821 }else if( c2=='l' && n2>2 && strncmp(azArg[1],"list",n2)==0 ){
2823 }else if( c2=='h' && strncmp(azArg[1],"html",n2)==0 ){
2825 }else if( c2=='t' && strncmp(azArg[1],"tcl",n2)==0 ){
2828 }else if( c2=='c' && strncmp(azArg[1],"csv",n2)==0 ){
2832 }else if( c2=='t' && strncmp(azArg[1],"tabs",n2)==0 ){
2835 }else if( c2=='i' && strncmp(azArg[1],"insert",n2)==0 ){
2837 set_table_name(p, nArg>=3 ? azArg[2] : "table");
2845 if( c=='n' && strncmp(azArg[0], "nullvalue", n)==0 ){
2848 "%.*s", (int)ArraySize(p->nullvalue)-1, azArg[1]);
2855 if( c=='o' && strncmp(azArg[0], "open", n)==0 && n>=2 ){
2861 p->zDbFilename = zNewFilename = sqlite3_mprintf("%s", azArg[1]);
2876 && (strncmp(azArg[0], "output", n)==0 || strncmp(azArg[0], "once", n)==0)
2878 const char *zFile = nArg>=2 ? azArg[1] : "stdout";
2880 fprintf(stderr, "Usage: .%s FILE\n", azArg[0]);
2884 if( n>1 && strncmp(azArg[0], "once", n)==0 ){
2918 if( c=='p' && n>=3 && strncmp(azArg[0], "print", n)==0 ){
2922 fprintf(p->out, "%s", azArg[i]);
2927 if( c=='p' && strncmp(azArg[0], "prompt", n)==0 ){
2929 strncpy(mainPrompt,azArg[1],(int)ArraySize(mainPrompt)-1);
2932 strncpy(continuePrompt,azArg[2],(int)ArraySize(continuePrompt)-1);
2936 if( c=='q' && strncmp(azArg[0], "quit", n)==0 ){
2940 if( c=='r' && n>=3 && strncmp(azArg[0], "read", n)==0 ){
2947 alt = fopen(azArg[1], "rb");
2949 fprintf(stderr,"Error: cannot open \"%s\"\n", azArg[1]);
2957 if( c=='r' && n>=3 && strncmp(azArg[0], "restore", n)==0 ){
2965 zSrcFile = azArg[1];
2968 zSrcFile = azArg[2];
2969 zDb = azArg[1];
3008 if( c=='s' && strncmp(azArg[0], "schema", n)==0 ){
3017 for(i=0; azArg[1][i]; i++) azArg[1][i] = ToLower(azArg[1][i]);
3018 if( strcmp(azArg[1],"sqlite_master")==0 ){
3032 }else if( strcmp(azArg[1],"sqlite_temp_master")==0 ){
3047 zShellStatic = azArg[1];
3089 if( c=='s' && n>=10 && strncmp(azArg[0], "selftest-", 9)==0 ){
3090 if( strncmp(azArg[0]+9, "boolean", n-9)==0 ){
3093 v = booleanValue(azArg[i]);
3094 fprintf(p->out, "%s: %d 0x%x\n", azArg[i], v, v);
3097 if( strncmp(azArg[0]+9, "integer", n-9)==0 ){
3101 v = integerValue(azArg[i]);
3102 sqlite3_snprintf(sizeof(zBuf),zBuf,"%s: %lld 0x%llx\n", azArg[i],v,v);
3109 if( c=='s' && strncmp(azArg[0], "separator", n)==0 ){
3115 sqlite3_snprintf(sizeof(p->separator), p->separator, azArg[1]);
3118 sqlite3_snprintf(sizeof(p->newline), p->newline, azArg[2]);
3123 && (strncmp(azArg[0], "shell", n)==0 || strncmp(azArg[0],"system",n)==0)
3132 zCmd = sqlite3_mprintf(strchr(azArg[1],' ')==0?"%s":"\"%s\"", azArg[1]);
3134 zCmd = sqlite3_mprintf(strchr(azArg[i],' ')==0?"%z %s":"%z \"%s\"",
3135 zCmd, azArg[i]);
3142 if( c=='s' && strncmp(azArg[0], "show", n)==0 ){
3172 if( c=='s' && strncmp(azArg[0], "stats", n)==0 ){
3174 p->statsOn = booleanValue(azArg[1]);
3181 if( c=='t' && n>1 && strncmp(azArg[0], "tables", n)==0 ){
3222 sqlite3_bind_text(pStmt, 1, azArg[1], -1, SQLITE_TRANSIENT);
3265 if( c=='t' && n>=8 && strncmp(azArg[0], "testctrl", n)==0 && nArg>=2 ){
3292 n = strlen30(azArg[1]);
3294 if( strncmp(azArg[1], aCtrl[i].zCtrlName, n)==0 ){
3298 fprintf(stderr, "ambiguous option name: \"%s\"\n", azArg[1]);
3304 if( testctrl<0 ) testctrl = (int)integerValue(azArg[1]);
3306 fprintf(stderr,"Error: invalid testctrl option: %s\n", azArg[1]);
3314 int opt = (int)strtol(azArg[2], 0, 0);
3319 azArg[1]);
3332 fprintf(stderr,"Error: testctrl %s takes no options\n", azArg[1]);
3339 unsigned int opt = (unsigned int)integerValue(azArg[2]);
3344 " int option\n", azArg[1]);
3352 int opt = booleanValue(azArg[2]);
3357 azArg[1]);
3365 const char *opt = azArg[2];
3370 azArg[1]);
3381 azArg[1]);
3387 if( c=='t' && n>4 && strncmp(azArg[0], "timeout", n)==0 ){
3389 sqlite3_busy_timeout(p->db, nArg>=2 ? (int)integerValue(azArg[1]) : 0);
3392 if( c=='t' && n>=5 && strncmp(azArg[0], "timer", n)==0 ){
3394 enableTimer = booleanValue(azArg[1]);
3405 if( c=='t' && strncmp(azArg[0], "trace", n)==0 ){
3413 p->traceOut = output_file_open(azArg[1]);
3423 if( c=='v' && strncmp(azArg[0], "version", n)==0 ){
3428 if( c=='v' && strncmp(azArg[0], "vfsname", n)==0 ){
3429 const char *zDbName = nArg==2 ? azArg[1] : "main";
3441 if( c=='w' && strncmp(azArg[0], "wheretrace", n)==0 ){
3443 sqlite3WhereTrace = nArg>=2 ? booleanValue(azArg[1]) : 0xff;
3447 if( c=='w' && strncmp(azArg[0], "width", n)==0 ){
3449 assert( nArg<=ArraySize(azArg) );
3451 p->colWidth[j-1] = (int)integerValue(azArg[j]);
3457 " \"%s\". Enter \".help\" for help\n", azArg[0]);