pub struct IdentifierCasing {
pub table: CaseRule,
pub table_alias: CaseRule,
pub column: CaseRule,
}Expand description
The identifier-casing policy for an analysis, split by identifier
class. Build one with IdentifierCasing::for_dialect (the dialect’s
default), IdentifierCasing::uniform (one rule for every class), or
the field literal, and pass it via ExtractorOptions::with_casing to a
*_with_options extractor to override the dialect default — e.g. to
model a deployment-specific collation.
Fields§
§table: CaseRulecatalog / schema / table names.
table_alias: CaseRuleTable aliases and CTE / derived / table-function names.
column: CaseRuleColumn names and column aliases.
Implementations§
Source§impl IdentifierCasing
impl IdentifierCasing
Sourcepub fn for_dialect(dialect: &dyn Dialect) -> Self
pub fn for_dialect(dialect: &dyn Dialect) -> Self
Map a parsed dialect to its default casing. Unrecognised
dialects fall back to the generic policy (CaseRule::Lower
everywhere), which preserves the resolver’s historical
behaviour.
Filesystem-dependent (MySQL table names) and collation-dependent
(SQL Server) models can’t be known from the dialect alone, so
they resolve to a fixed default here: SQL Server to the common
case-insensitive collation, MySQL table names to the
false-merge-avoiding CaseRule::Sensitive. A future override
API can refine these per deployment.
Trait Implementations§
Source§impl Clone for IdentifierCasing
impl Clone for IdentifierCasing
Source§fn clone(&self) -> IdentifierCasing
fn clone(&self) -> IdentifierCasing
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more