/ Check-in [ebf4bbff]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a test for the __hidden__ hack on this branch.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | hidden-columns-in-tables
Files: files | file ages | folders
SHA1:ebf4bbffec58111a670c46a9eb469bfd2440b0b1
User & Date: dan 2015-11-18 20:07:12
Context
2015-11-18
20:57
Honor the "__hidden__" prefix on the columns of views. check-in: 3071ba2b user: drh tags: hidden-columns-in-tables
20:07
Add a test for the __hidden__ hack on this branch. check-in: ebf4bbff user: dan tags: hidden-columns-in-tables
18:43
If a table column name begins with "__hidden__" then do not include that column in "*" expansions in SELECT statements, nor fill in that column in an INSERT INTO that omits the column list. This branch is a proof-of-concept only and is not intended to ever be merged into trunk. check-in: 2dbffb3a user: drh tags: hidden-columns-in-tables
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added test/hidden.test.







































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# 2015 November 18
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
#
# Test the __hidden__ hack.
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix hidden

do_execsql_test 1.1 {
  CREATE TABLE t1(__hidden__a, b);
  INSERT INTO t1 VALUES('1');
  INSERT INTO t1(__hidden__a, b) VALUES('x', 'y');
} {}

do_execsql_test 1.2 {
  SELECT * FROM t1;
} {1 y}

do_execsql_test 1.3 {
  SELECT __hidden__a, * FROM t1;
} {{} 1 x y}

#do_execsql_test 2.1 {
  #CREATE TABLE x1(a, b, c);
  #INSERT INTO x1 VALUES(1, 2, 3);
  #CREATE VIEW v1(a, b, __hidden__c) AS SELECT a, b, c FROM x1;
  #SELECT * FROM v1;
#} {1 2}

do_execsql_test 2.2 {
  PRAGMA table_info(v1);
} {
0 a {} 0 {} 0 
1 b {} 0 {} 0 
2 __hidden__c {} 0 {} 0
}



  
finish_test