Skip to main content

Module stream

Module stream 

Source
Expand description

SQLite dialect-forked queries for the RFC-015 stream surface.

Populated in Phase 2a.3 per RFC-023 §4.1 (write path) + Phase 2b.2.2 (read path). Mirrors ff-backend-postgres/src/stream.rs statement-for-statement: append_frame, read_stream, tail_stream (same SELECT shape; in-Rust broadcast replaces PG’s LISTEN/NOTIFY at the backend layer — see crate::pubsub::PubSub::stream_frame), and read_summary.

§Dialect notes

  • ff_stream_summary.document_json is TEXT (not jsonb) in the SQLite port; JSON Merge Patch is applied in Rust via crate::backend::apply_json_merge_patch and written back whole. Same observable behaviour as the PG jsonb path.
  • BestEffortLive trim uses a subquery-IN delete with the same shape as PG — SQLite supports correlated subqueries in DELETE.
  • pg_advisory_xact_lock is replaced by the enclosing BEGIN IMMEDIATE lock (§4.1 A3 single-writer).