Commit Graph

248 Commits

Author SHA1 Message Date
pedrocarlo
4bbe780a34 add optional serde serialization and deserialization to limbo Value 2025-06-09 11:38:15 -03:00
pedrocarlo
0f2849f7e1 serde and serde_json as workspace dependencies 2025-06-09 11:38:15 -03:00
Pekka Enberg
12876227c3 Limbo 0.0.22-pre.1 2025-06-05 18:26:33 +03:00
Jussi Saurio
062469936d test/stress: use tempfile unless opts.db_file given 2025-06-04 10:02:27 +03:00
Pere Diaz Bou
8ec7e616b4 simulator: switch to tracing, run io.run_once and add update queries
* Without tracing crate we cannot log anything that happens in
limbo_core
* IO never ran in step loop inside simulator.
* Added update queries (which currently loop forever for some reason I'm
debugging).
2025-05-30 10:57:13 +02:00
Pekka Enberg
0ae46e815c Limbo 0.0.21 2025-05-28 12:42:03 +03:00
Pekka Enberg
6b93c9acdc Limbo 0.0.21-pre.2 2025-05-28 12:23:13 +03:00
Pekka Enberg
80d7571f3e Limbo 0.0.21-pre.1 2025-05-28 11:17:08 +03:00
Pekka Enberg
edfa7402f0 sqlite3/test: Use tempfile in read frame test case
...make test runs idempotent, as suggested by Jussi.
2025-05-27 16:45:02 +03:00
Jussi Saurio
6254246541 use tempfile in test 2025-05-25 10:25:52 +03:00
Pekka Enberg
7d471889eb sqlite3: Switch to tracing logger
...we now actually see logging from core too.
2025-05-22 12:37:09 +03:00
Piotr Rzysko
ad9d044a04 Add CSV extension 2025-05-21 09:22:59 +02:00
pedrocarlo
510c70e919 Create CollationSeq enum and functions. Move strum to workspace dependency to avoid version mismatch with Parser 2025-05-19 15:22:14 -03:00
Pekka Enberg
4cf9305947 Merge 'bindings/javascript: Add Statement.iterate() method' from Diego Reis
I still didn't find a good way to implement variadic functions, we
should have some sort of wrapper in JS layer but it didn't work so well
for me so far. But once done it will be easily transferable to any
function.
It also should probably be async, but AFAIC napi doesn't have a straight
way to implement async iterators.

Closes #1515
2025-05-19 20:44:40 +03:00
Pere Diaz Bou
5eab588115 improve debug build validation speed
Various things:
* remove unnecessary debug_validate_cell calls
* Add SortedVec for keys in fuzz tests
* Validate btree's depth in fuzz test every 1K inserts to not overload
test with validations. We add `VALIDATE_BTREE`  env variable to enable
validation on every insert in case it is needed.
2025-05-19 09:53:15 +02:00
Diego Reis
9f6e242e42 bind/js: Partially implements iterate() method
The API still is sync and isn't variadic
2025-05-18 00:51:23 -03:00
pedrocarlo
a614114591 Config Definitions 2025-05-17 15:51:17 -03:00
Pekka Enberg
31ebbb190a Limbo 0.0.20 2025-05-14 09:49:05 +03:00
Pekka Enberg
bef665b7f3 Limbo 0.0.20-pre.2 2025-05-14 09:17:07 +03:00
Diego Reis
25df20dc97 bind/js: Bump napi and napi-derive versions 2025-05-08 08:22:04 -03:00
Jussi Saurio
c9eb56b54a Merge 'Read only mode' from Pedro Muniz
Closes #1413 . Basically, SQLite emits a check in a transaction to see
if it is attempting to write. If the db is in read only mode, it throws
an error, else the statement is executed. Mirroring how Rusqlite does
it, I modified the `OpenFlags` to use bitflags to better configure how
we open our VFS. This modification, will enable us to run tests against
the same database in parallel.

Closes #1433
2025-05-03 19:15:06 +03:00
Jussi Saurio
7920161efc update Cargo.lock 2025-05-03 18:32:58 +03:00
pedrocarlo
0c22382f3c shared lock on file and throw ReadOnly error in transaction 2025-05-02 16:30:48 -03:00
Jussi Saurio
0d77ea9446 Merge 'Optimization: only initialize Rustyline if we are in a tty' from Pedro Muniz
This is small nitpick, but it will be useful for #1258. If we are
testing or just piping some sql through stdin, we can just not
initialize `Rustyline` and save some execution time.
On `Select 1` bench, I got a minor performance bump, but it starts to
become less apparent on more complex queries.
<img width="759" alt="image" src="https://github.com/user-
attachments/assets/12e22675-e081-4284-a5ed-15d53a9c5579" />

Closes #1372
2025-04-25 23:02:42 +03:00
Pekka Enberg
2a5eb8e5bc stress: Make Clippy happy 2025-04-24 20:46:26 +03:00
Pekka Enberg
7308f6d6e8 Merge 'Bump julian_day_converter to 0.4.5' from meteorgan
The previous version of `julian_day-converter` had precision issues,
potentially causing loss of precision when converting between
`julianday` and `datetime`
![image](https://github.com/user-
attachments/assets/84042ca3-28cc-4020-a248-714df6298791)

Reviewed-by: Diego Reis (@diegoreis42)

