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
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
The previous version of `julian_day-converter` had precision issues,
potentially causing loss of precision when converting between
`julianday` and `datetime`

Reviewed-by: Diego Reis (@diegoreis42)
Closes#1344
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
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
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