surrealdb_expr/expr/convert/statements/
upsert.rs1use crate::sql::statements::upsert::*;
7
8impl From<UpsertStatement> for crate::expr::statements::UpsertStatement {
9 fn from(v: UpsertStatement) -> Self {
10 Self {
11 only: v.only,
12 what: v.what.into_iter().map(From::from).collect(),
13 with: v.with.map(Into::into),
14 data: v.data.map(Into::into),
15 cond: v.cond.map(Into::into),
16 output: v.output.map(Into::into),
17 timeout: v.timeout.into(),
18 explain: v.explain.map(Into::into),
19 }
20 }
21}
22
23impl From<crate::expr::statements::UpsertStatement> for UpsertStatement {
24 fn from(v: crate::expr::statements::UpsertStatement) -> Self {
25 Self {
26 only: v.only,
27 what: v.what.into_iter().map(From::from).collect(),
28 with: v.with.map(Into::into),
29 data: v.data.map(Into::into),
30 cond: v.cond.map(Into::into),
31 output: v.output.map(Into::into),
32 timeout: v.timeout.into(),
33 explain: v.explain.map(Into::into),
34 }
35 }
36}