Lines Matching defs:view

2539 ** which case the view setting is not reported back.
2869 ** Changes to a view that are intercepted by
2872 ** DELETE statement run on a view is always zero. Only changes made to real
2930 ** not. ^Changes to a view that are intercepted by INSTEAD OF triggers
3497 ** is the name of the inner-most trigger or view that is responsible for
5582 ** used inside of triggers, view, CHECK constraints, or other elements of
7191 ** ^If the specified table is actually a view, an [error code] is returned.
13321 ** * Columns in a view
16844 ** changes and so the view will need to be reset.
17253 #define SQLITE_CountOfView 0x00000200 /* The count-of-view optimization */
17748 ** The schema for each SQL table, virtual table, and view is represented
17752 char *zName; /* Name of the table or view */
17770 u8 eTabType; /* 0: normal, 1: virtual, 2: view */
17780 } view;
17794 ** TF_OOOHidden applies to tables or view that have hidden columns that are
17831 #define TABTYP_VIEW 2 /* A view */
18606 unsigned isMaterialized:1; /* This is a materialized view */
18877 #define SF_View 0x0200000 /* SELECT statement is a view */
19311 char *table; /* The table or view to which the trigger applies */
19656 int bView; /* Belongs to the outermost Select of a view */
19685 ** data structures on sqlite3DebugPrintf() using a tree-like view.
32590 ** These simplified versions of the tree-view routines omit unnecessary
48741 ** Windows will only let you create file view mappings
56135 ** or the journal_mode). From another view, these class members describe
63477 ** multiple concurrent readers to view different versions of the database
63765 ** This is a schematic view of the complete 136-byte header of the
99431 sqlite3ErrorMsg(&sParse, "cannot open view: %s", zTable);
108416 if( pSrc->a[0].pSelect ) return 0; /* FROM is not a subquery or view */
108419 assert( !IsView(pTab) ); /* FROM clause is not a view */
112502 sqlite3ErrorMsg(pParse, "view %s may not be altered", pTab->zName);
112580 ** edit view and trigger definitions within the temp database
112590 "WHERE type IN ('view', 'trigger')"
112826 /* Make sure this is not an attempt to ALTER a view. */
112828 sqlite3ErrorMsg(pParse, "Cannot add a column to a view");
112880 ** command. This function checks if the table is a view or virtual
112884 ** Or, if pTab is not a view or virtual table, zero is returned.
112891 zType = "view";
112990 "WHERE type IN ('trigger', 'view')",
113769 ** 1. type: Type of object ("table", "view" etc.)
113843 Select *pSelect = sParse.pNewTable->u.view.pSelect;
114000 ** 1. type: Type of object ("table", "view" etc.)
114056 Select *pSelect = pTab->u.view.pSelect;
114063 sqlite3SelectPrep(&sParse, pTab->u.view.pSelect, &sNC);
114067 sqlite3WalkSelect(&sWalker, pTab->u.view.pSelect);
114234 Select *pSelect = sParse.pNewTable->u.view.pSelect;
114297 ** 2: Object type ("view", "table", "trigger" or "index").
114343 sqlite3SelectPrep(&sParse, sParse.pNewTable->u.view.pSelect, &sNC);
114466 /* Make sure this is not an attempt to ALTER a view, virtual table or
117089 const char *zType, /* "view", "trigger", or "index" */
117090 const Token *pName /* Name of the view, trigger, or index */
117116 ** view in one database does not refer to objects in a different database.
117931 const char *zMsg = flags & LOCATE_VIEW ? "no such view" : "no such table";
117950 ** non-NULL if it is part of a view or trigger program definition. See
118228 ** Delete memory allocated for the column names of a table or view (the
118314 sqlite3SelectDelete(db, pTable->u.view.pSelect);
118444 /* The table or view or trigger name is passed to this routine via tokens
118506 ** unqualified name for a new schema object (table, index, view or
118686 Token *pName1, /* First part of the name of the table or view */
118687 Token *pName2, /* Second part of the name of the table or view */
118723 if( sqlite3CheckObjectName(pParse, zName, isView?"view":"table", zName) ){
118764 (IsView(pTable)? "view" : "table"), pName);
120249 char *zType; /* "view" or "table" */
120259 ** Initialize zType for the new view or table.
120267 /* A view */
120268 zType = "view";
120433 Token *pName1, /* The token that holds the name of the view */
120434 Token *pName2, /* The token that holds the name of the view */
120435 ExprList *pCNames, /* Optional list of view column names */
120436 Select *pSelect, /* A SELECT statement that will become the new view */
120437 int isTemp, /* TRUE for a TEMPORARY view */
120458 ** on a view, even though views do not have rowids. The following flag
120468 sqlite3FixInit(&sFix, pParse, iDb, "view", pName);
120471 /* Make a copy of the entire SELECT statement that defines the view.
120478 p->u.view.pSelect = pSelect;
120481 p->u.view.pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);
120503 /* Use sqlite3EndTable() to add the view to the schema table */
120519 ** the columns of the view in the pTable structure. Return the number
120524 Select *pSel; /* Copy of the SELECT that implements the view */
120546 /* A positive nCol means the columns names for this view are
120568 sqlite3ErrorMsg(pParse, "view %s is circularly defined", pTable->zName);
120575 ** "*" elements in the results set of the view and will assign cursors
120578 ** statement that defines the view.
120581 pSel = sqlite3SelectDup(db, pTable->u.view.pSelect, 0);
120621 ** the column names from the SELECT statement that defines the view.
121005 /* Ensure DROP TABLE is not used on a view, and DROP VIEW is not used
121013 sqlite3ErrorMsg(pParse, "use DROP VIEW to delete view %s", pTab->zName);
123821 sqlite3ErrorMsg(pParse,"cannot modify %s because it is a view",pTab->zName);
123831 ** Evaluate a view and store its result in an ephemeral table. The
123833 ** set of rows in the view that are to be added to the ephemeral table.
124013 int isView; /* True if attempting to delete from a view */
124035 ** deleted from is a view
124068 /* If pTab is really a view, make sure it has been initialized.
124095 /* Start the view context
124110 /* If we are trying to delete from a view, realize that view into
124272 /* Unless this is a view, open cursors for the table we are
124273 ** deleting from and all its indices. If this is a view, then the
124521 ** a view (in which case the only effect of the DELETE statement is to
129326 int isView; /* True if attempting to insert into a view */
129366 ** inserted into is a view
129390 /* If pTab is really a view, make sure it has been initialized.
129391 ** ViewGetColumnNames() is a no-op if pTab is not a view.
129648 /* If this is not a view, open the table and and all indices */
129673 sqlite3ErrorMsg(pParse, "cannot UPSERT a view");
129861 /* If this is an INSERT on a view with an INSTEAD OF INSERT trigger,
129969 ** refer to the "rowid" of the view. */
131475 return 0; /* tab2 may not be a view or virtual table */
135473 ** Return a single row for each table, virtual table, or view in the
135478 ** type: "table", "view", "virtual", "shadow"
135528 zType = "view";
137231 ** argv[0] = type of object: "table", "index", "trigger", or "view".
137234 ** argv[3] = root page number for table or index. 0 for trigger or view.
137263 ** structures that describe the table, index, or view.
140167 /* The "table" is actually a sub-select or a view in the FROM clause
140179 ** rowid of the sub-select or view. This expression is legal (see
142088 ** just as it did when it was a column of a view or sub-query. */
143449 ** where table is a database table, not a sub-select or view. If the query
143959 ** that implements the view. A copy is made of the view's SELECT
143962 ** of the view.
143993 /* Renumber selId because it has been copied from a view */
144015 ** an entry of the FROM clause is a subquery instead of a table or view,
144039 /* An ordinary table or view name in the FROM clause */
144063 sqlite3ErrorMsg(pParse, "access to view \"%s\" prohibited",
144066 pFrom->pSelect = sqlite3SelectDup(db, pTab->u.view.pSelect, 0);
144725 ** Check to see if the pThis entry of pTabList is a self-join of a prior view.
144726 ** If it is, then return the SrcItem for the prior view. If it is not,
144752 /* The view was modified by some other optimization such as
144851 SELECTTRACE(0x400,pParse,p,("After count-of-view optimization:\n"));
145054 /* Catch mismatch in the declared columns of a view and the number of
145315 /* This view has already been materialized by a prior entry in
145323 /* Materialize the view. If the view is not correlated, generate a
145325 ** the same view can reuse the materialization. */
146472 SrcList *pTableName,/* The name of the table/view the trigger applies to */
146582 sqlite3ErrorMsg(pParse, "cannot create %s trigger on view: %S",
147999 ** Or, if pLimit and pOrderBy are not NULL, and pTab is not a view:
148006 ** If pTab is a view, the GROUP BY clause is omitted.
148017 ** If the table is actually a view, then <other-columns> are all columns of
148018 ** the view. The results are written to the ephemeral table iEph as records
148167 int isView; /* True when updating a view (INSTEAD OF trigger) */
148206 ** updated is a view.
148466 /* Start the view context. */
148471 /* If we are trying to update a view, realize that view into
149840 " WHERE type IN('view','trigger')"
155312 ** From another point of view, "indexable" means that the subterm could
177316 ** 2. The table is not a view and the column name identified an
208364 ** tables or view named using the data_<target> naming scheme.
209736 ** for a view or 0 for a table.
209751 ** the second argument is either missing or 0 (not a view).
209795 "SELECT rbu_target_name(name, type='view') AS target, name "
209797 "WHERE type IN ('table', 'view') AND target IS NOT NULL "
238736 ** correctly for the current view. Return SQLITE_OK if successful, or an
246192 sql = sqlite3_mprintf("INSERT INTO %s.sqlite_master SELECT type, name, tbl_name, rootpage, sql FROM main.sqlite_master WHERE type='view' OR type='trigger' OR (type='table' AND rootpage=0);", dbName, dbName);