Closes #1344
2025-04-22 10:48:36 +03:00
pedrocarlo
277f6f1083 Switch to using std::io::IsTerminal::is_terminal 2025-04-21 01:03:31 -03:00
pedrocarlo
7aaffff45f Correct for Windows 2025-04-20 18:42:01 -03:00
pedrocarlo
b550fbb3e4 Only initialize Rustyline if we are in a tty 2025-04-20 17:03:43 -03:00
Pekka Enberg
7a3fc33592 Limbo 0.0.19 2025-04-16 15:23:02 +03:00
Pekka Enberg
38dab4c184 Limbo 0.0.19-pre.5 2025-04-16 14:00:17 +03:00
meteorgan
04cb09be2a Bump julian_day_converter to 0.4.5 2025-04-14 20:57:54 +08:00
Jussi Saurio
02a2618da9 Merge 'Better diagnostics' from Pedro Muniz
On my journey of improving DX, I thought it would be a good idea to
improve a bit the Diagnostics that `miette` provides. This is the first
step to provide better errors in the CLI. I want to do better errors for
tables and columns afterwards by giving suggestions of possible names to
choose from, like we have in the Rust compiler or Clippy.
# Changed
- `Scanner` now passes its offset to Errors allowing `miette` to
correctly point to error in the sql statement.
- Some personalized help messages for `MalformedHexInteger`
- Help message for `BadNumber` printing the offending `String`
Examples:
| Before | After |
|--------|--------|
| <img width="458" alt="image" src="https://github.com/user-
attachments/assets/a9d62add-66fc-42c0-b5e9-8b1ef3c436d0" /> | <img
width="263" alt="image" src="https://github.com/user-
attachments/assets/e56af563-3225-4d7b-a303-30e5c9c38f5c" /> |
| <img width="458" alt="image" src="https://github.com/user-
attachments/assets/1f5145ee-3a1c-4616-ad0e-6459444cbb2e" /> | <img
width="277" alt="image" src="https://github.com/user-
attachments/assets/c87cba62-08af-477e-865b-fcca55ac725a" /> |
| <img width="458" alt="image" src="https://github.com/user-
attachments/assets/1601649e-5e2a-45c7-b47a-4f0830d7d78f" /> | <img
width="458" alt="image" src="https://github.com/user-
attachments/assets/9f0fef05-2f67-4b20-b8d2-bad7c44a534e" /> |
| <img width="458" alt="image" src="https://github.com/user-
attachments/assets/70b82de0-7d24-4c57-b953-333c758f6f63" /> | <img
width="458" alt="image" src="https://github.com/user-
attachments/assets/889d3654-0f91-44cf-ab8a-a01b462d3a5c" /> |

Closes #1316
2025-04-12 10:40:44 +03:00
pedrocarlo
c99c6a4be5 Activate Bench for comparison 2025-04-11 13:40:56 -03:00
alpaylan
7a8fb34004 Merge branch 'main' of https://github.com/tursodatabase/limbo 2025-04-11 11:23:24 -04:00
alpaylan
d4707fe391 add non-zero exit code in case of failures, remove the interactive initalization option in bug base for now, fix bugs in differential mode, add detailed information regarding runs to the bug base 2025-04-11 11:23:03 -04:00
dependabot[bot]
a56e6ebc7d build(deps): bump pyo3 from 0.24.0 to 0.24.1
Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.24.0 to 0.24.1.
- [Release notes](https://github.com/pyo3/pyo3/releases)
- [Changelog](https://github.com/PyO3/pyo3/blob/v0.24.1/CHANGELOG.md)
- [Commits](https://github.com/pyo3/pyo3/compare/v0.24.0...v0.24.1)

---
updated-dependencies:
- dependency-name: pyo3
  dependency-version: 0.24.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-11 07:01:07 +00:00
Pekka Enberg
2752c77cc2 Merge 'simulator: Add Bug Database(BugBase)' from Alperen Keleş
Previously, simulator used `tempfile` for storing the resulting
interaction plans, database file, seeds, and all relevant information.
This posed the problem that this information became ephemeral, and we
were not able to properly use the results of previous runs for
optimizing future runs. This PR removes the CLI option `output_dir`,
bases the storage infrastructure on top of `BugBase` interface.

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

Closes #1276
2025-04-11 09:35:09 +03:00
Pere Diaz Bou
b35d805a81 tracing lock stress 2025-04-10 16:01:24 +02:00
Pekka Enberg
207563208f stress: Add support for INSERT, DELETE, and UPDATE 2025-04-10 11:59:25 +03:00
Pekka Enberg
6aaa105321 stress: Add schema generation support 2025-04-10 11:43:32 +03:00
alpaylan
cf4f1a8719 Merge branch 'main' of https://github.com/tursodatabase/limbo 2025-04-09 14:03:38 -04:00
PThorpe92
01184ec1d7 Add tracing-appender to log traces to file asyncronously 2025-04-08 19:36:38 -04:00
alpaylan
64c2917e81 add bug base, refactor 2025-04-08 17:48:16 -04:00
pedrocarlo
fd3335908c basic autocomplete for dot commands 2025-04-04 13:01:57 -03:00
Pekka Enberg
67627e18c8 Limbo 0.0.19-pre.4 2025-04-03 13:36:01 +03:00
Pekka Enberg
4f34373392 Limbo 0.0.19-pre.3 2025-04-03 12:39:17 +03:00
Pekka Enberg
a5ee6493c0 Limbo 0.0.19-pre.2 2025-04-03 10:43:36 +03:00
Pekka Enberg
7075c75b24 Limbo 0.0.19-pre.1 2025-04-03 10:03:01 +03:00
Pekka Enberg
65ae698773 Limbo 0.0.18 2025-04-02 15:04:48 +03:00