1 ! Copyright (C) 2009 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors combinators.short-circuit db db.errors
4 db.sqlite kernel locals tools.test ;
11 "insert into foo (id) values('1');" sql-command
13 { [ sql-table-missing? ] [ table>> "foo" = ] } 1&&
16 "create table foo(id);" sql-command
19 "create table foo(id);" sql-command
21 { [ sql-table-exists? ] [ table>> "foo" = ] } 1&&
24 "create index main_index on foo(id);" sql-command
27 "create index main_index on foo(id);" sql-command
29 { [ sql-index-exists? ] [ name>> "main_index" = ] } 1&&