//! Per-item write-error classifier shared by `batch_create`,
//! `batch_update`, and `batch_upsert`.
//!
//! Each of those runs its terminal INSERT/UPDATE/UPSERT inside a
//! per-item SAVEPOINT and needs a unique-constraint violation
//! (SQLSTATE 23505) to surface as `CoolError::Conflict` so the batch
//! envelope's per-item error code matches the single-row create/update
//! paths' semantics. Anything else preserves sqlstate/constraint via
//! [`cool_error_from_sqlx`].
use CoolError;
use crate::;
pub