pub struct CreateRule {
pub or_replace: bool,
pub name: Ident,
pub event: CreateRuleEvent,
pub table_name: ObjectName,
pub condition: Option<Expr>,
pub do_kind: Option<CreateRuleDoKind>,
pub action: CreateRuleAction,
}Expand description
A PostgreSQL rule with source spans derived from its identifiers, condition and actions.
CREATE [ OR REPLACE ] RULE name AS ON event
TO table_name [ WHERE condition ]
DO [ ALSO | INSTEAD ] { NOTHING | command | ( command ; command ... ) }See PostgreSQL
Fields§
§or_replace: booltrue when OR REPLACE was present.
name: IdentName of the rule.
event: CreateRuleEventEvent the rule fires on (SELECT, INSERT, UPDATE or DELETE).
table_name: ObjectNameTable the rule is defined on.
condition: Option<Expr>Optional expression for the WHERE clause.
do_kind: Option<CreateRuleDoKind>Optional ALSO or INSTEAD keyword following DO.
action: CreateRuleActionAction the rule performs.
Trait Implementations§
Source§impl Clone for CreateRule
impl Clone for CreateRule
Source§fn clone(&self) -> CreateRule
fn clone(&self) -> CreateRule
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 CreateRule
impl Debug for CreateRule
Source§impl Display for CreateRule
impl Display for CreateRule
impl Eq for CreateRule
Source§impl From<CreateRule> for Statement
impl From<CreateRule> for Statement
Source§fn from(v: CreateRule) -> Self
fn from(v: CreateRule) -> Self
Converts to this type from the input type.
Source§impl Hash for CreateRule
impl Hash for CreateRule
Source§impl Ord for CreateRule
impl Ord for CreateRule
Source§fn cmp(&self, other: &CreateRule) -> Ordering
fn cmp(&self, other: &CreateRule) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for CreateRule
impl PartialEq for CreateRule
Source§impl PartialOrd for CreateRule
impl PartialOrd for CreateRule
Source§impl Spanned for CreateRule
impl Spanned for CreateRule
impl StructuralPartialEq for CreateRule
Auto Trait Implementations§
impl Freeze for CreateRule
impl RefUnwindSafe for CreateRule
impl Send for CreateRule
impl Sync for CreateRule
impl Unpin for CreateRule
impl UnsafeUnpin for CreateRule
impl UnwindSafe for CreateRule
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