Lines Matching refs:zName

888 ** Attempt to determine if identifier zName needs to be quoted, either
895 static char quoteChar(const char *zName){
897 if( !isalpha((unsigned char)zName[0]) && zName[0]!='_' ) return '"';
898 for(i=0; zName[i]; i++){
899 if( !isalnum((unsigned char)zName[i]) && zName[i]!='_' ) return '"';
901 return sqlite3_keyword_check(zName, i) ? '"' : 0;
906 ** of the view, virtual table, or table valued function zSchema.zName.
911 const char *zName /* The name of the virtual table */
921 zSchema ? zSchema : "main", zName);
932 cQuote = quoteChar(zName);
933 appendText(&s, zName, cQuote);
963 const char *zName;
966 zName = (const char*)sqlite3_value_text(apVal[0]);
967 zFake = zName ? shellFakeSchema(sqlite3_context_db_handle(pCtx), 0, zName) : 0;
1010 const char *zName = (const char*)sqlite3_value_text(apVal[2]);
1027 if( zName
1029 && (zFake = shellFakeSchema(db, zSchema, zName))!=0
4758 ** contents of file zName. Or, leave the result unchanged (NULL)
4767 static void readFileContents(sqlite3_context *ctx, const char *zName){
4774 in = fopen(zName, "rb");
4814 const char *zName;
4816 zName = (const char*)sqlite3_value_text(argv[0]);
4817 if( zName==0 ) return;
4818 readFileContents(context, zName);
6327 static int apndDelete(sqlite3_vfs*, const char *zName, int syncDir);
6328 static int apndAccess(sqlite3_vfs*, const char *zName, int flags, int *);
6329 static int apndFullPathname(sqlite3_vfs*, const char *zName, int, char *zOut);
6341 static const char *apndNextSystemCall(sqlite3_vfs*, const char *zName);
6348 "apndvfs", /* zName */
6675 const char *zName,
6690 return pBaseVfs->xOpen(pBaseVfs, zName, pFile, flags, pOutFlags);
6696 rc = pBaseVfs->xOpen(pBaseVfs, zName, pBaseFile, flags, pOutFlags);
6792 const char *zName,
6795 return ORIGVFS(pVfs)->xSetSystemCall(ORIGVFS(pVfs),zName,pCall);
6799 const char *zName
6801 return ORIGVFS(pVfs)->xGetSystemCall(ORIGVFS(pVfs),zName);
6803 static const char *apndNextSystemCall(sqlite3_vfs *pVfs, const char *zName){
6804 return ORIGVFS(pVfs)->xNextSystemCall(ORIGVFS(pVfs), zName);
8740 const char *zName, /* Name of SQL function */
8744 if( sqlite3_stricmp("zipfile_cds", zName)==0 ){
8812 char *zName = 0; /* Path (name) of new entry */
8813 int nName = 0; /* Size of zName in bytes */
8840 zName = (char*)sqlite3_value_text(pName);
8842 if( zName==0 ){
8896 if( nName>0 && zName[nName-1]=='/' ){
8902 if( nName==0 || zName[nName-1]!='/' ){
8903 zName = zFree = sqlite3_mprintf("%s/", zName);
8904 if( zName==0 ){
8908 nName = (int)strlen(zName);
8910 while( nName>1 && zName[nName-2]=='/' ) nName--;
8926 e.cds.zFile = zName;
9449 char *zName;
9455 char *zName; /* Table name */
9793 assert( sqlite3_stricmp(p->pTab->zName, argv[2])==0 );
9986 "SELECT * FROM main.%Q WHERE sample()", pVtab->pTab->zName
10105 pNew->aCol[nCol].zName = pCsr;
10129 pNew->zName = pCsr;
10130 if( ALWAYS(pNew->zName!=0) ) memcpy(pNew->zName, zTab, nTab+1);
10210 if( idxIdentifierRequiresQuotes(p->zName) ){
10211 zRet = idxAppendText(pRc, zRet, "%Q", p->zName);
10213 zRet = idxAppendText(pRc, zRet, "%s", p->zName);
10245 const char *zTbl = pScan->pTab->zName;
10344 const char *zTable = pScan->pTab->zName;
10346 char *zName = 0; /* Index name */
10354 sqlite3_free(zName);
10355 zName = sqlite3_mprintf("%s_idx_%08x", zTable, h);
10356 if( zName==0 ) break;
10360 zFind = sqlite3_mprintf(zFmt, zName);
10370 }while( collisions<50 && zName!=0 );
10374 }else if( zName==0 ){
10382 zIdx = sqlite3_mprintf(zFmt, zName, zTable, zCols);
10390 idxHashAdd(&rc, &p->hIdx, zName, zIdx);
10393 sqlite3_free(zName);
10629 if( 0==sqlite3_stricmp(z3, pTab->zName) ) break;
10659 const char *zTab = pTab->zName;
10703 pTab->aCol[i].zName
10772 const char *zName = (const char*)sqlite3_column_text(pSchema, 1);
10775 if( zType==0 || zName==0 ) continue;
10780 rc = idxGetTableInfo(p->db, zName, &pTab, pzErrmsg);
10792 (i==0 ? "" : ", "), pTab->aCol[i].zName, pTab->aCol[i].zColl
10799 "CREATE VIRTUAL TABLE %Q USING expert(%Q)", zName, zInner
10980 const char *zName = (const char*)sqlite3_column_text(pIndexXInfo, 0);
10983 "%sx.%Q IS rem(%d, x.%Q) COLLATE %s", zComma, zName, nCol, zName, zColl
13577 const char *zName;
13607 p->errCode = sqlite3_create_function(db, aFunc[ii].zName,
13637 ** Otherwise, argument zName must be the name of a table that has just been
13643 ** Parameter iRoot must be the root page of table zName in the INPUT
13648 const char *zName, /* Name of table created in output db */
13652 "PRAGMA table_xinfo(%Q)", zName
13660 int nName = recoverStrlen(zName);
13678 memcpy(csr, zName, nName);
13713 pStmt = recoverPreparePrintf(p, p->dbOut, "PRAGMA index_xinfo(%Q)", zName);
13784 const char *zName = (const char*)sqlite3_column_text(pSelect, 3);
13792 zName, zName, zSql
15484 char *zName; /* Symbolic name for this session */
17016 static void set_table_name(ShellState *p, const char *zName){
17025 if( zName==0 ) return;
17026 cQuote = quoteChar(zName);
17027 n = strlen30(zName);
17033 for(i=0; zName[i]; i++){
17034 z[n++] = zName[i];
17035 if( zName[i]==cQuote ) z[n++] = cQuote;
19088 ** Read the content of file zName into memory obtained from sqlite3_malloc64()
19102 static char *readFile(const char *zName, int *pnByte){
19103 FILE *in = fopen(zName, "rb");
19132 sqlite3_free(pSession->zName);
19173 ** Try to deduce the type of file for zName based on its content. Return
19181 int deduceDatabaseType(const char *zName, int dfltZip){
19182 FILE *f = fopen(zName, "rb");
19187 if( dfltZip && sqlite3_strlike("%.zip",zName,0)==0 ){
19208 }else if( n==0 && dfltZip && sqlite3_strlike("%.zip",zName,0)==0 ){
19344 const char *zName = (const char*)sqlite3_value_text(argv[0]);
19346 if( zName ){
19347 char *z = sqlite3_mprintf("\"%w\"", zName);
20163 const unsigned char *zName;
20178 zName = sqlite3_column_text(pQuery, 0);
20180 if( zName==0 || zSql==0 ) continue;
20181 printf("%s... ", zName); fflush(stdout);
20189 xForEach(p, newDb, (const char*)zName);
20207 zName = sqlite3_column_text(pQuery, 0);
20209 if( zName==0 || zSql==0 ) continue;
20210 printf("%s... ", zName); fflush(stdout);
20218 xForEach(p, newDb, (const char*)zName);
20330 static const struct { const char *zName; int ofst; } aField[] = {
20344 static const struct { const char *zName; const char *zSql; } aQuery[] = {
20392 utf8_printf(p->out, "%-20s %u", aField[i].zName, val);
20413 utf8_printf(p->out, "%-20s %d\n", aQuery[i].zName, val);
22323 const char *zName;
22346 if( nArg>1 && cli_strcmp(azArg[1], aDbConfig[ii].zName)!=0 ) continue;
22351 utf8_printf(p->out, "%19s %s\n", aDbConfig[ii].zName, v ? "on" : "off");
23946 const char *zName = 0;
23968 }else if( zName==0 ){
23969 zName = azArg[ii];
23976 if( zName!=0 ){
23977 int isSchema = sqlite3_strlike(zName, "sqlite_master", '\\')==0
23978 || sqlite3_strlike(zName, "sqlite_schema", '\\')==0
23979 || sqlite3_strlike(zName,"sqlite_temp_master", '\\')==0
23980 || sqlite3_strlike(zName,"sqlite_temp_schema", '\\')==0;
23990 ")", zName);
24033 if( zName ){
24041 if( zName ){
24042 char *zQarg = sqlite3_mprintf("%Q", zName);
24045 bGlob = strchr(zName, '*') != 0 || strchr(zName, '?') != 0 ||
24046 strchr(zName, '[') != 0;
24047 if( strchr(zName, '.') ){
24103 if( cli_strcmp(pAuxDb->aSession[iSes].zName, azArg[1])==0 ) break;
24191 pSession->zName, ii);
24230 pSession->zName, ii);
24243 pSession->zName, ii);
24252 utf8_printf(p->out, "%d %s\n", i, pAuxDb->aSession[i].zName);
24261 char *zName;
24263 zName = azCmd[2];
24264 if( zName[0]==0 ) goto session_syntax_error;
24266 if( cli_strcmp(pAuxDb->aSession[i].zName,zName)==0 ){
24267 utf8_printf(stderr, "Session \"%s\" already exists\n", zName);
24285 pSession->zName = sqlite3_mprintf("%s", zName);
24286 shell_check_oom(pSession->zName);
25188 utf8_printf(p->out, "vfs.zName = \"%s\"\n", pVfs->zName);
25203 utf8_printf(p->out, "vfs.zName = \"%s\"%s\n", pVfs->zName,