ff_backend_sqlite/lib.rs
1//! `EngineBackend` implementation backed by SQLite — **dev-only**
2//! per RFC-023.
3//!
4//! # Phase 1a scope
5//!
6//! This crate is the RFC-023 Phase 1a scaffold: construction
7//! semantics (`FF_DEV_MODE=1` guard, per-path registry, connection
8//! pool, WARN banner), the SQLite transient-busy error classifier
9//! skeleton, and an [`EngineBackend`](ff_core::engine_backend::EngineBackend)
10//! impl whose data-plane methods return
11//! [`EngineError::Unavailable`](ff_core::engine_error::EngineError::Unavailable).
12//! Phase 1b lands the hand-ported SQLite-dialect migrations;
13//! Phase 2+ replaces the Unavailable stubs with real bodies
14//! paralleling `ff-backend-postgres`.
15//!
16//! # Production guard
17//!
18//! [`SqliteBackend::new`] refuses to construct without
19//! `FF_DEV_MODE=1` in the process environment. The refusal is on
20//! the TYPE (RFC-023 §3.3 A3 / §4.5) so every path — embedded
21//! library consumers, `ff_server::start_sqlite_branch`, and
22//! `ff_sdk::FlowFabricWorker::connect_with` — pays the guard.
23//!
24//! No ferriskey dep — this crate's transport is `sqlx`.
25
26#![allow(clippy::result_large_err)]
27
28mod backend;
29mod budget;
30mod completion_subscribe;
31mod config;
32mod errors;
33mod handle_codec;
34mod lease_event_subscribe;
35mod operator;
36mod outbox_cursor;
37mod reads;
38mod reclaim;
39mod reconcilers;
40mod scanner_supervisor;
41mod signal_delivery_subscribe;
42#[doc(hidden)]
43pub mod pubsub;
44pub mod queries;
45mod registry;
46pub mod retry;
47mod suspend_ops;
48mod tx_util;
49
50pub use backend::SqliteBackend;
51pub use errors::{MAX_ATTEMPTS, is_retryable_sqlite_busy};
52pub use retry::{IsRetryableBusy, retry_serializable};
53pub use scanner_supervisor::{SqliteScannerConfig, SqliteScannerHandle};