8a48b9c0b1
list to a table-valued-function in the FROM clause. FossilOrigin-Name: b919376147597c4b73421abe5788f893baf1560b
37 lines
993 B
Plaintext
37 lines
993 B
Plaintext
# 2015-08-19
|
|
#
|
|
# 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.
|
|
#
|
|
#***********************************************************************
|
|
#
|
|
# This file implements tests for table-valued-functions implemented using
|
|
# eponymous virtual tables.
|
|
#
|
|
|
|
set testdir [file dirname $argv0]
|
|
source $testdir/tester.tcl
|
|
set testprefix tabfunc01
|
|
|
|
ifcapable !vtab {
|
|
finish_test
|
|
return
|
|
}
|
|
load_static_extension db series
|
|
|
|
do_execsql_test tabfunc01-1.1 {
|
|
SELECT *, '|' FROM generate_series WHERE start=1 AND stop=9 AND step=2;
|
|
} {1 | 3 | 5 | 7 | 9 |}
|
|
do_execsql_test tabfunc01-1.2 {
|
|
SELECT *, '|' FROM generate_series LIMIT 5;
|
|
} {0 | 1 | 2 | 3 | 4 |}
|
|
do_catchsql_test tabfunc01-1.3 {
|
|
CREATE VIRTUAL TABLE t1 USING generate_series;
|
|
} {1 {no such module: generate_series}}
|
|
|
|
finish_test
|