//! Write-error classifier shared by the batch create/update/upsert paths
//! and the single-row create/update paths.
//!
//! The batch paths run their terminal INSERT/UPDATE/UPSERT inside a
//! per-item SAVEPOINT; the single-row paths run it as the whole
//! statement. Both need a unique-constraint violation (SQLSTATE 23505)
//! to surface as a 409 rather than the 500 that `cool_error_from_sqlx`
//! alone would produce. The sqlstate/constraint captured from the driver
//! is preserved via [`CoolError::ConflictTyped`] so
//! `CoolError::db_sqlstate`/`db_constraint` keep working regardless of
//! whether the violation was classified as a conflict or fell through to
//! [`cool_error_from_sqlx`]'s `DatabaseTyped`.
use ;
use crate::;
pub