pub struct MariaDbDialect { /* private fields */ }Expand description
The MariaDB dialect: MySQL’s state.
Trait Implementations§
impl BitwiseAggregates for MariaDbDialect
Source§impl Clone for MariaDbDialect
impl Clone for MariaDbDialect
impl CrossJoins for MariaDbDialect
Source§impl Debug for MariaDbDialect
impl Debug for MariaDbDialect
Source§impl Default for MariaDbDialect
impl Default for MariaDbDialect
Source§impl Dialect for MariaDbDialect
impl Dialect for MariaDbDialect
Source§const CLASS: &'static str = "Utopia\\Query\\Builder\\MariaDB"
const CLASS: &'static str = "Utopia\\Query\\Builder\\MariaDB"
The PHP class (
Utopia\Query\Builder\MySQL), as messages name it.Source§const LIKE_ESCAPE: u8 = b'!'
const LIKE_ESCAPE: u8 = b'!'
Source§const DECLARES_LIKE_ESCAPE: bool = true
const DECLARES_LIKE_ESCAPE: bool = true
Source§fn base_step(
b: &mut Builder<Self>,
step: Step,
arguments: &[Arg<'_>],
) -> Option<Result<Ret>>
fn base_step( b: &mut Builder<Self>, step: Step, arguments: &[Arg<'_>], ) -> Option<Result<Ret>>
A step only some dialects have, run as the dialect itself does:
None where the
dialect has no such step.Source§fn compile_random(_b: &Builder<Self>) -> String
fn compile_random(_b: &Builder<Self>) -> String
The random-order expression (
RAND()).Source§fn compile_regex(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
column: Option<&str>,
) -> Result<String>
fn compile_regex( b: &mut Builder<Self>, attribute: &str, values: &Array, column: Option<&str>, ) -> Result<String>
A regex filter on the wrapped attribute.
Source§fn compile_contains_all(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
column: Option<&str>,
) -> Result<String>
fn compile_contains_all( b: &mut Builder<Self>, attribute: &str, values: &Array, column: Option<&str>, ) -> Result<String>
containsAll (LIKE '%v%', ANDed).Source§fn compile_filter(b: &mut Builder<Self>, query: &Query) -> Result<String>
fn compile_filter(b: &mut Builder<Self>, query: &Query) -> Result<String>
A filter query (the base compiles comparisons, LIKE, IN, logical and raw filters).
Source§fn insert_default_values(b: &mut Builder<Self>) -> Result<Statement>
fn insert_default_values(b: &mut Builder<Self>) -> Result<Statement>
INSERT ... DEFAULT VALUES.Source§fn explain(
b: &mut Builder<Self>,
analyze: bool,
options: &ExplainOptions,
) -> Result<Statement>
fn explain( b: &mut Builder<Self>, analyze: bool, options: &ExplainOptions, ) -> Result<Statement>
EXPLAIN of the select statement.Source§fn reset(b: &mut Builder<Self>)
fn reset(b: &mut Builder<Self>)
Clears the dialect’s own state (after the shared state is cleared).
Source§fn ast_dialect() -> AstDialect
fn ast_dialect() -> AstDialect
The serializer
fromAst/toAst use for expressions.Source§const IMPLICIT_LIKE_ESCAPE: Option<u8>
const IMPLICIT_LIKE_ESCAPE: Option<u8>
The character
LIKE escapes with when a pattern declares none; None when it escapes
nothing, as in SQLite. Read moreSource§const LITERAL: StringLiteral = crate::StringLiteral::Backslash
const LITERAL: StringLiteral = crate::StringLiteral::Backslash
How the dialect writes and reads a string literal. Read more
Source§fn quote(_b: &Builder<Self>, identifier: &str) -> Result<String>
fn quote(_b: &Builder<Self>, identifier: &str) -> Result<String>
Quotes an identifier (
`users`.`id`).Source§fn quote_string(value: &[u8]) -> Vec<u8> ⓘ
fn quote_string(value: &[u8]) -> Vec<u8> ⓘ
A string literal for
to_raw_sql(): \ doubled and ' doubled
(PostgreSQL and SQLite double only ', since \ is not an escape
in their standard strings). Read moreSource§fn compile_like(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
prefix: &str,
suffix: &str,
not: bool,
column: Option<&str>,
) -> Result<String>
fn compile_like( b: &mut Builder<Self>, attribute: &str, values: &Array, prefix: &str, suffix: &str, not: bool, column: Option<&str>, ) -> Result<String>
LIKE with a prefix and suffix around the escaped value.Source§fn compile_contains(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
column: Option<&str>,
) -> Result<String>
fn compile_contains( b: &mut Builder<Self>, attribute: &str, values: &Array, column: Option<&str>, ) -> Result<String>
contains (LIKE '%v%', ORed for several values).Source§fn compile_not_contains(
b: &mut Builder<Self>,
attribute: &str,
values: &Array,
column: Option<&str>,
) -> Result<String>
fn compile_not_contains( b: &mut Builder<Self>, attribute: &str, values: &Array, column: Option<&str>, ) -> Result<String>
notContains (NOT LIKE '%v%', ANDed).Source§fn like_keyword(_b: &Builder<Self>) -> &'static str
fn like_keyword(_b: &Builder<Self>) -> &'static str
The
LIKE keyword (ILIKE on PostgreSQL).Source§fn build_after_joins_clause(
_b: &mut Builder<Self>,
_grouped: &ParsedQuery,
) -> Result<String>
fn build_after_joins_clause( _b: &mut Builder<Self>, _grouped: &ParsedQuery, ) -> Result<String>
Clauses after the joins and before
WHERE (ClickHouse ARRAY JOIN, PREWHERE).Source§fn build_after_group_by_clause(_b: &mut Builder<Self>) -> Result<String>
fn build_after_group_by_clause(_b: &mut Builder<Self>) -> Result<String>
Clauses after
GROUP BY (ClickHouse WITH TOTALS).Source§fn build_after_order_by_clause(_b: &mut Builder<Self>) -> Result<String>
fn build_after_order_by_clause(_b: &mut Builder<Self>) -> Result<String>
Clauses after
ORDER BY (ClickHouse LIMIT BY).Source§fn build_settings_clause(_b: &mut Builder<Self>) -> Result<String>
fn build_settings_clause(_b: &mut Builder<Self>) -> Result<String>
Clauses at the very end of a select (ClickHouse
SETTINGS).Source§fn wrap_union_member(_b: &Builder<Self>, sql: &str) -> String
fn wrap_union_member(_b: &Builder<Self>, sql: &str) -> String
One member of a
UNION chain (parenthesised by default).Source§fn should_emit_offset(
_b: &Builder<Self>,
offset: Option<i64>,
limit: Option<i64>,
) -> Result<bool>
fn should_emit_offset( _b: &Builder<Self>, offset: Option<i64>, limit: Option<i64>, ) -> Result<bool>
Whether to emit
OFFSET; the base refuses an offset without a limit.Source§fn compile_vector_order_expression(
_b: &mut Builder<Self>,
) -> Result<Option<Condition>>
fn compile_vector_order_expression( _b: &mut Builder<Self>, ) -> Result<Option<Condition>>
An
ORDER BY vector distance expression (PostgreSQL).Source§fn compile_group_by_time_bucket(
_b: &mut Builder<Self>,
_attribute: &str,
_interval: &str,
) -> Result<String>
fn compile_group_by_time_bucket( _b: &mut Builder<Self>, _attribute: &str, _interval: &str, ) -> Result<String>
A
groupByTimeBucket expression; unsupported by default.Source§fn resolve_join_filter_placement(
_b: &Builder<Self>,
requested: Placement,
is_cross_join: bool,
) -> Placement
fn resolve_join_filter_placement( _b: &Builder<Self>, requested: Placement, is_cross_join: bool, ) -> Placement
Where a join filter’s condition goes (cross and natural joins have no
ON).Source§fn compile_join_with_builder(
b: &mut Builder<Self>,
query: &Query,
join: &JoinBuilder,
) -> Result<String>
fn compile_join_with_builder( b: &mut Builder<Self>, query: &Query, join: &JoinBuilder, ) -> Result<String>
The
ON of a join built with a JoinBuilder.Source§impl FullTextSearch for MariaDbDialect
impl FullTextSearch for MariaDbDialect
Source§impl Hints for MariaDbDialect
impl Hints for MariaDbDialect
Source§impl InsertOrIgnore for MariaDbDialect
impl InsertOrIgnore for MariaDbDialect
Source§impl Json for MariaDbDialect
impl Json for MariaDbDialect
Source§fn set_json_append(
b: &mut Builder<Self>,
column: &str,
values: &Array,
) -> Result<()>
fn set_json_append( b: &mut Builder<Self>, column: &str, values: &Array, ) -> Result<()>
Appends
values to a JSON array column.Source§fn set_json_prepend(
b: &mut Builder<Self>,
column: &str,
values: &Array,
) -> Result<()>
fn set_json_prepend( b: &mut Builder<Self>, column: &str, values: &Array, ) -> Result<()>
Prepends
values to a JSON array column.Source§fn set_json_insert(
b: &mut Builder<Self>,
column: &str,
index: i64,
value: Value,
) -> Result<()>
fn set_json_insert( b: &mut Builder<Self>, column: &str, index: i64, value: Value, ) -> Result<()>
Inserts
value at index of a JSON array column.Source§fn set_json_remove(
b: &mut Builder<Self>,
column: &str,
value: Value,
) -> Result<()>
fn set_json_remove( b: &mut Builder<Self>, column: &str, value: Value, ) -> Result<()>
Removes
value from a JSON array column.Source§fn set_json_intersect(
b: &mut Builder<Self>,
column: &str,
values: &Array,
) -> Result<()>
fn set_json_intersect( b: &mut Builder<Self>, column: &str, values: &Array, ) -> Result<()>
Keeps the elements also in
values.Source§fn set_json_diff(
b: &mut Builder<Self>,
column: &str,
values: &Array,
) -> Result<()>
fn set_json_diff( b: &mut Builder<Self>, column: &str, values: &Array, ) -> Result<()>
Removes the elements in
values.impl LateralJoins for MariaDbDialect
impl Locking for MariaDbDialect
Source§impl MySqlFamily for MariaDbDialect
impl MySqlFamily for MariaDbDialect
Source§fn mysql(b: &Builder<Self>) -> &MySqlState
fn mysql(b: &Builder<Self>) -> &MySqlState
The MySQL state.
Source§fn mysql_mut(b: &mut Builder<Self>) -> &mut MySqlState
fn mysql_mut(b: &mut Builder<Self>) -> &mut MySqlState
The MySQL state, mutable.
Source§fn geom_from_text(srid: i64) -> String
fn geom_from_text(srid: i64) -> String
ST_GeomFromText(?, srid, 'axis-order=long-lat') (MariaDB has no axis order).impl NegatedFullTextSearch for MariaDbDialect
impl RawSql for MariaDbDialect
impl Returning for MariaDbDialect
Source§impl Rollup for MariaDbDialect
impl Rollup for MariaDbDialect
Source§fn with_rollup(b: &mut Builder<Self>)
fn with_rollup(b: &mut Builder<Self>)
Sets the dialect’s rollup modifier.
Source§impl Sequences for MariaDbDialect
impl Sequences for MariaDbDialect
impl Spatial for MariaDbDialect
Source§impl SqlDialect for MariaDbDialect
impl SqlDialect for MariaDbDialect
Source§fn 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.
Source§fn compile_spatial_filter(
b: &mut Builder<Self>,
method: Method,
attribute: &str,
query: &Query,
) -> Result<String>
fn compile_spatial_filter( b: &mut Builder<Self>, method: Method, attribute: &str, query: &Query, ) -> Result<String>
A spatial filter (MariaDB checks units first).
Source§fn 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.Source§fn 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.Source§fn 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).Source§fn 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.Source§fn 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.Source§fn 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.Source§fn 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).Source§fn compile_conflict_assignment(wrapped: &str) -> String
fn compile_conflict_assignment(wrapped: &str) -> String
The new value of a conflicting column (
VALUES(col), excluded.col).impl StatisticalAggregates for MariaDbDialect
Source§impl StringAggregates for MariaDbDialect
impl StringAggregates for MariaDbDialect
impl Transactions for MariaDbDialect
Source§impl Upsert for MariaDbDialect
impl Upsert for MariaDbDialect
Source§impl UpsertSelect for MariaDbDialect
impl UpsertSelect for MariaDbDialect
Auto Trait Implementations§
impl Forget for MariaDbDialect
impl Freeze for MariaDbDialect
impl Move for MariaDbDialect
impl RefUnwindSafe for MariaDbDialect
impl Send for MariaDbDialectwhere
RawVecInner: Send,
impl Sync for MariaDbDialectwhere
RawVecInner: Sync,
impl Unpin for MariaDbDialect
impl UnsafeUnpin for MariaDbDialect
impl UnwindSafe for MariaDbDialectwhere
RawVecInner: 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