pub enum QuoteStyle {
None,
Single,
Double,
UnicodeDouble,
Backtick,
Bracket,
}Expand description
Surface quote spelling for an identifier.
Variants§
None
Unquoted — a bare identifier.
Single
Single quotes '…'. Not an identifier delimiter in standard SQL — this records
a MySQL string literal used as a column alias (SELECT 1 AS 'x'), whose value is
interned as the identifier and rendered back single-quoted so it round-trips.
Double
Double-quoted "…" — the standard SQL delimited identifier.
UnicodeDouble
PostgreSQL / SQL-standard Unicode-escaped delimited identifier U&"…", optionally
followed by a UESCAPE 'c' clause. Like Double the delimiter is a
double quote, but the body carries \XXXX / \+XXXXXX escapes decoded against the
default \ (or the UESCAPE override). The interned sym holds the
decoded value — target-neutral, so a TargetDialect re-spell and the redacted
fingerprint emit the plain "…" form — while a source-fidelity render replays the
exact U&"…" [UESCAPE 'c'] spelling from the node’s span. The distinct variant is
what tells the renderer the decoded value and the source spelling differ (a plain
Double ident’s value already is its spelling).
Backtick
Backtick-quoted `…` (MySQL).
Bracket
Bracket-quoted […] (T-SQL).
Trait Implementations§
Source§impl Clone for QuoteStyle
impl Clone for QuoteStyle
Source§fn clone(&self) -> QuoteStyle
fn clone(&self) -> QuoteStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more