Pekka Enberg
194d43edde
Add explanation for concurrent transactions
...
Make it explicit that Turso -- like most databases -- allows a single
active transaction per connection at a time. If you need concurrency,
you need multiple connections, even with BEGIN CONCURRENT.
2025-12-06 09:44:25 +02:00
Pekka Enberg
6c74c53a36
Merge 'Kill unwrap() calls in VDBE module' from Pekka Enberg
...
Build & publish @tursodatabase/database / db-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Build & publish @tursodatabase/database / sync-bindings-aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Test DB bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Test DB bindings on browser@20 (push) Blocked by required conditions
Python / sdist (push) Waiting to run
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / test-limbo (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Closes #4014
2025-11-23 21:03:14 +02:00
Pekka Enberg
6638119792
Merge 'Tidied imports in Rust binding example without unwrap' from Dave Warnock
...
Apologies, I hadn't tidied the imports before the earlier PR. Corrected
now.
Closes #4013
2025-11-23 20:10:08 +02:00
Pekka Enberg
5716424ba3
core/vdbe: Improve error handling in mod.rs
2025-11-23 18:49:22 +02:00
Pekka Enberg
dc0ad3b745
core/vdbe: Improve error handling in value.rs
2025-11-23 18:49:22 +02:00
Pekka Enberg
e3f4cddcec
core/vdbe: Improve error handling in sorter.rs
2025-11-23 18:49:22 +02:00
Pekka Enberg
feafca1796
core/vdbe: Improve error handling in likeops.rs
2025-11-23 18:49:22 +02:00
Pekka Enberg
74f1b90301
core/vdbe: Improve error handling in insns.rs
2025-11-23 18:49:22 +02:00
Pekka Enberg
80d33c9806
core/vdbe: Improve error handling in explain.rs
2025-11-23 18:49:22 +02:00
Pekka Enberg
58c00c6816
core/vdbe: Switch to parking_lot::RwLock in sorter.rs
...
Eliminates bunch of unwrap() calls.
2025-11-23 18:41:26 +02:00
Pekka Enberg
6063cc5003
core/vdbe: Improve error handling in execute.rs
2025-11-23 18:41:26 +02:00
Pekka Enberg
5bc4f7b0de
core/vdbe: Replace unwrap() calls with expect() in builder.rs
2025-11-23 18:41:26 +02:00
Pekka Enberg
789be6762d
core/vdbe: Eliminate unwrap() in alloc_cursor_index()
2025-11-23 18:41:26 +02:00
Dave Warnock
657d03a4d4
Merge branch 'tursodatabase:main' into Rust-binding-example-without-unwrap
2025-11-23 16:35:08 +00:00
Dave Warnock
a7d56be2da
Tidied import
...
I noticed that I should have tidied the imports
2025-11-23 16:32:38 +00:00
Pekka Enberg
c59ae225ba
Merge 'Rust binding example without unwrap' from Dave Warnock
...
In line with other commits removing unwrap() I have removed the unwraps
from the rust binding example.
The main function now returns a Result so we can use ? instead of
unwrap.
I removed the double unwrap from the stmt.query, added an assert to
demonstrate that we expect to get back Some(Row)
I also added an age integer so the example shows how to use different
column types.
Closes #4012
2025-11-23 18:22:05 +02:00
Dave Warnock
970e419a8e
Merge branch 'tursodatabase:main' into Rust-binding-example-without-unwrap
2025-11-23 15:48:25 +00:00
Dave Warnock
1e5723e05a
Removed unwrap from the rust binding example
...
Refactor to remove unwrap, also added:
- an assertion to catch database failure
- an integer column to make the example a little more informative on how
to use binding
2025-11-23 15:45:15 +00:00
Pekka Enberg
6851f82cee
Merge 'Kill unwrap() calls in JSON module' from Pekka Enberg
...
Closes #4010
2025-11-23 16:36:03 +02:00
Pekka Enberg
437d790e88
core/json: Improve error handling in path.rs
2025-11-23 14:12:09 +02:00
Pekka Enberg
f02045f6b6
core/json: Improve error handling in vtab.rs
2025-11-23 14:12:09 +02:00
Pekka Enberg
d415ef3289
core/json: Improve error handling in mod.rs
2025-11-23 14:12:09 +02:00
Pekka Enberg
f46ea475d2
core/json: Improve error handling in ops.rs
2025-11-23 14:12:09 +02:00
Pekka Enberg
85a034ec82
core/json: Improve error handling in jsonb.rs
2025-11-23 14:12:09 +02:00
Pekka Enberg
c8ac128d7d
core/vdbe: Remove unnecessary parenthesis in explain.rs
...
Build & publish @tursodatabase/database / sync-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Test DB bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Test DB bindings on browser@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Build & publish @tursodatabase/database / db-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-wasm32-wasip1-threads - node@20 (push) Waiting to run
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / test-limbo (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
...come on Clippy...
2025-11-23 14:01:24 +02:00
Pekka Enberg
07df165a50
core/vdbe: Remove unnecessary cast from explain.rs
...
Let's make Clippy happy.
2025-11-23 13:50:55 +02:00
Pekka Enberg
e30589d54f
core/vdbe: Fix build errors in explain.rs
2025-11-23 13:45:45 +02:00
Pekka Enberg
5bd130a1a2
Merge 'core/index_method: Improve error handling in toy_vector_spare_ivf.rs' from Pekka Enberg
...
In preparation for #3992 that disallows the use of unwrap() altogether,
let's eliminate its use from toy_vector_spare_ivf.rs.
Closes #4006
2025-11-23 13:21:47 +02:00
Pekka Enberg
9bf6e6efd9
Merge 'use i64 for registers p1,p2,p3,p5 in EXPLAIN output' from Mikaël Francoeur
...
To avoid overflows, use i64 for p1,p2,p3,p5 in EXPLAIN output. This
matches SQLite's behaviour (https://github.com/sqlite/sqlite/blob/master
/src/vdbeaux.c#L2460-L2476).
I also changed the column type string for p4, there was a preexisting
mismatch between the value type and the explicit type string.
Closes https://github.com/tursodatabase/turso/issues/3944
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Closes #3961
2025-11-23 09:47:22 +02:00
Pekka Enberg
94cd61fb69
Merge 'bindings/java: add batching support to JDBC4PreparedStatement' from
...
# Changes
Support batching multiple DML queries in a single PreparedStatement.
### Java
- the setters of JDBC4PreparedStatement no longer bind to the underlying
native statement directly, but only store the parameter values locally
- On execution the correct set of parameters is bound to the native
statement
### Rust
- Added a helper method to retrieve the parameter count of a statement
# Reference
#615
Reviewed-by: Kim Seon Woo (@seonWKim)
Closes #3971
2025-11-23 09:45:08 +02:00
Pekka Enberg
fd25d47801
core/index_method: Improve error handling in toy_vector_spare_ivf.rs
2025-11-23 09:42:22 +02:00
Pekka Enberg
47e0eff3f6
Merge 'Kill unwrap() in macros' from Pekka Enberg
...
Rust / test-limbo (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Test DB bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Test DB bindings on browser@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Closes #4004
2025-11-22 19:21:42 +02:00
Preston Thorpe
a97081eafe
Merge 'translate/planner: Implement Index creation on arbitrary expressions' from Preston Thorpe
...
Build & publish @tursodatabase/database / db-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Test DB bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Test DB bindings on browser@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / test-limbo (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
This PR implements the functionality to create an index on an expression
instead of just a column, and makes an attempt for the planner to be
able to use these indexes.
https://sqlite.org/expridx.html
This adds the field:
`expr: Option<Box<Expr>>` to `IndexedColumn`
which is `None` for regular indexed columns.
This also adds the sentinel value `EXPR_INDEX_SENTINEL` for the
`position_in_table` field of indexed col expressions, since they are
not, actually in the table.. and similarly: `Constraint` now has the
`table_col_position` as an Option now, because it is no longer a
guarantee that it refers to a col expression.
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Closes #3990
2025-11-22 06:52:20 -05:00
Pekka Enberg
36d2dfcbad
macros: Replace unwrap() with expect() in generate_get_description()
2025-11-22 09:57:44 +02:00
Pekka Enberg
7b1b06a128
macros: Eliminate unwrap() calls in derive_atomic_enum_inner()
2025-11-22 09:57:44 +02:00
Pekka Enberg
bdbcfaa28b
macros: Eliminate unwrap() in match_ignore_ascci_case()
2025-11-22 09:57:44 +02:00
Pekka Enberg
b5c5666a49
Turso 0.4.0-pre.3
2025-11-22 09:56:18 +02:00
Pekka Enberg
bb2df133ea
Merge 'Kill unwrap in incremental module' from Pekka Enberg
...
As preparation for #3992 which prohibits use of unwrap, remove uses of
it in the incremental module.
Closes #4001
2025-11-22 09:55:35 +02:00
Jussi Saurio
06a01c4366
Merge 'mvcc: refactor RowID.row_id to be either i64 or a record' from Jussi Saurio
...
Rust / test-limbo (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Test DB bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Test DB bindings on browser@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / test-sqlite (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
to make interoperability with VDBE opcodes easier, we are going to store
versioned index rows (unlike in Hekaton). for this reason refactor
RowID.row_id to either be an i64 or an index key (record).
this lets us store a SkipMap from index key to a list of index row
versions like normal table row versions.
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>
Closes #4002
2025-11-21 22:07:15 +02:00
Jussi Saurio
c1a9f5c951
mvcc: refactor RowID.row_id to be either i64 or a record
...
to make interoperability with VDBE opcodes easier, we are going
to store versioned index rows (unlike in Hekaton). for this reason
refactor RowID.row_id to either be an i64 or an index key (record).
this lets us store a SkipMap from index key to a list of index row
versions like normal table row versions.
2025-11-21 17:05:56 +02:00
Pekka Enberg
f1401ab007
core/incremental: Improve error handling
2025-11-21 15:08:01 +02:00
Pekka Enberg
15f1619c42
Merge 'Kill unwrap() calls in extensions' from Pekka Enberg
...
Build & publish @tursodatabase/database / db-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Test DB bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Test DB bindings on browser@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / cargo-fmt-check (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust / test-limbo (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
As preparation for #3992 that actually enforces no unwraps, remove them
from extensions.
Reviewed-by: Preston Thorpe <preston@turso.tech>
Closes #4000
2025-11-21 14:19:18 +02:00
Pekka Enberg
227c979882
extensions/tests: Allow use of unwrap()
...
They're tests, it's fine.
2025-11-21 14:11:53 +02:00
Pekka Enberg
dcaf6f88d0
extensions: Replace unwrap() with expect() in fuzzy extension
2025-11-21 14:11:53 +02:00
Pekka Enberg
f044e39d43
extensions: Eliminate unwrap() in fuzzy extension
2025-11-21 14:11:53 +02:00
Pekka Enberg
cae17e7a36
extensions: Eliminate unwrap() call in csv extension
2025-11-21 14:11:53 +02:00
Pekka Enberg
deeb79c80e
extensions: Eliminate unwrap() in crypto extension
2025-11-21 14:11:53 +02:00
Pekka Enberg
eb07a5164b
extensions: Improve error handling in percentile extension
...
Eliminate unwrap() where we can, replace with expect() where we can't.
2025-11-21 14:11:53 +02:00
Pekka Enberg
96e63b4556
extensions: Replace unwrap() with expect() in get_column_names()
...
...error handling would be better here.
2025-11-21 14:11:53 +02:00
Pekka Enberg
582cc057ce
extensions: Eliminate unwrap() in IndexInfo::to_ffi()
2025-11-21 14:11:53 +02:00