Lines Matching defs:zName
1971 ** Attempt to determine if identifier zName needs to be quoted, either
1978 static char quoteChar(const char *zName){
1980 if( zName==0 ) return '"';
1981 if( !isalpha((unsigned char)zName[0]) && zName[0]!='_' ) return '"';
1982 for(i=0; zName[i]; i++){
1983 if( !isalnum((unsigned char)zName[i]) && zName[i]!='_' ) return '"';
1985 return sqlite3_keyword_check(zName, i) ? '"' : 0;
1990 ** of the view, virtual table, or table valued function zSchema.zName.
1995 const char *zName /* The name of the virtual table */
2005 zSchema ? zSchema : "main", zName);
2016 cQuote = quoteChar(zName);
2017 appendText(&s, zName, cQuote);
2087 const char *zName;
2090 zName = (const char*)sqlite3_value_text(apVal[0]);
2091 zFake = zName? shellFakeSchema(sqlite3_context_db_handle(pCtx), 0, zName) : 0;
2134 const char *zName = (const char*)sqlite3_value_text(apVal[2]);
2151 if( zName
2153 && (zFake = shellFakeSchema(db, zSchema, zName))!=0
7281 ** contents of file zName. Or, leave the result unchanged (NULL)
7290 static void readFileContents(sqlite3_context *ctx, const char *zName){
7297 in = fopen(zName, "rb");
7337 const char *zName;
7339 zName = (const char*)sqlite3_value_text(argv[0]);
7340 if( zName==0 ) return;
7341 readFileContents(context, zName);
8860 static int apndDelete(sqlite3_vfs*, const char *zName, int syncDir);
8861 static int apndAccess(sqlite3_vfs*, const char *zName, int flags, int *);
8862 static int apndFullPathname(sqlite3_vfs*, const char *zName, int, char *zOut);
8874 static const char *apndNextSystemCall(sqlite3_vfs*, const char *zName);
8881 "apndvfs", /* zName */
9208 const char *zName,
9223 return pBaseVfs->xOpen(pBaseVfs, zName, pFile, flags, pOutFlags);
9229 rc = pBaseVfs->xOpen(pBaseVfs, zName, pBaseFile, flags, pOutFlags);
9325 const char *zName,
9328 return ORIGVFS(pVfs)->xSetSystemCall(ORIGVFS(pVfs),zName,pCall);
9332 const char *zName
9334 return ORIGVFS(pVfs)->xGetSystemCall(ORIGVFS(pVfs),zName);
9336 static const char *apndNextSystemCall(sqlite3_vfs *pVfs, const char *zName){
9337 return ORIGVFS(pVfs)->xNextSystemCall(ORIGVFS(pVfs), zName);
11295 const char *zName, /* Name of SQL function */
11300 if( sqlite3_stricmp("zipfile_cds", zName)==0 ){
11368 char *zName = 0; /* Path (name) of new entry */
11369 int nName = 0; /* Size of zName in bytes */
11396 zName = (char*)sqlite3_value_text(pName);
11398 if( zName==0 ){
11452 if( nName>0 && zName[nName-1]=='/' ){
11458 if( nName==0 || zName[nName-1]!='/' ){
11459 zName = zFree = sqlite3_mprintf("%s/", zName);
11460 if( zName==0 ){
11464 nName = (int)strlen(zName);
11466 while( nName>1 && zName[nName-2]=='/' ) nName--;
11482 e.cds.zFile = zName;
12008 char *zName;
12014 char *zName; /* Table name */
12352 assert( sqlite3_stricmp(p->pTab->zName, argv[2])==0 );
12545 "SELECT * FROM main.%Q WHERE sqlite_expert_sample()", pVtab->pTab->zName
12665 pNew->aCol[nCol].zName = pCsr;
12689 pNew->zName = pCsr;
12690 if( ALWAYS(pNew->zName!=0) ) memcpy(pNew->zName, zTab, nTab+1);
12770 if( idxIdentifierRequiresQuotes(p->zName) ){
12771 zRet = idxAppendText(pRc, zRet, "%Q", p->zName);
12773 zRet = idxAppendText(pRc, zRet, "%s", p->zName);
12805 const char *zTbl = pScan->pTab->zName;
12904 const char *zTable = pScan->pTab->zName;
12906 char *zName = 0; /* Index name */
12914 sqlite3_free(zName);
12915 zName = sqlite3_mprintf("%s_idx_%08x", zTable, h);
12916 if( zName==0 ) break;
12920 zFind = sqlite3_mprintf(zFmt, zName);
12930 }while( collisions<50 && zName!=0 );
12934 }else if( zName==0 ){
12942 zIdx = sqlite3_mprintf(zFmt, zName, zTable, zCols);
12950 idxHashAdd(&rc, &p->hIdx, zName, zIdx);
12953 sqlite3_free(zName);
13189 if( 0==sqlite3_stricmp(z3, pTab->zName) ) break;
13219 const char *zTab = pTab->zName;
13263 pTab->aCol[i].zName
13332 const char *zName = (const char*)sqlite3_column_text(pSchema, 1);
13335 if( zType==0 || zName==0 ) continue;
13340 rc = idxGetTableInfo(p->db, zName, &pTab, pzErrmsg);
13352 (i==0 ? "" : ", "), pTab->aCol[i].zName, pTab->aCol[i].zColl
13359 "CREATE VIRTUAL TABLE %Q USING expert(%Q)", zName, zInner
13540 const char *zName = (const char*)sqlite3_column_text(pIndexXInfo, 0);
13544 zComma, zName, nCol, zName, zColl
13756 void useDummyCS(void *up1, sqlite3 *db, int etr, const char *zName){
13758 sqlite3_create_collation_v2(db, zName, etr, 0, dummyCompare, 0);
17438 const char *zName;
17470 p->errCode = sqlite3_create_function(db, aFunc[ii].zName,
17500 ** Otherwise, argument zName must be the name of a table that has just been
17506 ** Parameter iRoot must be the root page of table zName in the INPUT
17511 const char *zName, /* Name of table created in output db */
17515 "PRAGMA table_xinfo(%Q)", zName
17523 int nName = recoverStrlen(zName);
17541 memcpy(csr, zName, nName);
17576 pStmt = recoverPreparePrintf(p, p->dbOut, "PRAGMA index_xinfo(%Q)", zName);
17647 const char *zName = (const char*)sqlite3_column_text(pSelect, 3);
17655 zName, zName, zSql
19357 char *zName; /* Symbolic name for this session */
20965 static void set_table_name(ShellState *p, const char *zName){
20974 if( zName==0 ) return;
20975 cQuote = quoteChar(zName);
20976 n = strlen30(zName);
20982 for(i=0; zName[i]; i++){
20983 z[n++] = zName[i];
20984 if( zName[i]==cQuote ) z[n++] = cQuote;
21371 const char *zName = 0;
21384 sqlite3_stmt_scanstatus_v2(p, ii, SQLITE_SCANSTAT_NAME,f,(void*)&zName);
21401 if( zName && pArg->scanstatsOn>1 ){
23146 ** Read the content of file zName into memory obtained from sqlite3_malloc64()
23160 static char *readFile(const char *zName, int *pnByte){
23161 FILE *in = fopen(zName, "rb");
23169 eputf("Error: '%s' not seekable\n", zName);
23185 eputf("Error: cannot read '%s'\n", zName);
23201 sqlite3_free(pSession->zName);
23242 ** Try to deduce the type of file for zName based on its content. Return
23250 int deduceDatabaseType(const char *zName, int dfltZip){
23251 FILE *f = fopen(zName, "rb");
23256 if( dfltZip && sqlite3_strlike("%.zip",zName,0)==0 ){
23277 }else if( n==0 && dfltZip && sqlite3_strlike("%.zip",zName,0)==0 ){
24153 const unsigned char *zName;
24167 zName = sqlite3_column_text(pQuery, 0);
24169 if( zName==0 || zSql==0 ) continue;
24170 if( sqlite3_stricmp((char*)zName, "sqlite_sequence")!=0 ){
24171 sputf(stdout, "%s... ", zName); fflush(stdout);
24180 xForEach(p, newDb, (const char*)zName);
24197 zName = sqlite3_column_text(pQuery, 0);
24199 if( zName==0 || zSql==0 ) continue;
24200 if( sqlite3_stricmp((char*)zName, "sqlite_sequence")==0 ) continue;
24201 sputf(stdout, "%s... ", zName); fflush(stdout);
24209 xForEach(p, newDb, (const char*)zName);
24337 static const struct { const char *zName; int ofst; } aField[] = {
24351 static const struct { const char *zName; const char *zSql; } aQuery[] = {
24401 oputf("%-20s %u", aField[i].zName, val);
24422 oputf("%-20s %d\n", aQuery[i].zName, val);
26428 const char *zName;
26453 if( nArg>1 && cli_strcmp(azArg[1], aDbConfig[ii].zName)!=0 ) continue;
26458 oputf("%19s %s\n", aDbConfig[ii].zName, v ? "on" : "off");
28109 const char *zName = 0;
28131 }else if( zName==0 ){
28132 zName = azArg[ii];
28139 if( zName!=0 ){
28140 int isSchema = sqlite3_strlike(zName, "sqlite_master", '\\')==0
28141 || sqlite3_strlike(zName, "sqlite_schema", '\\')==0
28142 || sqlite3_strlike(zName,"sqlite_temp_master", '\\')==0
28143 || sqlite3_strlike(zName,"sqlite_temp_schema", '\\')==0;
28153 ")", zName);
28196 if( zName ){
28204 if( zName ){
28205 char *zQarg = sqlite3_mprintf("%Q", zName);
28208 bGlob = strchr(zName, '*') != 0 || strchr(zName, '?') != 0 ||
28209 strchr(zName, '[') != 0;
28210 if( strchr(zName, '.') ){
28266 if( cli_strcmp(pAuxDb->aSession[iSes].zName, azArg[1])==0 ) break;
28352 oputf("session %s enable flag = %d\n", pSession->zName, ii);
28387 oputf("session %s indirect flag = %d\n", pSession->zName, ii);
28399 oputf("session %s isempty flag = %d\n", pSession->zName, ii);
28408 oputf("%d %s\n", i, pAuxDb->aSession[i].zName);
28417 char *zName;
28419 zName = azCmd[2];
28420 if( zName[0]==0 ) goto session_syntax_error;
28422 if( cli_strcmp(pAuxDb->aSession[i].zName,zName)==0 ){
28423 eputf("Session \"%s\" already exists\n", zName);
28441 pSession->zName = sqlite3_mprintf("%s", zName);
28442 shell_check_oom(pSession->zName);
29498 oputf("vfs.zName = \"%s\"\n", pVfs->zName);
29513 oputf("vfs.zName = \"%s\"%s\n", pVfs->zName,