rorm_sql/on_conflict.rs
1/**
2Representation of an ON CONFLICT case in SQL.
3
4// TODO: Check ignore cases for different database backends
5// Mariadb: <https://mariadb.com/kb/en/insert-ignore/>
6*/
7#[derive(Debug, Copy, Clone)]
8pub enum OnConflict {
9 /// Aborts the current operation and rolls back all changes made from the current operation.
10 /// In case of an active transaction only the current statement is affected.
11 /// Prior successfully executed statement won't be rolled back
12 ABORT,
13 /// In case of an active transaction rolls back all statements.
14 /// If there's no transaction, the behaviour is equivalent with [OnConflict::ABORT]
15 ROLLBACK,
16}