Expression

Trait Expression 

Source
pub trait Expression:
    OpPrecedence
    + Send
    + Sync
    + Debug {
    // Required method
    fn write_query(
        &self,
        writer: &dyn SqlWriter,
        context: &mut Context,
        out: &mut String,
    );

    // Provided method
    fn is_ordered(&self) -> bool { ... }
}
Expand description

A renderable SQL expression node.

Required Methods§

Source

fn write_query( &self, writer: &dyn SqlWriter, context: &mut Context, out: &mut String, )

Serialize the expression into the output string using the dialect writer.

Provided Methods§

Source

fn is_ordered(&self) -> bool

Whether this expression carries ordering (ASC/DESC) information.

Trait Implementations§

Source§

impl Expression for &dyn Expression

Source§

fn write_query( &self, writer: &dyn SqlWriter, context: &mut Context, out: &mut String, )

Serialize the expression into the output string using the dialect writer.
Source§

fn is_ordered(&self) -> bool

Whether this expression carries ordering (ASC/DESC) information.
Source§

impl<'a, T: Expression> From<&'a T> for &'a dyn Expression

Source§

fn from(value: &'a T) -> Self

Converts to this type from the input type.
Source§

impl OpPrecedence for &dyn Expression

Source§

fn precedence(&self, writer: &dyn SqlWriter) -> i32

Lower numbers bind weaker; writers parenthesize when child precedence <= operator precedence.

Implementations on Foreign Types§

Source§

impl Expression for bool

Source§

fn write_query( &self, writer: &dyn SqlWriter, context: &mut Context, out: &mut String, )

Source§

impl Expression for ()

Source§

fn write_query( &self, _writer: &dyn SqlWriter, _context: &mut Context, _out: &mut String, )

Source§

impl<T: Expression> Expression for &T

Source§

fn write_query( &self, writer: &dyn SqlWriter, context: &mut Context, out: &mut String, )

Source§

fn is_ordered(&self) -> bool

Implementors§