Enum Returning
pub enum Returning {
Model {
include: Vec<Path>,
},
Changed,
Expr(Expr),
Value(Expr),
}Expand description
Variants§
Model
Return the full model with the specified association includes.
Changed
Return whether the operation changed any rows.
Expr(Expr)
Return the result of evaluating an expression against the source rows.
Value(Expr)
Return a fixed value, independent of the statement source.
Implementations§
§impl Returning
impl Returning
pub fn from_expr_iter<T>(items: impl IntoIterator<Item = T>) -> Returning
pub fn from_expr_iter<T>(items: impl IntoIterator<Item = T>) -> Returning
Creates a Returning::Expr from an iterator of expressions, combining
them into a record expression.
pub fn model_includes(&self) -> &[Path]
pub fn model_includes(&self) -> &[Path]
Returns the association include paths for a Model variant, or an
empty slice for other variants.
pub fn model_includes_mut_unwrap(&mut self) -> &mut Vec<Path>
pub fn model_includes_mut_unwrap(&mut self) -> &mut Vec<Path>
Returns a mutable reference to the Model variant’s include paths.
§Panics
Panics if this is not the Model variant.
pub fn is_changed(&self) -> bool
pub fn is_changed(&self) -> bool
Returns true if this is the Changed variant.
pub fn as_expr(&self) -> Option<&Expr>
pub fn as_expr(&self) -> Option<&Expr>
Returns a reference to the inner expression if this is the Expr
variant.
pub fn as_expr_unwrap(&self) -> &Expr
pub fn as_expr_unwrap(&self) -> &Expr
pub fn as_expr_mut(&mut self) -> Option<&mut Expr>
pub fn as_expr_mut(&mut self) -> Option<&mut Expr>
Returns a mutable reference to the inner expression if this is the
Expr variant.
pub fn as_expr_mut_unwrap(&mut self) -> &mut Expr
pub fn as_expr_mut_unwrap(&mut self) -> &mut Expr
Returns a mutable reference to the inner expression.
§Panics
Panics if this is not the Expr variant.