mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Add first cut of sqlite3_declare_vtab(). Not at all well tested yet. (CVS 3213)
FossilOrigin-Name: bbeb93b5bb26ba83ee7b7ae439ca5ceebebac9a0
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is creating and dropping virtual tables.
|
||||
#
|
||||
# $Id: vtab1.test,v 1.2 2006/06/12 06:09:19 danielk1977 Exp $
|
||||
# $Id: vtab1.test,v 1.3 2006/06/12 11:24:38 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -48,4 +48,31 @@ do_test vtab1-1.5 {
|
||||
}
|
||||
} {t1 {CREATE VIRTUAL TABLE t1 USING echo}}
|
||||
|
||||
# If a single argument is passed to the echo module during table
|
||||
# creation, it is assumed to be the name of a table in the same
|
||||
# database. The echo module attempts to set the schema of the
|
||||
# new virtual table to be the same as the existing database table.
|
||||
#
|
||||
do_test vtab1-2.1 {
|
||||
execsql {
|
||||
CREATE TABLE template(a, b, c);
|
||||
}
|
||||
execsql { PRAGMA table_info(template); }
|
||||
} [list \
|
||||
0 a {} 0 {} 0 \
|
||||
1 b {} 0 {} 0 \
|
||||
2 c {} 0 {} 0 \
|
||||
]
|
||||
do_test vtab1-2.2 {
|
||||
execsql {
|
||||
CREATE VIRTUAL TABLE t2 USING echo(template);
|
||||
}
|
||||
execsql { PRAGMA table_info(t2); }
|
||||
} [list \
|
||||
0 a {} 0 {} 0 \
|
||||
1 b {} 0 {} 0 \
|
||||
2 c {} 0 {} 0 \
|
||||
]
|
||||
|
||||
finish_test
|
||||
|
||||
|
Reference in New Issue
Block a user