surrealdb_expr/expr/convert/statements/
select.rs1use crate::sql::statements::select::*;
7
8impl From<SelectStatement> for crate::expr::statements::SelectStatement {
9 fn from(v: SelectStatement) -> Self {
10 Self {
11 fields: v.fields.into(),
12 omit: v.omit.into_iter().map(Into::into).collect(),
13 only: v.only,
14 what: v.what.into_iter().map(From::from).collect(),
15 with: v.with.map(Into::into),
16 cond: v.cond.map(Into::into),
17 split: v.split.map(Into::into),
18 group: v.group.map(Into::into),
19 order: v.order.map(Into::into),
20 limit: v.limit.map(Into::into),
21 start: v.start.map(Into::into),
22 fetch: v.fetch.map(Into::into),
23 version: v.version.into(),
24 timeout: v.timeout.into(),
25 explain: v.explain.map(Into::into),
26 tempfiles: v.tempfiles,
27 for_update: v.for_update,
28 }
29 }
30}
31
32impl From<crate::expr::statements::SelectStatement> for SelectStatement {
33 fn from(v: crate::expr::statements::SelectStatement) -> Self {
34 Self {
35 fields: v.fields.into(),
36 omit: v.omit.into_iter().map(Into::into).collect(),
37 only: v.only,
38 what: v.what.into_iter().map(From::from).collect(),
39 with: v.with.map(Into::into),
40 cond: v.cond.map(Into::into),
41 split: v.split.map(Into::into),
42 group: v.group.map(Into::into),
43 order: v.order.map(Into::into),
44 limit: v.limit.map(Into::into),
45 start: v.start.map(Into::into),
46 fetch: v.fetch.map(Into::into),
47 version: v.version.into(),
48 timeout: v.timeout.into(),
49 explain: v.explain.map(Into::into),
50 tempfiles: v.tempfiles,
51 for_update: v.for_update,
52 }
53 }
54}