mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Add the "exists" method to the TCL interface. (CVS 2813)
FossilOrigin-Name: 8a355d7aade5c7a95ab08aeedf1ee1857c121c33
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
# interface is pretty well tested. This file contains some addition
|
||||
# tests for fringe issues that the main test suite does not cover.
|
||||
#
|
||||
# $Id: tclsqlite.test,v 1.44 2005/08/29 23:00:05 drh Exp $
|
||||
# $Id: tclsqlite.test,v 1.45 2005/12/10 21:19:06 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -34,7 +34,7 @@ do_test tcl-1.1 {
|
||||
do_test tcl-1.2 {
|
||||
set v [catch {db bogus} msg]
|
||||
lappend v $msg
|
||||
} {1 {bad option "bogus": must be authorizer, busy, cache, changes, close, collate, collation_needed, commit_hook, complete, copy, errorcode, eval, function, last_insert_rowid, nullvalue, onecolumn, profile, progress, rekey, timeout, total_changes, trace, transaction, or version}}
|
||||
} {1 {bad option "bogus": must be authorizer, busy, cache, changes, close, collate, collation_needed, commit_hook, complete, copy, errorcode, eval, exists, function, last_insert_rowid, nullvalue, onecolumn, profile, progress, rekey, timeout, total_changes, trace, transaction, or version}}
|
||||
do_test tcl-1.3 {
|
||||
execsql {CREATE TABLE t1(a int, b int)}
|
||||
execsql {INSERT INTO t1 VALUES(10,20)}
|
||||
@ -435,4 +435,14 @@ do_test tcl-10.13 {
|
||||
db eval {SELECT * FROM t4}
|
||||
} {1 2 3 4 5 6 7}
|
||||
|
||||
do_test tcl-11.1 {
|
||||
db exists {SELECT x,x*2,x+x FROM t4 WHERE x==4}
|
||||
} {1}
|
||||
do_test tcl-11.2 {
|
||||
db exists {SELECT 0 FROM t4 WHERE x==4}
|
||||
} {1}
|
||||
do_test tcl-11.3 {
|
||||
db exists {SELECT 1 FROM t4 WHERE x==8}
|
||||
} {0}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user