Home
last modified time | relevance | path

Searched refs:execsql (Results 1 – 25 of 70) sorted by relevance

123

/illumos-gate/usr/src/lib/libsqlite/test/
H A Ddelete.test23 set v [catch {execsql {DELETE FROM test1}} msg]
30 set v [catch {execsql {DELETE FROM sqlite_master}} msg]
37 execsql {CREATE TABLE table1(f1 int, f2 int)}
38 execsql {INSERT INTO table1 VALUES(1,2)}
39 execsql {INSERT INTO table1 VALUES(2,4)}
40 execsql {INSERT INTO table1 VALUES(3,8)}
41 execsql {INSERT INTO table1 VALUES(4,16)}
42 execsql {SELECT * FROM table1 ORDER BY f1}
45 execsql {DELETE FROM table1 WHERE f1=3}
48 execsql {SELECT * FROM table1 ORDER BY f1}
[all …]
H A Dupdate.test23 set v [catch {execsql {UPDATE test1 SET f2=5 WHERE f1<1}} msg]
31 {execsql {UPDATE sqlite_master SET name='xyz' WHERE name='123'}} msg]
38 execsql {CREATE TABLE test1(f1 int,f2 int)}
41 execsql $sql
43 execsql {SELECT * FROM test1 ORDER BY f1}
49 set v [catch {execsql {UPDATE test1 SET f1=f3*2 WHERE f2==32}} msg]
53 set v [catch {execsql {UPDATE test1 SET f1=test2.f1*2 WHERE f2==32}} msg]
57 set v [catch {execsql {UPDATE test1 SET f3=f1*2 WHERE f2==32}} msg]
64 execsql {UPDATE test1 SET f2=f2*3}
67 execsql {SELECT * FROM test1 ORDER BY f1}
[all …]
H A Drowid.test24 execsql {
32 set r [execsql {SELECT rowid FROM t1 ORDER BY x}]
43 execsql $sql
48 execsql $sql
53 execsql $sql
58 execsql $sql
63 execsql $sql
70 execsql "SELECT x FROM t1 WHERE rowid=$norow"
74 set v [execsql {SELECT x, oid FROM t1 order by x}]
80 set v [execsql {SELECT x, RowID FROM t1 order by x}]
[all …]
H A Dindex.test23 execsql {CREATE TABLE test1(f1 int, f2 int, f3 int)}
24 execsql {CREATE INDEX index1 ON test1(f1)}
25 execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name}
28 execsql {SELECT name, sql, tbl_name, type FROM sqlite_master
34 execsql {SELECT name, sql, tbl_name, type FROM sqlite_master
40 execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name}
46 execsql {DROP TABLE test1}
47 execsql {SELECT name FROM sqlite_master WHERE type!='meta' ORDER BY name}
53 set v [catch {execsql {CREATE INDEX index1 ON test1(f1)}} msg]
61 execsql {CREATE TABLE test1(f1 int, f2 int, f3 int)}
[all …]
H A Dinsert.test23 set v [catch {execsql {INSERT INTO test1 VALUES(1,2,3)}} msg]
30 set v [catch {execsql {INSERT INTO sqlite_master VALUES(1,2,3,4)}} msg]
37 execsql {CREATE TABLE test1(one int, two int, three int)}
38 set v [catch {execsql {INSERT INTO test1 VALUES(1,2)}} msg]
42 set v [catch {execsql {INSERT INTO test1 VALUES(1,2,3,4)}} msg]
46 set v [catch {execsql {INSERT INTO test1(one,two) VALUES(1,2,3,4)}} msg]
50 set v [catch {execsql {INSERT INTO test1(one,two) VALUES(1)}} msg]
57 set v [catch {execsql {INSERT INTO test1(one,four) VALUES(1,2)}} msg]
64 execsql {INSERT INTO test1 VALUES(1,2,3)}
65 execsql {SELECT * FROM test1}
[all …]
H A Dsort.test33 execsql {
44 execsql {SELECT count(*) FROM t1}
48 execsql {SELECT n FROM t1 ORDER BY n}
51 execsql {SELECT n FROM t1 ORDER BY n ASC}
54 execsql {SELECT ALL n FROM t1 ORDER BY n ASC}
57 execsql {SELECT n FROM t1 ORDER BY n DESC}
60 execsql {SELECT v FROM t1 ORDER BY v}
63 execsql {SELECT n FROM t1 ORDER BY v}
66 execsql {SELECT n FROM t1 ORDER BY v DESC}
69 execsql {SELECT flt FROM t1 ORDER BY flt}
[all …]
H A Dfunc.test23 execsql {CREATE TABLE tbl1(t1 text)}
25 execsql "INSERT INTO tbl1 VALUES('$word')"
27 execsql {SELECT t1 FROM tbl1 ORDER BY t1}
30 execsql {
44 execsql {SELECT length(t1) FROM tbl1 ORDER BY t1}
47 set r [catch {execsql {SELECT length(*) FROM tbl1 ORDER BY t1}} msg]
51 set r [catch {execsql {SELECT length(t1,5) FROM tbl1 ORDER BY t1}} msg]
55 execsql {SELECT length(t1), count(*) FROM tbl1 GROUP BY length(t1)
59 execsql {SELECT coalesce(length(a),-1) FROM t2}
65 execsql {SELECT substr(t1,1,2) FROM tbl1 ORDER BY t1}
[all …]
H A Dpragma.test29 execsql {
37 execsql {
48 execsql {
56 execsql {
65 execsql {
74 execsql {
85 execsql {
93 execsql {
102 execsql {
113 execsql {
[all …]
H A Dminmax.test23 execsql {
53 execsql {SELECT min(x) FROM t1}
60 execsql {SELECT max(x) FROM t1}
66 execsql {CREATE INDEX t1i1 ON t1(x)}
68 execsql {SELECT min(x) FROM t1}
75 execsql {SELECT max(x) FROM t1}
82 execsql {SELECT max(y) FROM t1}
89 execsql {
94 execsql {SELECT min(a) FROM t2}
101 execsql {SELECT max(a) FROM t2}
[all …]
H A Dtrans.test25 execsql {
34 execsql {
44 execsql {SELECT b FROM one ORDER BY a} altdb
47 execsql {SELECT b FROM two ORDER BY a} altdb
54 set v [catch {execsql {BEGIN}} msg]
58 set v [catch {execsql {END}} msg]
62 set v [catch {execsql {BEGIN TRANSACTION}} msg]
66 set v [catch {execsql {COMMIT TRANSACTION}} msg]
70 set v [catch {execsql {BEGIN TRANSACTION 'foo'}} msg]
74 set v [catch {execsql {ROLLBACK TRANSACTION 'foo'}} msg]
[all …]
H A Din.test28 execsql {
33 execsql {SELECT count(*) FROM t1}
39 execsql {SELECT a FROM t1 WHERE b BETWEEN 10 AND 50 ORDER BY a}
42 execsql {SELECT a FROM t1 WHERE b NOT BETWEEN 10 AND 50 ORDER BY a}
45 execsql {SELECT a FROM t1 WHERE b BETWEEN a AND a*5 ORDER BY a}
48 execsql {SELECT a FROM t1 WHERE b NOT BETWEEN a AND a*5 ORDER BY a}
51 execsql {SELECT a FROM t1 WHERE b BETWEEN a AND a*5 OR b=512 ORDER BY a}
54 execsql {SELECT a+ 100*(a BETWEEN 1 and 3) FROM t1 ORDER BY b}
61 execsql {SELECT a FROM t1 WHERE b IN (8,12,16,24,32) ORDER BY a}
64 execsql {SELECT a FROM t1 WHERE b NOT IN (8,12,16,24,32) ORDER BY a}
[all …]
H A Dbigrow.test35 execsql {
47 execsql $sql
48 execsql {SELECT a, c FROM t1}
51 execsql {SELECT b FROM t1}
57 set r [catch {execsql $sql} msg]
61 execsql {SELECT b FROM t1 ORDER BY c}
64 execsql {SELECT c FROM t1 ORDER BY c}
67 execsql {DELETE FROM t1 WHERE a='abc2'}
68 execsql {SELECT c FROM t1}
72 execsql {
[all …]
H A Dselect1.test23 set v [catch {execsql {SELECT * FROM test1}} msg]
27 execsql {CREATE TABLE test1(f1 int, f2 int)}
30 set v [catch {execsql {SELECT * FROM test1, test2}} msg]
34 set v [catch {execsql {SELECT * FROM test2, test1}} msg]
38 execsql {INSERT INTO test1(f1,f2) VALUES(11,22)}
44 execsql {SELECT f1 FROM test1}
47 execsql {SELECT f2 FROM test1}
50 execsql {SELECT f2, f1 FROM test1}
53 execsql {SELECT f1, f2 FROM test1}
56 execsql {SELECT * FROM test1}
[all …]
H A Dlimit.test29 execsql {
36 execsql {SELECT count(*) FROM t1}
39 execsql {SELECT count(*) FROM t1 LIMIT 5}
42 execsql {SELECT x FROM t1 ORDER BY x LIMIT 5}
45 execsql {SELECT x FROM t1 ORDER BY x LIMIT 5 OFFSET 2}
48 execsql {SELECT x FROM t1 ORDER BY x LIMIT 2, 5}
51 execsql {SELECT x FROM t1 ORDER BY x LIMIT 5 OFFSET 5}
54 execsql {SELECT x FROM t1 ORDER BY x LIMIT 50 OFFSET 30}
57 execsql {SELECT x FROM t1 ORDER BY x LIMIT 30, 50}
60 execsql {SELECT x FROM t1 ORDER BY x LIMIT 50 OFFSET 50}
[all …]
H A Dcopy.test56 set v [catch {execsql {COPY test1 FROM 'data1.txt'}} msg]
63 set v [catch {execsql {COPY sqlite_master FROM 'data2.txt'}} msg]
70 execsql {CREATE TABLE test1(one int, two int, three int)}
71 execsql {COPY test1 FROM 'data1.txt'}
72 execsql {SELECT * FROM test1 ORDER BY one}
78 execsql {DELETE FROM test1}
79 execsql {COPY test1 FROM 'data2.txt'}
80 execsql {SELECT * FROM test1 ORDER BY one}
86 execsql {DELETE FROM test1}
87 execsql {COPY test1 FROM 'data4.txt' USING DELIMITERS ' | '}
[all …]
H A Dintpkey.test26 execsql {
34 execsql {
44 execsql {
56 execsql {
62 execsql {
67 execsql {
76 set r [catch {execsql {
82 execsql {
87 set r [catch {execsql {
96 execsql {
[all …]
H A Dview.test20 execsql {
30 execsql {
43 execsql {
51 execsql {
62 execsql {
74 execsql {
85 execsql {
91 execsql {
114 execsql {
120 execsql {
[all …]
H A Dnull.test24 execsql {
42 execsql {
47 execsql {
57 execsql {
62 execsql {
67 execsql {
72 execsql {
77 execsql {
82 execsql {
87 execsql {
[all …]
H A Dmisc3.test26 execsql {
40 execsql {
47 execsql {
65 execsql {
75 execsql {SELECT 2e-25*0.5e25}
78 execsql {SELECT 2.0e-25*000000.500000000000000000000000000000e+00025}
81 execsql {SELECT 000000000002e-0000000025*0.5e25}
84 execsql {SELECT 2e-25*0.5e250}
87 execsql {SELECT 2.0e-250*0.5e25}
90 execsql {SELECT '-2.0e-127' * '-0.5e27'}
[all …]
H A Dinsert2.test24 execsql {CREATE TABLE d1(n int, log int);}
27 execsql "INSERT INTO d1 VALUES($i,$j)"
29 execsql {SELECT * FROM d1 ORDER BY n}
35 execsql {
45 execsql {SELECT * FROM t1 ORDER BY log}
49 catch {execsql {DROP TABLE t1}}
50 execsql {
58 execsql {
63 catch {execsql {DROP TABLE t1}}
64 execsql {
[all …]
H A Dtable.test23 execsql {
29 execsql {
41 execsql {SELECT name, tbl_name, type FROM sqlite_master WHERE type!='meta'}
50 execsql {SELECT name, tbl_name, type from sqlite_master WHERE type!='meta'}
56 execsql {DROP TABLE test1}
57 execsql {SELECT * FROM sqlite_master WHERE type!='meta'}
66 execsql {SELECT name FROM sqlite_master WHERE type!='meta'}
72 execsql {CREATE TABLE "create" (f1 int)}
73 execsql {SELECT name FROM sqlite_master WHERE type!='meta'}
76 execsql {DROP TABLE "create"}
[all …]
H A Dselect4.test29 execsql {
36 execsql {SELECT DISTINCT log FROM t1 ORDER BY log}
42 lsort [execsql {SELECT DISTINCT log FROM t1}]
45 lsort [execsql {SELECT n FROM t1 WHERE log=3}]
48 execsql {
56 execsql {
65 execsql {DROP TABLE t2}
67 execsql {
76 execsql {DROP TABLE t2}
78 execsql {
[all …]
H A Dlock.test28 execsql {SELECT name FROM sqlite_master WHERE type='table' ORDER BY name}
31 execsql {SELECT name FROM sqlite_master WHERE type='table' ORDER BY name} db2
34 execsql {CREATE TABLE t1(a int, b int)}
35 execsql {SELECT name FROM sqlite_master WHERE type='table' ORDER BY name}
49 execsql {INSERT INTO t1 VALUES(1,2)}
50 execsql {SELECT * FROM t1}
53 execsql {SELECT * FROM t1} db2
56 execsql {UPDATE t1 SET a=b, b=a} db2
57 execsql {SELECT * FROM t1} db2
60 execsql {SELECT * FROM t1}
[all …]
H A Dselect3.test30 execsql {
35 execsql {SELECT DISTINCT log FROM t1 ORDER BY log}
41 execsql {SELECT count(*) FROM t1}
44 execsql {
50 execsql {SELECT max(n)/avg(n), max(log)/avg(log) FROM t1}
56 execsql {SELECT log, count(*) FROM t1 GROUP BY log ORDER BY log}
59 execsql {SELECT log, min(n) FROM t1 GROUP BY log ORDER BY log}
62 execsql {SELECT log, avg(n) FROM t1 GROUP BY log ORDER BY log}
65 execsql {SELECT log, avg(n)+1 FROM t1 GROUP BY log ORDER BY log}
68 execsql {SELECT log, avg(n)-min(n) FROM t1 GROUP BY log ORDER BY log}
[all …]
H A Dsubselect.test24 execsql {
30 execsql {SELECT * FROM t1 WHERE a = (SELECT count(*) FROM t1)}
36 set v [catch {execsql {SELECT * FROM t1 WHERE a = (SELECT * FROM t1)}} msg]
43 execsql {SELECT b from t1 where a = (SELECT a FROM t1 WHERE b=2)}
46 execsql {SELECT b from t1 where a = (SELECT a FROM t1 WHERE b=4)}
49 execsql {SELECT b from t1 where a = (SELECT a FROM t1 WHERE b=6)}
52 execsql {SELECT b from t1 where a = (SELECT a FROM t1 WHERE b=8)}
59 execsql {SELECT b from t1 where a = coalesce((SELECT a FROM t1 WHERE b=5),1)}
65 execsql {
72 execsql {
[all …]

123