Skip to main content

surrealdb_expr/expr/statements/
relate.rs

1use crate::expr::{Data, Expr, Output};
2
3#[derive(Clone, Debug, Eq, PartialEq, Hash)]
4pub struct RelateStatement {
5	pub only: bool,
6	/// When true, update an existing edge record with the same explicit id.
7	pub or_update: bool,
8	/// The expression resulting in the table through which we create a relation
9	pub through: Expr,
10	/// The expression the relation is from
11	pub from: Expr,
12	/// The expression the relation targets.
13	pub to: Expr,
14	/// The data associated with the relation being created
15	pub data: Option<Data>,
16	/// What the result of the statement should resemble (i.e. Diff or no result etc).
17	pub output: Option<Output>,
18	/// The timeout for the statement
19	pub timeout: Expr,
20}