Commit Graph

229 Commits

Author SHA1 Message Date
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
Pekka Enberg
e79da7375b Limbo 0.0.18-pre.5 2025-04-02 13:38:22 +03:00
Pekka Enberg
f74a10c9c1 Limbo 0.0.18-pre.4 2025-04-02 09:30:42 +03:00
Ihor Andrianov
568dc54b9e big cleanup 2025-03-30 18:58:33 +03:00
Ihor Andrianov
303f1b3749 replace std math functions with libm for compat 2025-03-29 12:16:14 +02:00
Pekka Enberg
9ef729f81c Initial JavaScript bindings with napi-rs 2025-03-26 13:30:13 +02:00
Pere Diaz Bou
004dc374b2 bump rusqlite to 0.34 2025-03-25 14:17:31 +01:00
Pekka Enberg
669317c11e Limbo 0.18.0-pre.3 2025-03-21 20:13:00 +02:00
Pekka Enberg
26a9f24e2f Merge 'Syntax highlighting and hinting' from Pedro Muniz
Start of syntax highlighting and hinting. Still need to figure out how
to sublime-syntax works to produce good highlights.
Edit:
Personally, I believe there are more interesting syntax highlighting
possibilities with `reedline` crate, but currently, we cannot use it as
the our DB `Connection` would have to be `Send`. This PR is an
introduction and quality of life changes for the users of the CLI and
for us developers, as we now won't have to look at black and white text
only. I want to have a config file to personalize the color pallets,
that will be made in a following PR.

Closes #1101
2025-03-21 18:17:47 +02:00
Pekka Enberg
d45521a70e Limbo 0.0.18-pre.2 2025-03-20 08:45:34 +02:00
Pekka Enberg
1adbb2a462 Limbo 0.0.18-pre.1 2025-03-19 20:39:17 +02:00
Pekka Enberg
ddb39d2493 Limbo 0.0.17 2025-03-19 17:29:17 +02:00
Pekka Enberg
a81ed4a523 bindings/python: Update PyO3 dependency to 0.24.0 2025-03-17 10:58:33 +02:00
Pedro Muniz
fdddb32ecf Merge branch 'main' into syntax-high 2025-03-13 23:04:07 -03:00
PThorpe92
b306cd416d Add debug logging to testing vfs extension 2025-03-12 21:52:52 -04:00
PThorpe92
216a8e7848 Update getrandom dependency in ext api crate 2025-03-12 21:52:52 -04:00
PThorpe92
8e2c9367c0 add missing method to add builtin vfs to ext api 2025-03-12 21:52:51 -04:00
PThorpe92
35fc9df275 Rename and combine testing extension crate 2025-03-12 21:52:51 -04:00
PThorpe92
20f92fdacf Define API for vfs modules extensions 2025-03-12 21:52:50 -04:00
Pere Diaz Bou
deaff6c1ec Fix detachment of nodes in lru cache. 2025-03-12 15:48:22 +01:00