pub struct UnaryOp<V: Expression> {
pub op: UnaryOpType,
pub arg: V,
}Fields§
§op: UnaryOpType§arg: VTrait Implementations§
Source§impl<E: Expression> Expression for UnaryOp<E>
impl<E: Expression> Expression for UnaryOp<E>
Source§fn write_query(
&self,
writer: &dyn SqlWriter,
context: &mut Context,
out: &mut DynQuery,
)
fn write_query( &self, writer: &dyn SqlWriter, context: &mut Context, out: &mut DynQuery, )
Generates the SQL representation of this expression.
Source§fn accept_visitor(
&self,
matcher: &mut dyn ExpressionVisitor,
writer: &dyn SqlWriter,
context: &mut Context,
out: &mut DynQuery,
) -> bool
fn accept_visitor( &self, matcher: &mut dyn ExpressionVisitor, writer: &dyn SqlWriter, context: &mut Context, out: &mut DynQuery, ) -> bool
Traverses the expression with a visitor.
Source§fn as_identifier(&self, context: &mut Context) -> String
fn as_identifier(&self, context: &mut Context) -> String
Renders the expression as a string suitable for use as an identifier.
Source§impl<E: Expression> OpPrecedence for UnaryOp<E>
impl<E: Expression> OpPrecedence for UnaryOp<E>
Source§fn precedence(&self, writer: &dyn SqlWriter) -> i32
fn precedence(&self, writer: &dyn SqlWriter) -> i32
Lower numbers bind weaker, writers parenthesize when child precedence <= operator precedence.
Auto Trait Implementations§
impl<V> Freeze for UnaryOp<V>where
V: Freeze,
impl<V> RefUnwindSafe for UnaryOp<V>where
V: RefUnwindSafe,
impl<V> Send for UnaryOp<V>
impl<V> Sync for UnaryOp<V>
impl<V> Unpin for UnaryOp<V>where
V: Unpin,
impl<V> UnsafeUnpin for UnaryOp<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for UnaryOp<V>where
V: UnwindSafe,
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