#!/usr/bin/env tclsh set testdir [file dirname $argv0] source $testdir/tester.tcl do_execsql_test_on_specific_db {:memory:} affinity { CREATE TABLE t1 (c INTEGER); INSERT INTO t1 VALUES ('1'); INSERT INTO t1 VALUES ('1a'); SELECT c, typeof(c) FROM t1; } { {1|integer} {1a|text} } do_execsql_test_on_specific_db {:memory:} affinity-rowid { create table t(a integer); insert into t(rowid, a) values (1, 1); select * from t where rowid = '1'; select * from t where a = '1'; } {1 1} do_execsql_test_on_specific_db {:memory:} affinity-ascii-whitespace-1.1 { CREATE TABLE nb1(i INTEGER); INSERT INTO nb1 VALUES ('12' || CHAR(160)); SELECT TYPEOF(i), LENGTH(i) FROM nb1; } {text|3}