use crate::sql::statements::upsert::*;
impl From<UpsertStatement> for crate::expr::statements::UpsertStatement {
fn from(v: UpsertStatement) -> Self {
Self {
only: v.only,
what: v.what.into_iter().map(From::from).collect(),
with: v.with.map(Into::into),
data: v.data.map(Into::into),
cond: v.cond.map(Into::into),
output: v.output.map(Into::into),
timeout: v.timeout.into(),
explain: v.explain.map(Into::into),
}
}
}
impl From<crate::expr::statements::UpsertStatement> for UpsertStatement {
fn from(v: crate::expr::statements::UpsertStatement) -> Self {
Self {
only: v.only,
what: v.what.into_iter().map(From::from).collect(),
with: v.with.map(Into::into),
data: v.data.map(Into::into),
cond: v.cond.map(Into::into),
output: v.output.map(Into::into),
timeout: v.timeout.into(),
explain: v.explain.map(Into::into),
}
}
}