pub struct AnsiDialect;Expand description
Zero-config SqlRenderer for the Agnostic pseudo-platform.
Uses ANSI SQL type names and double-quote identifier quoting.
Intended for parameterless to_sql() / to_ddl() convenience
methods that need a default renderer.
Trait Implementations§
Source§impl DdlRenderer for AnsiDialect
impl DdlRenderer for AnsiDialect
Source§fn render_create_table_prefix(&self) -> &'static str
fn render_create_table_prefix(&self) -> &'static str
Prefix for CREATE TABLE statements.
Source§fn column_default_precedes_not_null(&self) -> bool
fn column_default_precedes_not_null(&self) -> bool
Source§fn supports_foreign_key_action(&self, action: ReferentialAction) -> bool
fn supports_foreign_key_action(&self, action: ReferentialAction) -> bool
Whether this engine carries the given foreign-key referential action
(
ON DELETE … / ON UPDATE …) in CREATE TABLE DDL. Read moreSource§fn render_create_view_prefix(&self) -> &'static str
fn render_create_view_prefix(&self) -> &'static str
Prefix for CREATE VIEW statements.
Source§fn replaces_a_view_that_is_read(&self) -> bool
fn replaces_a_view_that_is_read(&self) -> bool
Whether
CREATE OR REPLACE VIEW replaces a view that other objects
read. Read moreSource§fn render_view_replacement(&self, replacement: &ViewReplacement<'_>) -> String
fn render_view_replacement(&self, replacement: &ViewReplacement<'_>) -> String
The statements that make a view other objects read, on an engine
that answers
false to
replaces_a_view_that_is_read. Read moreSource§fn render_column_definition(
&self,
name: &str,
dt: &DataType,
nullable: bool,
) -> String
fn render_column_definition( &self, name: &str, dt: &DataType, nullable: bool, ) -> String
Render a column definition (name, type, nullability).
Source§fn render_column_evolution(
&self,
change: &ColumnEvolution<'_>,
) -> Option<String>
fn render_column_evolution( &self, change: &ColumnEvolution<'_>, ) -> Option<String>
The statement this engine takes for one change to a table that
already holds rows, or
None where it has none. Read moreSource§fn render_identity_column(&self, name: &str, data_type: &DataType) -> String
fn render_identity_column(&self, name: &str, data_type: &DataType) -> String
Render the surrogate identity column — a plain, ungenerated
NOT NULL
column of the type it is given, on every dialect. Read moreSource§fn generates_identity_values(&self) -> bool
fn generates_identity_values(&self) -> bool
Whether this platform’s engine actually assigns an identity column’s
value, rather than merely tolerating the declaration. Read more
Source§fn representable_timestamp_ceiling(
&self,
data_type: &DataType,
) -> Option<&'static str>
fn representable_timestamp_ceiling( &self, data_type: &DataType, ) -> Option<&'static str>
The latest instant this platform can hold EXACTLY in the column it
renders for
data_type — the ceiling the refuse-by-name rule compares
against, or None for no declared ceiling. Read moreSource§fn auto_increment_requires_key(&self) -> bool
fn auto_increment_requires_key(&self) -> bool
Whether the platform requires every auto-increment / identity column to
be the leading column of an index (PK or KEY). Read more
Source§fn render_drop_table_prefix(&self, if_exists: bool) -> String
fn render_drop_table_prefix(&self, if_exists: bool) -> String
Prefix for DROP TABLE statements.
Source§fn render_drop_view_prefix(&self, if_exists: bool) -> String
fn render_drop_view_prefix(&self, if_exists: bool) -> String
Prefix for DROP VIEW statements.
Source§fn render_create_schema_prefix(&self, if_not_exists: bool) -> String
fn render_create_schema_prefix(&self, if_not_exists: bool) -> String
Prefix for CREATE SCHEMA / CREATE NAMESPACE.
Source§fn render_create_schema_statement(
&self,
name: &str,
if_not_exists: bool,
) -> String
fn render_create_schema_statement( &self, name: &str, if_not_exists: bool, ) -> String
Render a complete CREATE SCHEMA statement. Read more
Source§fn render_table_comment(&self, table: &str, comment: &str) -> Option<String>
fn render_table_comment(&self, table: &str, comment: &str) -> Option<String>
Render a table comment (platform-specific syntax). Read more
Source§fn render_column_comment(
&self,
table: &str,
column: &str,
comment: &str,
) -> Option<String>
fn render_column_comment( &self, table: &str, column: &str, comment: &str, ) -> Option<String>
Render a column comment — not wired to anything, and measured. Read more
Source§fn supports_if_not_exists(&self) -> bool
fn supports_if_not_exists(&self) -> bool
Whether to render IF NOT EXISTS on CREATE TABLE.
Source§fn render_column_default(&self, value: &str) -> Option<String>
fn render_column_default(&self, value: &str) -> Option<String>
Render a column’s
DEFAULT clause — keyword included — or decline it. Read moreSource§fn render_declared_column_default(
&self,
value: &str,
column_type: &DataType,
) -> String
fn render_declared_column_default( &self, value: &str, column_type: &DataType, ) -> String
Spell an author’s OWN declared default in this engine’s words. Read more
Source§fn render_begin_transaction(&self) -> &'static str
fn render_begin_transaction(&self) -> &'static str
Render a BEGIN transaction statement. Read more
Source§fn render_commit(&self) -> &'static str
fn render_commit(&self) -> &'static str
Render a COMMIT transaction statement.
Source§fn supports_ddl_transactions(&self) -> bool
fn supports_ddl_transactions(&self) -> bool
Whether the platform supports DDL transactions.
Source§fn render_drop_function(
&self,
name: &str,
param_types: &[&str],
if_exists: bool,
) -> String
fn render_drop_function( &self, name: &str, param_types: &[&str], if_exists: bool, ) -> String
Render a DROP FUNCTION statement with optional parameter types for overloaded functions.
Source§fn render_drop_object_keyword(&self, obj_type: &str) -> String
fn render_drop_object_keyword(&self, obj_type: &str) -> String
Render the drop keyword for a SQL object type.
Source§fn render_create_view_keyword(&self, secure: bool, global_temp: bool) -> String
fn render_create_view_keyword(&self, secure: bool, global_temp: bool) -> String
Render the CREATE VIEW keyword/prefix with
secure/global_temp modifiers.Source§fn supports_alter_drop_if_exists(&self) -> bool
fn supports_alter_drop_if_exists(&self) -> bool
Whether
ALTER TABLE … DROP COLUMN IF EXISTS is part of the grammar. Read moreSource§fn render_drop_column(
&self,
table: WrittenObject<'_>,
column: &str,
only_where_it_stands: bool,
) -> Option<Written>
fn render_drop_column( &self, table: WrittenObject<'_>, column: &str, only_where_it_stands: bool, ) -> Option<Written>
The statement that drops one column of a table that holds rows. Read more
Source§fn render_drop_view(
&self,
view: WrittenObject<'_>,
only_where_it_stands: bool,
) -> Option<Written>
fn render_drop_view( &self, view: WrittenObject<'_>, only_where_it_stands: bool, ) -> Option<Written>
The statement that drops one of Razeri’s views, spelled as the
statement writes it. Read more
Source§fn render_create_table_if_absent(
&self,
table: WrittenObject<'_>,
create: &str,
) -> Option<Written>
fn render_create_table_if_absent( &self, table: WrittenObject<'_>, create: &str, ) -> Option<Written>
A
CREATE TABLE that runs only where the table is not there yet,
on an engine whose grammar has no CREATE TABLE IF NOT EXISTS. Read moreSource§fn render_copy_table(
&self,
source: WrittenObject<'_>,
copy: WrittenObject<'_>,
) -> Written
fn render_copy_table( &self, source: WrittenObject<'_>, copy: WrittenObject<'_>, ) -> Written
The statement that copies a table, every row it holds, into a new
table beside it. Read more
Source§fn render_table_storage_options(
&self,
settings: &[EngineSetting<'_>],
) -> Option<String>
fn render_table_storage_options( &self, settings: &[EngineSetting<'_>], ) -> Option<String>
The clause a table’s storage settings are written in, after its
column list — SQL Server’s
WITH (DATA_COMPRESSION = PAGE) — or None
where none of settings is this engine’s, which is the default. Read moreSource§fn drop_index_uses_on_syntax(&self) -> bool
fn drop_index_uses_on_syntax(&self) -> bool
Whether DROP INDEX uses ON syntax:
DROP INDEX idx ON table (SqlServer).Source§fn constraint_enforcement(&self) -> ConstraintEnforcement
fn constraint_enforcement(&self) -> ConstraintEnforcement
Whether this engine checks the constraints it accepts. Read more
Source§fn key_constraint_suffix(&self) -> &'static str
fn key_constraint_suffix(&self) -> &'static str
The words a key constraint must carry to be accepted at all. Read more
Source§fn supports_primary_key_constraint(&self) -> bool
fn supports_primary_key_constraint(&self) -> bool
Whether a
PRIMARY KEY is part of the grammar. Read moreSource§fn supports_foreign_key_constraint(&self) -> bool
fn supports_foreign_key_constraint(&self) -> bool
Whether a
FOREIGN KEY … REFERENCES is part of the grammar. Read moreSource§fn supports_unique_constraint(&self) -> bool
fn supports_unique_constraint(&self) -> bool
Whether a table-level
UNIQUE (…) constraint is part of the grammar. Read moreSource§fn supports_check_constraint(&self) -> bool
fn supports_check_constraint(&self) -> bool
Whether a table-level
CHECK (…) constraint is part of the grammar. Read moreSource§fn supports_cascade_drop(&self) -> bool
fn supports_cascade_drop(&self) -> bool
Whether the platform supports CASCADE/RESTRICT in DROP statements. Read more
Source§fn supports_procedure_comment(&self) -> bool
fn supports_procedure_comment(&self) -> bool
Whether
COMMENT ON PROCEDURE is part of the grammar. Read moreSource§fn supports_drop_function_arg_types(&self) -> bool
fn supports_drop_function_arg_types(&self) -> bool
Whether the platform supports function argument types in DROP FUNCTION. Read more
Source§fn supports_sync_drop(&self) -> bool
fn supports_sync_drop(&self) -> bool
Whether the platform supports SYNC option for DROP (
ClickHouse).Source§fn supports_force_drop(&self) -> bool
fn supports_force_drop(&self) -> bool
Whether the platform supports FORCE option for DROP (Databricks).
Source§fn supports_alter_drop_cascade(&self) -> bool
fn supports_alter_drop_cascade(&self) -> bool
Whether the platform supports CASCADE in ALTER TABLE DROP. Read more
Source§impl FormulaRenderer for AnsiDialect
impl FormulaRenderer for AnsiDialect
Source§fn render_string_agg(
&self,
expr: &str,
sep: &str,
distinct: bool,
order: Option<&str>,
) -> String
fn render_string_agg( &self, expr: &str, sep: &str, distinct: bool, order: Option<&str>, ) -> String
Render
STRING_AGG / LISTAGG style aggregation.Source§fn render_first_value(&self, expr: &str, ignore_nulls: bool) -> String
fn render_first_value(&self, expr: &str, ignore_nulls: bool) -> String
Render
FIRST_VALUE with optional IGNORE NULLS.Source§fn render_stddev(&self, expr: &str, population: bool) -> String
fn render_stddev(&self, expr: &str, population: bool) -> String
Render
STDDEV_POP / STDDEV_SAMP.Source§fn render_percentile(
&self,
expr: &str,
percentile: f64,
continuous: bool,
) -> String
fn render_percentile( &self, expr: &str, percentile: f64, continuous: bool, ) -> String
Render
PERCENTILE_CONT / PERCENTILE_DISC.Source§fn render_median(&self, expr: &str) -> String
fn render_median(&self, expr: &str) -> String
Render MEDIAN.
Source§fn render_count_if(&self, condition: &str) -> String
fn render_count_if(&self, condition: &str) -> String
Render COUNT IF semantics.
Source§fn render_split(&self, expr: &str, delimiter: &str) -> String
fn render_split(&self, expr: &str, delimiter: &str) -> String
Render SPLIT /
STRING_TO_ARRAY style expression.Source§fn render_regexp_replace(
&self,
expr: &str,
pattern: &str,
replacement: &str,
) -> String
fn render_regexp_replace( &self, expr: &str, pattern: &str, replacement: &str, ) -> String
Render
REGEXP_REPLACE.Source§fn render_regexp_extract(
&self,
expr: &str,
pattern: &str,
group: Option<usize>,
) -> String
fn render_regexp_extract( &self, expr: &str, pattern: &str, group: Option<usize>, ) -> String
Render
REGEXP_EXTRACT / REGEXP_SUBSTR.Source§fn supports_split(&self) -> bool
fn supports_split(&self) -> bool
Whether this engine splits a text into a list, the way
render_split writes it. Read moreSource§fn supports_regexp_like(&self) -> bool
fn supports_regexp_like(&self) -> bool
Whether this engine tests a text against a regular expression,
the way
render_regexp_like writes it. Read moreSource§fn supports_regexp_extract(&self) -> bool
fn supports_regexp_extract(&self) -> bool
Whether this engine takes the part of a text a regular expression
matches, the way
render_regexp_extract
writes it. Read moreSource§fn supports_ordered_string_agg(&self) -> bool
fn supports_ordered_string_agg(&self) -> bool
Whether this engine orders the values a string aggregation joins,
the
ORDER BY inside render_string_agg. Read moreSource§fn render_nvl2(&self, expr: &str, not_null: &str, is_null: &str) -> String
fn render_nvl2(&self, expr: &str, not_null: &str, is_null: &str) -> String
Render NVL2 semantics.
Source§fn render_multi_if(&self, conditions: &[(&str, &str)], else_: &str) -> String
fn render_multi_if(&self, conditions: &[(&str, &str)], else_: &str) -> String
Render multi-branch IF semantics.
Source§fn render_power_operator(&self) -> Option<String>
fn render_power_operator(&self) -> Option<String>
This engine’s exponentiation operator, or
None where it has none. Read moreSource§fn render_ilike_operator(&self) -> Option<String>
fn render_ilike_operator(&self) -> Option<String>
This engine’s case-insensitive
LIKE, or None where it has none.Source§fn render_not_ilike_operator(&self) -> Option<String>
fn render_not_ilike_operator(&self) -> Option<String>
This engine’s negated case-insensitive
LIKE, or None where it
has none.Source§fn render_concat_operator(&self) -> Option<String>
fn render_concat_operator(&self) -> Option<String>
This engine’s string concatenation operator, or
None where it
joins strings only through a function.Source§fn render_bitwise_xor_operator(&self) -> String
fn render_bitwise_xor_operator(&self) -> String
👎Deprecated since 0.14.0:
answer render_bitwise_operator(BitwiseOperator::Xor) instead, which can say the engine has none
Render the bitwise XOR operator.
Source§fn render_bitwise_operator(&self, operator: BitwiseOperator) -> Option<String>
fn render_bitwise_operator(&self, operator: BitwiseOperator) -> Option<String>
This engine’s spelling of one bitwise operator, or
None where it
has no such operator. Read moreSource§fn render_try_cast_str(&self, expr: &str, type_str: &str) -> String
fn render_try_cast_str(&self, expr: &str, type_str: &str) -> String
Render
TRY_CAST expression (takes pre-rendered type string).Source§fn render_convert(
&self,
expr: &str,
type_str: &str,
style: Option<i32>,
) -> String
fn render_convert( &self, expr: &str, type_str: &str, style: Option<i32>, ) -> String
Render CONVERT expression with optional style.
Source§fn render_if_null(&self, expr: &str, replacement: &str) -> String
fn render_if_null(&self, expr: &str, replacement: &str) -> String
Render IFNULL / ISNULL / COALESCE expression.
Source§fn render_named_param(&self, name: &str) -> String
fn render_named_param(&self, name: &str) -> String
Render a named parameter reference.
Source§fn render_positional_param(&self, pos: usize) -> String
fn render_positional_param(&self, pos: usize) -> String
Render a positional parameter reference.
Source§fn render_data_type_ref(&self, dt: &DataTypeRef) -> String
fn render_data_type_ref(&self, dt: &DataTypeRef) -> String
Render a
DataTypeRef as a SQL type name string. Read moreSource§impl ReplicationRenderer for AnsiDialect
impl ReplicationRenderer for AnsiDialect
Source§fn session_prerequisites(&self) -> Vec<String>
fn session_prerequisites(&self) -> Vec<String>
Statements every generated script runs before its first real
statement, in this order, in the same session. Read more
Source§fn session_prerequisites_for(&self, computes_key: bool) -> Vec<String>
fn session_prerequisites_for(&self, computes_key: bool) -> Vec<String>
The session’s settings for one design, which may need fewer than
Self::session_prerequisites names. Read moreSource§fn sid_external_artifact(&self) -> Option<SidExternalArtifact>
fn sid_external_artifact(&self) -> Option<SidExternalArtifact>
Does an external artifact already carry the name
generate_sid on
this platform, and what is it? Read moreSource§fn sid_library_source(&self) -> Option<SidLibrarySource>
fn sid_library_source(&self) -> Option<SidLibrarySource>
The source of a library the operator compiles, where the key
function arrives that way — shipped in the deploy bundle as a file of
its own, so the build is one line. Read more
Source§fn sid_prerequisites(&self) -> String
fn sid_prerequisites(&self) -> String
Returns prerequisite SQL/instructions for SID deployment. Read more
Source§fn sid_prerequisite_statements(&self) -> Vec<String>
fn sid_prerequisite_statements(&self) -> Vec<String>
The executable statements inside
Self::sid_prerequisites, in
order — razeri’s own text, split on razeri’s own declared boundary. Read moreSource§fn sid_pure_sql_fallback(&self) -> Option<String>
fn sid_pure_sql_fallback(&self) -> Option<String>
A prerequisite script that installs the same key function without
compiling anything — where the platform has one, and
None where it
does not. Read moreSource§fn sid_pure_sql_fallback_in(&self, schemas: &[&str]) -> Option<String>
fn sid_pure_sql_fallback_in(&self, schemas: &[&str]) -> Option<String>
Self::sid_pure_sql_fallback, installed in every schema a
design writes into. Read moreSource§fn sid_prerequisite_kind(&self) -> SidPrerequisiteKind
fn sid_prerequisite_kind(&self) -> SidPrerequisiteKind
Which of
SidPrerequisiteKind’s shapes this platform’s prerequisite
is. Read moreSource§fn sid_prerequisite_home(&self) -> SidPrerequisiteHome
fn sid_prerequisite_home(&self) -> SidPrerequisiteHome
Where
Self::sid_prerequisites puts what it installs, so that a
key function created in some other schema can call it by name. Read moreSource§fn sid_validation_query(&self, schema: Option<&str>, null_sid: i64) -> String
fn sid_validation_query(&self, schema: Option<&str>, null_sid: i64) -> String
Returns a validation query to verify the SID function is operational. Read more
Source§fn render_data_extract(
&self,
qualified: &str,
columns: &str,
file_path: &str,
format: &str,
where_clause: &str,
_batch_size: Option<usize>,
) -> String
fn render_data_extract( &self, qualified: &str, columns: &str, file_path: &str, format: &str, where_clause: &str, _batch_size: Option<usize>, ) -> String
Renders an extract/export SQL statement for the given table. Read more
Source§fn render_data_load(
&self,
qualified: &str,
file_path: &str,
_format: &str,
) -> String
fn render_data_load( &self, qualified: &str, file_path: &str, _format: &str, ) -> String
Renders a load/import SQL statement for the given table. Read more
Source§fn render_checksum_query(&self, qualified: &str) -> String
fn render_checksum_query(&self, qualified: &str) -> String
Renders a checksum validation query for data comparison. Read more
Source§fn parquet_export_warning(&self) -> Option<&str>
fn parquet_export_warning(&self) -> Option<&str>
Warning about Parquet export limitations on this platform. Read more
Source§fn sid_deployment_warning(&self) -> Option<&str>
fn sid_deployment_warning(&self) -> Option<&str>
Warning about SID function deployment requirements on this platform. Read more
Source§impl SqlRenderer for AnsiDialect
impl SqlRenderer for AnsiDialect
Source§fn sid_spelling(&self) -> SidSpelling
fn sid_spelling(&self) -> SidSpelling
ANSI’s vocabulary on purpose, and named so — not the guess a dialect that has decided nothing inherits.
Source§fn render_data_type(&self, dt: &DataType) -> String
fn render_data_type(&self, dt: &DataType) -> String
Render a
DataType as platform-specific SQL.Source§fn quote_identifier(&self, name: &str) -> String
fn quote_identifier(&self, name: &str) -> String
Quote an identifier using platform conventions. Read more
Source§fn qualify_name(&self, schema: Option<&str>, name: &str) -> String
fn qualify_name(&self, schema: Option<&str>, name: &str) -> String
Render a fully qualified name (optional schema + name).
Source§fn render_current_timestamp(&self) -> String
fn render_current_timestamp(&self) -> String
Render the platform’s
CURRENT_TIMESTAMP expression.Source§fn is_agnostic_dialect(&self) -> bool
fn is_agnostic_dialect(&self) -> bool
Whether this dialect is the “agnostic” pseudo-dialect. Read more
Source§fn dialect_name(&self) -> &'static str
fn dialect_name(&self) -> &'static str
Return a stable string identifier for this dialect. Read more
Source§fn to_formula_renderer(&self) -> Box<dyn FormulaRenderer>
fn to_formula_renderer(&self) -> Box<dyn FormulaRenderer>
Create a boxed
FormulaRenderer for this dialect. Read moreSource§fn render_parameter_data_type(&self, dt: &DataType) -> String
fn render_parameter_data_type(&self, dt: &DataType) -> String
The type text for a routine’s PARAMETER, which is not always the text
a column carries. Read more
Source§fn render_nullable_data_type(&self, dt: &DataType) -> String
fn render_nullable_data_type(&self, dt: &DataType) -> String
The type text for a column that ADMITS NULL — the whole type, not a
modifier appended to one. Read more
Source§fn render_comment(&self, text: &str) -> String
fn render_comment(&self, text: &str) -> String
A comment, written as this engine reads one. Read more
Source§fn uses_schema_in_qualified_names(&self) -> bool
fn uses_schema_in_qualified_names(&self) -> bool
Whether this dialect uses schemas in qualified names. Read more
Source§fn fold_schema_into_name(&self, schema: &str, name: &str) -> Option<String>
fn fold_schema_into_name(&self, schema: &str, name: &str) -> Option<String>
The name an object takes on an engine with no schemas, where this
dialect keeps a design’s layers apart by folding the schema into it —
sales_raw and customers become sales_raw_customers — or None,
the default, where the schema is dropped. Read moreSource§fn supports_secure_view(&self) -> bool
fn supports_secure_view(&self) -> bool
Whether this dialect supports
SECURE VIEW (Snowflake).Source§fn supports_global_temporary_view(&self) -> bool
fn supports_global_temporary_view(&self) -> bool
Whether this dialect supports
GLOBAL TEMPORARY VIEW (Databricks).Source§fn catalog_system_schemas(&self) -> &'static [&'static str]
fn catalog_system_schemas(&self) -> &'static [&'static str]
The schemas a catalog scan passes over — the engine’s own
bookkeeping, never a warehouse’s contents. Read more
Source§fn render_catalog_columns_query(&self, schema: Option<&str>) -> Option<String>
fn render_catalog_columns_query(&self, schema: Option<&str>) -> Option<String>
The query that lists what the warehouse holds — one row per column,
as
(schema, object, column). Read moreSource§fn render_catalog_object_times_query(
&self,
schema: Option<&str>,
) -> Option<String>
fn render_catalog_object_times_query( &self, schema: Option<&str>, ) -> Option<String>
The query that says when each object was created, as
(schema, object, created_at) — where the engine records it at all. Read moreSource§fn catalog_scope_predicate(&self, column: &str, schema: Option<&str>) -> String
fn catalog_scope_predicate(&self, column: &str, schema: Option<&str>) -> String
The
WHERE clause both catalog queries share: one named schema, or
every schema that is not the engine’s own. Read moreSource§fn sid_helper_body(&self) -> Option<SidHelperBody>
fn sid_helper_body(&self) -> Option<SidHelperBody>
The body of the surrogate-key helper, where SQL cannot spell it. Read more
Source§fn delimited_file_relation(&self, path_literal: &str) -> Option<String>
fn delimited_file_relation(&self, path_literal: &str) -> Option<String>
How this engine reads a delimited text file as a relation, or
None
where it cannot. Read moreSource§fn delimited_file_relation_for(
&self,
file: &DelimitedFile<'_>,
) -> Option<String>
fn delimited_file_relation_for( &self, file: &DelimitedFile<'_>, ) -> Option<String>
How this engine reads a delimited text file as a relation, told
everything Razeri knows about the file — or
None where it cannot. Read moreSource§fn parquet_file_relation(&self, path_literal: &str) -> Option<String>
fn parquet_file_relation(&self, path_literal: &str) -> Option<String>
How this engine reads a parquet file as a relation of text — or
None where it cannot, which is the default. Read moreSource§fn delimited_file_prerequisites(&self, directory_literal: &str) -> Vec<String>
fn delimited_file_prerequisites(&self, directory_literal: &str) -> Vec<String>
Statements this engine needs run once before any of its file relations
resolve, in order — and none by default. Read more
Source§fn delimited_file_statements_for(&self, file: &DelimitedFile<'_>) -> Vec<String>
fn delimited_file_statements_for(&self, file: &DelimitedFile<'_>) -> Vec<String>
Statements this engine needs run before it can read THIS file, in
order — and none by default. Read more
Source§fn render_one_row_source(&self) -> Option<String>
fn render_one_row_source(&self) -> Option<String>
The one-row table a query reads when it has nothing else to read,
or
None on an engine that takes a SELECT with no FROM at all. Read moreA view one statement reads in several places, read once: the item
of the statement’s leading
WITH that keeps relation’s rows under
name, written name AS (…) — or None, the default, where each
place the statement names the view reads it again. Read moreSource§fn delimited_file_relation_in_encoding(
&self,
path_literal: &str,
encoding: &str,
) -> Option<String>
fn delimited_file_relation_in_encoding( &self, path_literal: &str, encoding: &str, ) -> Option<String>
How this engine reads a delimited text file whose bytes are not
UTF-8, or
None where it states no way to. Read moreSource§fn render_cast_type(&self, dt: &DataType) -> String
fn render_cast_type(&self, dt: &DataType) -> String
Source§fn procedure_form(&self) -> ProcedureForm
fn procedure_form(&self) -> ProcedureForm
Which stored-procedure grammar this engine speaks. Read more
Source§fn scalar_function_form(&self) -> ScalarFunctionForm
fn scalar_function_form(&self) -> ScalarFunctionForm
Which scalar-function grammar this engine speaks. Read more
Source§fn bulk_load_form(&self) -> Option<BulkLoadForm>
fn bulk_load_form(&self) -> Option<BulkLoadForm>
Which of Razeri’s bulk-load grammars this engine speaks, or
None
where it speaks none of them. Read moreSource§fn render_view_options(&self, settings: &[EngineSetting<'_>]) -> Option<String>
fn render_view_options(&self, settings: &[EngineSetting<'_>]) -> Option<String>
The clause a view’s settings are written in, between its name and
AS — PostgreSQL’s WITH (security_barrier = true) — or None where
none of settings is this engine’s, which is the default. Read moreSource§fn render_join_options(&self, settings: &[EngineSetting<'_>]) -> Option<String>
fn render_join_options(&self, settings: &[EngineSetting<'_>]) -> Option<String>
The words a join’s settings are written in, in front of its join
keyword —
ClickHouse’s GLOBAL ANY — or None where none of
settings is this engine’s, which is the default.Source§fn table_function_form(&self) -> TableFunctionForm
fn table_function_form(&self) -> TableFunctionForm
Which table-valued-function grammar this engine speaks, and — where it
has none — the words it refuses in. Read more
Source§fn render_procedure(&self, routine: &RoutineSpec) -> Option<String>
fn render_procedure(&self, routine: &RoutineSpec) -> Option<String>
Spell a whole stored procedure in this engine’s own grammar — the
method
ProcedureForm::Custom promises. Read moreSource§fn render_scalar_function(&self, routine: &RoutineSpec) -> Option<String>
fn render_scalar_function(&self, routine: &RoutineSpec) -> Option<String>
Spell a whole scalar function in this engine’s own grammar — the
method
ScalarFunctionForm::Custom promises. Read moreSource§fn render_table_function(&self, routine: &RoutineSpec) -> Option<String>
fn render_table_function(&self, routine: &RoutineSpec) -> Option<String>
Spell a whole table-valued function in this engine’s own grammar —
the method
TableFunctionForm::Custom promises. Read moreSource§fn render_current_date(&self) -> String
fn render_current_date(&self) -> String
Platform’s
CURRENT_DATE expression. Read moreSource§fn render_single_row_aggregate(
&self,
expression: &str,
kind: AggregableKind,
) -> Option<String>
fn render_single_row_aggregate( &self, expression: &str, kind: AggregableKind, ) -> Option<String>
Collapse a subquery that selects AT MOST ONE ROW into an aggregate,
for the engines that will not accept an unaggregated correlated scalar. Read more
Source§fn render_any_value(&self, expression: &str) -> String
fn render_any_value(&self, expression: &str) -> String
Take any one value of
expression from a group, for the engines
that cannot group on the column itself. Read moreSource§fn median_aggregate_form(&self) -> Option<&'static str>
fn median_aggregate_form(&self) -> Option<&'static str>
Source§fn render_interval_literal(&self, interval: &str) -> String
fn render_interval_literal(&self, interval: &str) -> String
Render an interval literal. Read more
Source§fn concat_operator(&self) -> &'static str
fn concat_operator(&self) -> &'static str
Render the string concatenation operator. Read more
Source§fn render_nan_literal(&self, _dt: &DataType) -> String
fn render_nan_literal(&self, _dt: &DataType) -> String
Render a NaN literal for a floating-point type. Read more
Source§fn render_infinity_literal(&self, _positive: bool, _dt: &DataType) -> String
fn render_infinity_literal(&self, _positive: bool, _dt: &DataType) -> String
Render an infinity literal for a floating-point type. Read more
Source§fn ifnull_function_name(&self) -> &'static str
fn ifnull_function_name(&self) -> &'static str
Render the NULL-coalescing function name. Read more
Source§fn render_iif(&self, cond: &str, then_val: &str, else_val: &str) -> String
fn render_iif(&self, cond: &str, then_val: &str, else_val: &str) -> String
Render an IIF expression (or CASE WHEN equivalent). Read more
Source§fn render_date_trunc(&self, field: &str, expr: &str) -> String
fn render_date_trunc(&self, field: &str, expr: &str) -> String
Render a
DATE_TRUNC expression. Read moreSource§fn render_date_extract(&self, field: &str, column: &str) -> String
fn render_date_extract(&self, field: &str, column: &str) -> String
One part of a date or a timestamp, as a whole number. Read more
Source§fn render_try_cast(&self, expr: &str, target: &DataType) -> String
fn render_try_cast(&self, expr: &str, target: &DataType) -> String
Render a
TRY_CAST expression. Read moreSource§fn render_named_parameter(&self, name: &str) -> String
fn render_named_parameter(&self, name: &str) -> String
Render a named parameter placeholder. Read more
Source§fn merge_not_matched_keyword(&self) -> &'static str
fn merge_not_matched_keyword(&self) -> &'static str
Keyword emitted for MERGE NOT MATCHED branch. Read more
Source§fn supports_merge_not_matched_by_source(&self) -> bool
fn supports_merge_not_matched_by_source(&self) -> bool
Whether MERGE supports
WHEN NOT MATCHED BY SOURCE.Source§fn merge_supported(&self) -> bool
fn merge_supported(&self) -> bool
Whether this platform takes a
MERGE statement. Read moreSource§fn merge_supports_schema_evolution_keyword(&self) -> bool
fn merge_supports_schema_evolution_keyword(&self) -> bool
Whether
WITH SCHEMA EVOLUTION is supported for MERGE.Source§fn merge_supports_table_hints(&self) -> bool
fn merge_supports_table_hints(&self) -> bool
Whether table hints are supported in MERGE target.
Source§fn merge_uses_output_clause(&self) -> bool
fn merge_uses_output_clause(&self) -> bool
Whether OUTPUT clause should be used for MERGE result projection.
Source§fn merge_supports_returning_clause(&self) -> bool
fn merge_supports_returning_clause(&self) -> bool
Whether RETURNING clause is supported for MERGE.
Source§fn longest_script_line(&self) -> Option<usize>
fn longest_script_line(&self) -> Option<usize>
The longest line this engine’s own client reads intact from a script
file, or
None where it reads any line. Read moreSource§fn render_relation_alias(&self, relation: &str, alias: &str) -> String
fn render_relation_alias(&self, relation: &str, alias: &str) -> String
How this engine writes a short name for a relation. Read more
Source§fn is_reserved_word(&self, word: &str) -> bool
fn is_reserved_word(&self, word: &str) -> bool
Whether this engine reserves
word, so a name spelled that way
has to be quoted to be read as a name. Read moreSource§fn render_alias(&self, alias: &str) -> String
fn render_alias(&self, alias: &str) -> String
A short name Razeri gives a column or a relation inside one
statement, written so this engine reads it as a name. Read more
Source§fn render_ddl_within_routine_body(&self, statement: &str) -> String
fn render_ddl_within_routine_body(&self, statement: &str) -> String
How a statement that changes the shape of the warehouse is written
inside a routine’s body. Read more
Source§fn render_empty_table(&self, relation: &str) -> String
fn render_empty_table(&self, relation: &str) -> String
How this engine empties a table and keeps it. Read more
Source§fn merge_target_accepts_alias(&self) -> bool
fn merge_target_accepts_alias(&self) -> bool
Whether this engine lets a
MERGE target carry an alias. Read moreSource§fn render_merge_on(&self, condition: &str) -> String
fn render_merge_on(&self, condition: &str) -> String
How this engine writes the condition a
MERGE matches rows on. Read moreSource§fn merge_source_requires_inlined_ctes(&self) -> bool
fn merge_source_requires_inlined_ctes(&self) -> bool
Source§fn insert_accepts_leading_ctes(&self) -> bool
fn insert_accepts_leading_ctes(&self) -> bool
Source§fn supports_sql_function_ddl(&self) -> bool
fn supports_sql_function_ddl(&self) -> bool
Whether this engine can be given a function by
CREATE FUNCTION. Read moreSource§fn scalar_function_body_is_expression(&self) -> bool
fn scalar_function_body_is_expression(&self) -> bool
Whether a scalar function’s body is a bare expression. Read more
Source§fn scalar_function_names_are_schema_qualified(&self) -> bool
fn scalar_function_names_are_schema_qualified(&self) -> bool
Whether a scalar function belongs to a schema. Read more
Source§fn scalar_function_call_requires_schema(&self) -> bool
fn scalar_function_call_requires_schema(&self) -> bool
Whether an unqualified scalar-function call resolves. Read more
Source§fn render_procedure_call(&self, qualified_name: &str) -> String
fn render_procedure_call(&self, qualified_name: &str) -> String
How this engine invokes a stored procedure, as a whole statement. Read more
Source§fn schema_separator(&self) -> &'static str
fn schema_separator(&self) -> &'static str
The schema separator for qualified names. Read more
Source§fn statement_separator(&self) -> &'static str
fn statement_separator(&self) -> &'static str
The statement separator for scripts. Read more
Source§fn supports_compound_assignment(&self) -> bool
fn supports_compound_assignment(&self) -> bool
Whether the platform supports compound assignment operators (e.g.,
col += value). Read moreSource§fn supports_update_from(&self) -> bool
fn supports_update_from(&self) -> bool
Whether UPDATE supports FROM clause for join-based updates. Read more
Source§fn update_from_takes_a_source_naming_the_targets_columns(&self) -> bool
fn update_from_takes_a_source_naming_the_targets_columns(&self) -> bool
Whether an
UPDATE … FROM takes a joined source whose columns carry
the target’s own names, under an unqualified SET:
UPDATE t SET v = source.v FROM (SELECT k, v FROM s) source WHERE t.k = source.k. Read moreSource§fn render_refresh_statistics(&self, table: &str) -> Option<String>
fn render_refresh_statistics(&self, table: &str) -> Option<String>
The statement that tells this engine’s planner what a table now
holds, after Razeri wrote it in bulk, or
None where the engine needs
none. Read moreSource§fn uses_alter_table_update(&self) -> bool
fn uses_alter_table_update(&self) -> bool
Whether the platform uses ALTER TABLE … UPDATE syntax (
ClickHouse mutations).Source§fn mutation_reads_only_its_own_rows(&self) -> bool
fn mutation_reads_only_its_own_rows(&self) -> bool
Whether a mutation on this platform can read only the row it is
mutating. Read more
Source§fn render_procedure_variable_reference(&self, name: &str) -> String
fn render_procedure_variable_reference(&self, name: &str) -> String
The spelling a SQL statement inside a generated procedure body reads
a declared local variable by. Read more
Source§fn render_procedure_query_into_variable(
&self,
variable: &str,
query: &str,
) -> String
fn render_procedure_query_into_variable( &self, variable: &str, query: &str, ) -> String
The statement that binds one query’s answer to a declared local. Read more
Source§fn render_procedure_raise(
&self,
message: &str,
error_code: Option<i32>,
) -> String
fn render_procedure_raise( &self, message: &str, error_code: Option<i32>, ) -> String
The statement that stops a procedure body with an error of its own. Read more
Source§fn render_procedure_log(
&self,
level: ProcedureLogLevel,
message: &str,
) -> Option<String>
fn render_procedure_log( &self, level: ProcedureLogLevel, message: &str, ) -> Option<String>
The statement that writes a message where an operator can read it. Read more
Source§fn render_discarded_scalar(&self, expression: &str, alias: &str) -> String
fn render_discarded_scalar(&self, expression: &str, alias: &str) -> String
The statement a generated load asks a scalar question with and throws
the answer away. Read more
Source§fn render_inline_clock_binding(
&self,
name: &str,
moment: &str,
) -> InlineClockBinding
fn render_inline_clock_binding( &self, name: &str, moment: &str, ) -> InlineClockBinding
How a script with no stored procedures binds the load’s clock once
— same rule as
Self::render_procedure_variable_reference, on the
engines where a load ships as a flat statement list rather than a
procedure body. Read moreSource§fn update_supports_top_clause(&self) -> bool
fn update_supports_top_clause(&self) -> bool
Whether UPDATE supports TOP(n) clause (
SqlServer).Source§fn update_supports_table_hints(&self) -> bool
fn update_supports_table_hints(&self) -> bool
Whether UPDATE supports table hints (e.g.,
WITH (NOLOCK)) (SqlServer).Source§fn update_uses_output_clause(&self) -> bool
fn update_uses_output_clause(&self) -> bool
Whether UPDATE uses OUTPUT clause positioned before FROM (
SqlServer). Read moreSource§fn update_supports_returning(&self) -> bool
fn update_supports_returning(&self) -> bool
Whether UPDATE supports a RETURNING clause at the end of the statement. Read more
Source§fn insert_uses_output_clause(&self) -> bool
fn insert_uses_output_clause(&self) -> bool
Whether INSERT uses OUTPUT clause positioned before VALUES/SELECT (
SqlServer). Read moreSource§fn insert_supports_returning(&self) -> bool
fn insert_supports_returning(&self) -> bool
Whether INSERT supports RETURNING at the end (
PostgreSQL, CitusDB).Source§fn insert_supports_table_hints(&self) -> bool
fn insert_supports_table_hints(&self) -> bool
Whether INSERT supports table hints (e.g.,
WITH (TABLOCK)) (SqlServer).Source§fn supports_insert_overwrite(&self) -> bool
fn supports_insert_overwrite(&self) -> bool
Whether INSERT OVERWRITE is supported (Snowflake, Databricks).
Source§fn supports_on_conflict(&self) -> bool
fn supports_on_conflict(&self) -> bool
Whether INSERT … ON CONFLICT is supported (
PostgreSQL, CitusDB).Source§fn supports_overriding_clause(&self) -> bool
fn supports_overriding_clause(&self) -> bool
Whether OVERRIDING SYSTEM/USER VALUE clause is supported (
PostgreSQL).Source§fn returning_clause_keyword(&self) -> &'static str
fn returning_clause_keyword(&self) -> &'static str
The keyword for returning data from DML: “OUTPUT” (
SqlServer) or “RETURNING” (others).Source§fn supports_returning_into(&self) -> bool
fn supports_returning_into(&self) -> bool
Whether OUTPUT … INTO is supported (
SqlServer).Source§fn supports_multi_table_insert(&self) -> bool
fn supports_multi_table_insert(&self) -> bool
Whether multi-table INSERT (INSERT ALL) is supported (Snowflake).
Source§fn render_security_mode(&self, is_definer: bool) -> &'static str
fn render_security_mode(&self, is_definer: bool) -> &'static str
Render the security mode clause for function/procedure definitions. Read more
Source§fn render_function_parameter_name(&self, name: &str) -> String
fn render_function_parameter_name(&self, name: &str) -> String
Render a function parameter name. Read more
Source§fn render_function_parameter_nullable(
&self,
_nullable: bool,
) -> Option<&'static str>
fn render_function_parameter_nullable( &self, _nullable: bool, ) -> Option<&'static str>
Render explicit nullability for a function parameter, if the platform requires it. Read more
Source§fn render_function_parameter_default(&self, value: &str) -> String
fn render_function_parameter_default(&self, value: &str) -> String
Render the default-value clause for a function parameter. Read more
Source§fn render_function_column_name(&self, name: &str) -> String
fn render_function_column_name(&self, name: &str) -> String
Render a column name inside a table-valued function definition. Read more
Source§fn render_time_partition_expr(&self, column: &str, granularity: &str) -> String
fn render_time_partition_expr(&self, column: &str, granularity: &str) -> String
Render a time partition expression for a column and granularity. Read more
Source§fn render_partition_clause(&self, expr: &str) -> String
fn render_partition_clause(&self, expr: &str) -> String
Render a DDL partition clause wrapping the expression list. Read more
Source§fn render_generated_column(&self, name: &str, expr: &str) -> String
fn render_generated_column(&self, name: &str, expr: &str) -> String
Render a generated column declaration. Read more
Source§fn supports_window_frame_exclude(&self) -> bool
fn supports_window_frame_exclude(&self) -> bool
Whether the platform supports the EXCLUDE clause in window frame specifications. Read more
Source§fn supports_window_frame_groups(&self) -> bool
fn supports_window_frame_groups(&self) -> bool
Whether the platform supports the GROUPS frame mode in window functions. Read more
Source§fn supports_named_windows(&self) -> bool
fn supports_named_windows(&self) -> bool
Whether the platform supports named windows (WINDOW clause). Read more
Source§fn uses_hash_temp_table_prefix(&self) -> bool
fn uses_hash_temp_table_prefix(&self) -> bool
Whether the platform uses a
# prefix for session-scoped temporary table names. Read moreSource§fn supports_table_variables(&self) -> bool
fn supports_table_variables(&self) -> bool
Whether the platform supports
DECLARE @name TABLE (...) table variables. Read moreSource§fn render_create_temp_table_keyword(&self) -> &'static str
fn render_create_temp_table_keyword(&self) -> &'static str
The full CREATE keyword for session-scoped temporary tables. Read more
Source§fn supports_transient_tables(&self) -> bool
fn supports_transient_tables(&self) -> bool
Whether the platform supports transient tables (e.g.
CREATE TRANSIENT TABLE). Read moreSource§fn supports_on_commit_drop(&self) -> bool
fn supports_on_commit_drop(&self) -> bool
Whether the platform supports
ON COMMIT DROP for transaction-scoped temp tables. Read moreSource§fn render_table_suffix(&self, table: &TableSuffixRequest<'_>) -> Option<String>
fn render_table_suffix(&self, table: &TableSuffixRequest<'_>) -> Option<String>
The clause written after a table’s column list, or
None on an
engine whose CREATE TABLE is complete at the closing parenthesis. Read moreSource§fn sorting_key_refuses_nullable_columns(&self) -> bool
fn sorting_key_refuses_nullable_columns(&self) -> bool
Whether this platform’s table sorting key refuses nullable columns. Read more
Source§fn requires_primary_key_in_create_table(&self) -> bool
fn requires_primary_key_in_create_table(&self) -> bool
Whether the platform requires a primary key on every table. Read more
Auto Trait Implementations§
impl Forget for AnsiDialect
impl Freeze for AnsiDialect
impl Move for AnsiDialect
impl RefUnwindSafe for AnsiDialect
impl Send for AnsiDialect
impl Sync for AnsiDialect
impl Unpin for AnsiDialect
impl UnsafeUnpin for AnsiDialect
impl UnwindSafe for AnsiDialect
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