Reference Issue: #393
This PR implements a procedural macro derive_description that automates
the generation of a get_description method for enums. The macro extracts
documentation comments (specified with `/// Description...`) associated
with enum variants and generates an implementation that provides
optional descriptions for each variant.
Closes#528
- added Arbitrary and ArbitraryOf<T> traits for mroe centralized
generation
- implemented random generation for tables and structured queries
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>
Closes#464
Solving issue #494 , changes made at 5 places where todo macros were
replaced with relevant errors to avoid the crashes _for now_
Reviewed-by: Avinash Sajjanshetty <opensource@avi.im>
Closes#526
Rewrite `Y BETWEEN X AND Z` as `X <= Y AND Y <= Z`. And due to the
support of this optimization rule, limbo should now be able to execute
the `BETWEEN AND` statement.
Closes#490
Implements [json_array](https://sqlite.org/json1.html#jarray).
As a side quest, this PR also fixes an issue with the `CHAR` function
which didn't work properly if the parameters were non-leaf AST nodes.
The PR is quite big, because as I mentioned in https://github.com/tursod
atabase/limbo/issues/127#issuecomment-2541307979 we had to modify
`OwnedValue::Text` to support a `subtype` parameter, which is what
SQLite does.
Closes#504
This wires up checkpointing to the SQLite C API. We don't respect the
checkpointing mode because core does not have that nor do we report back
some stats.
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>
Closes#480
#479
This is my first draft for implementing `sqlite3_get_table()`, it is
highly inspired on the actual implementation found [here](https://raw.gi
thubusercontent.com/rusqlite/rusqlite/92fdc11fea0ecea6400dfcb74c1c3ca362
14a7d4/libsqlite3-sys/sqlite3/sqlite3.c), I made some basic manual
testing in `example.c` and it works fine but an extensive test suite is
recommended.
Closes#519
The only instances of the &(*x) dereferencing pattern in the codebase,
is used with Completion smart pointers. Changed it to use as_ref(). No
functional changes.
Closes#516
Somehow the `make` command does not work because of the name
mismatching. This PR will fix only this issue.
For reproducing the issue:
```
$ make
Checking requirements files...
mkdir -p .tmp
pip-compile pyproject.toml --quiet --output-file=.tmp/requirements.txt
pip-compile pyproject.toml --quiet --extra=dev --output-file=.tmp/requirements-dev.txt
diff -u requirements.txt .tmp/requirements.txt || (echo "requirements.txt doesn't match pyproject.toml" && exit 1)
--- requirements.txt 2024-12-17 02:19:29.887227723 +0000
+++ .tmp/requirements.txt 2024-12-17 02:19:38.046065295 +0000
@@ -1,2 +1,2 @@
typing-extensions==4.12.2
- # via limbo (pyproject.toml)
+ # via pylimbo (pyproject.toml)
requirements.txt doesn't match pyproject.toml
make: *** [Makefile:28: check-requirements] Error 1
```
## Another issue...
`maturin` is still not in requirements dev list. Shall we continue to
install it manually or add it to dev list?
Closes#495
This adds an interrupt() method to Statement that allows apps to
interrupt a running statement. Please note that this is different from
`sqlite3_interrupt()` which interrupts all ongoing operations in a
database. Although we want to support that too, per statement interrupt
is much more useful to apps.
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>
Closes#512
This adds an interrupt() method to Statement that allows apps to
interrupt a running statement. Please note that this is different from
`sqlite3_interrupt()` which interrupts all ongoing operations in a
database. Although we want to support that too, per statement interrupt
is much more useful to apps.
This change refactors how PRAGMA statements are handled, introducing a
more organized and extensible structure to simplify adding new PRAGMA
properties in the future.
Previously, only the `cache_size` PRAGMA was supported. With this
update, support for the `journal_mode` PRAGMA has been added.
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>
Closes#501
This change refactors how PRAGMA statements are handled, introducing a
more organized and extensible structure to simplify adding new PRAGMA
properties in the future.
Previously, only the `cache_size` PRAGMA was supported. With this
update, support for the `journal_mode` PRAGMA has been added.
This PR adds the `.tables` command. I use it a lot in sqlite and I
noticed it was missing from here so I decided to contribute.
Let me know if any changes or improvements are required.
Reviewed-by: Preston Thorpe <alpkeles99@gmail.com>
Closes#503