1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Allow virtual tables to mark columns as 'hidden'. Hidden columns do not show

up in "*" expansion, the implicit column list of an INSERT statement, or the results of a "PRAGMA table_info" statement. (CVS 4127)

FossilOrigin-Name: 7f887a6a00fdd6efc3740bd8a1731bb1abde087c
This commit is contained in:
danielk1977
2007-06-26 10:38:54 +00:00
parent 8605761506
commit 034ca14f81
8 changed files with 235 additions and 23 deletions

View File

@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
** $Id: select.c,v 1.352 2007/06/24 06:32:18 danielk1977 Exp $
** $Id: select.c,v 1.353 2007/06/26 10:38:55 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -1334,6 +1334,15 @@ static int prepSelectStmt(Parse *pParse, Select *p){
Expr *pExpr, *pRight;
char *zName = pTab->aCol[j].zName;
/* If a column is marked as 'hidden' (currently only possible
** for virtual tables), do not include it in the expanded
** result-set list.
*/
if( IsHiddenColumn(&pTab->aCol[j]) ){
assert(IsVirtual(pTab));
continue;
}
if( i>0 ){
struct SrcList_item *pLeft = &pTabList->a[i-1];
if( (pLeft[1].jointype & JT_NATURAL)!=0 &&