pub fn extract_constraint_value(db_err: &dyn DatabaseError) -> Option<String>Expand description
Extracts the conflicting value from a database error’s constraint violation.
Downcasts to sqlx::postgres::PgDatabaseError, reads its detail(),
and parses the conflicting value. Called by generated create_all code
to attribute a batch’s duplicate-id conflict to one of its own ids — see
crate::IdConflict.
Security note: see parse_constraint_detail_value — the returned
value may be PII and must not be exposed to untrusted clients.