pub struct ClickHouseDialect { /* private fields */ }Expand description
The ClickHouse dialect and its own state.
Trait Implementations§
impl BitwiseAggregates for ClickHouseDialect
Source§impl Clone for ClickHouseDialect
impl Clone for ClickHouseDialect
impl CrossJoins for ClickHouseDialect
Source§impl Cube for ClickHouseDialect
impl Cube for ClickHouseDialect
Source§impl Debug for ClickHouseDialect
impl Debug for ClickHouseDialect
Source§impl Default for ClickHouseDialect
impl Default for ClickHouseDialect
Source§impl Dialect for ClickHouseDialect
impl Dialect for ClickHouseDialect
Source§const CLASS: &'static str = "Utopia\\Query\\Builder\\ClickHouse"
const CLASS: &'static str = "Utopia\\Query\\Builder\\ClickHouse"
The PHP class (
Utopia\Query\Builder\MySQL), as messages name it.Source§const LITERAL: StringLiteral = crate::StringLiteral::BackslashUtf8
const LITERAL: StringLiteral = crate::StringLiteral::BackslashUtf8
How the dialect writes and reads a string literal. Read more
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_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_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_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 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 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 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 LIKE_ESCAPE: u8 = b'\\'
const LIKE_ESCAPE: u8 = b'\\'
Source§const DECLARES_LIKE_ESCAPE: bool = false
const DECLARES_LIKE_ESCAPE: bool = false
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§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_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 like_keyword(_b: &Builder<Self>) -> &'static str
fn like_keyword(_b: &Builder<Self>) -> &'static str
The
LIKE keyword (ILIKE on PostgreSQL).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_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§fn insert_default_values(b: &mut Builder<Self>) -> Result<Statement>
fn insert_default_values(b: &mut Builder<Self>) -> Result<Statement>
INSERT ... DEFAULT VALUES.impl FullOuterJoins for ClickHouseDialect
Source§impl Hints for ClickHouseDialect
impl Hints for ClickHouseDialect
impl RawSql for ClickHouseDialect
Source§impl Rollup for ClickHouseDialect
impl Rollup for ClickHouseDialect
Source§fn with_rollup(b: &mut Builder<Self>)
fn with_rollup(b: &mut Builder<Self>)
Sets the dialect’s rollup modifier.
Source§impl StringAggregates for ClickHouseDialect
impl StringAggregates for ClickHouseDialect
Source§impl TableSampling for ClickHouseDialect
impl TableSampling for ClickHouseDialect
Source§impl Totals for ClickHouseDialect
impl Totals for ClickHouseDialect
Source§fn with_totals(b: &mut Builder<Self>)
fn with_totals(b: &mut Builder<Self>)
Sets the totals modifier.
Auto Trait Implementations§
impl Forget for ClickHouseDialect
impl Freeze for ClickHouseDialectwhere
*const u8 is !null: Freeze,
PhantomData<Query>: Freeze,
PhantomData<String>: Freeze,
PhantomData<ArrayJoin>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<(String, String)>: Freeze,
impl Move for ClickHouseDialect
impl RefUnwindSafe for ClickHouseDialectwhere
Atomic<usize>: RefUnwindSafe,
Atomic<*mut ()>: RefUnwindSafe,
OnceLock<Index>: RefUnwindSafe,
Atomic<u8>: RefUnwindSafe,
impl Send for ClickHouseDialect
impl Sync for ClickHouseDialect
impl Unpin for ClickHouseDialect
impl UnsafeUnpin for ClickHouseDialectwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Query>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<ArrayJoin>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
impl UnwindSafe for ClickHouseDialect
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