• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

joaoh82 / rust_sqlite / 25638930315 / 1
69%
main: 69%

Build:
DEFAULT BRANCH: main
Ran 10 May 2026 08:30PM UTC
Files 60
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 May 2026 08:26PM UTC coverage: 68.001% (+0.2%) from 67.809%
25638930315.1

push

github

web-flow
feat(engine): Phase 11.5 snapshot-isolated reads via Statement::query (SQLR-22) (#126)

Closes the most visible 11.4 limitation: reads via
prepare()/query() now route through the BEGIN-time snapshot,
matching the behaviour Connection::execute("SELECT…") already
had. Picked ahead of the plan-doc's 11.5 (checkpoint
integration) because the prepare/query gap was a real
correctness hole — users hitting BEGIN CONCURRENT would
silently see post-commit data instead of snapshot data through
the prepared-statement path.

Connection.concurrent_tx: Option<ConcurrentTx> →
Mutex<Option<ConcurrentTx>>. Required because Statement::query
takes &self and can't mutate concurrent_tx without interior
mutability. Mutex (not RefCell) preserves Connection: Send +
Sync — the Phase 11.1 contract.

New `with_snapshot_read<F, R>(&self, f: F) -> R` helper:
- Locks concurrent_tx, then db.inner (consistent
  concurrent_tx → inner ordering across every code path).
- If a transaction is open, swaps db.tables ↔ tx.tables for
  the duration of f, with a Drop-based scope guard so a panic
  inside f can't leave db.tables pointing at the snapshot
  clone (which would corrupt every sibling handle's view).
- If no transaction is open, runs f against the live db
  directly — same path the legacy query() used.

Statement::query / Statement::query_with_params route through
the helper. Same SelectQuery / param-substitution code; only
the &Database lookup point changes.

Internal lifecycle methods refactored:
- new lock_concurrent_tx() centralises poison handling and
  keeps the lock-order discipline visible at every call site.
- begin_concurrent / commit_concurrent / rollback_concurrent /
  execute_in_concurrent_tx all updated to lock through it.
  Mechanical — no behaviour change for those paths.

Tests (5 new connection-level):
- query_inside_concurrent_tx_sees_begin_time_snapshot — the
  test I removed in 11.4 because it was failing; now passes.
- query_inside_concurrent_tx_sees_own_writes ... (continued)

10411 of 15310 relevant lines covered (68.0%)

1.23 hits per line

Source Files on job 25638930315.1
  • Tree
  • List 60
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25638930315
  • ec18292e on github
  • Prev Job for on main (#25632443257.1)
  • Next Job for on main (#25652227157.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc