mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Add a "pk" column to the table_info pragma which is true for each column
that is part of the primary key. Add a "foreign_key_list" pragma that gives information about all foreign keys for a table. Both changes are experimental. (CVS 1081) FossilOrigin-Name: 5232b0665b84a9339a85918570093a376a0ea91f
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.14 2003/08/19 14:31:02 drh Exp $
|
||||
# $Id: tclsqlite.test,v 1.15 2003/08/23 22:40:54 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -70,7 +70,7 @@ if {[sqlite -encoding]=="UTF-8" && [sqlite -tcl-uses-utf]} {
|
||||
do_test tcl-2.1 {
|
||||
execsql "CREATE TABLE t\u0123x(a int, b\u1235 float)"
|
||||
execsql "PRAGMA table_info(t\u0123x)"
|
||||
} "0 a int 0 {} 1 b\u1235 float 0 {}"
|
||||
} "0 a int 0 {} 0 1 b\u1235 float 0 {} 0"
|
||||
do_test tcl-2.2 {
|
||||
execsql "INSERT INTO t\u0123x VALUES(1,2.3)"
|
||||
db eval "SELECT * FROM t\u0123x" result break
|
||||
@ -82,7 +82,7 @@ if {[sqlite -encoding]=="iso8859" && [sqlite -tcl-uses-utf]} {
|
||||
do_test tcl-2.1 {
|
||||
execsql "CREATE TABLE t\251x(a int, b\306 float)"
|
||||
execsql "PRAGMA table_info(t\251x)"
|
||||
} "0 a int 0 {} 1 b\306 float 0 {}"
|
||||
} "0 a int 0 {} 0 1 b\306 float 0 {} 0"
|
||||
do_test tcl-2.2 {
|
||||
execsql "INSERT INTO t\251x VALUES(1,2.3)"
|
||||
db eval "SELECT * FROM t\251x" result break
|
||||
|
Reference in New Issue
Block a user