surrealdb_expr/expr/convert/record_id/self_mod.rs
1//! `sql` -> `expr` conversions declared directly in [`crate::sql::record_id`].
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::record_id::*;
7
8impl From<RecordIdLit> for crate::expr::RecordIdLit {
9 fn from(v: RecordIdLit) -> Self {
10 crate::expr::RecordIdLit {
11 table: v.table.into(),
12 key: v.key.into(),
13 }
14 }
15}
16
17impl From<crate::expr::RecordIdLit> for RecordIdLit {
18 fn from(v: crate::expr::RecordIdLit) -> Self {
19 RecordIdLit {
20 table: v.table.into(),
21 key: v.key.into(),
22 }
23 }
24}