do not auto-lowercase Name identifiers

- this is complicated because column names must preserve case
This commit is contained in:
Nikita Sivukhin
2025-09-26 12:32:01 +04:00
parent c4b3074575
commit 27c9506059
4 changed files with 34 additions and 43 deletions

View File

@@ -745,7 +745,7 @@ impl ToTokens for Expr {
Self::Collate(expr, collation) => {
expr.to_tokens(s, context)?;
s.append(TK_COLLATE, None)?;
s.append(TK_ID, Some(&collation.as_quoted()))
s.append(TK_ID, Some(&collation.as_ident()))
}
Self::DoublyQualified(db_name, tbl_name, col_name) => {
db_name.to_tokens(s, context)?;
@@ -1370,7 +1370,7 @@ impl ToTokens for Name {
s: &mut S,
_: &C,
) -> Result<(), S::Error> {
s.append(TK_ID, Some(&self.as_quoted()))
s.append(TK_ID, Some(&self.as_ident()))
}
}