pyturso 0.4.3rc2__tar.gz → 0.4.4rc1__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.
Files changed (271) hide show
  1. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/Cargo.lock +31 -31
  2. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/Cargo.toml +12 -12
  3. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/PKG-INFO +1 -1
  4. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/src/turso.rs +7 -0
  5. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/busy.rs +19 -40
  6. pyturso-0.4.4rc1/core/io/clock.rs +150 -0
  7. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/io/generic.rs +8 -3
  8. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/io/io_uring.rs +7 -3
  9. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/io/memory.rs +8 -5
  10. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/io/unix.rs +7 -3
  11. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/io/vfs.rs +7 -3
  12. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/io/windows.rs +8 -5
  13. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/lib.rs +1 -1
  14. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/statement.rs +2 -2
  15. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/storage/wal.rs +7 -8
  16. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/schema.rs +3 -0
  17. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vdbe/mod.rs +9 -0
  18. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sdk-kit/src/bindings.rs +1 -0
  19. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sdk-kit/src/rsapi.rs +6 -0
  20. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/src/database_sync_engine.rs +3 -3
  21. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/src/sparse_io.rs +8 -3
  22. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/src/types.rs +1 -1
  23. pyturso-0.4.3rc2/core/io/clock.rs +0 -103
  24. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/Cargo.toml +0 -0
  25. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/README.md +0 -0
  26. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/build.rs +0 -0
  27. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/example.py +0 -0
  28. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/py-bindings-db-aio.mdx +0 -0
  29. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/py-bindings-db.mdx +0 -0
  30. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/py-bindings-sync-aio.mdx +0 -0
  31. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/py-bindings-sync.mdx +0 -0
  32. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/py-bindings-tests-aio.mdx +0 -0
  33. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/py-bindings-tests.mdx +0 -0
  34. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/requirements-dev.txt +0 -0
  35. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/requirements.txt +0 -0
  36. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/src/lib.rs +0 -0
  37. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/src/turso_sync.rs +0 -0
  38. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/tests/__init__.py +0 -0
  39. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/tests/test_database.py +0 -0
  40. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/tests/test_database_aio.py +0 -0
  41. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/tests/test_database_sync.py +0 -0
  42. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/tests/test_database_sync_aio.py +0 -0
  43. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/tests/utils.py +0 -0
  44. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/turso/__init__.py +0 -0
  45. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/turso/aio/__init__.py +0 -0
  46. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/turso/aio/sync/__init__.py +0 -0
  47. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/turso/lib.py +0 -0
  48. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/turso/lib_aio.py +0 -0
  49. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/turso/lib_sync.py +0 -0
  50. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/turso/lib_sync_aio.py +0 -0
  51. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/turso/py.typed +0 -0
  52. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/turso/sync/__init__.py +0 -0
  53. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/bindings/python/turso/worker.py +0 -0
  54. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/Cargo.toml +0 -0
  55. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/assert.rs +0 -0
  56. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/benches/benchmark.rs +0 -0
  57. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/benches/json_benchmark.rs +0 -0
  58. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/benches/mvcc_benchmark.rs +0 -0
  59. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/benches/tpc_h_benchmark.rs +0 -0
  60. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/build.rs +0 -0
  61. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/error.rs +0 -0
  62. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/ext/dynamic.rs +0 -0
  63. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/ext/mod.rs +0 -0
  64. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/ext/vtab_xconnect.rs +0 -0
  65. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/fast_lock.rs +0 -0
  66. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/function.rs +0 -0
  67. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/functions/datetime.rs +0 -0
  68. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/functions/mod.rs +0 -0
  69. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/functions/printf.rs +0 -0
  70. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/functions/strftime.rs +0 -0
  71. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/incremental/aggregate_operator.rs +0 -0
  72. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/incremental/compiler.rs +0 -0
  73. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/incremental/cursor.rs +0 -0
  74. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/incremental/dbsp.rs +0 -0
  75. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/incremental/expr_compiler.rs +0 -0
  76. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/incremental/filter_operator.rs +0 -0
  77. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/incremental/input_operator.rs +0 -0
  78. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/incremental/join_operator.rs +0 -0
  79. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/incremental/merge_operator.rs +0 -0
  80. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/incremental/mod.rs +0 -0
  81. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/incremental/operator.rs +0 -0
  82. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/incremental/persistence.rs +0 -0
  83. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/incremental/project_operator.rs +0 -0
  84. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/incremental/view.rs +0 -0
  85. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/index_method/backing_btree.rs +0 -0
  86. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/index_method/mod.rs +0 -0
  87. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/index_method/toy_vector_sparse_ivf.rs +0 -0
  88. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/info.rs +0 -0
  89. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/io/common.rs +0 -0
  90. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/io/completions.rs +0 -0
  91. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/io/mod.rs +0 -0
  92. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/json/cache.rs +0 -0
  93. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/json/error.rs +0 -0
  94. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/json/jsonb.rs +0 -0
  95. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/json/mod.rs +0 -0
  96. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/json/ops.rs +0 -0
  97. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/json/path.rs +0 -0
  98. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/json/vtab.rs +0 -0
  99. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/mvcc/clock.rs +0 -0
  100. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/mvcc/cursor.rs +0 -0
  101. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/mvcc/database/checkpoint_state_machine.rs +0 -0
  102. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/mvcc/database/mod.rs +0 -0
  103. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/mvcc/database/tests.rs +0 -0
  104. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/mvcc/mod.rs +0 -0
  105. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/mvcc/persistent_storage/logical_log.rs +0 -0
  106. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/mvcc/persistent_storage/mod.rs +0 -0
  107. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/numeric/mod.rs +0 -0
  108. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/numeric/nonnan.rs +0 -0
  109. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/parameters.rs +0 -0
  110. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/pragma.rs +0 -0
  111. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/pseudo.rs +0 -0
  112. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/schema.rs +0 -0
  113. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/series.rs +0 -0
  114. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/state_machine.rs +0 -0
  115. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/stats.rs +0 -0
  116. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/storage/btree.rs +0 -0
  117. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/storage/buffer_pool.rs +0 -0
  118. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/storage/checksum.rs +0 -0
  119. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/storage/database.rs +0 -0
  120. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/storage/encryption.rs +0 -0
  121. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/storage/journal_mode.rs +0 -0
  122. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/storage/mod.rs +0 -0
  123. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/storage/page_cache.rs +0 -0
  124. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/storage/pager.rs +0 -0
  125. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/storage/slot_bitmap.rs +0 -0
  126. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/storage/sqlite3_ondisk.rs +0 -0
  127. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/storage/state_machines.rs +0 -0
  128. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/storage/subjournal.rs +0 -0
  129. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/time/internal.rs +0 -0
  130. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/time/mod.rs +0 -0
  131. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/aggregation.rs +0 -0
  132. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/alter.rs +0 -0
  133. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/analyze.rs +0 -0
  134. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/attach.rs +0 -0
  135. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/collate.rs +0 -0
  136. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/compound_select.rs +0 -0
  137. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/delete.rs +0 -0
  138. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/display.rs +0 -0
  139. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/emitter.rs +0 -0
  140. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/expr.rs +0 -0
  141. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/expression_index.rs +0 -0
  142. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/fkeys.rs +0 -0
  143. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/group_by.rs +0 -0
  144. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/index.rs +0 -0
  145. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/insert.rs +0 -0
  146. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/integrity_check.rs +0 -0
  147. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/logical.rs +0 -0
  148. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/main_loop.rs +0 -0
  149. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/mod.rs +0 -0
  150. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/optimizer/OPTIMIZER.md +0 -0
  151. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/optimizer/access_method.rs +0 -0
  152. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/optimizer/constraints.rs +0 -0
  153. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/optimizer/cost.rs +0 -0
  154. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/optimizer/join.rs +0 -0
  155. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/optimizer/lift_common_subexpressions.rs +0 -0
  156. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/optimizer/mod.rs +0 -0
  157. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/optimizer/order.rs +0 -0
  158. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/order_by.rs +0 -0
  159. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/plan.rs +0 -0
  160. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/planner.rs +0 -0
  161. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/pragma.rs +0 -0
  162. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/result_row.rs +0 -0
  163. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/rollback.rs +0 -0
  164. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/select.rs +0 -0
  165. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/subquery.rs +0 -0
  166. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/transaction.rs +0 -0
  167. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/trigger.rs +0 -0
  168. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/trigger_exec.rs +0 -0
  169. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/update.rs +0 -0
  170. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/upsert.rs +0 -0
  171. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/values.rs +0 -0
  172. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/view.rs +0 -0
  173. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/translate/window.rs +0 -0
  174. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/types.rs +0 -0
  175. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/util.rs +0 -0
  176. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/uuid.rs +0 -0
  177. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vdbe/affinity.rs +0 -0
  178. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vdbe/bloom_filter.rs +0 -0
  179. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vdbe/builder.rs +0 -0
  180. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vdbe/execute.rs +0 -0
  181. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vdbe/explain.rs +0 -0
  182. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vdbe/hash_table.rs +0 -0
  183. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vdbe/insn.rs +0 -0
  184. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vdbe/likeop.rs +0 -0
  185. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vdbe/metrics.rs +0 -0
  186. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vdbe/rowset.rs +0 -0
  187. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vdbe/sorter.rs +0 -0
  188. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vdbe/value.rs +0 -0
  189. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vector/mod.rs +0 -0
  190. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vector/operations/concat.rs +0 -0
  191. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vector/operations/convert.rs +0 -0
  192. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vector/operations/distance_cos.rs +0 -0
  193. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vector/operations/distance_dot.rs +0 -0
  194. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vector/operations/distance_l2.rs +0 -0
  195. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vector/operations/jaccard.rs +0 -0
  196. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vector/operations/mod.rs +0 -0
  197. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vector/operations/serialize.rs +0 -0
  198. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vector/operations/slice.rs +0 -0
  199. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vector/operations/text.rs +0 -0
  200. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vector/vector_types.rs +0 -0
  201. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/core/vtab.rs +0 -0
  202. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/extensions/core/Cargo.toml +0 -0
  203. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/extensions/core/README.md +0 -0
  204. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/extensions/core/build.rs +0 -0
  205. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/extensions/core/src/functions.rs +0 -0
  206. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/extensions/core/src/lib.rs +0 -0
  207. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/extensions/core/src/types.rs +0 -0
  208. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/extensions/core/src/vfs_modules.rs +0 -0
  209. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/extensions/core/src/vtabs.rs +0 -0
  210. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/macros/Cargo.toml +0 -0
  211. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/macros/src/atomic_enum.rs +0 -0
  212. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/macros/src/ext/agg_derive.rs +0 -0
  213. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/macros/src/ext/match_ignore_ascii_case.rs +0 -0
  214. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/macros/src/ext/mod.rs +0 -0
  215. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/macros/src/ext/scalars.rs +0 -0
  216. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/macros/src/ext/vfs_derive.rs +0 -0
  217. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/macros/src/ext/vtab_derive.rs +0 -0
  218. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/macros/src/lib.rs +0 -0
  219. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/macros/src/test.rs +0 -0
  220. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/parser/Cargo.toml +0 -0
  221. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/parser/README.md +0 -0
  222. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/parser/benches/parser_benchmark.rs +0 -0
  223. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/parser/src/ast/check.rs +0 -0
  224. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/parser/src/ast/fmt.rs +0 -0
  225. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/parser/src/ast.rs +0 -0
  226. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/parser/src/error.rs +0 -0
  227. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/parser/src/lexer.rs +0 -0
  228. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/parser/src/lib.rs +0 -0
  229. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/parser/src/parser.rs +0 -0
  230. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/parser/src/token.rs +0 -0
  231. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/pyproject.toml +0 -0
  232. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sdk-kit/Cargo.toml +0 -0
  233. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sdk-kit/README.md +0 -0
  234. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sdk-kit/bindgen.sh +0 -0
  235. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sdk-kit/readme-sdk-kit.mdx +0 -0
  236. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sdk-kit/src/capi.rs +0 -0
  237. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sdk-kit/src/lib.rs +0 -0
  238. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sdk-kit/turso.h +0 -0
  239. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sdk-kit-macros/Cargo.toml +0 -0
  240. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sdk-kit-macros/src/lib.rs +0 -0
  241. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/.gitignore +0 -0
  242. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/Cargo.toml +0 -0
  243. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/src/database_replay_generator.rs +0 -0
  244. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/src/database_sync_engine_io.rs +0 -0
  245. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/src/database_sync_lazy_storage.rs +0 -0
  246. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/src/database_sync_operations.rs +0 -0
  247. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/src/database_tape.rs +0 -0
  248. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/src/errors.rs +0 -0
  249. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/src/io_operations.rs +0 -0
  250. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/src/lib.rs +0 -0
  251. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/src/server_proto.rs +0 -0
  252. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/engine/src/wal_session.rs +0 -0
  253. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/sdk-kit/Cargo.toml +0 -0
  254. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/sdk-kit/bindgen.sh +0 -0
  255. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/sdk-kit/src/bindings.rs +0 -0
  256. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/sdk-kit/src/capi.rs +0 -0
  257. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/sdk-kit/src/lib.rs +0 -0
  258. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/sdk-kit/src/rsapi.rs +0 -0
  259. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/sdk-kit/src/sync_engine_io.rs +0 -0
  260. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/sdk-kit/src/turso_async_operation.rs +0 -0
  261. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/sync/sdk-kit/turso_sync.h +0 -0
  262. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/turso/__init__.py +0 -0
  263. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/turso/aio/__init__.py +0 -0
  264. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/turso/aio/sync/__init__.py +0 -0
  265. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/turso/lib.py +0 -0
  266. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/turso/lib_aio.py +0 -0
  267. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/turso/lib_sync.py +0 -0
  268. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/turso/lib_sync_aio.py +0 -0
  269. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/turso/py.typed +0 -0
  270. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/turso/sync/__init__.py +0 -0
  271. {pyturso-0.4.3rc2 → pyturso-0.4.4rc1}/turso/worker.py +0 -0
