mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
Add more test cases for update
This commit is contained in:
parent
4067c98848
commit
2dec7b7255
1 changed files with 19 additions and 0 deletions
|
@ -102,6 +102,15 @@ do_execsql_test_on_specific_db {:memory:} update-self-reference {
|
|||
} {10|10
|
||||
2|20}
|
||||
|
||||
do_execsql_test_on_specific_db {:memory:} update-self-ref-all {
|
||||
create table temp (a, b, c);
|
||||
insert into temp values (1, 2, 3);
|
||||
insert into temp values (4, 5, 6);
|
||||
update temp set a = b;
|
||||
select * from temp;
|
||||
} {2|2|3
|
||||
5|5|6}
|
||||
|
||||
do_execsql_test_on_specific_db {:memory:} update-large-text {
|
||||
create table temp (a);
|
||||
insert into temp values ('short');
|
||||
|
@ -144,3 +153,13 @@ do_execsql_test_on_specific_db {:memory:} update-multiple-columns {
|
|||
select * from temp;
|
||||
} {10|20|30
|
||||
10|20|30}
|
||||
|
||||
do_execsql_test_on_specific_db {:memory:} update-true-expr {
|
||||
create table temp (a, b, c);
|
||||
insert into temp values (1, 2, 3);
|
||||
insert into temp values (4, 5, 6);
|
||||
update temp set a = 10, b = 20, c = 30 where 1;
|
||||
select * from temp;
|
||||
} {10|20|30
|
||||
10|20|30}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue