pub fn is_read_only_violation(err: &Error) -> boolExpand description
Finds a sqlx::Error carrying SQLSTATE 25006 (cannot execute ... in a read-only transaction) anywhere in err’s chain – the error a write raises when its connection turned
read-only mid-query, after already passing this crate’s connect/acquire checks (e.g. an
instance demoted between before_acquire and the query, or a WritablePolicy::Prefer pool
that fell back to a replica on purpose).