Commit graph

11019 commits

Author SHA1 Message Date
Pekka Enberg
6326417247 core/index_method: Improve error handling in toy_vector_spare_ivf.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
cafd731a61 core/storage: Improve error handling in database.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
5a3687685b core/storage: Improve error handling in page_cache.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
c4e988176c core/storage: Improve error handling in checksum.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
3d6a7e53e3 core/storage: Improve error handling in pager.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
298944304b core/storage: Improve error handling in wal.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
dea1442e7e core/storage: Eliminate unwrap() from encryption.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
6afaaf95c4 core/storage: Improve error handling in sqlite3_ondisk.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
6f95f48daf core/storage: Improve error handling in btree.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
a32e0222fb core/translate: Improve error handling in display.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
564029a693 core/translate: Improve error handling in optimizer/mod.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
e1e777b0ab core/translate: Improve error handling in schema.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
3e36641b1d core/translate: Improve error handling in index.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
d6656ea461 core/translate: Improve error handling in planner.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
3ff0e03143 core/translate: Improve error handling in constraints.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
8ad5bf4f90 core/translate: Improve error handling in insert.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
05f69b1896 core/translate: Improve error handling in main_loop.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
786decf1de core/translate: Improve error handling in expr.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
9b72189f51 core/translate: Improve error handling in emitter.rs
Eliminates few unwrap() calls.
2025-11-22 09:57:03 +02:00
Pekka Enberg
ec5915f9aa core/translate: Eliminate unwrap() calls in select.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
9581cb9601 core/translate: Replace unwrap() calls with expect() in plan.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
434cd91219 core/vdbe: Replace unwrap() calls with expect() in builder.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
12b30d6c3f core/vdbe: Eliminate unwrap() in alloc_cursor_index() 2025-11-22 09:57:03 +02:00
Pekka Enberg
d9f01bf2c7 core/functions: Improve error handling in datetime.rs
Eliminates few unwrap() calls.
2025-11-22 09:57:03 +02:00
Pekka Enberg
46feb85355 core/ext: Replace unwrap() with expect() in vtab_xconnect.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
716a6ae14c core/ext: Switch to parking_lot::Mutex
...eliminates few unwrap() calls.
2025-11-22 09:57:03 +02:00
Pekka Enberg
f3e092cac0 cli: Replace unwrap() calls with expect() in build.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
bf9c3d0489 core: Improve error handling in schema.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
a1ba0cb8ae core: Replace unwrap() calls with expect() in build.rs 2025-11-22 09:57:03 +02:00
Pekka Enberg
1c44e0182b parser: Allow unwrap() in the code
There are lots of unwrap() calls in the parser. We should fix them, but
let's just allow unwrap for now...
2025-11-22 09:57:03 +02:00
Pekka Enberg
eceaa423e6 macros: Replace unwrap() with expect() in generate_get_description() 2025-11-22 09:57:03 +02:00
Pekka Enberg
15c7581d20 macros: Eliminate unwrap() calls in derive_atomic_enum_inner() 2025-11-22 09:57:03 +02:00
Pekka Enberg
552b731a0e macros: Eliminate unwrap() in match_ignore_ascci_case() 2025-11-22 09:57:02 +02:00
Pekka Enberg
a1b74965ba Add section on error handlng to CONTRIBUTING.md 2025-11-22 09:57:02 +02:00
Pekka Enberg
eda0b6c2ff github: Disallow unwrap() in code with Clippy
...we still allow it in test code.
2025-11-22 09:57:02 +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
Some checks are pending
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
Some checks are pending
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
Pekka Enberg
23859ec6ef extensions: Replace unwrap() with expect() in generate_random_number()
Propagating the error would be even better, of course.
2025-11-21 14:11:53 +02:00