Skip to content

sql (fix): Quote digit QName parts to generate valid SQL#3493

Merged
xerial merged 1 commit intowvlet:mainfrom
takezoe:sql-quote-qname-parts
Apr 20, 2024
Merged

sql (fix): Quote digit QName parts to generate valid SQL#3493
xerial merged 1 commit intowvlet:mainfrom
takezoe:sql-quote-qname-parts

Conversation

@takezoe
Copy link
Copy Markdown
Member

@takezoe takezoe commented Apr 20, 2024

No description provided.

DigitId(x, None)
} else if (!x.matches("[0-9a-zA-Z_]*")) {
// Quotations are needed with special characters to generate valid SQL
QuotedIdentifier(x, None)
Copy link
Copy Markdown
Member Author

@takezoe takezoe Apr 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to QName.sqlExpr so that this method can focus on identifier generation without handling special cases.

@takezoe takezoe force-pushed the sql-quote-qname-parts branch from 738b632 to 00f66ca Compare April 20, 2024 03:06
@takezoe takezoe changed the title sql (fix): Quote digit QName parts to generate SQL properly sql (fix): Quote digit QName parts to generate valid SQL Apr 20, 2024
@takezoe takezoe requested a review from xerial April 20, 2024 03:14
@xerial xerial merged commit ef113c7 into wvlet:main Apr 20, 2024
@xerial
Copy link
Copy Markdown
Member

xerial commented Apr 20, 2024

Ok. Merged

@takezoe takezoe deleted the sql-quote-qname-parts branch April 22, 2024 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants