Commit Graph

68 Commits

Author SHA1 Message Date
Jussi Saurio
a48b6d049a Another post-rebase clippy round with 1.88.0 2025-07-12 19:10:56 +03:00
Nils Koch
1a91966c7e fix clippy errors for rust 1.88.0 (manual fix) 2025-07-12 18:58:55 +03:00
Nils Koch
828d4f5016 fix clippy errors for rust 1.88.0 (auto fix) 2025-07-12 18:58:41 +03:00
Pekka Enberg
7f91768ff6 core/translate: Unify no such table error messages
We're now mixing different error messages, which makes compatibility
testing pretty hard. Unify on a single, SQLite compatible error message
"no such table".
2025-07-07 11:10:46 +03:00
Pekka Enberg
ca990e8fd1 Revert "Merge 'Rust binding improvements' from Pedro Muniz"
This reverts commit bd60cd214c, reversing
changes made to 74e48a3a8f because it
makes limbo_stress hang.
2025-07-03 12:28:10 +03:00
Glauber Costa
bff5a440dc add a README for the rust bindings 2025-07-02 10:18:23 -05:00
pedrocarlo
b1ee556892 fix doc test 2025-06-30 15:34:10 -03:00
pedrocarlo
78107935b5 clippy 2025-06-30 15:29:09 -03:00
pedrocarlo
cd280007ff more docs 2025-06-30 15:08:48 -03:00
pedrocarlo
318c2389fd extra example using Streams mapping 2025-06-30 15:05:54 -03:00
pedrocarlo
becc0e3a93 reset statements when we are done with the query or we encounter an error 2025-06-30 15:05:27 -03:00
pedrocarlo
a4c6138e33 docs fix 2025-06-30 13:38:40 -03:00
pedrocarlo
e08748e07e make futures-util default feature + use futures in example.rs 2025-06-30 13:16:42 -03:00
pedrocarlo
a1fe46779d move rows to separate file 2025-06-30 12:38:41 -03:00
pedrocarlo
3a17e58707 separate statement to separate file 2025-06-30 12:38:41 -03:00
pedrocarlo
279a7fca3b add futures-util feature flag + impl Stream for Rows 2025-06-30 12:38:41 -03:00
Pekka Enberg
a84a755cf7 bindings/rust: Add feature flag to enable indexes 2025-06-30 12:36:20 +03:00
Pekka Enberg
592ad81c86 Rename limbo crate to turso 2025-06-29 13:07:57 +03:00
Pekka Enberg
645c0bd796 core: Add Antithesis-aware turso_assert
This adds a `turso_assert` macro that is Antithesis aware when
`antithesis` feature flag is enabled. I did not yet convert any
call-sites to use it.

Co-authored-by: Nikita Sivukhin <sivukhin@turso.tech>
2025-06-29 11:46:18 +03:00
Pekka Enberg
53ba3ff926 Rename limbo_core crate to turso_core 2025-06-29 09:59:17 +03:00
Andika Tanuwijaya
8a17158034 [rust_binding] named params 2025-06-29 02:28:06 +07:00
Pekka Enberg
2fc5c0ce5c Switch to runtime flag for enabling indexes
Makes it easier to test the feature:

```
$ cargo run --  --experimental-indexes
Limbo v0.0.22
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database
limbo> CREATE TABLE t(x);
limbo> CREATE INDEX t_idx ON t(x);
limbo> DROP INDEX t_idx;
```
2025-06-26 10:07:28 +03:00
Pekka Enberg
344eecb7ac bindings/rust: Fix RustDoc 2025-06-26 09:58:05 +03:00
Pekka Enberg
39aa7ad1b0 cargo fmt 2025-06-26 09:48:40 +03:00
Pekka Enberg
532b9cbcdb bindings/rust: API documentation 2025-06-26 09:45:58 +03:00
Pekka Enberg
2313c33015 Merge 'bindings/rust: Implement Debug for Connection' from Charlie
A simple change to implement the `Debug` trait for the `Connection`,
similar to how it is implemented for `Database`.  This should help users
in their application code with wrapping the connection.

