Merge 'Run all statements from sql argument in cli' from Vrishabh

When we had multiple sql statements in cli/interactive shell, we were
only running one from them as  shown below. This PR fixes them.
One added benefit of this is we can add complex sql in the tcl test
files like the changes in insert.test .
sqlite3 output
```
❯ sqlite3  :memory: "select 1;select 2"
1
2
```
Limbo main branch output
```
❯ ./target/debug/limbo.exe :memory: "select 1;select 2;"
1
```
Limbos output with this PR
```
❯ ./target/debug/limbo.exe :memory: "select 1;select 2;"
1
2
```

Reviewed-by: Preston Thorpe <cory.pride83@gmail.com>

Closes #673
This commit is contained in:
Pekka Enberg
2025-01-15 18:44:17 +02:00
3 changed files with 112 additions and 63 deletions

View File

@@ -1,3 +1,9 @@
#!/usr/bin/env tclsh
set testdir [file dirname $argv0]
source $testdir/tester.tcl
source $testdir/tester.tcl
do_execsql_test_on_specific_db {:memory:} basic-insert {
create table temp (t1 integer, primary key (t1));
insert into temp values (1);
select * from temp;
} {1}