pub trait Expression:
OpPrecedence
+ Send
+ Sync
+ Debug {
// Required methods
fn write_query(
&self,
writer: &dyn SqlWriter,
context: &mut Context,
out: &mut DynQuery,
);
fn accept_visitor(
&self,
matcher: &mut dyn ExpressionVisitor,
writer: &dyn SqlWriter,
context: &mut Context,
_out: &mut DynQuery,
) -> bool;
// Provided method
fn as_identifier(&self, context: &mut Context) -> String { ... }
}Expand description
Renderable SQL expression.
Required Methods§
Sourcefn 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, )
Serialize the expression into out using writer.
Sourcefn 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
Check if the matcher matching this expression
Provided Methods§
Sourcefn as_identifier(&self, context: &mut Context) -> String
fn as_identifier(&self, context: &mut Context) -> String
Converts the given value to a String representing the expression
Trait Implementations§
Source§impl Expression for &dyn Expression
impl Expression for &dyn Expression
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, )
Serialize the expression into
out using writer.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
Check if the matcher matching this expression
Source§fn as_identifier(&self, context: &mut Context) -> String
fn as_identifier(&self, context: &mut Context) -> String
Converts the given value to a
String representing the expressionSource§impl<'a, T: Expression> From<&'a T> for &'a dyn Expression
impl<'a, T: Expression> From<&'a T> for &'a dyn Expression
Source§impl OpPrecedence for &dyn Expression
impl OpPrecedence for &dyn Expression
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.