@@ -896,7 +896,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
896
896
 
897
897
  [[package]]
898
898
  name = "core_tester"
899
- version = "0.4.3-pre.2"
899
+ version = "0.4.4-pre.1"
900
900
  dependencies = [
901
901
  "anyhow",
902
902
  "assert_cmd",
@@ -2729,7 +2729,7 @@ dependencies = [
2729
2729
 
2730
2730
  [[package]]
2731
2731
  name = "limbo_completion"
2732
- version = "0.4.3-pre.2"
2732
+ version = "0.4.4-pre.1"
2733
2733
  dependencies = [
2734
2734
  "mimalloc",
2735
2735
  "turso_ext",
@@ -2737,7 +2737,7 @@ dependencies = [
2737
2737
 
2738
2738
  [[package]]
2739
2739
  name = "limbo_crypto"
2740
- version = "0.4.3-pre.2"
2740
+ version = "0.4.4-pre.1"
2741
2741
  dependencies = [
2742
2742
  "blake3",
2743
2743
  "data-encoding",
@@ -2750,7 +2750,7 @@ dependencies = [
2750
2750
 
2751
2751
  [[package]]
2752
2752
  name = "limbo_csv"
2753
- version = "0.4.3-pre.2"
2753
+ version = "0.4.4-pre.1"
2754
2754
  dependencies = [
2755
2755
  "csv",
2756
2756
  "mimalloc",
@@ -2760,7 +2760,7 @@ dependencies = [
2760
2760
 
2761
2761
  [[package]]
2762
2762
  name = "limbo_fuzzy"
2763
- version = "0.4.3-pre.2"
2763
+ version = "0.4.4-pre.1"
2764
2764
  dependencies = [
2765
2765
  "mimalloc",
2766
2766
  "turso_ext",
@@ -2768,7 +2768,7 @@ dependencies = [
2768
2768
 
2769
2769
  [[package]]
2770
2770
  name = "limbo_ipaddr"
2771
- version = "0.4.3-pre.2"
2771
+ version = "0.4.4-pre.1"
2772
2772
  dependencies = [
2773
2773
  "ipnetwork",
2774
2774
  "mimalloc",
@@ -2777,7 +2777,7 @@ dependencies = [
2777
2777
 
2778
2778
  [[package]]
2779
2779
  name = "limbo_percentile"
2780
- version = "0.4.3-pre.2"
2780
+ version = "0.4.4-pre.1"
2781
2781
  dependencies = [
2782
2782
  "mimalloc",
2783
2783
  "turso_ext",
@@ -2785,7 +2785,7 @@ dependencies = [
2785
2785
 
2786
2786
  [[package]]
2787
2787
  name = "limbo_regexp"
2788
- version = "0.4.3-pre.2"
2788
+ version = "0.4.4-pre.1"
2789
2789
  dependencies = [
2790
2790
  "mimalloc",
2791
2791
  "regex",
@@ -2794,7 +2794,7 @@ dependencies = [
2794
2794
 
2795
2795
  [[package]]
2796
2796
  name = "limbo_sim"
2797
- version = "0.4.3-pre.2"
2797
+ version = "0.4.4-pre.1"
2798
2798
  dependencies = [
2799
2799
  "anyhow",
2800
2800
  "bitflags 2.9.4",
@@ -2831,7 +2831,7 @@ dependencies = [
2831
2831
 
2832
2832
  [[package]]
2833
2833
  name = "limbo_sqlite_test_ext"
2834
- version = "0.4.3-pre.2"
2834
+ version = "0.4.4-pre.1"
2835
2835
  dependencies = [
2836
2836
  "cc",
2837
2837
  ]
@@ -3718,7 +3718,7 @@ dependencies = [
3718
3718
 
3719
3719
  [[package]]
3720
3720
  name = "py-turso"
3721
- version = "0.4.3-pre.2"
3721
+ version = "0.4.4-pre.1"
3722
3722
  dependencies = [
3723
3723
  "anyhow",
3724
3724
  "pyo3",
@@ -4595,7 +4595,7 @@ checksum = "d372029cb5195f9ab4e4b9aef550787dce78b124fcaee8d82519925defcd6f0d"
4595
4595
 
4596
4596
  [[package]]
4597
4597
  name = "sql_generation"
4598
- version = "0.4.3-pre.2"
4598
+ version = "0.4.4-pre.1"
4599
4599
  dependencies = [
4600
4600
  "anarchist-readable-name-generator-lib",
4601
4601
  "anyhow",
@@ -5299,7 +5299,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
5299
5299
 
5300
5300
  [[package]]
5301
5301
  name = "turso"
5302
- version = "0.4.3-pre.2"
5302
+ version = "0.4.4-pre.1"
5303
5303
  dependencies = [
5304
5304
  "anyhow",
5305
5305
  "bytes",
@@ -5323,14 +5323,14 @@ dependencies = [
5323
5323
 
5324
5324
  [[package]]
5325
5325
  name = "turso-dotnet"
5326
- version = "0.4.3-pre.2"
5326
+ version = "0.4.4-pre.1"
5327
5327
  dependencies = [
5328
5328
  "turso_core",
5329
5329
  ]
5330
5330
 
5331
5331
  [[package]]
5332
5332
  name = "turso-java"
5333
- version = "0.4.3-pre.2"
5333
+ version = "0.4.4-pre.1"
5334
5334
  dependencies = [
5335
5335
  "jni",
5336
5336
  "thiserror 2.0.16",
@@ -5339,7 +5339,7 @@ dependencies = [
5339
5339
 
5340
5340
  [[package]]
5341
5341
  name = "turso_cli"
5342
- version = "0.4.3-pre.2"
5342
+ version = "0.4.4-pre.1"
5343
5343
  dependencies = [
5344
5344
  "anyhow",
5345
5345
  "bytes",
@@ -5380,7 +5380,7 @@ dependencies = [
5380
5380
 
5381
5381
  [[package]]
5382
5382
  name = "turso_core"
5383
- version = "0.4.3-pre.2"
5383
+ version = "0.4.4-pre.1"
5384
5384
  dependencies = [
5385
5385
  "aegis",
5386
5386
  "aes",
@@ -5447,7 +5447,7 @@ dependencies = [
5447
5447
 
5448
5448
  [[package]]
5449
5449
  name = "turso_dart"
5450
- version = "0.4.3-pre.2"
5450
+ version = "0.4.4-pre.1"
5451
5451
  dependencies = [
5452
5452
  "flutter_rust_bridge",
5453
5453
  "turso_core",
@@ -5455,7 +5455,7 @@ dependencies = [
5455
5455
 
5456
5456
  [[package]]
5457
5457
  name = "turso_ext"
5458
- version = "0.4.3-pre.2"
5458
+ version = "0.4.4-pre.1"
5459
5459
  dependencies = [
5460
5460
  "chrono",
5461
5461
  "getrandom 0.3.2",
@@ -5464,7 +5464,7 @@ dependencies = [
5464
5464
 
5465
5465
  [[package]]
5466
5466
  name = "turso_ext_tests"
5467
- version = "0.4.3-pre.2"
5467
+ version = "0.4.4-pre.1"
5468
5468
  dependencies = [
5469
5469
  "env_logger 0.11.7",
5470
5470
  "lazy_static",
@@ -5475,7 +5475,7 @@ dependencies = [
5475
5475
 
5476
5476
  [[package]]
5477
5477
  name = "turso_macros"
5478
- version = "0.4.3-pre.2"
5478
+ version = "0.4.4-pre.1"
5479
5479
  dependencies = [
5480
5480
  "proc-macro2",
5481
5481
  "quote",
@@ -5484,7 +5484,7 @@ dependencies = [
5484
5484
 
5485
5485
  [[package]]
5486
5486
  name = "turso_node"
5487
- version = "0.4.3-pre.2"
5487
+ version = "0.4.4-pre.1"
5488
5488
  dependencies = [
5489
5489
  "chrono",
5490
5490
  "napi",
@@ -5497,7 +5497,7 @@ dependencies = [
5497
5497
 
5498
5498
  [[package]]
5499
5499
  name = "turso_parser"
5500
- version = "0.4.3-pre.2"
5500
+ version = "0.4.4-pre.1"
5501
5501
  dependencies = [
5502
5502
  "bitflags 2.9.4",
5503
5503
  "criterion",
@@ -5514,7 +5514,7 @@ dependencies = [
5514
5514
 
5515
5515
  [[package]]
5516
5516
  name = "turso_sdk_kit"
5517
- version = "0.4.3-pre.2"
5517
+ version = "0.4.4-pre.1"
5518
5518
  dependencies = [
5519
5519
  "bindgen",
5520
5520
  "env_logger 0.11.7",
@@ -5527,7 +5527,7 @@ dependencies = [
5527
5527
 
5528
5528
  [[package]]
5529
5529
  name = "turso_sdk_kit_macros"
5530
- version = "0.4.3-pre.2"
5530
+ version = "0.4.4-pre.1"
5531
5531
  dependencies = [
5532
5532
  "proc-macro2",
5533
5533
  "quote",
@@ -5536,7 +5536,7 @@ dependencies = [
5536
5536
 
5537
5537
  [[package]]
5538
5538
  name = "turso_sqlite3"
5539
- version = "0.4.3-pre.2"
5539
+ version = "0.4.4-pre.1"
5540
5540
  dependencies = [
5541
5541
  "env_logger 0.11.7",
5542
5542
  "libc",
@@ -5549,7 +5549,7 @@ dependencies = [
5549
5549
 
5550
5550
  [[package]]
5551
5551
  name = "turso_stress"
5552
- version = "0.4.3-pre.2"
5552
+ version = "0.4.4-pre.1"
5553
5553
  dependencies = [
5554
5554
  "antithesis_sdk",
5555
5555
  "clap",
@@ -5565,7 +5565,7 @@ dependencies = [
5565
5565
 
5566
5566
  [[package]]
5567
5567
  name = "turso_sync_engine"
5568
- version = "0.4.3-pre.2"
5568
+ version = "0.4.4-pre.1"
5569
5569
  dependencies = [
5570
5570
  "base64 0.22.1",
5571
5571
  "bytes",
@@ -5592,7 +5592,7 @@ dependencies = [
5592
5592
 
5593
5593
  [[package]]
5594
5594
  name = "turso_sync_js"
5595
- version = "0.4.3-pre.2"
5595
+ version = "0.4.4-pre.1"
5596
5596
  dependencies = [
5597
5597
  "genawaiter",
5598
5598
  "napi",
@@ -5607,7 +5607,7 @@ dependencies = [
5607
5607
 
5608
5608
  [[package]]
5609
5609
  name = "turso_sync_sdk_kit"
5610
- version = "0.4.3-pre.2"
5610
+ version = "0.4.4-pre.1"
5611
5611
  dependencies = [
5612
5612
  "bindgen",
5613
5613
  "env_logger 0.11.7",
@@ -5624,7 +5624,7 @@ dependencies = [
5624
5624
 
5625
5625
  [[package]]
5626
5626
  name = "turso_whopper"
5627
- version = "0.4.3-pre.2"
5627
+ version = "0.4.4-pre.1"
5628
5628
  dependencies = [
5629
5629
  "anyhow",
5630
5630
  "clap",
@@ -6,24 +6,24 @@ members = ["bindings/python"]
6
6
  exclude = ["perf/latency/limbo", "turso-test-runner"]
7
7
 
8
8
  [workspace.package]
9
- version = "0.4.3-pre.2"
9
+ version = "0.4.4-pre.1"
10
10
  authors = ["the Limbo authors"]
11
11
  edition = "2021"
12
12
  license = "MIT"
13
13
  repository = "https://github.com/tursodatabase/turso"
14
14
 
15
15
  [workspace.dependencies]
16
- turso = { path = "bindings/rust", version = "0.4.3-pre.2" }
17
- turso_node = { path = "bindings/javascript", version = "0.4.3-pre.2" }
18
- turso_sdk_kit = { path = "sdk-kit", version = "0.4.3-pre.2" }
19
- turso_sdk_kit_macros = { path = "sdk-kit-macros", version = "0.4.3-pre.2" }
20
- turso_sync_sdk_kit = { path = "sync/sdk-kit", version = "0.4.3-pre.2" }
21
- limbo_completion = { path = "extensions/completion", version = "0.4.3-pre.2" }
22
- turso_core = { path = "core", version = "0.4.3-pre.2" }
23
- turso_sync_engine = { path = "sync/engine", version = "0.4.3-pre.2" }
24
- turso_ext = { path = "extensions/core", version = "0.4.3-pre.2" }
25
- turso_macros = { path = "macros", version = "0.4.3-pre.2" }
26
- turso_parser = { path = "parser", version = "0.4.3-pre.2" }
16
+ turso = { path = "bindings/rust", version = "0.4.4-pre.1" }
17
+ turso_node = { path = "bindings/javascript", version = "0.4.4-pre.1" }
18
+ turso_sdk_kit = { path = "sdk-kit", version = "0.4.4-pre.1" }
19
+ turso_sdk_kit_macros = { path = "sdk-kit-macros", version = "0.4.4-pre.1" }
20
+ turso_sync_sdk_kit = { path = "sync/sdk-kit", version = "0.4.4-pre.1" }
21
+ limbo_completion = { path = "extensions/completion", version = "0.4.4-pre.1" }
22
+ turso_core = { path = "core", version = "0.4.4-pre.1" }
23
+ turso_sync_engine = { path = "sync/engine", version = "0.4.4-pre.1" }
24
+ turso_ext = { path = "extensions/core", version = "0.4.4-pre.1" }
25
+ turso_macros = { path = "macros", version = "0.4.4-pre.1" }
26
+ turso_parser = { path = "parser", version = "0.4.4-pre.1" }
27
27
  sql_generation = { path = "sql_generation" }
28
28
  strum = { version = "0.26", features = ["derive"] }
29
29
  strum_macros = "0.26"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyturso
3
- Version: 0.4.3rc2
3
+ Version: 0.4.4rc1
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Programming Language :: Python
6
6
  Classifier: Programming Language :: Python :: 3
@@ -18,6 +18,12 @@ pub enum PyTursoStatusCode {
18
18
  Io = 3,
19
19
  }
20
20
  create_exception!(turso, Busy, PyException, "database is locked");
21
+ create_exception!(
22
+ turso,
23
+ BusySnapshot,
24
+ PyException,
25
+ "database snapshot is stale"
26
+ );
21
27
  create_exception!(turso, Interrupt, PyException, "interrupted");
22
28
  create_exception!(turso, Error, PyException, "generic error");
23
29
  create_exception!(turso, Misuse, PyException, "API misuse");
@@ -31,6 +37,7 @@ create_exception!(turso, IoError, PyException, "I/O error");
31
37
  pub(crate) fn turso_error_to_py_err(err: TursoError) -> PyErr {
32
38
  match err {
33
39
  rsapi::TursoError::Busy(message) => Busy::new_err(message),
40
+ rsapi::TursoError::BusySnapshot(message) => BusySnapshot::new_err(message),
34
41
  rsapi::TursoError::Interrupt(message) => Interrupt::new_err(message),
35
42
  rsapi::TursoError::Error(message) => Error::new_err(message),
36
43
  rsapi::TursoError::Misuse(message) => Misuse::new_err(message),
@@ -1,4 +1,4 @@
1
- use crate::Instant;
1
+ use crate::MonotonicInstant;
2
2
  use std::time::Duration;
3
3
 
4
4
  /// Type alias for busy handler callback function.
@@ -52,7 +52,7 @@ pub struct BusyHandlerState {
52
52
  /// Number of times the busy handler has been invoked for this locking event
53
53
  invocation_count: i32,
54
54
  /// For timeout-based handlers: the next timeout instant to wait until
55
- timeout: Instant,
55
+ timeout: MonotonicInstant,
56
56
  /// For timeout-based handlers: the current iteration index into DELAYS
57
57
  iteration: usize,
58
58
  }
@@ -91,7 +91,7 @@ impl BusyHandlerState {
91
91
  ];
92
92
 
93
93
  /// Create a new busy handler state
94
- pub fn new(now: Instant) -> Self {
94
+ pub fn new(now: MonotonicInstant) -> Self {
95
95
  Self {
96
96
  invocation_count: 0,
97
97
  timeout: now,
@@ -100,14 +100,14 @@ impl BusyHandlerState {
100
100
  }
101
101
 
102
102
  /// Reset the state for a new locking event
103
- pub fn reset(&mut self, now: Instant) {
103
+ pub fn reset(&mut self, now: MonotonicInstant) {
104
104
  self.invocation_count = 0;
105
105
  self.timeout = now;
106
106
  self.iteration = 0;
107
107
  }
108
108
 
109
109
  /// Get the current timeout instant
110
- pub fn timeout(&self) -> Instant {
110
+ pub fn timeout(&self) -> MonotonicInstant {
111
111
  self.timeout
112
112
  }
113
113
 
@@ -118,7 +118,7 @@ impl BusyHandlerState {
118
118
  ///
119
119
  /// For timeout-based handlers, this also updates the internal timeout instant.
120
120
  /// For custom handlers, this invokes the callback and respects its return value.
121
- pub fn invoke(&mut self, handler: &BusyHandler, now: Instant) -> bool {
121
+ pub fn invoke(&mut self, handler: &BusyHandler, now: MonotonicInstant) -> bool {
122
122
  match handler {
123
123
  BusyHandler::None => {
124
124
  // No handler: return BUSY immediately
@@ -142,7 +142,7 @@ impl BusyHandlerState {
142
142
  /// Implements sqliteDefaultBusyCallback logic for timeout-based handling.
143
143
  ///
144
144
  /// This uses an exponentially increasing delay schedule, capped at 100ms per iteration.
145
- fn invoke_timeout_handler(&mut self, max_duration: Duration, now: Instant) -> bool {
145
+ fn invoke_timeout_handler(&mut self, max_duration: Duration, now: MonotonicInstant) -> bool {
146
146
  let idx = self.iteration.min(11);
147
147
  let mut delay = Self::DELAYS[idx];
148
148
  let mut prior = Self::TOTALS[idx];
@@ -170,21 +170,11 @@ impl BusyHandlerState {
170
170
  ///
171
171
  /// This returns the duration between `now` and the timeout instant.
172
172
  /// Returns `Duration::ZERO` if the timeout has already passed.
173
- pub fn get_delay(&self, now: Instant) -> Duration {
174
- if now.secs > self.timeout.secs
175
- || (now.secs == self.timeout.secs && now.micros >= self.timeout.micros)
176
- {
173
+ pub fn get_delay(&self, now: MonotonicInstant) -> Duration {
174
+ if now >= self.timeout {
177
175
  Duration::ZERO
178
176
  } else {
179
- let secs_diff = (self.timeout.secs - now.secs) as u64;
180
- let micros_diff = if self.timeout.micros >= now.micros {
181
- self.timeout.micros - now.micros
182
- } else {
183
- // Borrow from seconds
184
- return Duration::from_secs(secs_diff.saturating_sub(1))
185
- + Duration::from_micros((1_000_000 + self.timeout.micros - now.micros) as u64);
186
- };
187
- Duration::from_secs(secs_diff) + Duration::from_micros(micros_diff as u64)
177
+ self.timeout.duration_since(now)
188
178
  }
189
179
  }
190
180
  }
@@ -192,8 +182,9 @@ impl BusyHandlerState {
192
182
  #[cfg(test)]
193
183
  mod tests {
194
184
  use super::*;
195
- fn test_instant() -> Instant {
196
- Instant { secs: 0, micros: 0 }
185
+
186
+ fn test_instant() -> MonotonicInstant {
187
+ MonotonicInstant::now()
197
188
  }
198
189
 
199
190
  #[test]
@@ -365,7 +356,7 @@ mod tests {
365
356
  state.invoke(&handler, now);
366
357
 
367
358
  // Reset
368
- let later = Instant { secs: 1, micros: 0 };
359
+ let later = MonotonicInstant::now();
369
360
  state.reset(later);
370
361
 
371
362
  // Should be back to initial state
@@ -377,25 +368,21 @@ mod tests {
377
368
 
378
369
  #[test]
379
370
  fn test_get_delay_when_timeout_passed() {
380
- let now = Instant {
381
- secs: 10,
382
- micros: 0,
383
- };
371
+ let now = MonotonicInstant::now();
384
372
  let state = BusyHandlerState::new(now);
385
373
 
386
374
  // Timeout is at `now`, so any time >= now should return zero delay
387
375
  assert_eq!(state.get_delay(now), Duration::ZERO);
388
376
 
389
- let later = Instant {
390
- secs: 11,
391
- micros: 0,
392
- };
377
+ // A later time should also return zero
378
+ std::thread::sleep(Duration::from_micros(10));
379
+ let later = MonotonicInstant::now();
393
380
  assert_eq!(state.get_delay(later), Duration::ZERO);
394
381
  }
395
382
 
396
383
  #[test]
397
384
  fn test_get_delay_calculates_remaining_time() {
398
- let now = Instant { secs: 0, micros: 0 };
385
+ let now = MonotonicInstant::now();
399
386
  let mut state = BusyHandlerState::new(now);
400
387
 
401
388
  let handler = BusyHandler::Timeout(Duration::from_millis(100));
@@ -404,13 +391,5 @@ mod tests {
404
391
  // Check delay from `now` - should be 1ms
405
392
  let delay = state.get_delay(now);
406
393
  assert_eq!(delay, Duration::from_millis(1));
407
-
408
- // Check delay from half-way point
409
- let half = Instant {
410
- secs: 0,
411
- micros: 500,
412
- };
413
- let delay = state.get_delay(half);
414
- assert_eq!(delay, Duration::from_micros(500));
415
394
  }
416
395
  }
@@ -0,0 +1,150 @@
1
+ use std::time::{Duration, SystemTime, UNIX_EPOCH};
2
+
3
+ /// A monotonic instant in time, backed by `std::time::Instant`.
4
+ #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
5
+ pub struct MonotonicInstant(std::time::Instant);
6
+
7
+ impl MonotonicInstant {
8
+ pub fn now() -> Self {
9
+ MonotonicInstant(std::time::Instant::now())
10
+ }
11
+
12
+ pub fn elapsed(&self) -> Duration {
13
+ self.0.elapsed()
14
+ }
15
+
16
+ pub fn duration_since(&self, earlier: MonotonicInstant) -> Duration {
17
+ self.0.duration_since(earlier.0)
18
+ }
19
+
20
+ pub fn checked_add(&self, duration: Duration) -> Option<MonotonicInstant> {
21
+ self.0.checked_add(duration).map(MonotonicInstant)
22
+ }
23
+
24
+ pub fn checked_sub(&self, duration: Duration) -> Option<MonotonicInstant> {
25
+ self.0.checked_sub(duration).map(MonotonicInstant)
26
+ }
27
+ }
28
+
29
+ impl std::ops::Add<Duration> for MonotonicInstant {
30
+ type Output = MonotonicInstant;
31
+
32
+ fn add(self, rhs: Duration) -> Self::Output {
33
+ MonotonicInstant(self.0 + rhs)
34
+ }
35
+ }
36
+
37
+ impl std::ops::Sub<Duration> for MonotonicInstant {
38
+ type Output = MonotonicInstant;
39
+
40
+ fn sub(self, rhs: Duration) -> Self::Output {
41
+ MonotonicInstant(self.0 - rhs)
42
+ }
43
+ }
44
+
45
+ /// Wall-clock time as seconds and microseconds since Unix epoch.
46
+ #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
47
+ pub struct WallClockInstant {
48
+ pub secs: i64,
49
+ pub micros: u32,
50
+ }
51
+
52
+ const MICROS_PER_SEC: u32 = 1_000_000;
53
+
54
+ impl WallClockInstant {
55
+ pub fn now() -> Self {
56
+ let duration = SystemTime::now()
57
+ .duration_since(UNIX_EPOCH)
58
+ .expect("system time before Unix epoch");
59
+ WallClockInstant {
60
+ secs: duration.as_secs() as i64,
61
+ micros: duration.subsec_micros(),
62
+ }
63
+ }
64
+
65
+ pub fn to_system_time(self) -> SystemTime {
66
+ if self.secs >= 0 {
67
+ UNIX_EPOCH + Duration::new(self.secs as u64, self.micros * 1000)
68
+ } else {
69
+ let positive_secs = (-self.secs) as u64;
70
+ if self.micros > 0 {
71
+ let nanos_to_subtract = (1_000_000 - self.micros) * 1000;
72
+ UNIX_EPOCH - Duration::new(positive_secs - 1, nanos_to_subtract)
73
+ } else {
74
+ UNIX_EPOCH - Duration::new(positive_secs, 0)
75
+ }
76
+ }
77
+ }
78
+
79
+ pub fn checked_add_duration(&self, other: &Duration) -> Option<WallClockInstant> {
80
+ let mut secs = self.secs.checked_add_unsigned(other.as_secs())?;
81
+ let mut micros = other.subsec_micros() + self.micros;
82
+ if micros >= MICROS_PER_SEC {
83
+ micros -= MICROS_PER_SEC;
84
+ secs = secs.checked_add(1)?;
85
+ }
86
+ Some(Self { secs, micros })
87
+ }
88
+
89
+ pub fn checked_sub_duration(&self, other: &Duration) -> Option<WallClockInstant> {
90
+ let mut secs = self.secs.checked_sub_unsigned(other.as_secs())?;
91
+ let mut micros = self.micros as i32 - other.subsec_micros() as i32;
92
+ if micros < 0 {
93
+ micros += MICROS_PER_SEC as i32;
94
+ secs = secs.checked_sub(1)?;
95
+ }
96
+ Some(Self {
97
+ secs,
98
+ micros: micros as u32,
99
+ })
100
+ }
101
+ }
102
+
103
+ impl std::ops::Add<Duration> for WallClockInstant {
104
+ type Output = WallClockInstant;
105
+
106
+ fn add(self, rhs: Duration) -> Self::Output {
107
+ self.checked_add_duration(&rhs)
108
+ .expect("duration addition overflow")
109
+ }
110
+ }
111
+
112
+ impl std::ops::Sub<Duration> for WallClockInstant {
113
+ type Output = WallClockInstant;
114
+
115
+ fn sub(self, rhs: Duration) -> Self::Output {
116
+ self.checked_sub_duration(&rhs)
117
+ .expect("duration subtraction underflow")
118
+ }
119
+ }
120
+
121
+ impl<T: chrono::TimeZone> From<chrono::DateTime<T>> for WallClockInstant {
122
+ fn from(value: chrono::DateTime<T>) -> Self {
123
+ WallClockInstant {
124
+ secs: value.timestamp(),
125
+ micros: value.timestamp_subsec_micros(),
126
+ }
127
+ }
128
+ }
129
+
130
+ pub trait Clock {
131
+ /// Monotonic time for timeout checking and elapsed time measurement.
132
+ /// Cheap on real systems (reads TSC), controllable in simulation.
133
+ fn current_time_monotonic(&self) -> MonotonicInstant;
134
+
135
+ /// Wall-clock time for timestamps (WAL, datetime functions).
136
+ /// Controllable in simulation for deterministic behavior.
137
+ fn current_time_wall_clock(&self) -> WallClockInstant;
138
+ }
139
+
140
+ pub struct DefaultClock;
141
+
142
+ impl Clock for DefaultClock {
143
+ fn current_time_monotonic(&self) -> MonotonicInstant {
144
+ MonotonicInstant::now()
145
+ }
146
+
147
+ fn current_time_wall_clock(&self) -> WallClockInstant {
148
+ WallClockInstant::now()
149
+ }
150
+ }
@@ -1,4 +1,5 @@
1
- use crate::{io::clock::DefaultClock, Clock, Completion, File, Instant, OpenFlags, Result, IO};
1
+ use crate::io::clock::{DefaultClock, MonotonicInstant, WallClockInstant};
2
+ use crate::{Clock, Completion, File, OpenFlags, Result, IO};
2
3
  use parking_lot::RwLock;
3
4
  use std::io::{Read, Seek, Write};
4
5
  use std::sync::Arc;
@@ -43,8 +44,12 @@ impl IO for GenericIO {
43
44
  }
44
45
 
45
46
  impl Clock for GenericIO {
46
- fn now(&self) -> Instant {
47
- DefaultClock.now()
47
+ fn current_time_monotonic(&self) -> MonotonicInstant {
48
+ DefaultClock.current_time_monotonic()
49
+ }
50
+
51
+ fn current_time_wall_clock(&self) -> WallClockInstant {
52
+ DefaultClock.current_time_wall_clock()
48
53
  }
49
54
  }
50
55
 
@@ -1,7 +1,7 @@
1
1
  #![allow(clippy::arc_with_non_send_sync)]
2
2
 
3
3
  use super::{common, Completion, CompletionInner, File, OpenFlags, IO};
4
- use crate::io::clock::{Clock, DefaultClock, Instant};
4
+ use crate::io::clock::{Clock, DefaultClock, MonotonicInstant, WallClockInstant};
5
5
  use crate::storage::wal::CKPT_BATCH_PAGES;
6
6
  use crate::{turso_assert, CompletionError, LimboError, Result};
7
7
  use parking_lot::Mutex;
@@ -624,8 +624,12 @@ impl IO for UringIO {
624
624
  }
625
625
 
626
626
  impl Clock for UringIO {
627
- fn now(&self) -> Instant {
628
- DefaultClock.now()
627
+ fn current_time_monotonic(&self) -> MonotonicInstant {
628
+ DefaultClock.current_time_monotonic()
629
+ }
630
+
631
+ fn current_time_wall_clock(&self) -> WallClockInstant {
632
+ DefaultClock.current_time_wall_clock()
629
633
  }
630
634
  }
631
635