pub struct DialectInfo {
pub name: &'static str,
pub display_name: &'static str,
pub aliases: &'static [&'static str],
pub dialect_family: DialectFamily,
pub family: &'static str,
pub is_cloud_native: bool,
pub is_olap: bool,
pub is_postgres_compatible: bool,
}Expand description
Metadata describing a dialect implementation.
Serializes to the discovery payload returned by list_platforms() across
every surface (and consumed by the typed-constants generator), so hosts learn
the registered platforms — including third-party plugins — at runtime instead
of hard-coding them.
Fields§
§name: &'static strMachine-readable name (e.g., “postgres”, “redshift”).
display_name: &'static strHuman-readable display name (e.g., “PostgreSQL”, “Amazon Redshift”).
aliases: &'static [&'static str]The other spellings this dialect answers to (e.g. ["pg", "postgresql"]).
A dialect owns its own names. name always resolves; this
is everything else a design or a --target may say for the same
platform. Matching ignores case and surrounding whitespace, so
"PostgreSQL" needs no separate entry. Declare &[] to answer to
name alone.
Two loaded dialects must not claim the same spelling: a spelling that names two platforms names neither, and resolving it is refused rather than guessed.
dialect_family: DialectFamilyDialect family for shared behavior (e.g., PostgreSQL, TSql).
family: &'static strSQL family label (e.g., “PostgreSQL”, “T-SQL”, “ClickHouse SQL”).
is_cloud_native: boolWhether this is a cloud-native platform (e.g. Snowflake, Databricks).
is_olap: boolWhether this is primarily an OLAP engine (e.g. ClickHouse).
is_postgres_compatible: boolWhether this dialect is PostgreSQL-wire-compatible.
Implementations§
Source§impl DialectInfo
impl DialectInfo
Sourcepub fn spellings(&self) -> Vec<&'static str>
pub fn spellings(&self) -> Vec<&'static str>
Every spelling this dialect answers to: its own name, then its aliases.
This is what the resolver reads, so it is also the honest answer to “what may a design call this platform?”. An alias repeating the name is listed once.
Sourcepub fn answers_to(&self, spelling: &str) -> bool
pub fn answers_to(&self, spelling: &str) -> bool
Whether this dialect answers to spelling, ignoring case and
surrounding whitespace.
Trait Implementations§
Source§impl Clone for DialectInfo
impl Clone for DialectInfo
Source§fn clone(&self) -> DialectInfo
fn clone(&self) -> DialectInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more