Diff for /parser3/tests/388-sql.html between versions 1.3 and 1.8

version 1.3, 2017/12/07 00:55:12 version 1.8, 2019/10/24 15:14:56
Line 1 Line 1
 @main[]  @main[]
   
 $SQL[  $SQL[
         $.drivers[^table::create{protocol       driver  client          $.drivers[^table::create{protocol       driver  client  connect
 sqlite  ../../sql/sqlite/.libs/libparser3sqlite.so      libsqlite3.so  sqlite  ../../sql/sqlite/.libs/libparser3sqlite.so      libsqlite3.so   sqlite://:memory:?multi_statements=1
   mysql   ../../sql/mysql/.libs/libparser3mysql.so        libmariadbclient.so     mysql://@/?config_group=parser3&multi_statements=1
   pgsql   ../../sql/pgsql/.libs/libparser3pgsql.so        libpq.so        pgsql://test@localhost/test
 }]  }]
 ]  ]
   
 ^connect[sqlite://:memory:]{  $void[^SQL.drivers.locate[protocol;sqlite]]
         1. 2 + 2 = ^string:sql{select 2+2}  
   ^connect[$SQL.drivers.connect]{
   
           1. 2 + 2 = ^string:sql{select 2+2}
   
         2. void          2. void
   
         2.1 ^void:sql{create table pets (pet varchar, food varchar, aggressive varchar, weigth varchar)}          2.0 $ignore[^try-catch{ ^void:sql{drop table pets} }]
   
           2.1 ^void:sql{create table pets (pet varchar(128), food varchar(128), aggressive varchar(128), weigth varchar(128))}
   
         2.2 ^void:sql{insert into pets values          2.2 ^void:sql{insert into pets values
                 ('cat', 'milk', '^taint['very']', 5),                  ('cat', 'milk', '^taint['very']', 5),
Line 24  sqlite ../../sql/sqlite/.libs/libparser3 Line 30  sqlite ../../sql/sqlite/.libs/libparser3
         2.4 ^try-catch{ ^void:sql{query}[ $.unknown[yes] ] }          2.4 ^try-catch{ ^void:sql{query}[ $.unknown[yes] ] }
         2.5 ^try-catch{ ^void:sql{query}[ $.bind[ $.name[value] ] ] }          2.5 ^try-catch{ ^void:sql{query}[ $.bind[ $.name[value] ] ] }
   
           2.6 Multiple queries: ^try-catch{ ^void:sql{delete from pets where pet='' ^; delete from pets where pet='' } }
           2.7 Exception in second query: ^try-catch{ ^void:sql{delete from pets where pet='' ^; select 2+2 } }
   
         3. int/double          3. int/double
   
Line 48  sqlite ../../sql/sqlite/.libs/libparser3 Line 56  sqlite ../../sql/sqlite/.libs/libparser3
   
         4.5. ^h[select * from pets; $.type[table] $.limit(1) $.offset(1) ]          4.5. ^h[select * from pets; $.type[table] $.limit(1) $.offset(1) ]
   
           4.6 ^try-catch{ ^h[select 'dup', pet from pets; $.type[string] ]}
   
   
         5. table          5. table
   
Line 55  sqlite ../../sql/sqlite/.libs/libparser3 Line 65  sqlite ../../sql/sqlite/.libs/libparser3
   
         5.2. ^t[select * from pets; $.limit(1) $.offset(1) ]          5.2. ^t[select * from pets; $.limit(1) $.offset(1) ]
   
           5.3 ^try-catch{ ^t[select * from pets; $.bind[ $.name[value] ] ] }
   
           5.4 ^try-catch{ ^t[select * from pets; $.no-such-option[] ] }
   
   
         6. file          6. file
   

Removed from v.1.3  
changed lines
  Added in v.1.8


E-mail: