pub struct CreateRuleStatement {
pub name: String,
pub or_replace: bool,
pub event: String,
pub table: String,
pub instead: bool,
pub when_condition: Option<Expr>,
pub commands: Vec<Statement>,
}Expand description
v7.39 (round 139) — CREATE RULE query-rewrite rule AST node.
Fields§
§name: String§or_replace: bool§event: StringEvent keyword, uppercased: INSERT / UPDATE / DELETE / SELECT.
table: String§instead: booltrue = DO INSTEAD (replace the operation), false = DO ALSO
(run alongside; PG’s default when neither keyword is written).
when_condition: Option<Expr>Optional WHERE ( condition ) — the rule applies only when it holds.
commands: Vec<Statement>The DO commands (over NEW / OLD). Empty = NOTHING.
Trait Implementations§
Source§impl Clone for CreateRuleStatement
impl Clone for CreateRuleStatement
Source§fn clone(&self) -> CreateRuleStatement
fn clone(&self) -> CreateRuleStatement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateRuleStatement
impl Debug for CreateRuleStatement
Source§impl PartialEq for CreateRuleStatement
impl PartialEq for CreateRuleStatement
impl StructuralPartialEq for CreateRuleStatement
Auto Trait Implementations§
impl Freeze for CreateRuleStatement
impl RefUnwindSafe for CreateRuleStatement
impl Send for CreateRuleStatement
impl Sync for CreateRuleStatement
impl Unpin for CreateRuleStatement
impl UnsafeUnpin for CreateRuleStatement
impl UnwindSafe for CreateRuleStatement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more