Lines Matching refs:azArg
719 static int shell_callback(void *pArg, int nArg, char **azArg, char **azCol, int *aiType){
726 if( azArg==0 ) break;
734 azArg[i] ? azArg[i] : p->nullvalue);
751 n = strlen30(azArg && azArg[i] ? azArg[i] : p->nullvalue);
780 if( azArg==0 ) break;
788 if( p->mode==MODE_Explain && azArg[i] && strlen30(azArg[i])>w ){
789 w = strlen30(azArg[i]);
799 azArg[i] ? azArg[i] : p->nullvalue, i==nArg-1 ? "\n": " ");
802 azArg[i] ? azArg[i] : p->nullvalue, i==nArg-1 ? "\n": " ");
814 if( azArg==0 ) break;
816 char *z = azArg[i];
839 if( azArg==0 ) break;
843 output_html_string(p->out, azArg[i] ? azArg[i] : p->nullvalue);
857 if( azArg==0 ) break;
859 output_c_string(p->out, azArg[i] ? azArg[i] : p->nullvalue);
876 if( azArg>0 ){
878 output_csv(p, azArg[i], i<nArg-1);
890 if( azArg==0 ) break;
894 if( (azArg[i]==0) || (aiType && aiType[i]==SQLITE_NULL) ){
898 output_quoted_string(p->out, azArg[i]);
901 fprintf(p->out,"%s%s",zSep, azArg[i]);
907 }else if( isNumber(azArg[i], 0) ){
908 fprintf(p->out,"%s%s",zSep, azArg[i]);
911 output_quoted_string(p->out, azArg[i]);
925 static int callback(void *pArg, int nArg, char **azArg, char **azCol){
927 return shell_callback(pArg, nArg, azArg, azCol, NULL);
1455 static int dump_callback(void *pArg, int nArg, char **azArg, char **azCol){
1465 zTable = azArg[0];
1466 zType = azArg[1];
1467 zSql = azArg[2];
2270 char *azArg[50];
2274 while( zLine[i] && nArg<ArraySize(azArg) ){
2279 azArg[nArg++] = &zLine[i];
2287 if( delim=='"' ) resolve_backslashes(azArg[nArg-1]);
2289 azArg[nArg++] = &zLine[i];
2292 resolve_backslashes(azArg[nArg-1]);
2299 n = strlen30(azArg[0]);
2300 c = azArg[0][0];
2301 if( (c=='b' && n>=3 && strncmp(azArg[0], "backup", n)==0)
2302 || (c=='s' && n>=3 && strncmp(azArg[0], "save", n)==0)
2310 const char *z = azArg[j];
2315 fprintf(stderr, "unknown option: %s\n", azArg[j]);
2319 zDestFile = azArg[j];
2322 zDestFile = azArg[j];
2357 if( c=='b' && n>=3 && strncmp(azArg[0], "bail", n)==0 ){
2359 bail_on_error = booleanValue(azArg[1]);
2369 if( c=='b' && n>=3 && strncmp(azArg[0], "breakpoint", n)==0 ){
2373 if( c=='c' && strncmp(azArg[0], "clone", n)==0 ){
2375 tryToClone(p, azArg[1]);
2382 if( c=='d' && n>1 && strncmp(azArg[0], "databases", n)==0 ){
2401 if( c=='d' && strncmp(azArg[0], "dump", n)==0 ){
2432 zShellStatic = azArg[i];
2455 if( c=='e' && strncmp(azArg[0], "echo", n)==0 ){
2457 p->echoOn = booleanValue(azArg[1]);
2464 if( c=='e' && strncmp(azArg[0], "eqp", n)==0 ){
2466 p->autoEQP = booleanValue(azArg[1]);
2473 if( c=='e' && strncmp(azArg[0], "exit", n)==0 ){
2474 if( nArg>1 && (rc = (int)integerValue(azArg[1]))!=0 ) exit(rc);
2478 if( c=='e' && strncmp(azArg[0], "explain", n)==0 ){
2479 int val = nArg>=2 ? booleanValue(azArg[1]) : 1;
2513 if( c=='f' && strncmp(azArg[0], "fullschema", n)==0 ){
2564 if( c=='h' && strncmp(azArg[0], "headers", n)==0 ){
2566 p->showHeader = booleanValue(azArg[1]);
2573 if( c=='h' && strncmp(azArg[0], "help", n)==0 ){
2577 if( c=='i' && strncmp(azArg[0], "import", n)==0 ){
2594 zFile = azArg[1];
2595 zTable = azArg[2];
2734 if( c=='i' && strncmp(azArg[0], "indices", n)==0 ){
2752 zShellStatic = azArg[1];
2779 if( c=='i' && strncmp(azArg[0], "iotrace", n)==0 ){
2785 }else if( strcmp(azArg[1], "-")==0 ){
2789 iotrace = fopen(azArg[1], "w");
2791 fprintf(stderr, "Error: cannot open \"%s\"\n", azArg[1]);
2802 if( c=='l' && strncmp(azArg[0], "load", n)==0 ){
2810 zFile = azArg[1];
2811 zProc = nArg>=3 ? azArg[2] : 0;
2822 if( c=='l' && strncmp(azArg[0], "log", n)==0 ){
2827 const char *zFile = azArg[1];
2833 if( c=='m' && strncmp(azArg[0], "mode", n)==0 ){
2834 const char *zMode = nArg>=2 ? azArg[1] : "";
2837 if( c2=='l' && n2>2 && strncmp(azArg[1],"lines",n2)==0 ){
2839 }else if( c2=='c' && strncmp(azArg[1],"columns",n2)==0 ){
2841 }else if( c2=='l' && n2>2 && strncmp(azArg[1],"list",n2)==0 ){
2843 }else if( c2=='h' && strncmp(azArg[1],"html",n2)==0 ){
2845 }else if( c2=='t' && strncmp(azArg[1],"tcl",n2)==0 ){
2848 }else if( c2=='c' && strncmp(azArg[1],"csv",n2)==0 ){
2852 }else if( c2=='t' && strncmp(azArg[1],"tabs",n2)==0 ){
2855 }else if( c2=='i' && strncmp(azArg[1],"insert",n2)==0 ){
2857 set_table_name(p, nArg>=3 ? azArg[2] : "table");
2865 if( c=='n' && strncmp(azArg[0], "nullvalue", n)==0 ){
2868 "%.*s", (int)ArraySize(p->nullvalue)-1, azArg[1]);
2875 if( c=='o' && strncmp(azArg[0], "open", n)==0 && n>=2 ){
2881 p->zDbFilename = zNewFilename = sqlite3_mprintf("%s", azArg[1]);
2896 && (strncmp(azArg[0], "output", n)==0 || strncmp(azArg[0], "once", n)==0)
2898 const char *zFile = nArg>=2 ? azArg[1] : "stdout";
2900 fprintf(stderr, "Usage: .%s FILE\n", azArg[0]);
2904 if( n>1 && strncmp(azArg[0], "once", n)==0 ){
2938 if( c=='p' && n>=3 && strncmp(azArg[0], "print", n)==0 ){
2942 fprintf(p->out, "%s", azArg[i]);
2947 if( c=='p' && strncmp(azArg[0], "prompt", n)==0 ){
2949 strncpy(mainPrompt,azArg[1],(int)ArraySize(mainPrompt)-1);
2952 strncpy(continuePrompt,azArg[2],(int)ArraySize(continuePrompt)-1);
2956 if( c=='q' && strncmp(azArg[0], "quit", n)==0 ){
2960 if( c=='r' && n>=3 && strncmp(azArg[0], "read", n)==0 ){
2967 alt = fopen(azArg[1], "rb");
2969 fprintf(stderr,"Error: cannot open \"%s\"\n", azArg[1]);
2977 if( c=='r' && n>=3 && strncmp(azArg[0], "restore", n)==0 ){
2985 zSrcFile = azArg[1];
2988 zSrcFile = azArg[2];
2989 zDb = azArg[1];
3028 if( c=='s' && strncmp(azArg[0], "schema", n)==0 ){
3037 for(i=0; azArg[1][i]; i++) azArg[1][i] = ToLower(azArg[1][i]);
3038 if( strcmp(azArg[1],"sqlite_master")==0 ){
3052 }else if( strcmp(azArg[1],"sqlite_temp_master")==0 ){
3067 zShellStatic = azArg[1];
3109 if( c=='s' && n>=10 && strncmp(azArg[0], "selftest-", 9)==0 ){
3110 if( strncmp(azArg[0]+9, "boolean", n-9)==0 ){
3113 v = booleanValue(azArg[i]);
3114 fprintf(p->out, "%s: %d 0x%x\n", azArg[i], v, v);
3117 if( strncmp(azArg[0]+9, "integer", n-9)==0 ){
3121 v = integerValue(azArg[i]);
3122 sqlite3_snprintf(sizeof(zBuf),zBuf,"%s: %lld 0x%llx\n", azArg[i],v,v);
3129 if( c=='s' && strncmp(azArg[0], "separator", n)==0 ){
3135 sqlite3_snprintf(sizeof(p->separator), p->separator, azArg[1]);
3138 sqlite3_snprintf(sizeof(p->newline), p->newline, azArg[2]);
3143 && (strncmp(azArg[0], "shell", n)==0 || strncmp(azArg[0],"system",n)==0)
3152 zCmd = sqlite3_mprintf(strchr(azArg[1],' ')==0?"%s":"\"%s\"", azArg[1]);
3154 zCmd = sqlite3_mprintf(strchr(azArg[i],' ')==0?"%z %s":"%z \"%s\"",
3155 zCmd, azArg[i]);
3162 if( c=='s' && strncmp(azArg[0], "show", n)==0 ){
3192 if( c=='s' && strncmp(azArg[0], "stats", n)==0 ){
3194 p->statsOn = booleanValue(azArg[1]);
3201 if( c=='t' && n>1 && strncmp(azArg[0], "tables", n)==0 ){
3242 sqlite3_bind_text(pStmt, 1, azArg[1], -1, SQLITE_TRANSIENT);
3285 if( c=='t' && n>=8 && strncmp(azArg[0], "testctrl", n)==0 && nArg>=2 ){
3312 n = strlen30(azArg[1]);
3314 if( strncmp(azArg[1], aCtrl[i].zCtrlName, n)==0 ){
3318 fprintf(stderr, "ambiguous option name: \"%s\"\n", azArg[1]);
3324 if( testctrl<0 ) testctrl = (int)integerValue(azArg[1]);
3326 fprintf(stderr,"Error: invalid testctrl option: %s\n", azArg[1]);
3334 int opt = (int)strtol(azArg[2], 0, 0);
3339 azArg[1]);
3352 fprintf(stderr,"Error: testctrl %s takes no options\n", azArg[1]);
3359 unsigned int opt = (unsigned int)integerValue(azArg[2]);
3364 " int option\n", azArg[1]);
3372 int opt = booleanValue(azArg[2]);
3377 azArg[1]);
3385 const char *opt = azArg[2];
3390 azArg[1]);
3401 azArg[1]);
3407 if( c=='t' && n>4 && strncmp(azArg[0], "timeout", n)==0 ){
3409 sqlite3_busy_timeout(p->db, nArg>=2 ? (int)integerValue(azArg[1]) : 0);
3412 if( c=='t' && n>=5 && strncmp(azArg[0], "timer", n)==0 ){
3414 enableTimer = booleanValue(azArg[1]);
3425 if( c=='t' && strncmp(azArg[0], "trace", n)==0 ){
3433 p->traceOut = output_file_open(azArg[1]);
3443 if( c=='v' && strncmp(azArg[0], "version", n)==0 ){
3448 if( c=='v' && strncmp(azArg[0], "vfsname", n)==0 ){
3449 const char *zDbName = nArg==2 ? azArg[1] : "main";
3461 if( c=='w' && strncmp(azArg[0], "wheretrace", n)==0 ){
3463 sqlite3WhereTrace = nArg>=2 ? booleanValue(azArg[1]) : 0xff;
3467 if( c=='w' && strncmp(azArg[0], "width", n)==0 ){
3469 assert( nArg<=ArraySize(azArg) );
3471 p->colWidth[j-1] = (int)integerValue(azArg[j]);
3477 " \"%s\". Enter \".help\" for help\n", azArg[0]);