mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-24 03:34:18 +01:00
53 lines
1.1 KiB
Tcl
Executable File
53 lines
1.1 KiB
Tcl
Executable File
#!/usr/bin/env tclsh
|
|
|
|
set testdir [file dirname $argv0]
|
|
source $testdir/tester.tcl
|
|
|
|
do_execsql_test select-const-1 {
|
|
SELECT 1
|
|
} {1}
|
|
|
|
do_execsql_test select-const-2 {
|
|
SELECT 2
|
|
} {2}
|
|
|
|
do_execsql_test select-blob-empty {
|
|
SELECT x'';
|
|
} {}
|
|
|
|
do_execsql_test select-blob-ascii {
|
|
SELECT x'6C696D626f';
|
|
} {limbo}
|
|
|
|
do_execsql_test select-blob-emoji {
|
|
SELECT x'F09FA680';
|
|
} {🦀}
|
|
|
|
do_execsql_test select-limit-0 {
|
|
SELECT id FROM users LIMIT 0;
|
|
} {}
|
|
|
|
do_execsql_test realify {
|
|
select price from products limit 1;
|
|
} {79.0}
|
|
|
|
do_execsql_test select-add {
|
|
select u.age + 1 from users u where u.age = 91 limit 1;
|
|
} {92}
|
|
|
|
do_execsql_test case-insensitive-columns {
|
|
select u.aGe + 1 from USERS u where U.AGe = 91 limit 1;
|
|
} {92}
|
|
|
|
do_execsql_test table-star {
|
|
select p.*, p.name from products p limit 1;
|
|
} {1|hat|79.0|hat}
|
|
|
|
do_execsql_test table-star-2 {
|
|
select p.*, u.first_name from users u join products p on u.id = p.id limit 1;
|
|
} {1|hat|79.0|Jamie}
|
|
|
|
do_execsql_test seekrowid {
|
|
select * from users u where u.id = 5;
|
|
} {"5|Edward|Miller|christiankramer@example.com|725-281-1033|08522 English Plain|Lake Keith|ID|23283|15"}
|