Trait toql_core::field_handler::FieldHandler
source · [−]pub trait FieldHandler {
fn build_filter(
&self,
select: SqlExpr,
filter: &FieldFilter,
aux_params: &ParameterMap<'_>
) -> Result<Option<SqlExpr>, SqlBuilderError>;
fn build_select(
&self,
select: SqlExpr,
aux_params: &ParameterMap<'_>
) -> Result<Option<SqlExpr>, SqlBuilderError> { ... }
}
Required Methods
fn build_filter(
&self,
select: SqlExpr,
filter: &FieldFilter,
aux_params: &ParameterMap<'_>
) -> Result<Option<SqlExpr>, SqlBuilderError>
fn build_filter(
&self,
select: SqlExpr,
filter: &FieldFilter,
aux_params: &ParameterMap<'_>
) -> Result<Option<SqlExpr>, SqlBuilderError>
Match filter and return SQL expression.
Do not insert parameters in the SQL expression, use ?
instead.
If you miss some arguments, raise an error, typically SqlBuilderError::FilterInvalid
Provided Methods
fn build_select(
&self,
select: SqlExpr,
aux_params: &ParameterMap<'_>
) -> Result<Option<SqlExpr>, SqlBuilderError>
fn build_select(
&self,
select: SqlExpr,
aux_params: &ParameterMap<'_>
) -> Result<Option<SqlExpr>, SqlBuilderError>
Context parameters allow to share information between different handlers Return sql and params if you want to select it.