Commit Graph

86 Commits

Author SHA1 Message Date
PThorpe92
ef69df7258 Apply review suggestions 2025-07-30 19:42:53 -04:00
PThorpe92
88445328a5 Handle partial writes for pwritev calls in io_uring and fix JS bindings 2025-07-30 19:42:50 -04:00
PThorpe92
d189f66328 Add pwritev to wasm/js api 2025-07-30 19:42:48 -04:00
PThorpe92
2c3a9fe5ef Finish wal transaction handling and add more wal and chkpt testing 2025-07-30 14:10:10 +03:00
PThorpe92
9c75872827 Make writing wal header able to be sync 2025-07-30 14:05:18 +03:00
PThorpe92
dcf346b9b0 Update apparently very old branch to new api 2025-07-30 13:48:05 +03:00
PThorpe92
272a63b562 Fix truncate impl in JS bindings 2025-07-30 13:48:05 +03:00
Pekka Enberg
8adc807cd7 Merge 'Change function signatures to return IO Completions' from Pedro Muniz
Changes a couple of function signatures to return `Completion`. Also, I
changed `Completion` to be internally `Arc` to abstract the `Arc`
implementation detail, and to be able to attach a `#[must_use]` to the
`Completion` struct, so that cargo check can show us where we are not
tracking completions in the code. I also attached a `#[must_use]` to
`IOResult` so that we can see the places that we are not propagating or
waiting for I/O, demonstrating locations where functions should be
reentrant and are not.
Also, while we are with this refactor in progress I want to relax the
Clippy CI lint on unused_variables.

Closes #2309
2025-07-29 12:41:14 +03: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
pedrocarlo
d30c7d54c8 change all Arc<Completion> to Completion 2025-07-28 15:32:45 -03:00
pedrocarlo
7789c569a0 make Completion implementation contain an inner Arc<CompletionInner> so that we can must_use the Completion struct 2025-07-28 15:31:42 -03:00
pedrocarlo
3104e3fee5 adjust DatabaseStorage trait to return completions 2025-07-28 15:31:42 -03:00
Diego Reis
bab10909c3 Disable extension loading for wasm
We should enable it later when wasm become more mature
2025-07-28 14:49:07 -03:00
Pekka Enberg
edbbeefed5 bindings/javascript: Fix Database.close()
We need to drop reference to `turso_core::Database` for this to work.
2025-07-28 19:13:53 +03:00
Levy A.
cbb618f0ad feat(javascript): add tracing_subscriber 2025-07-27 21:24:39 -03:00
Diego Reis
0f95cf7751 bind/js: Switch to napi v3 2025-07-25 11:45:57 -03:00
Jussi Saurio
1f55726acf claude sonnet forgot to run clippy when implementing mcp server 2025-07-18 17:15:39 +03:00
Pekka Enberg
81d386d6c4 Merge 'bindings/js: support iterator, and more kinds of params' from Mikaël Francoeur
This PR fixes 3 tests that check param binding and iteration.
-----
as part of https://github.com/tursodatabase/turso/issues/1900

Closes #2097
2025-07-18 16:25:01 +03:00
pedrocarlo
dc5f73887e refactor to require Arc<Completion> in file traits so that we can delay IO calls correctly 2025-07-17 12:24:43 -03:00
Mikaël Francoeur
cf13911839 support more params format and iterable 2025-07-17 09:46:15 -04:00
Diego Reis
21882d1db3 bind/js: Fix presentation mode disabling logic 2025-07-16 15:07:12 -03:00
Mikaël Francoeur
68134fa186 support named bind parameters 2025-07-14 15:36:12 -04:00
Mikaël Francoeur
e25064959b return info object 2025-07-14 14:35:48 -04: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
Mikaël Francoeur
2a691f5044 make some errors compatible with better-sqlite3 2025-07-08 11:36:23 -04:00
pedrocarlo
711b1ef114 make all run_once be run under statement or connection so that rollback is called 2025-07-07 11:51:25 -03:00
Lucas Forato
9376ac3f13 feat: merge with main 2025-06-30 16:25:59 -03:00
Pekka Enberg
53ba3ff926 Rename limbo_core crate to turso_core 2025-06-29 09:59:17 +03:00
pedrocarlo
bac5e4b563 refactor File and Database Storage to remove Arc<Connection> and return Arc<Connection> for caller to wait for completion 2025-06-26 22:17:28 -03:00
pedrocarlo
64d9193e7b refactor Completion to have a type field and lift common is_complete property 2025-06-26 22:17:27 -03:00
Pekka Enberg
dc2e7ce942 bindings/javascript: Fix StepResult:IO handling 2025-06-26 20:42:35 +03:00
Forato
d87ab33dcd Merge branch 'main' into feat/db-open-js-impl 2025-06-26 11:34:33 -03:00
Forato
4863564213 feat: only call close if it is open 2025-06-26 10:24:18 -03: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
Forato
317d8f763c feat: add napi to open 2025-06-25 18:53:05 -03:00
Forato
897898fdbd fix: remove unused Mutex 2025-06-25 18:52:12 -03:00
Forato
7919ff032a feat: implement open in lib.rs 2025-06-25 18:45:23 -03:00
Pekka Enberg
0297773a02 bindings/javascript: Pass readonly flag to open 2025-06-25 18:59:44 +03:00
Forato
772ba761e6 bindings/javascript: implement readonly functionality 2025-06-25 18:36:52 +03:00
Diego Reis
43aa2577cd Implement size for JS and WASM storages 2025-06-24 14:41:50 -03:00
Diego Reis
f0f9ad4844 core: Get rid of maybe_init_database_file
Initialization now only occurs in the first write transaction
2025-06-24 14:41:50 -03:00
Diego Reis
9c7330c01c core: Add size method to DatabaseStorage trait 2025-06-24 14:41:49 -03:00
Nils Koch
2827b86917 chore: fix clippy warnings 2025-06-23 19:52:13 +01: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
Anton Harniakou
11ad9b8884 napi.rs: Remove codegen for transaction 2025-06-09 10:43:43 +03:00
Anton Harniakou
a3298c3ce8 make clippy happy 2025-06-09 10:43:43 +03:00
Anton Harniakou
defb2e52e8 process errors 2025-06-09 10:43:43 +03:00
Anton Harniakou
7c9c1f60d4 Implement pragma 2025-06-09 10:40:04 +03:00
Anton Harniakou
dbc5e7f15a Add simple pragma option 2025-06-09 10:40:04 +03:00