/*
* Orvanta API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 6.5.0
* Contact: contact@orvanta.cloud
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// ConflictMode : What the target does with a row that collides with one already present. `error` is a plain `INSERT` (the default, and the behaviour of every run before #1216). `skip` is `INSERT ... ON CONFLICT DO NOTHING`, which makes re-sending an already-applied batch a no-op -- the only thing that lets a run resume across the window where the previous attempt's last batch may or may not have committed. `skip` is refused with a 400 if the target table has no unique constraint covering the mapped columns, since `ON CONFLICT DO NOTHING` would then never fire and would duplicate rather than skip.
/// What the target does with a row that collides with one already present. `error` is a plain `INSERT` (the default, and the behaviour of every run before #1216). `skip` is `INSERT ... ON CONFLICT DO NOTHING`, which makes re-sending an already-applied batch a no-op -- the only thing that lets a run resume across the window where the previous attempt's last batch may or may not have committed. `skip` is refused with a 400 if the target table has no unique constraint covering the mapped columns, since `ON CONFLICT DO NOTHING` would then never fire and would duplicate rather than skip.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ConflictMode {
#[serde(rename = "error")]
Error,
#[serde(rename = "skip")]
Skip,
}
impl std::fmt::Display for ConflictMode {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Error => write!(f, "error"),
Self::Skip => write!(f, "skip"),
}
}
}
impl Default for ConflictMode {
fn default() -> ConflictMode {
Self::Error
}
}