pub struct SetOperationBindingPowerTable {
pub union_except: BindingPower,
pub intersect: BindingPower,
}Expand description
Dialect-owned set-operation binding powers.
Set operations combine SetExpr query bodies rather
than Expr nodes, so they use a small parallel table
keyed by SetOperator. The same binding-power discipline still applies:
parser precedence climbing and render-time parenthesization both read this
table, so INTERSECT cannot drift from UNION/EXCEPT in one direction only.
Fields§
§union_except: BindingPowerBinding power of UNION/EXCEPT.
intersect: BindingPowerBinding power of INTERSECT (tighter than UNION/EXCEPT).
Implementations§
Source§impl SetOperationBindingPowerTable
impl SetOperationBindingPowerTable
Sourcepub const fn set_operation(&self, op: &SetOperator) -> BindingPower
pub const fn set_operation(&self, op: &SetOperator) -> BindingPower
Return the binding power for op.
Sourcepub const fn with_set_operator(self, op: &SetOperator, bp: BindingPower) -> Self
pub const fn with_set_operator(self, op: &SetOperator, bp: BindingPower) -> Self
Return a copy of this table with one set-operator class replaced.
Sourcepub const fn needs_parens(
&self,
parent: &SetOperator,
child: &SetOperator,
side: Side,
) -> bool
pub const fn needs_parens( &self, parent: &SetOperator, child: &SetOperator, side: Side, ) -> bool
Return whether a child set operation needs parentheses under parent.
Trait Implementations§
Source§impl Clone for SetOperationBindingPowerTable
impl Clone for SetOperationBindingPowerTable
Source§fn clone(&self) -> SetOperationBindingPowerTable
fn clone(&self) -> SetOperationBindingPowerTable
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 moreimpl Copy for SetOperationBindingPowerTable
impl Eq for SetOperationBindingPowerTable
impl StructuralPartialEq for SetOperationBindingPowerTable
Auto Trait Implementations§
impl Freeze for SetOperationBindingPowerTable
impl RefUnwindSafe for SetOperationBindingPowerTable
impl Send for SetOperationBindingPowerTable
impl Sync for SetOperationBindingPowerTable
impl Unpin for SetOperationBindingPowerTable
impl UnsafeUnpin for SetOperationBindingPowerTable
impl UnwindSafe for SetOperationBindingPowerTable
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