#!/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}
