surrealdb_expr/expr/convert/with.rs
1//! `sql` -> `expr` conversions for [`crate::sql::with`].
2//!
3//! Lives in core rather than beside the AST: `surrealdb-sql` sits below
4//! core, so it cannot name `expr` types.
5
6use crate::sql::with::*;
7
8impl From<With> for crate::expr::With {
9 fn from(v: With) -> Self {
10 match v {
11 With::NoIndex => Self::NoIndex,
12 With::Index(i) => Self::Index(i),
13 }
14 }
15}
16
17impl From<crate::expr::With> for With {
18 fn from(v: crate::expr::With) -> Self {
19 match v {
20 crate::expr::With::NoIndex => Self::NoIndex,
21 crate::expr::With::Index(i) => Self::Index(i),
22 }
23 }
24}