Commit Graph

4964 Commits

Author SHA1 Message Date
pedrocarlo
ff5aa17769 impl ToSqlString for CompoundSelect Plan 2025-06-04 12:06:43 -03:00
pedrocarlo
51014d01c3 impl ToSqlString for SelectPlan 2025-06-04 12:06:43 -03:00
pedrocarlo
6773dca595 impl ToSqlString for VACUUM stmt + tests 2025-06-04 12:06:43 -03:00
pedrocarlo
d86ff4dea3 impl ToSqlString for UPDATE stmt + tests 2025-06-04 12:06:42 -03:00
pedrocarlo
659ef8fcf7 impl ToSqlString for REINDEX, RELEASE, ROLLBACK, SAVEPOINT stmt + tests 2025-06-04 12:06:42 -03:00
pedrocarlo
e9cbd29dd1 impl ToSqlString for PRAGMA stmt + tests 2025-06-04 12:06:42 -03:00
pedrocarlo
260a26d612 impl ToSqlString for INSERT stmt + tests 2025-06-04 12:06:42 -03:00
pedrocarlo
5710976d95 impl ToSqlString for DROP INDEX, TABLE, TRIGGER, and VIEW stmt 2025-06-04 12:06:42 -03:00
pedrocarlo
8ff0a3c780 impl ToSqlString for DETACH stmt 2025-06-04 12:06:42 -03:00
pedrocarlo
0dc5ca668c test for DELETE + fixes 2025-06-04 12:06:42 -03:00
pedrocarlo
3b1da29b50 impl ToSqlString for DELETE stmt 2025-06-04 12:06:42 -03:00
pedrocarlo
6ba6fae2c6 CREATE VIRTUAL TABLE tests 2025-06-04 12:06:42 -03:00
pedrocarlo
c8f9e29262 impl ToSqlString for CREATE VIRTUAL TABLE stmt + fixes 2025-06-04 12:06:42 -03:00
pedrocarlo
563ab2fdf3 impl ToSqlString for CREATE VIEW stmt + tests 2025-06-04 12:06:42 -03:00
pedrocarlo
87b9540b4a test for create trigger + fixes 2025-06-04 12:06:42 -03:00
pedrocarlo
a22d06cd66 impl ToSqlString for CREATE TRIGGER stmt 2025-06-04 12:06:42 -03:00
pedrocarlo
ba215c8ba9 test for create table + fixes 2025-06-04 12:06:42 -03:00
pedrocarlo
8a7cc7669d impl ToSqlString for CREATE TABLE stmt 2025-06-04 12:06:42 -03:00
pedrocarlo
a8f5257240 impl ToSqlString for CREATE INDEX stmt 2025-06-04 12:06:42 -03:00
pedrocarlo
b47e3a990e impl ToSqlString for COMMIT stmt 2025-06-04 12:06:42 -03:00
pedrocarlo
4f736daa7c impl ToSqlString for BEGIN stmt 2025-06-04 12:06:42 -03:00
pedrocarlo
2a2132e479 impl ToSqlString for Attach stmt 2025-06-04 12:06:42 -03:00
pedrocarlo
355e9a2c96 impl ToSqlString for analyze stmt 2025-06-04 12:06:42 -03:00
pedrocarlo
43b1d4f5da alter table tests + fixes 2025-06-04 12:06:42 -03:00
pedrocarlo
7fb3d40ec2 implement ToSqlString for AlterTable 2025-06-04 12:06:42 -03:00
pedrocarlo
e0c2a09d71 more tests for select + fixes 2025-06-04 12:06:42 -03:00
pedrocarlo
5b6ed60133 simpler select tests + fixes to printing 2025-06-04 12:06:42 -03:00
pedrocarlo
fb01541708 impl ToSqlString for Select 2025-06-04 12:06:42 -03:00
pedrocarlo
0b0e724f54 implement ToSqlString for Expr 2025-06-04 12:06:42 -03:00
pedrocarlo
1dc73bc49e initial stubs for ast::Select 2025-06-04 12:06:42 -03:00
pedrocarlo
2ac2990b4c to_sql_string trait definition 2025-06-04 12:06:42 -03:00
Pekka Enberg
9f17be8162 Merge 'simulator: log the interaction about to be executed with INFO' from Jussi Saurio
I think this is useful to see, without having to drop down to DEBUG and
seeing all the other stuff.

Closes #1655
2025-06-04 10:20:54 +03:00
Pekka Enberg
7376284895 Merge 'simulator: add CREATE INDEX to interactions' from Jussi Saurio
Adds CREATE INDEX as a potential interaction.
Kudos to @alpaylan - I've been sleeping on the simulator a bit lately --
incredibly easy to add new stuff here

