pyturso 0.3.0rc2__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.

Files changed (191) hide show
  1. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/Cargo.lock +51 -31
  2. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/Cargo.toml +18 -18
  3. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/PKG-INFO +1 -1
  4. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/Cargo.toml +4 -5
  5. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/benches/benchmark.rs +113 -1
  6. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/incremental/aggregate_operator.rs +1 -0
  7. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/incremental/compiler.rs +14 -17
  8. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/incremental/cursor.rs +5 -9
  9. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/incremental/join_operator.rs +1 -0
  10. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/incremental/operator.rs +83 -116
  11. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/incremental/view.rs +15 -0
  12. pyturso-0.3.0rc2/core/io/mod.rs → pyturso-0.3.0rc4/core/io/completions.rs +281 -332
  13. pyturso-0.3.0rc4/core/io/mod.rs +328 -0
  14. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/lib.rs +7 -0
  15. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/mvcc/cursor.rs +81 -26
  16. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/mvcc/database/checkpoint_state_machine.rs +3 -8
  17. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/mvcc/database/mod.rs +0 -1
  18. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/mvcc/database/tests.rs +5 -0
  19. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/mvcc/persistent_storage/logical_log.rs +2 -2
  20. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/schema.rs +89 -8
  21. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/storage/btree.rs +114 -885
  22. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/storage/buffer_pool.rs +4 -4
  23. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/storage/encryption.rs +19 -19
  24. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/storage/pager.rs +23 -13
  25. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/storage/slot_bitmap.rs +9 -7
  26. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/storage/sqlite3_ondisk.rs +1 -1
  27. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/storage/wal.rs +222 -196
  28. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/expr.rs +22 -20
  29. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/insert.rs +383 -298
  30. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/planner.rs +21 -1
  31. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/schema.rs +49 -24
  32. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/types.rs +0 -20
  33. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/util.rs +33 -6
  34. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vdbe/execute.rs +340 -131
  35. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vdbe/mod.rs +11 -0
  36. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vdbe/sorter.rs +19 -14
  37. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vector/mod.rs +2 -2
  38. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vector/operations/concat.rs +14 -12
  39. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vector/operations/convert.rs +12 -8
  40. pyturso-0.3.0rc4/core/vector/operations/distance_cos.rs +217 -0
  41. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vector/operations/distance_l2.rs +74 -21
  42. pyturso-0.3.0rc4/core/vector/operations/serialize.rs +22 -0
  43. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vector/operations/slice.rs +9 -5
  44. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vector/operations/text.rs +11 -7
  45. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vector/vector_types.rs +78 -33
  46. pyturso-0.3.0rc4/parser/src/error.rs +108 -0
  47. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/parser/src/lexer.rs +125 -33
  48. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/parser/src/parser.rs +32 -4
  49. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/parser/src/token.rs +43 -0
  50. pyturso-0.3.0rc2/core/vector/operations/distance_cos.rs +0 -172
  51. pyturso-0.3.0rc2/core/vector/operations/serialize.rs +0 -19
  52. pyturso-0.3.0rc2/parser/src/error.rs +0 -52
  53. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/bindings/python/Cargo.toml +0 -0
  54. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/bindings/python/build.rs +0 -0
  55. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/bindings/python/example.py +0 -0
  56. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/bindings/python/requirements-dev.txt +0 -0
  57. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/bindings/python/requirements.txt +0 -0
  58. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/bindings/python/src/errors.rs +0 -0
  59. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/bindings/python/src/lib.rs +0 -0
  60. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/bindings/python/tests/__init__.py +0 -0
  61. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/bindings/python/tests/test_database.py +0 -0
  62. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/bindings/python/turso/__init__.py +0 -0
  63. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/bindings/python/turso/py.typed +0 -0
  64. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/assert.rs +0 -0
  65. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/benches/json_benchmark.rs +0 -0
  66. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/benches/mvcc_benchmark.rs +0 -0
  67. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/benches/tpc_h_benchmark.rs +0 -0
  68. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/build.rs +0 -0
  69. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/error.rs +0 -0
  70. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/ext/dynamic.rs +0 -0
  71. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/ext/mod.rs +0 -0
  72. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/ext/vtab_xconnect.rs +0 -0
  73. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/fast_lock.rs +0 -0
  74. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/function.rs +0 -0
  75. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/functions/datetime.rs +0 -0
  76. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/functions/mod.rs +0 -0
  77. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/functions/printf.rs +0 -0
  78. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/functions/strftime.rs +0 -0
  79. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/incremental/dbsp.rs +0 -0
  80. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/incremental/expr_compiler.rs +0 -0
  81. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/incremental/filter_operator.rs +0 -0
  82. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/incremental/input_operator.rs +0 -0
  83. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/incremental/merge_operator.rs +0 -0
  84. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/incremental/mod.rs +0 -0
  85. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/incremental/persistence.rs +0 -0
  86. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/incremental/project_operator.rs +0 -0
  87. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/info.rs +0 -0
  88. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/io/clock.rs +0 -0
  89. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/io/common.rs +0 -0
  90. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/io/generic.rs +0 -0
  91. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/io/io_uring.rs +0 -0
  92. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/io/memory.rs +0 -0
  93. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/io/unix.rs +0 -0
  94. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/io/vfs.rs +0 -0
  95. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/io/windows.rs +0 -0
  96. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/json/cache.rs +0 -0
  97. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/json/error.rs +0 -0
  98. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/json/jsonb.rs +0 -0
  99. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/json/mod.rs +0 -0
  100. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/json/ops.rs +0 -0
  101. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/json/path.rs +0 -0
  102. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/json/vtab.rs +0 -0
  103. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/mvcc/clock.rs +0 -0
  104. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/mvcc/mod.rs +0 -0
  105. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/mvcc/persistent_storage/mod.rs +0 -0
  106. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/numeric/mod.rs +0 -0
  107. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/numeric/nonnan.rs +0 -0
  108. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/parameters.rs +0 -0
  109. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/pragma.rs +0 -0
  110. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/pseudo.rs +0 -0
  111. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/series.rs +0 -0
  112. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/state_machine.rs +0 -0
  113. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/storage/checksum.rs +0 -0
  114. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/storage/database.rs +0 -0
  115. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/storage/mod.rs +0 -0
  116. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/storage/page_cache.rs +0 -0
  117. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/storage/state_machines.rs +0 -0
  118. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/time/internal.rs +0 -0
  119. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/time/mod.rs +0 -0
  120. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/aggregation.rs +0 -0
  121. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/alter.rs +0 -0
  122. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/analyze.rs +0 -0
  123. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/attach.rs +0 -0
  124. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/collate.rs +0 -0
  125. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/compound_select.rs +0 -0
  126. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/delete.rs +0 -0
  127. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/display.rs +0 -0
  128. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/emitter.rs +0 -0
  129. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/fkeys.rs +0 -0
  130. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/group_by.rs +0 -0
  131. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/index.rs +0 -0
  132. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/integrity_check.rs +0 -0
  133. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/logical.rs +0 -0
  134. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/main_loop.rs +0 -0
  135. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/mod.rs +0 -0
  136. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/optimizer/OPTIMIZER.md +0 -0
  137. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/optimizer/access_method.rs +0 -0
  138. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/optimizer/constraints.rs +0 -0
  139. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/optimizer/cost.rs +0 -0
  140. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/optimizer/join.rs +0 -0
  141. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/optimizer/lift_common_subexpressions.rs +0 -0
  142. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/optimizer/mod.rs +0 -0
  143. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/optimizer/order.rs +0 -0
  144. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/order_by.rs +0 -0
  145. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/plan.rs +0 -0
  146. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/pragma.rs +0 -0
  147. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/result_row.rs +0 -0
  148. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/rollback.rs +0 -0
  149. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/select.rs +0 -0
  150. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/subquery.rs +0 -0
  151. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/transaction.rs +0 -0
  152. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/update.rs +0 -0
  153. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/upsert.rs +0 -0
  154. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/values.rs +0 -0
  155. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/view.rs +0 -0
  156. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/translate/window.rs +0 -0
  157. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/uuid.rs +0 -0
  158. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vdbe/builder.rs +0 -0
  159. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vdbe/explain.rs +0 -0
  160. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vdbe/insn.rs +0 -0
  161. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vdbe/likeop.rs +0 -0
  162. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vdbe/metrics.rs +0 -0
  163. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vector/operations/jaccard.rs +0 -0
  164. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vector/operations/mod.rs +0 -0
  165. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/core/vtab.rs +0 -0
  166. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/extensions/core/Cargo.toml +0 -0
  167. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/extensions/core/README.md +0 -0
  168. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/extensions/core/build.rs +0 -0
  169. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/extensions/core/src/functions.rs +0 -0
  170. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/extensions/core/src/lib.rs +0 -0
  171. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/extensions/core/src/types.rs +0 -0
  172. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/extensions/core/src/vfs_modules.rs +0 -0
  173. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/extensions/core/src/vtabs.rs +0 -0
  174. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/macros/Cargo.toml +0 -0
  175. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/macros/src/ext/agg_derive.rs +0 -0
  176. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/macros/src/ext/match_ignore_ascii_case.rs +0 -0
  177. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/macros/src/ext/mod.rs +0 -0
  178. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/macros/src/ext/scalars.rs +0 -0
  179. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/macros/src/ext/vfs_derive.rs +0 -0
  180. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/macros/src/ext/vtab_derive.rs +0 -0
  181. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/macros/src/lib.rs +0 -0
  182. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/parser/Cargo.toml +0 -0
  183. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/parser/README.md +0 -0
  184. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/parser/benches/parser_benchmark.rs +0 -0
  185. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/parser/src/ast/check.rs +0 -0
  186. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/parser/src/ast/fmt.rs +0 -0
  187. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/parser/src/ast.rs +0 -0
  188. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/parser/src/lib.rs +0 -0
  189. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/pyproject.toml +0 -0
  190. {pyturso-0.3.0rc2 → pyturso-0.3.0rc4}/turso/__init__.py +0 -0
  191. {pyturso-0.3.0rc2 → 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.17"
526
+ version = "1.2.41"
527
527
  source = "registry+https://github.com/rust-lang/crates.io-index"
528
- checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a"
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.2"
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.2"
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.2"
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.2"
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.2"
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.2"
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.2"
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.2"
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.2"
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.2"
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.2"
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.2"
4214
+ version = "0.3.0-pre.4"
4197
4215
  dependencies = [
4198
4216
  "anarchist-readable-name-generator-lib 0.2.0",
4199
4217
  "anyhow",
@@ -4821,19 +4839,21 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
4821
4839
 
4822
4840
  [[package]]
4823
4841
  name = "turso"
4824
- version = "0.3.0-pre.2"
4842
+ version = "0.3.0-pre.4"
4825
4843
  dependencies = [
4826
4844
  "rand 0.9.2",
4827
4845
  "rand_chacha 0.9.0",
4828
4846
  "tempfile",
4829
4847
  "thiserror 2.0.16",
4830
4848
  "tokio",
4849
+ "tracing",
4850
+ "tracing-subscriber",
4831
4851
  "turso_core",
4832
4852
  ]
4833
4853
 
4834
4854
  [[package]]
4835
4855
  name = "turso-java"
4836
- version = "0.3.0-pre.2"
4856
+ version = "0.3.0-pre.4"
4837
4857
  dependencies = [
4838
4858
  "jni",
4839
4859
  "thiserror 2.0.16",
@@ -4842,7 +4862,7 @@ dependencies = [
4842
4862
 
4843
4863
  [[package]]
4844
4864
  name = "turso_cli"
4845
- version = "0.3.0-pre.2"
4865
+ version = "0.3.0-pre.4"
4846
4866
  dependencies = [
4847
4867
  "anyhow",
4848
4868
  "cfg-if",
@@ -4878,7 +4898,7 @@ dependencies = [
4878
4898
 
4879
4899
  [[package]]
4880
4900
  name = "turso_core"
4881
- version = "0.3.0-pre.2"
4901
+ version = "0.3.0-pre.4"
4882
4902
  dependencies = [
4883
4903
  "aegis",
4884
4904
  "aes",
@@ -4893,7 +4913,6 @@ dependencies = [
4893
4913
  "crossbeam-skiplist",
4894
4914
  "env_logger 0.11.7",
4895
4915
  "fallible-iterator",
4896
- "getrandom 0.2.15",
4897
4916
  "hex",
4898
4917
  "intrusive-collections",
4899
4918
  "io-uring",
@@ -4911,7 +4930,7 @@ dependencies = [
4911
4930
  "pprof",
4912
4931
  "quickcheck",
4913
4932
  "quickcheck_macros",
4914
- "rand 0.8.5",
4933
+ "rand 0.9.2",
4915
4934
  "rand_chacha 0.9.0",
4916
4935
  "regex",
4917
4936
  "regex-syntax",
@@ -4921,6 +4940,7 @@ dependencies = [
4921
4940
  "rustix 1.0.7",
4922
4941
  "ryu",
4923
4942
  "serde",
4943
+ "simsimd",
4924
4944
  "sorted-vec",
4925
4945
  "strum",
4926
4946
  "strum_macros",
@@ -4938,7 +4958,7 @@ dependencies = [
4938
4958
 
4939
4959
  [[package]]
4940
4960
  name = "turso_dart"
4941
- version = "0.3.0-pre.2"
4961
+ version = "0.3.0-pre.4"
4942
4962
  dependencies = [
4943
4963
  "flutter_rust_bridge",
4944
4964
  "turso_core",
@@ -4946,7 +4966,7 @@ dependencies = [
4946
4966
 
4947
4967
  [[package]]
4948
4968
  name = "turso_ext"
4949
- version = "0.3.0-pre.2"
4969
+ version = "0.3.0-pre.4"
4950
4970
  dependencies = [
4951
4971
  "chrono",
4952
4972
  "getrandom 0.3.2",
@@ -4955,7 +4975,7 @@ dependencies = [
4955
4975
 
4956
4976
  [[package]]
4957
4977
  name = "turso_ext_tests"
4958
- version = "0.3.0-pre.2"
4978
+ version = "0.3.0-pre.4"
4959
4979
  dependencies = [
4960
4980
  "env_logger 0.11.7",
4961
4981
  "lazy_static",
@@ -4966,7 +4986,7 @@ dependencies = [
4966
4986
 
4967
4987
  [[package]]
4968
4988
  name = "turso_macros"
4969
- version = "0.3.0-pre.2"
4989
+ version = "0.3.0-pre.4"
4970
4990
  dependencies = [
4971
4991
  "proc-macro2",
4972
4992
  "quote",
@@ -4975,7 +4995,7 @@ dependencies = [
4975
4995
 
4976
4996
  [[package]]
4977
4997
  name = "turso_node"
4978
- version = "0.3.0-pre.2"
4998
+ version = "0.3.0-pre.4"
4979
4999
  dependencies = [
4980
5000
  "chrono",
4981
5001
  "napi",
@@ -4988,7 +5008,7 @@ dependencies = [
4988
5008
 
4989
5009
  [[package]]
4990
5010
  name = "turso_parser"
4991
- version = "0.3.0-pre.2"
5011
+ version = "0.3.0-pre.4"
4992
5012
  dependencies = [
4993
5013
  "bitflags 2.9.4",
4994
5014
  "criterion",
@@ -5004,7 +5024,7 @@ dependencies = [
5004
5024
 
5005
5025
  [[package]]
5006
5026
  name = "turso_sqlite3"
5007
- version = "0.3.0-pre.2"
5027
+ version = "0.3.0-pre.4"
5008
5028
  dependencies = [
5009
5029
  "env_logger 0.11.7",
5010
5030
  "libc",
@@ -5017,7 +5037,7 @@ dependencies = [
5017
5037
 
5018
5038
  [[package]]
5019
5039
  name = "turso_stress"
5020
- version = "0.3.0-pre.2"
5040
+ version = "0.3.0-pre.4"
5021
5041
  dependencies = [
5022
5042
  "anarchist-readable-name-generator-lib 0.1.2",
5023
5043
  "antithesis_sdk",
@@ -5034,7 +5054,7 @@ dependencies = [
5034
5054
 
5035
5055
  [[package]]
5036
5056
  name = "turso_sync_engine"
5037
- version = "0.3.0-pre.2"
5057
+ version = "0.3.0-pre.4"
5038
5058
  dependencies = [
5039
5059
  "base64 0.22.1",
5040
5060
  "bytes",
@@ -5061,7 +5081,7 @@ dependencies = [
5061
5081
 
5062
5082
  [[package]]
5063
5083
  name = "turso_sync_js"
5064
- version = "0.3.0-pre.2"
5084
+ version = "0.3.0-pre.4"
5065
5085
  dependencies = [
5066
5086
  "genawaiter",
5067
5087
  "napi",
@@ -5076,7 +5096,7 @@ dependencies = [
5076
5096
 
5077
5097
  [[package]]
5078
5098
  name = "turso_whopper"
5079
- version = "0.3.0-pre.2"
5099
+ version = "0.3.0-pre.4"
5080
5100
  dependencies = [
5081
5101
  "anyhow",
5082
5102
  "clap",
@@ -8,29 +8,29 @@ exclude = [
8
8
  ]
9
9
 
10
10
  [workspace.package]
11
- version = "0.3.0-pre.2"
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.2" }
19
- turso_node = { path = "bindings/javascript", version = "0.3.0-pre.2" }
20
- limbo_completion = { path = "extensions/completion", version = "0.3.0-pre.2" }
21
- turso_core = { path = "core", version = "0.3.0-pre.2" }
22
- turso_sync_engine = { path = "sync/engine", version = "0.3.0-pre.2" }
23
- limbo_crypto = { path = "extensions/crypto", version = "0.3.0-pre.2" }
24
- limbo_csv = { path = "extensions/csv", version = "0.3.0-pre.2" }
25
- turso_ext = { path = "extensions/core", version = "0.3.0-pre.2" }
26
- turso_ext_tests = { path = "extensions/tests", version = "0.3.0-pre.2" }
27
- limbo_ipaddr = { path = "extensions/ipaddr", version = "0.3.0-pre.2" }
28
- turso_macros = { path = "macros", version = "0.3.0-pre.2" }
29
- limbo_percentile = { path = "extensions/percentile", version = "0.3.0-pre.2" }
30
- limbo_regexp = { path = "extensions/regexp", version = "0.3.0-pre.2" }
31
- limbo_uuid = { path = "extensions/uuid", version = "0.3.0-pre.2" }
32
- turso_parser = { path = "parser", version = "0.3.0-pre.2" }
33
- limbo_fuzzy = { path = "extensions/fuzzy", version = "0.3.0-pre.2" }
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 }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyturso
3
- Version: 0.3.0rc2
3
+ Version: 0.3.0rc4
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Programming Language :: Python
6
6
  Classifier: Programming Language :: Python :: 3
@@ -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 = "0.8.5"
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.workspace = true
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);
@@ -7,6 +7,7 @@ use crate::incremental::operator::{
7
7
  generate_storage_id, ComputationTracker, DbspStateCursors, EvalState, IncrementalOperator,
8
8
  };
9
9
  use crate::incremental::persistence::{ReadRecord, WriteRow};
10
+ use crate::storage::btree::CursorTrait;
10
11
  use crate::types::{IOResult, ImmutableRecord, SeekKey, SeekOp, SeekResult, ValueRef};
11
12
  use crate::{return_and_restore_if_io, return_if_io, LimboError, Result, Value};
12
13
  use std::collections::{BTreeMap, HashMap, HashSet};
@@ -12,7 +12,7 @@ use crate::incremental::operator::{
12
12
  IncrementalOperator, InputOperator, JoinOperator, JoinType, ProjectOperator,
13
13
  };
14
14
  use crate::schema::Type;
15
- use crate::storage::btree::{BTreeCursor, BTreeKey};
15
+ use crate::storage::btree::{BTreeCursor, BTreeKey, CursorTrait};
16
16
  // Note: logical module must be made pub(crate) in translate/mod.rs
17
17
  use crate::translate::logical::{
18
18
  BinaryOperator, Column, ColumnInfo, JoinType as LogicalJoinType, LogicalExpr, LogicalPlan,
@@ -329,6 +329,11 @@ pub struct DbspNode {
329
329
  pub executable: Box<dyn IncrementalOperator>,
330
330
  }
331
331
 
332
+ // SAFETY: This needs to be audited for thread safety.
333
+ // See: https://github.com/tursodatabase/turso/issues/1552
334
+ unsafe impl Send for DbspNode {}
335
+ unsafe impl Sync for DbspNode {}
336
+
332
337
  impl std::fmt::Debug for DbspNode {
333
338
  fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
334
339
  f.debug_struct("DbspNode")
@@ -395,6 +400,11 @@ pub struct DbspCircuit {
395
400
  pub(super) internal_state_index_root: i64,
396
401
  }
397
402
 
403
+ // SAFETY: This needs to be audited for thread safety.
404
+ // See: https://github.com/tursodatabase/turso/issues/1552
405
+ unsafe impl Send for DbspCircuit {}
406
+ unsafe impl Sync for DbspCircuit {}
407
+
398
408
  impl DbspCircuit {
399
409
  /// Create a new empty circuit with initial empty schema
400
410
  /// The actual output schema will be set when the root node is established
@@ -480,15 +490,10 @@ impl DbspCircuit {
480
490
  ) -> Result<IOResult<Delta>> {
481
491
  if let Some(root_id) = self.root {
482
492
  // Create temporary cursors for execute (non-commit) operations
483
- let table_cursor = BTreeCursor::new_table(
484
- None,
485
- pager.clone(),
486
- self.internal_state_root,
487
- OPERATOR_COLUMNS,
488
- );
493
+ let table_cursor =
494
+ BTreeCursor::new_table(pager.clone(), self.internal_state_root, OPERATOR_COLUMNS);
489
495
  let index_def = create_dbsp_state_index(self.internal_state_index_root);
490
496
  let index_cursor = BTreeCursor::new_index(
491
- None,
492
497
  pager.clone(),
493
498
  self.internal_state_index_root,
494
499
  &index_def,
@@ -537,14 +542,12 @@ impl DbspCircuit {
537
542
  CommitState::Init => {
538
543
  // Create state cursors when entering CommitOperators state
539
544
  let state_table_cursor = BTreeCursor::new_table(
540
- None,
541
545
  pager.clone(),
542
546
  self.internal_state_root,
543
547
  OPERATOR_COLUMNS,
544
548
  );
545
549
  let index_def = create_dbsp_state_index(self.internal_state_index_root);
546
550
  let state_index_cursor = BTreeCursor::new_index(
547
- None,
548
551
  pager.clone(),
549
552
  self.internal_state_index_root,
550
553
  &index_def,
@@ -575,7 +578,6 @@ impl DbspCircuit {
575
578
 
576
579
  // Create view cursor when entering UpdateView state
577
580
  let view_cursor = Box::new(BTreeCursor::new_table(
578
- None,
579
581
  pager.clone(),
580
582
  main_data_root,
581
583
  num_columns,
@@ -605,7 +607,6 @@ impl DbspCircuit {
605
607
  // due to btree cursor state machine limitations
606
608
  if matches!(write_row_state, WriteRowView::GetRecord) {
607
609
  *view_cursor = Box::new(BTreeCursor::new_table(
608
- None,
609
610
  pager.clone(),
610
611
  main_data_root,
611
612
  num_columns,
@@ -633,7 +634,6 @@ impl DbspCircuit {
633
634
  let view_cursor = std::mem::replace(
634
635
  view_cursor,
635
636
  Box::new(BTreeCursor::new_table(
636
- None,
637
637
  pager.clone(),
638
638
  main_data_root,
639
639
  num_columns,
@@ -729,14 +729,12 @@ impl DbspCircuit {
729
729
 
730
730
  // Create temporary cursors for the recursive call
731
731
  let temp_table_cursor = BTreeCursor::new_table(
732
- None,
733
732
  pager.clone(),
734
733
  self.internal_state_root,
735
734
  OPERATOR_COLUMNS,
736
735
  );
737
736
  let index_def = create_dbsp_state_index(self.internal_state_index_root);
738
737
  let temp_index_cursor = BTreeCursor::new_index(
739
- None,
740
738
  pager.clone(),
741
739
  self.internal_state_index_root,
742
740
  &index_def,
@@ -2764,8 +2762,7 @@ mod tests {
2764
2762
  let num_columns = circuit.output_schema.columns.len() + 1;
2765
2763
 
2766
2764
  // Create a cursor to read the btree
2767
- let mut btree_cursor =
2768
- 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);
2769
2766
 
2770
2767
  // Rewind to the beginning
2771
2768
  pager.io.block(|| btree_cursor.rewind())?;