surrealdb_expr/expr/statements/output.rs
1use crate::expr::Expr;
2use crate::expr::fetch::Fetchs;
3
4#[derive(Clone, Debug, Eq, PartialEq, Hash)]
5pub struct OutputStatement {
6 pub what: Expr,
7 pub fetch: Option<Fetchs>,
8}
9
10impl OutputStatement {
11 /// Check if we require a writeable transaction
12 pub fn read_only(&self) -> bool {
13 self.what.read_only() && self.fetch.as_ref().map(|x| x.read_only()).unwrap_or(true)
14 }
15}