pyturso 0.3.0rc3__tar.gz → 0.3.0rc4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyturso might be problematic. Click here for more details.
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/Cargo.lock +49 -31
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/Cargo.toml +18 -18
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/PKG-INFO +1 -1
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/Cargo.toml +4 -5
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/benches/benchmark.rs +113 -1
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/incremental/compiler.rs +3 -16
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/incremental/cursor.rs +5 -9
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/incremental/operator.rs +80 -115
- pyturso-0.3.0rc3/core/io/mod.rs → pyturso-0.3.0rc4/core/io/completions.rs +16 -327
- pyturso-0.3.0rc4/core/io/mod.rs +328 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/mvcc/cursor.rs +81 -26
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/mvcc/database/checkpoint_state_machine.rs +2 -7
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/mvcc/database/mod.rs +0 -1
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/mvcc/database/tests.rs +5 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/mvcc/persistent_storage/logical_log.rs +2 -2
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/schema.rs +62 -3
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/storage/btree.rs +47 -162
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/storage/buffer_pool.rs +4 -4
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/storage/encryption.rs +19 -19
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/storage/slot_bitmap.rs +9 -7
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/storage/sqlite3_ondisk.rs +1 -1
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/storage/wal.rs +218 -196
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/expr.rs +10 -12
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/util.rs +33 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vdbe/execute.rs +340 -131
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vector/mod.rs +2 -2
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vector/operations/concat.rs +14 -12
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vector/operations/convert.rs +12 -8
- pyturso-0.3.0rc4/core/vector/operations/distance_cos.rs +217 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vector/operations/distance_l2.rs +74 -21
- pyturso-0.3.0rc4/core/vector/operations/serialize.rs +22 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vector/operations/slice.rs +9 -5
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vector/operations/text.rs +11 -7
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vector/vector_types.rs +78 -33
- pyturso-0.3.0rc4/parser/src/error.rs +108 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/parser/src/lexer.rs +125 -33
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/parser/src/parser.rs +32 -4
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/parser/src/token.rs +43 -0
- pyturso-0.3.0rc3/core/vector/operations/distance_cos.rs +0 -172
- pyturso-0.3.0rc3/core/vector/operations/serialize.rs +0 -19
- pyturso-0.3.0rc3/parser/src/error.rs +0 -52
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/bindings/python/Cargo.toml +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/bindings/python/build.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/bindings/python/example.py +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/bindings/python/requirements-dev.txt +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/bindings/python/requirements.txt +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/bindings/python/src/errors.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/bindings/python/src/lib.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/bindings/python/tests/__init__.py +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/bindings/python/tests/test_database.py +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/bindings/python/turso/__init__.py +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/bindings/python/turso/py.typed +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/assert.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/benches/json_benchmark.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/benches/mvcc_benchmark.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/benches/tpc_h_benchmark.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/build.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/error.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/ext/dynamic.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/ext/mod.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/ext/vtab_xconnect.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/fast_lock.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/function.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/functions/datetime.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/functions/mod.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/functions/printf.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/functions/strftime.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/incremental/aggregate_operator.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/incremental/dbsp.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/incremental/expr_compiler.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/incremental/filter_operator.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/incremental/input_operator.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/incremental/join_operator.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/incremental/merge_operator.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/incremental/mod.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/incremental/persistence.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/incremental/project_operator.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/incremental/view.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/info.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/io/clock.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/io/common.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/io/generic.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/io/io_uring.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/io/memory.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/io/unix.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/io/vfs.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/io/windows.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/json/cache.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/json/error.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/json/jsonb.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/json/mod.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/json/ops.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/json/path.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/json/vtab.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/lib.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/mvcc/clock.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/mvcc/mod.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/mvcc/persistent_storage/mod.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/numeric/mod.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/numeric/nonnan.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/parameters.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/pragma.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/pseudo.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/series.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/state_machine.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/storage/checksum.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/storage/database.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/storage/mod.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/storage/page_cache.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/storage/pager.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/storage/state_machines.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/time/internal.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/time/mod.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/aggregation.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/alter.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/analyze.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/attach.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/collate.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/compound_select.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/delete.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/display.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/emitter.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/fkeys.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/group_by.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/index.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/insert.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/integrity_check.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/logical.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/main_loop.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/mod.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/optimizer/OPTIMIZER.md +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/optimizer/access_method.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/optimizer/constraints.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/optimizer/cost.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/optimizer/join.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/optimizer/lift_common_subexpressions.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/optimizer/mod.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/optimizer/order.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/order_by.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/plan.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/planner.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/pragma.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/result_row.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/rollback.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/schema.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/select.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/subquery.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/transaction.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/update.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/upsert.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/values.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/view.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/translate/window.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/types.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/uuid.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vdbe/builder.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vdbe/explain.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vdbe/insn.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vdbe/likeop.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vdbe/metrics.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vdbe/mod.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vdbe/sorter.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vector/operations/jaccard.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vector/operations/mod.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/core/vtab.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/extensions/core/Cargo.toml +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/extensions/core/README.md +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/extensions/core/build.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/extensions/core/src/functions.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/extensions/core/src/lib.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/extensions/core/src/types.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/extensions/core/src/vfs_modules.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/extensions/core/src/vtabs.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/macros/Cargo.toml +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/macros/src/ext/agg_derive.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/macros/src/ext/match_ignore_ascii_case.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/macros/src/ext/mod.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/macros/src/ext/scalars.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/macros/src/ext/vfs_derive.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/macros/src/ext/vtab_derive.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/macros/src/lib.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/parser/Cargo.toml +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/parser/README.md +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/parser/benches/parser_benchmark.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/parser/src/ast/check.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/parser/src/ast/fmt.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/parser/src/ast.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/parser/src/lib.rs +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/pyproject.toml +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/turso/__init__.py +0 -0
- {pyturso-0.3.0rc3 → pyturso-0.3.0rc4}/turso/py.typed +0 -0
|
@@ -523,10 +523,11 @@ dependencies = [
|
|
|
523
523
|
|
|
524
524
|
[[package]]
|
|
525
525
|
name = "cc"
|
|
526
|
-
version = "1.2.
|
|
526
|
+
version = "1.2.41"
|
|
527
527
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
528
|
-
checksum = "
|
|
528
|
+
checksum = "ac9fe6cdbb24b6ade63616c0a0688e45bb56732262c158df3c0c4bea4ca47cb7"
|
|
529
529
|
dependencies = [
|
|
530
|
+
"find-msvc-tools",
|
|
530
531
|
"jobserver",
|
|
531
532
|
"libc",
|
|
532
533
|
"shlex",
|
|
@@ -821,7 +822,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
|
|
821
822
|
|
|
822
823
|
[[package]]
|
|
823
824
|
name = "core_tester"
|
|
824
|
-
version = "0.3.0-pre.
|
|
825
|
+
version = "0.3.0-pre.4"
|
|
825
826
|
dependencies = [
|
|
826
827
|
"anyhow",
|
|
827
828
|
"assert_cmd",
|
|
@@ -831,6 +832,7 @@ dependencies = [
|
|
|
831
832
|
"rand 0.9.2",
|
|
832
833
|
"rand_chacha 0.9.0",
|
|
833
834
|
"rusqlite",
|
|
835
|
+
"sql_generation",
|
|
834
836
|
"tempfile",
|
|
835
837
|
"test-log",
|
|
836
838
|
"tokio",
|
|
@@ -838,6 +840,7 @@ dependencies = [
|
|
|
838
840
|
"tracing-subscriber",
|
|
839
841
|
"turso",
|
|
840
842
|
"turso_core",
|
|
843
|
+
"turso_parser",
|
|
841
844
|
"twox-hash",
|
|
842
845
|
"zerocopy 0.8.26",
|
|
843
846
|
]
|
|
@@ -1502,6 +1505,12 @@ dependencies = [
|
|
|
1502
1505
|
"windows-sys 0.59.0",
|
|
1503
1506
|
]
|
|
1504
1507
|
|
|
1508
|
+
[[package]]
|
|
1509
|
+
name = "find-msvc-tools"
|
|
1510
|
+
version = "0.1.4"
|
|
1511
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1512
|
+
checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127"
|
|
1513
|
+
|
|
1505
1514
|
[[package]]
|
|
1506
1515
|
name = "findshlibs"
|
|
1507
1516
|
version = "0.10.2"
|
|
@@ -2539,7 +2548,7 @@ dependencies = [
|
|
|
2539
2548
|
|
|
2540
2549
|
[[package]]
|
|
2541
2550
|
name = "limbo_completion"
|
|
2542
|
-
version = "0.3.0-pre.
|
|
2551
|
+
version = "0.3.0-pre.4"
|
|
2543
2552
|
dependencies = [
|
|
2544
2553
|
"mimalloc",
|
|
2545
2554
|
"turso_ext",
|
|
@@ -2547,7 +2556,7 @@ dependencies = [
|
|
|
2547
2556
|
|
|
2548
2557
|
[[package]]
|
|
2549
2558
|
name = "limbo_crypto"
|
|
2550
|
-
version = "0.3.0-pre.
|
|
2559
|
+
version = "0.3.0-pre.4"
|
|
2551
2560
|
dependencies = [
|
|
2552
2561
|
"blake3",
|
|
2553
2562
|
"data-encoding",
|
|
@@ -2560,7 +2569,7 @@ dependencies = [
|
|
|
2560
2569
|
|
|
2561
2570
|
[[package]]
|
|
2562
2571
|
name = "limbo_csv"
|
|
2563
|
-
version = "0.3.0-pre.
|
|
2572
|
+
version = "0.3.0-pre.4"
|
|
2564
2573
|
dependencies = [
|
|
2565
2574
|
"csv",
|
|
2566
2575
|
"mimalloc",
|
|
@@ -2570,7 +2579,7 @@ dependencies = [
|
|
|
2570
2579
|
|
|
2571
2580
|
[[package]]
|
|
2572
2581
|
name = "limbo_fuzzy"
|
|
2573
|
-
version = "0.3.0-pre.
|
|
2582
|
+
version = "0.3.0-pre.4"
|
|
2574
2583
|
dependencies = [
|
|
2575
2584
|
"mimalloc",
|
|
2576
2585
|
"turso_ext",
|
|
@@ -2578,7 +2587,7 @@ dependencies = [
|
|
|
2578
2587
|
|
|
2579
2588
|
[[package]]
|
|
2580
2589
|
name = "limbo_ipaddr"
|
|
2581
|
-
version = "0.3.0-pre.
|
|
2590
|
+
version = "0.3.0-pre.4"
|
|
2582
2591
|
dependencies = [
|
|
2583
2592
|
"ipnetwork",
|
|
2584
2593
|
"mimalloc",
|
|
@@ -2587,7 +2596,7 @@ dependencies = [
|
|
|
2587
2596
|
|
|
2588
2597
|
[[package]]
|
|
2589
2598
|
name = "limbo_percentile"
|
|
2590
|
-
version = "0.3.0-pre.
|
|
2599
|
+
version = "0.3.0-pre.4"
|
|
2591
2600
|
dependencies = [
|
|
2592
2601
|
"mimalloc",
|
|
2593
2602
|
"turso_ext",
|
|
@@ -2595,7 +2604,7 @@ dependencies = [
|
|
|
2595
2604
|
|
|
2596
2605
|
[[package]]
|
|
2597
2606
|
name = "limbo_regexp"
|
|
2598
|
-
version = "0.3.0-pre.
|
|
2607
|
+
version = "0.3.0-pre.4"
|
|
2599
2608
|
dependencies = [
|
|
2600
2609
|
"mimalloc",
|
|
2601
2610
|
"regex",
|
|
@@ -2604,7 +2613,7 @@ dependencies = [
|
|
|
2604
2613
|
|
|
2605
2614
|
[[package]]
|
|
2606
2615
|
name = "limbo_sim"
|
|
2607
|
-
version = "0.3.0-pre.
|
|
2616
|
+
version = "0.3.0-pre.4"
|
|
2608
2617
|
dependencies = [
|
|
2609
2618
|
"anyhow",
|
|
2610
2619
|
"bitflags 2.9.4",
|
|
@@ -2640,7 +2649,7 @@ dependencies = [
|
|
|
2640
2649
|
|
|
2641
2650
|
[[package]]
|
|
2642
2651
|
name = "limbo_sqlite_test_ext"
|
|
2643
|
-
version = "0.3.0-pre.
|
|
2652
|
+
version = "0.3.0-pre.4"
|
|
2644
2653
|
dependencies = [
|
|
2645
2654
|
"cc",
|
|
2646
2655
|
]
|
|
@@ -3456,7 +3465,7 @@ dependencies = [
|
|
|
3456
3465
|
|
|
3457
3466
|
[[package]]
|
|
3458
3467
|
name = "py-turso"
|
|
3459
|
-
version = "0.3.0-pre.
|
|
3468
|
+
version = "0.3.0-pre.4"
|
|
3460
3469
|
dependencies = [
|
|
3461
3470
|
"anyhow",
|
|
3462
3471
|
"pyo3",
|
|
@@ -4141,6 +4150,15 @@ dependencies = [
|
|
|
4141
4150
|
"similar",
|
|
4142
4151
|
]
|
|
4143
4152
|
|
|
4153
|
+
[[package]]
|
|
4154
|
+
name = "simsimd"
|
|
4155
|
+
version = "6.5.3"
|
|
4156
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4157
|
+
checksum = "0e3f209c5a8155b8458b1a0d3a6fc9fa09d201e6086fdaae18e9e283b9274f8f"
|
|
4158
|
+
dependencies = [
|
|
4159
|
+
"cc",
|
|
4160
|
+
]
|
|
4161
|
+
|
|
4144
4162
|
[[package]]
|
|
4145
4163
|
name = "slab"
|
|
4146
4164
|
version = "0.4.9"
|
|
@@ -4193,7 +4211,7 @@ checksum = "d372029cb5195f9ab4e4b9aef550787dce78b124fcaee8d82519925defcd6f0d"
|
|
|
4193
4211
|
|
|
4194
4212
|
[[package]]
|
|
4195
4213
|
name = "sql_generation"
|
|
4196
|
-
version = "0.3.0-pre.
|
|
4214
|
+
version = "0.3.0-pre.4"
|
|
4197
4215
|
dependencies = [
|
|
4198
4216
|
"anarchist-readable-name-generator-lib 0.2.0",
|
|
4199
4217
|
"anyhow",
|
|
@@ -4821,7 +4839,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
|
|
4821
4839
|
|
|
4822
4840
|
[[package]]
|
|
4823
4841
|
name = "turso"
|
|
4824
|
-
version = "0.3.0-pre.
|
|
4842
|
+
version = "0.3.0-pre.4"
|
|
4825
4843
|
dependencies = [
|
|
4826
4844
|
"rand 0.9.2",
|
|
4827
4845
|
"rand_chacha 0.9.0",
|
|
@@ -4835,7 +4853,7 @@ dependencies = [
|
|
|
4835
4853
|
|
|
4836
4854
|
[[package]]
|
|
4837
4855
|
name = "turso-java"
|
|
4838
|
-
version = "0.3.0-pre.
|
|
4856
|
+
version = "0.3.0-pre.4"
|
|
4839
4857
|
dependencies = [
|
|
4840
4858
|
"jni",
|
|
4841
4859
|
"thiserror 2.0.16",
|
|
@@ -4844,7 +4862,7 @@ dependencies = [
|
|
|
4844
4862
|
|
|
4845
4863
|
[[package]]
|
|
4846
4864
|
name = "turso_cli"
|
|
4847
|
-
version = "0.3.0-pre.
|
|
4865
|
+
version = "0.3.0-pre.4"
|
|
4848
4866
|
dependencies = [
|
|
4849
4867
|
"anyhow",
|
|
4850
4868
|
"cfg-if",
|
|
@@ -4880,7 +4898,7 @@ dependencies = [
|
|
|
4880
4898
|
|
|
4881
4899
|
[[package]]
|
|
4882
4900
|
name = "turso_core"
|
|
4883
|
-
version = "0.3.0-pre.
|
|
4901
|
+
version = "0.3.0-pre.4"
|
|
4884
4902
|
dependencies = [
|
|
4885
4903
|
"aegis",
|
|
4886
4904
|
"aes",
|
|
@@ -4895,7 +4913,6 @@ dependencies = [
|
|
|
4895
4913
|
"crossbeam-skiplist",
|
|
4896
4914
|
"env_logger 0.11.7",
|
|
4897
4915
|
"fallible-iterator",
|
|
4898
|
-
"getrandom 0.2.15",
|
|
4899
4916
|
"hex",
|
|
4900
4917
|
"intrusive-collections",
|
|
4901
4918
|
"io-uring",
|
|
@@ -4913,7 +4930,7 @@ dependencies = [
|
|
|
4913
4930
|
"pprof",
|
|
4914
4931
|
"quickcheck",
|
|
4915
4932
|
"quickcheck_macros",
|
|
4916
|
-
"rand 0.
|
|
4933
|
+
"rand 0.9.2",
|
|
4917
4934
|
"rand_chacha 0.9.0",
|
|
4918
4935
|
"regex",
|
|
4919
4936
|
"regex-syntax",
|
|
@@ -4923,6 +4940,7 @@ dependencies = [
|
|
|
4923
4940
|
"rustix 1.0.7",
|
|
4924
4941
|
"ryu",
|
|
4925
4942
|
"serde",
|
|
4943
|
+
"simsimd",
|
|
4926
4944
|
"sorted-vec",
|
|
4927
4945
|
"strum",
|
|
4928
4946
|
"strum_macros",
|
|
@@ -4940,7 +4958,7 @@ dependencies = [
|
|
|
4940
4958
|
|
|
4941
4959
|
[[package]]
|
|
4942
4960
|
name = "turso_dart"
|
|
4943
|
-
version = "0.3.0-pre.
|
|
4961
|
+
version = "0.3.0-pre.4"
|
|
4944
4962
|
dependencies = [
|
|
4945
4963
|
"flutter_rust_bridge",
|
|
4946
4964
|
"turso_core",
|
|
@@ -4948,7 +4966,7 @@ dependencies = [
|
|
|
4948
4966
|
|
|
4949
4967
|
[[package]]
|
|
4950
4968
|
name = "turso_ext"
|
|
4951
|
-
version = "0.3.0-pre.
|
|
4969
|
+
version = "0.3.0-pre.4"
|
|
4952
4970
|
dependencies = [
|
|
4953
4971
|
"chrono",
|
|
4954
4972
|
"getrandom 0.3.2",
|
|
@@ -4957,7 +4975,7 @@ dependencies = [
|
|
|
4957
4975
|
|
|
4958
4976
|
[[package]]
|
|
4959
4977
|
name = "turso_ext_tests"
|
|
4960
|
-
version = "0.3.0-pre.
|
|
4978
|
+
version = "0.3.0-pre.4"
|
|
4961
4979
|
dependencies = [
|
|
4962
4980
|
"env_logger 0.11.7",
|
|
4963
4981
|
"lazy_static",
|
|
@@ -4968,7 +4986,7 @@ dependencies = [
|
|
|
4968
4986
|
|
|
4969
4987
|
[[package]]
|
|
4970
4988
|
name = "turso_macros"
|
|
4971
|
-
version = "0.3.0-pre.
|
|
4989
|
+
version = "0.3.0-pre.4"
|
|
4972
4990
|
dependencies = [
|
|
4973
4991
|
"proc-macro2",
|
|
4974
4992
|
"quote",
|
|
@@ -4977,7 +4995,7 @@ dependencies = [
|
|
|
4977
4995
|
|
|
4978
4996
|
[[package]]
|
|
4979
4997
|
name = "turso_node"
|
|
4980
|
-
version = "0.3.0-pre.
|
|
4998
|
+
version = "0.3.0-pre.4"
|
|
4981
4999
|
dependencies = [
|
|
4982
5000
|
"chrono",
|
|
4983
5001
|
"napi",
|
|
@@ -4990,7 +5008,7 @@ dependencies = [
|
|
|
4990
5008
|
|
|
4991
5009
|
[[package]]
|
|
4992
5010
|
name = "turso_parser"
|
|
4993
|
-
version = "0.3.0-pre.
|
|
5011
|
+
version = "0.3.0-pre.4"
|
|
4994
5012
|
dependencies = [
|
|
4995
5013
|
"bitflags 2.9.4",
|
|
4996
5014
|
"criterion",
|
|
@@ -5006,7 +5024,7 @@ dependencies = [
|
|
|
5006
5024
|
|
|
5007
5025
|
[[package]]
|
|
5008
5026
|
name = "turso_sqlite3"
|
|
5009
|
-
version = "0.3.0-pre.
|
|
5027
|
+
version = "0.3.0-pre.4"
|
|
5010
5028
|
dependencies = [
|
|
5011
5029
|
"env_logger 0.11.7",
|
|
5012
5030
|
"libc",
|
|
@@ -5019,7 +5037,7 @@ dependencies = [
|
|
|
5019
5037
|
|
|
5020
5038
|
[[package]]
|
|
5021
5039
|
name = "turso_stress"
|
|
5022
|
-
version = "0.3.0-pre.
|
|
5040
|
+
version = "0.3.0-pre.4"
|
|
5023
5041
|
dependencies = [
|
|
5024
5042
|
"anarchist-readable-name-generator-lib 0.1.2",
|
|
5025
5043
|
"antithesis_sdk",
|
|
@@ -5036,7 +5054,7 @@ dependencies = [
|
|
|
5036
5054
|
|
|
5037
5055
|
[[package]]
|
|
5038
5056
|
name = "turso_sync_engine"
|
|
5039
|
-
version = "0.3.0-pre.
|
|
5057
|
+
version = "0.3.0-pre.4"
|
|
5040
5058
|
dependencies = [
|
|
5041
5059
|
"base64 0.22.1",
|
|
5042
5060
|
"bytes",
|
|
@@ -5063,7 +5081,7 @@ dependencies = [
|
|
|
5063
5081
|
|
|
5064
5082
|
[[package]]
|
|
5065
5083
|
name = "turso_sync_js"
|
|
5066
|
-
version = "0.3.0-pre.
|
|
5084
|
+
version = "0.3.0-pre.4"
|
|
5067
5085
|
dependencies = [
|
|
5068
5086
|
"genawaiter",
|
|
5069
5087
|
"napi",
|
|
@@ -5078,7 +5096,7 @@ dependencies = [
|
|
|
5078
5096
|
|
|
5079
5097
|
[[package]]
|
|
5080
5098
|
name = "turso_whopper"
|
|
5081
|
-
version = "0.3.0-pre.
|
|
5099
|
+
version = "0.3.0-pre.4"
|
|
5082
5100
|
dependencies = [
|
|
5083
5101
|
"anyhow",
|
|
5084
5102
|
"clap",
|
|
@@ -8,29 +8,29 @@ exclude = [
|
|
|
8
8
|
]
|
|
9
9
|
|
|
10
10
|
[workspace.package]
|
|
11
|
-
version = "0.3.0-pre.
|
|
11
|
+
version = "0.3.0-pre.4"
|
|
12
12
|
authors = ["the Limbo authors"]
|
|
13
13
|
edition = "2021"
|
|
14
14
|
license = "MIT"
|
|
15
15
|
repository = "https://github.com/tursodatabase/turso"
|
|
16
16
|
|
|
17
17
|
[workspace.dependencies]
|
|
18
|
-
turso = { path = "bindings/rust", version = "0.3.0-pre.
|
|
19
|
-
turso_node = { path = "bindings/javascript", version = "0.3.0-pre.
|
|
20
|
-
limbo_completion = { path = "extensions/completion", version = "0.3.0-pre.
|
|
21
|
-
turso_core = { path = "core", version = "0.3.0-pre.
|
|
22
|
-
turso_sync_engine = { path = "sync/engine", version = "0.3.0-pre.
|
|
23
|
-
limbo_crypto = { path = "extensions/crypto", version = "0.3.0-pre.
|
|
24
|
-
limbo_csv = { path = "extensions/csv", version = "0.3.0-pre.
|
|
25
|
-
turso_ext = { path = "extensions/core", version = "0.3.0-pre.
|
|
26
|
-
turso_ext_tests = { path = "extensions/tests", version = "0.3.0-pre.
|
|
27
|
-
limbo_ipaddr = { path = "extensions/ipaddr", version = "0.3.0-pre.
|
|
28
|
-
turso_macros = { path = "macros", version = "0.3.0-pre.
|
|
29
|
-
limbo_percentile = { path = "extensions/percentile", version = "0.3.0-pre.
|
|
30
|
-
limbo_regexp = { path = "extensions/regexp", version = "0.3.0-pre.
|
|
31
|
-
limbo_uuid = { path = "extensions/uuid", version = "0.3.0-pre.
|
|
32
|
-
turso_parser = { path = "parser", version = "0.3.0-pre.
|
|
33
|
-
limbo_fuzzy = { path = "extensions/fuzzy", version = "0.3.0-pre.
|
|
18
|
+
turso = { path = "bindings/rust", version = "0.3.0-pre.4" }
|
|
19
|
+
turso_node = { path = "bindings/javascript", version = "0.3.0-pre.4" }
|
|
20
|
+
limbo_completion = { path = "extensions/completion", version = "0.3.0-pre.4" }
|
|
21
|
+
turso_core = { path = "core", version = "0.3.0-pre.4" }
|
|
22
|
+
turso_sync_engine = { path = "sync/engine", version = "0.3.0-pre.4" }
|
|
23
|
+
limbo_crypto = { path = "extensions/crypto", version = "0.3.0-pre.4" }
|
|
24
|
+
limbo_csv = { path = "extensions/csv", version = "0.3.0-pre.4" }
|
|
25
|
+
turso_ext = { path = "extensions/core", version = "0.3.0-pre.4" }
|
|
26
|
+
turso_ext_tests = { path = "extensions/tests", version = "0.3.0-pre.4" }
|
|
27
|
+
limbo_ipaddr = { path = "extensions/ipaddr", version = "0.3.0-pre.4" }
|
|
28
|
+
turso_macros = { path = "macros", version = "0.3.0-pre.4" }
|
|
29
|
+
limbo_percentile = { path = "extensions/percentile", version = "0.3.0-pre.4" }
|
|
30
|
+
limbo_regexp = { path = "extensions/regexp", version = "0.3.0-pre.4" }
|
|
31
|
+
limbo_uuid = { path = "extensions/uuid", version = "0.3.0-pre.4" }
|
|
32
|
+
turso_parser = { path = "parser", version = "0.3.0-pre.4" }
|
|
33
|
+
limbo_fuzzy = { path = "extensions/fuzzy", version = "0.3.0-pre.4" }
|
|
34
34
|
sql_generation = { path = "sql_generation" }
|
|
35
35
|
strum = { version = "0.26", features = ["derive"] }
|
|
36
36
|
strum_macros = "0.26"
|
|
@@ -59,7 +59,7 @@ fallible-iterator = "0.3.0"
|
|
|
59
59
|
criterion = "0.5"
|
|
60
60
|
chrono = { version = "0.4.42", default-features = false }
|
|
61
61
|
hex = "0.4"
|
|
62
|
-
antithesis_sdk = "0.2"
|
|
62
|
+
antithesis_sdk = { version = "0.2", default-features = false }
|
|
63
63
|
cfg-if = "1.0.0"
|
|
64
64
|
tracing-appender = "0.2.3"
|
|
65
65
|
env_logger = { version = "0.11.6", default-features = false }
|
|
@@ -15,7 +15,7 @@ path = "lib.rs"
|
|
|
15
15
|
|
|
16
16
|
[features]
|
|
17
17
|
default = ["fs", "uuid", "time", "json", "series", "encryption"]
|
|
18
|
-
antithesis = ["dep:antithesis_sdk"]
|
|
18
|
+
antithesis = ["dep:antithesis_sdk", "antithesis_sdk?/full"]
|
|
19
19
|
tracing_release = ["tracing/release_max_level_info"]
|
|
20
20
|
conn_raw_api = []
|
|
21
21
|
fs = ["turso_ext/vfs"]
|
|
@@ -52,14 +52,13 @@ cfg_block = "0.1.1"
|
|
|
52
52
|
fallible-iterator = { workspace = true }
|
|
53
53
|
hex = { workspace = true }
|
|
54
54
|
thiserror = { workspace = true }
|
|
55
|
-
getrandom = { version = "0.2.15" }
|
|
56
55
|
regex = { workspace = true }
|
|
57
56
|
regex-syntax = { workspace = true, default-features = false, features = [
|
|
58
57
|
"unicode",
|
|
59
58
|
] }
|
|
60
59
|
chrono = { workspace = true, default-features = false, features = ["clock"] }
|
|
61
60
|
julian_day_converter = "0.4.5"
|
|
62
|
-
rand =
|
|
61
|
+
rand = { workspace = true }
|
|
63
62
|
libm = "0.2"
|
|
64
63
|
turso_macros = { workspace = true }
|
|
65
64
|
miette = { workspace = true }
|
|
@@ -84,6 +83,7 @@ aegis = "0.9.0"
|
|
|
84
83
|
twox-hash = "2.1.1"
|
|
85
84
|
intrusive-collections = "0.9.7"
|
|
86
85
|
roaring = "0.11.2"
|
|
86
|
+
simsimd = "6.5.3"
|
|
87
87
|
|
|
88
88
|
[build-dependencies]
|
|
89
89
|
chrono = { workspace = true, default-features = false }
|
|
@@ -100,10 +100,9 @@ criterion = { workspace = true, features = [
|
|
|
100
100
|
"async_futures",
|
|
101
101
|
] }
|
|
102
102
|
rstest = "0.18.2"
|
|
103
|
-
rusqlite
|
|
103
|
+
rusqlite = { workspace = true, features = ["series"] }
|
|
104
104
|
quickcheck = { version = "1.0", default-features = false }
|
|
105
105
|
quickcheck_macros = { version = "1.0", default-features = false }
|
|
106
|
-
rand = "0.8.5" # Required for quickcheck
|
|
107
106
|
rand_chacha = { workspace = true }
|
|
108
107
|
env_logger = { workspace = true }
|
|
109
108
|
test-log = { version = "0.2.17", features = ["trace"] }
|
|
@@ -2,6 +2,7 @@ use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criteri
|
|
|
2
2
|
use pprof::criterion::{Output, PProfProfiler};
|
|
3
3
|
use regex::Regex;
|
|
4
4
|
use std::{sync::Arc, time::Instant};
|
|
5
|
+
use tempfile::TempDir;
|
|
5
6
|
use turso_core::{Database, LimboError, PlatformIO, StepResult};
|
|
6
7
|
|
|
7
8
|
#[cfg(not(target_family = "wasm"))]
|
|
@@ -16,6 +17,36 @@ fn rusqlite_open() -> rusqlite::Connection {
|
|
|
16
17
|
sqlite_conn
|
|
17
18
|
}
|
|
18
19
|
|
|
20
|
+
fn setup_rusqlite(temp_dir: &TempDir, query: &str) -> rusqlite::Connection {
|
|
21
|
+
let db_path = temp_dir.path().join("bench.db");
|
|
22
|
+
let sqlite_conn = rusqlite::Connection::open(db_path).unwrap();
|
|
23
|
+
sqlite_conn
|
|
24
|
+
.pragma_update(None, "synchronous", "FULL")
|
|
25
|
+
.unwrap();
|
|
26
|
+
sqlite_conn
|
|
27
|
+
.pragma_update(None, "journal_mode", "WAL")
|
|
28
|
+
.unwrap();
|
|
29
|
+
sqlite_conn
|
|
30
|
+
.pragma_update(None, "locking_mode", "EXCLUSIVE")
|
|
31
|
+
.unwrap();
|
|
32
|
+
let journal_mode = sqlite_conn
|
|
33
|
+
.pragma_query_value(None, "journal_mode", |row| row.get::<_, String>(0))
|
|
34
|
+
.unwrap();
|
|
35
|
+
assert_eq!(journal_mode.to_lowercase(), "wal");
|
|
36
|
+
let synchronous = sqlite_conn
|
|
37
|
+
.pragma_query_value(None, "synchronous", |row| row.get::<_, usize>(0))
|
|
38
|
+
.unwrap();
|
|
39
|
+
const FULL: usize = 2;
|
|
40
|
+
assert_eq!(synchronous, FULL);
|
|
41
|
+
|
|
42
|
+
// load the generate_series extension
|
|
43
|
+
rusqlite::vtab::series::load_module(&sqlite_conn).unwrap();
|
|
44
|
+
|
|
45
|
+
// Create test table
|
|
46
|
+
sqlite_conn.execute(query, []).unwrap();
|
|
47
|
+
sqlite_conn
|
|
48
|
+
}
|
|
49
|
+
|
|
19
50
|
fn bench_open(criterion: &mut Criterion) {
|
|
20
51
|
// https://github.com/tursodatabase/turso/issues/174
|
|
21
52
|
// The rusqlite benchmark crashes on Mac M1 when using the flamegraph features
|
|
@@ -896,9 +927,90 @@ fn bench_concurrent_writes(criterion: &mut Criterion) {
|
|
|
896
927
|
});
|
|
897
928
|
}
|
|
898
929
|
|
|
930
|
+
fn bench_insert_randomblob(criterion: &mut Criterion) {
|
|
931
|
+
// The rusqlite benchmark crashes on Mac M1 when using the flamegraph features
|
|
932
|
+
let enable_rusqlite = std::env::var("DISABLE_RUSQLITE_BENCHMARK").is_err();
|
|
933
|
+
|
|
934
|
+
let mut group = criterion.benchmark_group("Insert rows in batches");
|
|
935
|
+
|
|
936
|
+
// Test different batch sizes
|
|
937
|
+
for batch_size in [1, 10, 100] {
|
|
938
|
+
let temp_dir = tempfile::tempdir().unwrap();
|
|
939
|
+
let db_path = temp_dir.path().join("bench.db");
|
|
940
|
+
|
|
941
|
+
#[allow(clippy::arc_with_non_send_sync)]
|
|
942
|
+
let io = Arc::new(PlatformIO::new().unwrap());
|
|
943
|
+
let db = Database::open_file(io.clone(), db_path.to_str().unwrap(), false, false).unwrap();
|
|
944
|
+
let limbo_conn = db.connect().unwrap();
|
|
945
|
+
|
|
946
|
+
let mut stmt = limbo_conn.query("CREATE TABLE test(x)").unwrap().unwrap();
|
|
947
|
+
|
|
948
|
+
loop {
|
|
949
|
+
match stmt.step().unwrap() {
|
|
950
|
+
turso_core::StepResult::IO => {
|
|
951
|
+
stmt.run_once().unwrap();
|
|
952
|
+
}
|
|
953
|
+
turso_core::StepResult::Done => {
|
|
954
|
+
break;
|
|
955
|
+
}
|
|
956
|
+
turso_core::StepResult::Row => {
|
|
957
|
+
unreachable!();
|
|
958
|
+
}
|
|
959
|
+
turso_core::StepResult::Interrupt | turso_core::StepResult::Busy => {
|
|
960
|
+
unreachable!();
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
let random_blob = format!(
|
|
966
|
+
"INSERT INTO test select randomblob(1024 * 100) from generate_series(1, {batch_size});"
|
|
967
|
+
);
|
|
968
|
+
|
|
969
|
+
group.bench_function(format!("limbo_insert_{batch_size}_randomblob"), |b| {
|
|
970
|
+
let mut stmt = limbo_conn.prepare(&random_blob).unwrap();
|
|
971
|
+
b.iter(|| {
|
|
972
|
+
loop {
|
|
973
|
+
match stmt.step().unwrap() {
|
|
974
|
+
turso_core::StepResult::IO => {
|
|
975
|
+
stmt.run_once().unwrap();
|
|
976
|
+
}
|
|
977
|
+
turso_core::StepResult::Done => {
|
|
978
|
+
break;
|
|
979
|
+
}
|
|
980
|
+
turso_core::StepResult::Row => {
|
|
981
|
+
unreachable!();
|
|
982
|
+
}
|
|
983
|
+
turso_core::StepResult::Interrupt | turso_core::StepResult::Busy => {
|
|
984
|
+
unreachable!();
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
stmt.reset();
|
|
989
|
+
});
|
|
990
|
+
});
|
|
991
|
+
|
|
992
|
+
if enable_rusqlite {
|
|
993
|
+
let temp_dir = tempfile::tempdir().unwrap();
|
|
994
|
+
let sqlite_conn = setup_rusqlite(&temp_dir, "CREATE TABLE test(x)");
|
|
995
|
+
|
|
996
|
+
group.bench_function(format!("sqlite_insert_{batch_size}_randomblob"), |b| {
|
|
997
|
+
let mut stmt = sqlite_conn.prepare(&random_blob).unwrap();
|
|
998
|
+
b.iter(|| {
|
|
999
|
+
let mut rows = stmt.raw_query();
|
|
1000
|
+
while let Some(row) = rows.next().unwrap() {
|
|
1001
|
+
black_box(row);
|
|
1002
|
+
}
|
|
1003
|
+
});
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
group.finish();
|
|
1009
|
+
}
|
|
1010
|
+
|
|
899
1011
|
criterion_group! {
|
|
900
1012
|
name = benches;
|
|
901
1013
|
config = Criterion::default().with_profiler(PProfProfiler::new(100, Output::Flamegraph(None)));
|
|
902
|
-
targets = bench_open, bench_alter, bench_prepare_query, bench_execute_select_1, bench_execute_select_rows, bench_execute_select_count, bench_insert_rows, bench_concurrent_writes
|
|
1014
|
+
targets = bench_open, bench_alter, bench_prepare_query, bench_execute_select_1, bench_execute_select_rows, bench_execute_select_count, bench_insert_rows, bench_concurrent_writes, bench_insert_randomblob
|
|
903
1015
|
}
|
|
904
1016
|
criterion_main!(benches);
|
|
@@ -490,15 +490,10 @@ impl DbspCircuit {
|
|
|
490
490
|
) -> Result<IOResult<Delta>> {
|
|
491
491
|
if let Some(root_id) = self.root {
|
|
492
492
|
// Create temporary cursors for execute (non-commit) operations
|
|
493
|
-
let table_cursor =
|
|
494
|
-
|
|
495
|
-
pager.clone(),
|
|
496
|
-
self.internal_state_root,
|
|
497
|
-
OPERATOR_COLUMNS,
|
|
498
|
-
);
|
|
493
|
+
let table_cursor =
|
|
494
|
+
BTreeCursor::new_table(pager.clone(), self.internal_state_root, OPERATOR_COLUMNS);
|
|
499
495
|
let index_def = create_dbsp_state_index(self.internal_state_index_root);
|
|
500
496
|
let index_cursor = BTreeCursor::new_index(
|
|
501
|
-
None,
|
|
502
497
|
pager.clone(),
|
|
503
498
|
self.internal_state_index_root,
|
|
504
499
|
&index_def,
|
|
@@ -547,14 +542,12 @@ impl DbspCircuit {
|
|
|
547
542
|
CommitState::Init => {
|
|
548
543
|
// Create state cursors when entering CommitOperators state
|
|
549
544
|
let state_table_cursor = BTreeCursor::new_table(
|
|
550
|
-
None,
|
|
551
545
|
pager.clone(),
|
|
552
546
|
self.internal_state_root,
|
|
553
547
|
OPERATOR_COLUMNS,
|
|
554
548
|
);
|
|
555
549
|
let index_def = create_dbsp_state_index(self.internal_state_index_root);
|
|
556
550
|
let state_index_cursor = BTreeCursor::new_index(
|
|
557
|
-
None,
|
|
558
551
|
pager.clone(),
|
|
559
552
|
self.internal_state_index_root,
|
|
560
553
|
&index_def,
|
|
@@ -585,7 +578,6 @@ impl DbspCircuit {
|
|
|
585
578
|
|
|
586
579
|
// Create view cursor when entering UpdateView state
|
|
587
580
|
let view_cursor = Box::new(BTreeCursor::new_table(
|
|
588
|
-
None,
|
|
589
581
|
pager.clone(),
|
|
590
582
|
main_data_root,
|
|
591
583
|
num_columns,
|
|
@@ -615,7 +607,6 @@ impl DbspCircuit {
|
|
|
615
607
|
// due to btree cursor state machine limitations
|
|
616
608
|
if matches!(write_row_state, WriteRowView::GetRecord) {
|
|
617
609
|
*view_cursor = Box::new(BTreeCursor::new_table(
|
|
618
|
-
None,
|
|
619
610
|
pager.clone(),
|
|
620
611
|
main_data_root,
|
|
621
612
|
num_columns,
|
|
@@ -643,7 +634,6 @@ impl DbspCircuit {
|
|
|
643
634
|
let view_cursor = std::mem::replace(
|
|
644
635
|
view_cursor,
|
|
645
636
|
Box::new(BTreeCursor::new_table(
|
|
646
|
-
None,
|
|
647
637
|
pager.clone(),
|
|
648
638
|
main_data_root,
|
|
649
639
|
num_columns,
|
|
@@ -739,14 +729,12 @@ impl DbspCircuit {
|
|
|
739
729
|
|
|
740
730
|
// Create temporary cursors for the recursive call
|
|
741
731
|
let temp_table_cursor = BTreeCursor::new_table(
|
|
742
|
-
None,
|
|
743
732
|
pager.clone(),
|
|
744
733
|
self.internal_state_root,
|
|
745
734
|
OPERATOR_COLUMNS,
|
|
746
735
|
);
|
|
747
736
|
let index_def = create_dbsp_state_index(self.internal_state_index_root);
|
|
748
737
|
let temp_index_cursor = BTreeCursor::new_index(
|
|
749
|
-
None,
|
|
750
738
|
pager.clone(),
|
|
751
739
|
self.internal_state_index_root,
|
|
752
740
|
&index_def,
|
|
@@ -2774,8 +2762,7 @@ mod tests {
|
|
|
2774
2762
|
let num_columns = circuit.output_schema.columns.len() + 1;
|
|
2775
2763
|
|
|
2776
2764
|
// Create a cursor to read the btree
|
|
2777
|
-
let mut btree_cursor =
|
|
2778
|
-
BTreeCursor::new_table(None, pager.clone(), main_data_root, num_columns);
|
|
2765
|
+
let mut btree_cursor = BTreeCursor::new_table(pager.clone(), main_data_root, num_columns);
|
|
2779
2766
|
|
|
2780
2767
|
// Rewind to the beginning
|
|
2781
2768
|
pager.io.block(|| btree_cursor.rewind())?;
|
|
@@ -5,7 +5,7 @@ use crate::{
|
|
|
5
5
|
view::{IncrementalView, ViewTransactionState},
|
|
6
6
|
},
|
|
7
7
|
return_if_io,
|
|
8
|
-
storage::btree::
|
|
8
|
+
storage::btree::CursorTrait,
|
|
9
9
|
types::{IOResult, SeekKey, SeekOp, SeekResult, Value},
|
|
10
10
|
LimboError, Pager, Result,
|
|
11
11
|
};
|
|
@@ -35,7 +35,7 @@ enum SeekState {
|
|
|
35
35
|
/// and overlays transaction changes as needed.
|
|
36
36
|
pub struct MaterializedViewCursor {
|
|
37
37
|
// Core components
|
|
38
|
-
btree_cursor: Box<
|
|
38
|
+
btree_cursor: Box<dyn CursorTrait>,
|
|
39
39
|
view: Arc<Mutex<IncrementalView>>,
|
|
40
40
|
pager: Arc<Pager>,
|
|
41
41
|
|
|
@@ -62,7 +62,7 @@ pub struct MaterializedViewCursor {
|
|
|
62
62
|
|
|
63
63
|
impl MaterializedViewCursor {
|
|
64
64
|
pub fn new(
|
|
65
|
-
btree_cursor: Box<
|
|
65
|
+
btree_cursor: Box<dyn CursorTrait>,
|
|
66
66
|
view: Arc<Mutex<IncrementalView>>,
|
|
67
67
|
pager: Arc<Pager>,
|
|
68
68
|
tx_state: Arc<ViewTransactionState>,
|
|
@@ -296,6 +296,7 @@ impl MaterializedViewCursor {
|
|
|
296
296
|
#[cfg(test)]
|
|
297
297
|
mod tests {
|
|
298
298
|
use super::*;
|
|
299
|
+
use crate::storage::btree::BTreeCursor;
|
|
299
300
|
use crate::util::IOExt;
|
|
300
301
|
use crate::{Connection, Database, OpenFlags};
|
|
301
302
|
use std::sync::Arc;
|
|
@@ -359,12 +360,7 @@ mod tests {
|
|
|
359
360
|
|
|
360
361
|
// Create a btree cursor
|
|
361
362
|
let pager = conn.get_pager();
|
|
362
|
-
let btree_cursor = Box::new(BTreeCursor::new(
|
|
363
|
-
None, // No MvCursor
|
|
364
|
-
pager.clone(),
|
|
365
|
-
root_page,
|
|
366
|
-
num_columns,
|
|
367
|
-
));
|
|
363
|
+
let btree_cursor = Box::new(BTreeCursor::new(pager.clone(), root_page, num_columns));
|
|
368
364
|
|
|
369
365
|
// Get or create transaction state for this view
|
|
370
366
|
let tx_state = conn.view_transaction_states.get_or_create("test_view");
|