Closes #1798
2025-06-24 16:11:54 +03:00
Nils Koch
2827b86917 chore: fix clippy warnings 2025-06-23 19:52:13 +01:00
CM-IV
3bb0374401 impl Debug for Connection 2025-06-22 11:41:07 -05:00
Pere Diaz Bou
9aecc1c903 disable constraints on stress test
without indexes constraints are useless
2025-06-18 12:45:04 +02:00
Pekka Enberg
47e08d34bf bindings/rust: Fix Rows::next() I/O dispatcher handling
The `next()` function needs to be a loop to make sure we actually return rows.
2025-06-16 14:28:08 +03:00
Pekka Enberg
90c1e3fc06 Switch Connection to use Arc instead of Rc
Connection needs to be Arc so that bindings can wrap it with `Mutex` for
multi-threading.
2025-06-16 10:43:19 +03:00
Jussi Saurio
b5ac095716 Fix off-by-one error in max_frame after WAL load 2025-05-25 19:34:51 +03:00
Jussi Saurio
6254246541 use tempfile in test 2025-05-25 10:25:52 +03:00
Jussi Saurio
208639c5ee clippy 2025-05-24 21:01:13 +03:00
Jussi Saurio
67359dc17b Add another persistence test and also assert that the data was in the WAL, not the main db 2025-05-24 20:44:47 +03:00
Jussi Saurio
1baa9c7038 Add regression test for being able to read WAL from disk 2025-05-24 18:35:53 +03:00
Diego Reis
4766c9c286 bind/rust: Fix lifetime issue with pragma_query
Shallow cloning in Row ended up invalidating the pointer
to value
2025-05-19 21:29:07 -03:00
Diego Reis
ed0e3b1ba2 bind/rust: Implement pragma_query 2025-05-19 14:04:59 -03:00
Diego Reis
72a1cd5e3c wip: pragma_query method 2025-05-18 17:39:22 -03:00
Pekka Enberg
e3f71259d8 Rename OwnedValue -> Value
We have not had enough merge conflicts for a while so let's do a
tree-wide rename.
2025-05-15 09:59:46 +03:00
Jussi Saurio
e57cea8de7 Merge 'reset statement before executing in rust binding' from Pedro Muniz
Closes #1426

Closes #1436
2025-05-03 18:34:44 +03:00
pedrocarlo
7cc190a12b reset statement before executing 2025-05-02 19:26:44 -03:00
Peter Hayman
8f366e98d5 add Row::column_count 2025-05-01 15:31:38 +10:00
Peter Hayman
29d463aa89 implement Clone for Arc<Mutex> types 2025-04-28 00:22:39 +10:00
Timo Kösters
1c82752473 feat: Statement::columns function for Rust bindings 2025-04-21 13:17:50 +02:00
Pekka Enberg
207563208f stress: Add support for INSERT, DELETE, and UPDATE 2025-04-10 11:59:25 +03:00
tsar-boomba
89c0b0b862 Implement Clone and Debug for rust binding's Database 2025-04-02 18:22:57 -07:00
Pere Diaz Bou
ee55116ca6 return row as reference to registers 2025-03-29 22:04:08 +01:00
Pere Diaz Bou
bf37fd3314 wip 2025-03-29 22:02:49 +01:00
Pere Diaz Bou
9291f60722 Introduce Register struct
OwnedValue has become a powerhouse of madness, mainly because I decided
to do it like that when I first introduced AggContext. I decided it was
enough and I introduced a `Register` struct that contains `OwnedValue`,
`Record` and `Aggregation`, this way we don't use `OwnedValue` for
everything make everyone's life harder.

This is the next step towards making ImmutableRecords the default
because I want to remove unnecessary allocations. Right now we clone
OwnedValues when we generate a record more than needed.
2025-03-27 17:53:02 +01:00