pub trait SqlDialect: Dialect {
// Required methods
fn compile_search_expression(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
not: bool,
) -> Result<String>;
fn compile_spatial_distance(
b: &mut Builder<Self>,
method: Method,
attribute: &str,
values: &Array,
) -> Result<String>;
fn compile_spatial_predicate(
b: &mut Builder<Self>,
function: &str,
attribute: &str,
values: &Array,
not: bool,
) -> Result<String>;
fn compile_spatial_covers_predicate(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
not: bool,
) -> Result<String>;
fn compile_json_contains_expression(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
not: bool,
) -> Result<String>;
fn compile_json_overlaps_expression(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
) -> Result<String>;
fn compile_json_path_expression(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
) -> Result<String>;
fn compile_conflict_header(b: &mut Builder<Self>) -> Result<String>;
fn compile_conflict_assignment(wrapped: &str) -> String;
// Provided methods
fn compile_spatial_filter(
b: &mut Builder<Self>,
method: Method,
attribute: &str,
query: &Query,
) -> Result<String> { ... }
fn compile_array_filter(
b: &mut Builder<Self>,
method: Method,
attribute: &str,
query: &Query,
) -> Result<String> { ... }
}Expand description
The hooks a SQL dialect implements: how it compiles search, spatial and JSON predicates, and its conflict clause.
Required Methods§
Sourcefn compile_search_expression(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
not: bool,
) -> Result<String>
fn compile_search_expression( b: &mut Builder<Self>, attribute: &str, values: &Array, not: bool, ) -> Result<String>
Full-text search on the wrapped attribute.
Sourcefn compile_spatial_distance(
b: &mut Builder<Self>,
method: Method,
attribute: &str,
values: &Array,
) -> Result<String>
fn compile_spatial_distance( b: &mut Builder<Self>, method: Method, attribute: &str, values: &Array, ) -> Result<String>
A distance* predicate.
Sourcefn compile_spatial_predicate(
b: &mut Builder<Self>,
function: &str,
attribute: &str,
values: &Array,
not: bool,
) -> Result<String>
fn compile_spatial_predicate( b: &mut Builder<Self>, function: &str, attribute: &str, values: &Array, not: bool, ) -> Result<String>
A spatial predicate function (ST_Intersects, …), negated with NOT.
Sourcefn compile_spatial_covers_predicate(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
not: bool,
) -> Result<String>
fn compile_spatial_covers_predicate( b: &mut Builder<Self>, attribute: &str, values: &Array, not: bool, ) -> Result<String>
covers / notCovers (MySQL ST_Contains, PostgreSQL ST_Covers).
Sourcefn compile_json_contains_expression(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
not: bool,
) -> Result<String>
fn compile_json_contains_expression( b: &mut Builder<Self>, attribute: &str, values: &Array, not: bool, ) -> Result<String>
jsonContains / jsonNotContains.
Sourcefn compile_json_overlaps_expression(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
) -> Result<String>
fn compile_json_overlaps_expression( b: &mut Builder<Self>, attribute: &str, values: &Array, ) -> Result<String>
jsonOverlaps.
Sourcefn compile_json_path_expression(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
) -> Result<String>
fn compile_json_path_expression( b: &mut Builder<Self>, attribute: &str, values: &Array, ) -> Result<String>
jsonPath.
Sourcefn compile_conflict_header(b: &mut Builder<Self>) -> Result<String>
fn compile_conflict_header(b: &mut Builder<Self>) -> Result<String>
The start of the conflict clause (ON DUPLICATE KEY UPDATE).
Sourcefn compile_conflict_assignment(wrapped: &str) -> String
fn compile_conflict_assignment(wrapped: &str) -> String
The new value of a conflicting column (VALUES(col), excluded.col).
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".