Clean up the cursor lookup code in VDBE in preparation for multi-version
cursor support.
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Closes#1090
This PR cleans up some comments in the extension API and prevents
extensions themselves from calling 'free' on Value types that are
exposed to the user facing traits, as well as changes the `from_ffi`
method for OwnedValues to take ownership and automatically free the
values to prevent memory leaks.
This PR also finds the name of the `args: &[Value]` argument for scalar
functions in extensions, and uses that in the proc macro, instead of
relying on documentation to communicate that the parameter must be named
`args`.
Closes#1054
Relatively simple one, although I notice we don't have a lot of testing
here. The extensions have all their tests in the python cli extension
tests. Do we want to keep it that way or motivate inline rust tests for
these modules?
Closes#1081
These 2 were missing from the help menu and are both pretty useful.
Noticed `.exit` is also missing, ambivalent about this one since it's
rarely needed.
Also removed all ending periods to make these consistent (sqlite uses
this punctuation style as well)
Closes#1072
### Purpose
- Do some minor nits
- Implement logic that returns updated count when running
executeUpdate
- Implement version related functions
### Reference
- https://github.com/tursodatabase/limbo/issues/615Closes#1086
Fixes [#1084](https://github.com/tursodatabase/limbo/issues/1084),
displays blobs as blob literals for the `.dump` command:
```
limbo> CREATE TABLE IF NOT EXISTS files (
id INTEGER PRIMARY KEY AUTOINCREMENT,
data BLOB
);
INSERT INTO files (data) VALUES (X'89504E470D0A1A0A0000000D49484452000000');
limbo> .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE files (id INTEGER PRIMARY KEY AUTOINCREMENT, data BLOB);
INSERT INTO files VALUES(1,X'89504e470d0a1a0a0000000d49484452000000');
COMMIT;
```
Closes#1087
This adds a "limbo_stress" tool for stress testing Limbo in
non-deterministic way together with support code to run the tests under
Antithesis (which makes them deterministic). The stress tester does not
really do anything useful yet, this is just a step to make sure we can
run tests under Antithesis.
This PR is a cleanup of stuff that I found while eating a burguer:
* `WriteInfo` now includes `BalanceInfo` to hold balance information so
that we can release it at will.
* Remove: `new_pages` and `scratch_cells`
* Once `balance_non_root` completes, it now resets state to
`BalanceStart` so that we can trigger other balance if needed. (we need
to add tests for this).
* Remove extra allocation of divider cells.
Closes#1082
This PR does the following:
1. Replaces a couple `RefCell`'s on the cursor and page stack with
`Cell` since the types implement `Copy`
2. Adds a `return_corrupt!` macro to handle the frequent error
3. Removed `Result` return type from cursor `record` method
4. Removed a couple clones and very minor refactoring (a few clippy
suggestions)
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>
Closes#1075
@PThorpe92 @penberg @jussisaurio please let me know if you want any
change, this is just a simple way for me to know if a pr is made in
core, maybe I should have a `/core/translate` and `/core/storage` too.
Closes#1068