Commit Graph

698 Commits

Author SHA1 Message Date
Pekka Enberg
55b5e45231 Merge 'bindings/rust: Return number of rows changed from Connection::execute()' from Rohith Suresh
Fixes #1904
This PR changes the existing behaviour of Connection.execute to not
return 0, but the number of rows that have been changed by the operation
within. The changes are:
1. Adds a getter for n_change and the execute function now returns the
n_change value
2. Integration test  to test the behaviour

Closes #1987
2025-07-20 09:49:51 +03:00
Pekka Enberg
744f636c33 Merge 'bindings/java: Make TursoDB and TursoDB factory thread-safe' from Mikaël Francoeur
This PR makes `TursoDB` and `TursoDBFactory` thread-safe. I also used
the opportunity to do some minor improvements.

Reviewed-by: Kim Seon Woo (@seonWKim)

Closes #2070
2025-07-20 09:48:53 +03:00
RS2007
adf70dc855 Return number of rows changed from Connection.execute 2025-07-20 07:27:38 +05:30
Pekka Enberg
16958f1a44 Turso 0.1.3-pre.3 2025-07-19 08:44:22 +03:00
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
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
Jussi Saurio
242301704f Merge 'bind/java: Fix Linux x86 build release' from Diego Reis
> "But it ain't about how hard ya hit. It's about how hard you can get
hit and keep moving forward."
> -- Rocky
Fix ~obviously~ wrong (my bad) Linux build.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #2143
2025-07-17 21:24:44 +03:00
Diego Reis
68ad2cf37f bind/java: Fix Linux x86 build release 2025-07-17 15:18:58 -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
b18fd83e6f call TursoDB::load from constructor 2025-07-17 10:20:21 -04:00
Mikaël Francoeur
8fe4f2163c call TursoDB::open from constructor 2025-07-17 10:12:04 -04: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
Pekka Enberg
b03b06107b Turso 0.1.3-pre.2 2025-07-16 20:08:46 +03:00
Diego Reis
5dd571483f Add cacheflush to Rust binding 2025-07-16 11:08:52 -03:00
Pekka Enberg
93634d56ba Turso 0.1.3-pre.1 2025-07-16 13:16:57 +03:00
Jussi Saurio
0ab0af912c Merge 'bindings/js: fix more tests' from Mikaël Francoeur
Six more tests passing on Turso. The commits can be reviewed separately.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #2085
2025-07-15 12:17:15 +03:00
Pekka Enberg
b7db07cf2d Turso 0.1.2 2025-07-15 11:01:25 +03:00
Mikaël Francoeur
68134fa186 support named bind parameters 2025-07-14 15:36:12 -04:00
Mikaël Francoeur
093140d84c throw on empty statement 2025-07-14 15:28:07 -04:00
Mikaël Francoeur
e25064959b return info object 2025-07-14 14:35:48 -04:00
Mikaël Francoeur
99614a3c7c support open property 2025-07-14 14:03:57 -04:00
Pekka Enberg
03d170ca05 Turso 0.1.2-pre.4 2025-07-14 13:21:41 +03:00
Pere Diaz Bou
93235bc566 io/wasm: return number read bytes 2025-07-14 10:35:55 +02:00
Mikaël Francoeur
434d1c60be only initialize DriverPropertyInfo once 2025-07-13 12:27:54 -04:00
Mikaël Francoeur
c92e9cf866 prevent double initialization in TursoDB 2025-07-13 11:47:38 -04:00
Mikaël Francoeur
e8228794c7 close statements in text and example 2025-07-13 11:47:38 -04:00
Mikaël Francoeur
d91266fdba make TursoDBFactory thread-safe 2025-07-13 11:47:38 -04:00
Mikaël Francoeur
ed736df60c add dotfiles 2025-07-13 11:43:26 -04:00
Pekka Enberg
c454feeba4 Turso 0.1.2-pre.3 2025-07-13 12:55:02 +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
Nils Koch
828d4f5016 fix clippy errors for rust 1.88.0 (auto fix) 2025-07-12 18:58:41 +03:00
Pekka Enberg
474c1bff3b Turso 0.1.2-pre.2 2025-07-10 10:10:52 +03:00
Pekka Enberg
91fff1d2b3 Merge 'bindings/python: Start transaction implicitly in execute()' from Pekka Enberg
We need to start transaction implicitly in execute() for DML statements
to make sure first transaction is actually started.
Fixes #2002

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #2013
2025-07-09 14:34:02 +03:00
Pekka Enberg
6b4dda8b9b Merge 'bindings/javascript: Improve error handling compatibility with better-sqlite3' from Mikaël Francoeur
This PR brings the error handling of the js bindings one step closer to
better-sqlite3. There is still some work left for the error handling to
be 100% compatible.
This is my first non-trivial Rust PR, so if you have any comments that
can help me improve, please leave them on the PR.
-----
as part of https://github.com/tursodatabase/turso/issues/1900

Reviewed-by: Diego Reis (@el-yawd)

Closes #2009
2025-07-09 12:16:28 +03:00
Pekka Enberg
5216e67d53 bindings/python: Start transaction implicitly in execute()
We need to start transaction implicitly in execute() for DML statements
to make sure first transaction is actually started.

Fixes #2002
2025-07-09 10:59:52 +03:00
Pekka Enberg
943793a571 Turso 0.1.2-pre.1 2025-07-09 09:27:31 +03:00
Pekka Enberg
cf47097f45 Turso v0.1.2-pre.1 2025-07-09 09:27:25 +03:00
Mikaël Francoeur
2a691f5044 make some errors compatible with better-sqlite3 2025-07-08 11:36:23 -04:00
Pekka Enberg
b895381ae6 Revert "Merge 'Reachable assertions in Antithesis Python Test for better logging' from Pedro Muniz"
This reverts commit dbbc3f5190, reversing
changes made to 1cd5a49705. We're missing
some mandatory parameters, causing these to fail under Antithesis.
2025-07-08 17:51:12 +03:00
Pere Diaz Bou
91107d364a only close connection in case of reference count is 1
Due to how `execute` is implemented, it returns a `Connection` clone
which internally shares a turso_core::Connection with every other
Connection. Since `execute` returns `Connection` and immediatly it is
dropped, it will close connection, checkpoint and leave database in
weird state.
2025-07-08 15:19:20 +02:00
Pekka Enberg
68060dabe2 Merge 'bindings/java: Implement required methods to run on JetBrains Datagrip' from Kim Seon Woo
Now, you can upload driver zar to Datagrip and use Turso database.
<img width="852" alt="image" src="https://github.com/user-
attachments/assets/27b071c3-bef7-4c4a-926d-9225de3c5a5b" />
## How to set up
### Build jar file
command: `make libs && make publish_local`
- this will build and put your jar file under `~/.m2/...`
### Register driver
![image](https://github.com/user-
attachments/assets/3420dcf6-ebda-4444-b9c4-99ed23c76917)
### Set up datasource
![image](https://github.com/user-
attachments/assets/6e87e10c-9d58-4956-8d5c-e4fc6830d83d)

Closes #1971
2025-07-08 10:23:14 +03:00
pedrocarlo
e9361c0eba add more logging to antithesis tests
format python tests
2025-07-07 19:11:55 -03: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
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