Closes #1656
2025-06-04 10:15:48 +03:00
Pekka Enberg
941ecdc75b Merge 'stress: Use temporary file unless one explicitly specified' from Jussi Saurio
Closes #1660
2025-06-04 10:12:31 +03:00
Jussi Saurio
7e875a44cb add limbostress.log to gitignore 2025-06-04 10:02:37 +03:00
Jussi Saurio
062469936d test/stress: use tempfile unless opts.db_file given 2025-06-04 10:02:27 +03:00
Jussi Saurio
2087393d22 Merge 'Write database header via normal pager route' from meteorgan
Closes: #1613

Closes #1634
2025-06-04 09:39:14 +03:00
Jussi Saurio
2d638e737c Merge 'sim/aws: fix sim timeout handling' from Jussi Saurio
code was trying to consume the same readablestream twice: once in the
timeouter's catch block, and a second time in the body of the try block
before postGithubIssue() could run.

Closes #1658
2025-06-04 09:38:31 +03:00
Jussi Saurio
8bc1e06964 add simulator.log to gitignore 2025-06-04 09:29:25 +03:00
Jussi Saurio
e53ac59532 Fix assertion failing on 100 != 99.99999999999999999999 2025-06-04 09:28:26 +03:00
Jussi Saurio
5680326881 sim: add CREATE INDEX to interactions 2025-06-04 09:21:59 +03:00
Jussi Saurio
ad8c9a4c15 Merge 'Fix WAL frame checksum mismatch' from Diego Reis
Closes #1622
I did an A/B test between SQLite and Limbo and they can restart the db
from each other, indicating that there isn't something very wrong with
our file format. Turns out it was with our reset logic without
truncating the file. I assumed it's safe to don't reset if we're in
`PASSIVE` mode, given the
[docs](https://www.sqlite.org/c3ref/wal_checkpoint_v2.html) and [source
code](https://github.com/sqlite/sqlite/blob/2bd9f69d40dd240c4122c6d02f1f
f447e7b5c098/src/wal.c#L2193).
It also does some small clean ups and fixes.

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #1647
2025-06-04 09:14:45 +03:00
Jussi Saurio
e29b17ccbb Merge 'simulator: options to disable certain query types' from Pedro Muniz
Some additional cli options and some adjustments to determine if a query
statement is disabled for this run. This enables us to at least run the
simulator to completion when other parts of the system cause infinite
loops almost every time. I'm looking at you UPDATE

Closes #1657
2025-06-04 09:14:17 +03:00
Jussi Saurio
4fc04c8db3 sim/aws: fix sim timeout handling
code was trying to consume the same readablestream twice: once in
the timeouter's catch block, and a second time in the body of the
try block before postGithubIssue() could run.
2025-06-04 09:08:59 +03:00
Pekka Enberg
c6ef19396d Merge 'Add support for pragma table-valued functions' from Piotr Rżysko
This PR adds support for table-valued functions for PRAGMAs (see the
[PRAGMA functions section](https://www.sqlite.org/pragma.html)).
Additionally, it introduces built-in table-valued functions. I
considered using extensions for this, but there are several reasons in
favor of a dedicated mechanism:
* It simplifies the use of internal functions, structs, etc. For
example, when implementing `json_each` and `json_tree`, direct access to
internals was necessary:
https://github.com/tursodatabase/limbo/pull/1088
* It avoids FFI overhead. [Benchmarks](https://github.com/piotrrzysko/li
mbo/blob/pragma_vtabs_bench/core/benches/pragma_benchmarks.rs) on my
hardware show that `pragma_table_info()` implemented as an extension is
2.5× slower than the built-in version.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #1642
2025-06-04 09:08:10 +03:00
Pekka Enberg
d2c5c4647f Limbo supports exact vector search
Make the roadmap item more explicit that it's about indexing.
2025-06-04 09:04:13 +03:00
Pekka Enberg
025714ce94 Merge 'bindings/javascript: Add proper exec() method and raw() mode' from Diego Reis
Now we can execute a sequence of statements from exec, it's similar to
`execute_batch()` from rusqlite
EDIT: It also add support for raw mode and do a small clean up to push
if statements outside loops

Closes #1620
2025-06-04 08:13:36 +03:00
pedrocarlo
1c424818aa simulator options to disable certain query types 2025-06-03 22:21:40 -03:00
Diego Reis
09f978b239 core: Tagging some comments as TODO 2025-06-03 15:09:16 -03:00
meteorgan
1554c54f2b restore comments 2025-06-03 22:06:08 +08:00