Commit Graph

85 Commits

Author SHA1 Message Date
Nikita Sivukhin
0f1d954319 enable indices in Rust SDK 2025-08-13 16:28:45 +04:00
pedrocarlo
b6e200dbed adjust cacheflush calls outside of pager 2025-08-13 10:24:55 +03:00
Nikita Sivukhin
b612259a3a more friendly copmletely runtime agnostic turso-sync-engine crate 2025-08-06 19:26:55 +04:00
Pere Diaz Bou
2392ea1b55 bindings/rust: add with_mvcc option 2025-08-05 11:40:23 +02:00
Nikita Sivukhin
2e23230e79 extend raw WAL API with few more methods
- try_wal_watermark_read_page - try to read page from the DB with given WAL watermark value
- wal_changed_pages_after - return set of unique pages changed after watermark WAL position
2025-08-04 16:55:50 +04:00
Nikita Sivukhin
0adb40534c hind dangerous methods behind conn_raw_api feature 2025-08-04 12:40:28 +04:00
Diego Reis
8a47b9d5a4 Address PR's comments 2025-08-01 16:00:32 -03:00
Diego Reis
572d3bd4ce Simplify Rust API verbosity by implementing Row.get() and
Statement.query_row()
2025-08-01 16:00:32 -03:00
Diego Reis
adb81dd6ce Separate Row and Rows in its own file 2025-08-01 16:00:32 -03:00
pedrocarlo
543cdb3e2c underscoring completions and IOResult to avoid warning messages 2025-07-31 11:51:17 -03:00
Jussi Saurio
6e2218c3ed fix/bindings/rust: return errors instead of swallowing them and returning None 2025-07-31 11:57:17 +03:00
Pekka Enberg
2443b8db3c Merge 'bindings/rust: Add Connection::execute_batch()' from Rohith Suresh
Fixes #2184

Closes #2215
2025-07-30 10:19:03 +03:00
RS2007
282222a39f feat: execute_batch working 2025-07-29 21:24:33 +05:30
RS2007
8affc9d436 Prototyping execute_batch 2025-07-29 21:24:22 +05:30
Jussi Saurio
72bf4a714a bindings/rust: return errors instead of vibecoded numbers 2025-07-29 17:45:15 +03:00
Nikita Sivukhin
76cc8c05a5 add conversion method 2025-07-29 14:41:10 +04:00
pedrocarlo
3831e0db39 convert must_use compile warnings to unused_variables to track locations where we need to refactor in the future 2025-07-28 16:09:26 -03:00
Pekka Enberg
e2d4cbbe48 Merge 'core: Enforce shared database object per database file' from Pekka Enberg
We need to ensures that there is a single, shared `Database` object per
a database file. We need because it is not safe to have multiple
independent WAL files open because coordination happens at process-level
POSIX file advisory locks.
Fixes #2267

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #2299
2025-07-28 19:34:35 +03:00
Nikita Sivukhin
976b67a408 fix clippy 2025-07-28 17:27:52 +04:00
Nikita Sivukhin
09b18f6b6e add WAL API methods to the rust bindings and extend result of wal_insert_frame method 2025-07-28 17:20:10 +04:00
Pekka Enberg
551df4ce0d bindings/rust: Fix test_database_persistence_many_frames()
We need to make sure database connection is closed to avoid reusing he
same `Database` object.
2025-07-28 13:04:22 +03:00
RS2007
adf70dc855 Return number of rows changed from Connection.execute 2025-07-20 07:27:38 +05:30
Diego Reis
b3c8255032 Fix clippy warnings 2025-07-18 11:26:10 -03:00
Diego Reis
f9d024b68a bind/rust: Use Rusqlite compatible consumer API
Methods like commit, rollback and finish should "consume" a transaction,
so it cannot be used after calling any of them (Pretty neat, rust!)
2025-07-18 11:25:24 -03:00
Diego Reis
92cddb6437 bind/rust: Add more tests for Transaction 2025-07-18 11:25:24 -03:00
Diego Reis
0b96c24196 wip: Basic support for Transaction in Rust binding 2025-07-18 11:25:24 -03:00
Diego Reis
5dd571483f Add cacheflush to Rust binding 2025-07-16 11:08:52 -03:00
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
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
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
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
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