1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! Glue shared by the sqlx-backed backends ([`sqlite`](super::sqlite) and
//! [`postgres`](super::postgres)).
//!
//! Everything here is **dialect-independent**: it never names a concrete
//! `sqlx::Database`, so it is defined exactly once regardless of which (or both)
//! of the `sqlite` / `postgres` features are enabled. The SQL-bearing code — the
//! `op_*` functions with their compile-time-checked `sqlx::query!` literals, which
//! *are* dialect-bound — lives in each backend module.
use Arc;
use crate::;
/// The current span's OpenTelemetry status/error fields, recorded on failure.
///
/// The span must declare `otel.status_code` and `error.type` as
/// [`tracing::field::Empty`]. Only the error *kind* ([`Error::kind_str`]) is
/// recorded — never a payload or message body.
pub
/// Resolves an edge label to its paired inverse label, if any (see
/// [`InMemoryStore`](crate::InMemoryStore)).
pub type InverseResolver = ;
/// Map an [`sqlx::Error`] onto the store's [`Error`], collapsing the two cases the
/// store gives dedicated variants (`RowNotFound` → [`Error::NotFound`], a unique
/// violation → [`Error::AlreadyExists`]) and treating everything else as a generic
/// backend error. Dialect-independent: `is_unique_violation()` is honored by every
/// sqlx driver.
/// Merge a backend's embedded schema migrations with a consumer's own into one
/// ordered ledger.
///
/// This is the shared body behind each backend's `migrator_with`. Two
/// `sqlx::migrate!` migrators would share sqlx's single hardcoded
/// `_sqlx_migrations` ledger, forcing non-overlapping version ranges and
/// `set_ignore_missing(true)` on both; merging into one migrator sidesteps that.
/// Versions across the combined set must be unique and are applied in ascending
/// order, so a consumer numbers its migrations above the backend's low range.
pub