Skip to content

grave quotes and double quotes#269

Merged
JasonShin merged 1 commit intomainfrom
grave-quotes
Mar 29, 2026
Merged

grave quotes and double quotes#269
JasonShin merged 1 commit intomainfrom
grave-quotes

Conversation

@JasonShin
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 29, 2026 03:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves SQL extraction from tagged template literals so escaped characters (notably backticks) are interpreted correctly, and adds demo coverage for quoted identifiers in PostgreSQL and MySQL.

Changes:

  • Switch SQL extraction in the SWC tag parser to prefer the template literal’s “cooked” value, falling back to “raw” when needed.
  • Add PostgreSQL demo queries covering double-quoted identifiers (table, qualified table, and columns).
  • Add MySQL demo queries covering backtick-escaped identifiers (table, qualified table, and columns) along with snapshots.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/demo/select/double_quote_escaping.ts Adds demo queries for PostgreSQL double-quoted identifiers.
tests/demo/select/double_quote_escaping.snapshot.ts Adds snapshot typings for the new PostgreSQL demo queries.
tests/demo/select/double_quote_escaping.queries.ts Adds expected generated typings for the new PostgreSQL demo queries.
tests/demo/mysql/backtick_escaping.ts Adds demo queries for MySQL backtick-escaped identifiers (requires cooked template parsing).
tests/demo/mysql/backtick_escaping.snapshot.ts Adds snapshot typings for the new MySQL demo queries.
tests/demo/mysql/backtick_escaping.queries.ts Adds expected generated typings for the new MySQL demo queries.
src/parser/tag.rs Fixes template literal handling by using cooked strings (with raw fallback) for SQL text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JasonShin JasonShin enabled auto-merge (squash) March 29, 2026 04:03
@JasonShin JasonShin disabled auto-merge March 29, 2026 04:07
@JasonShin JasonShin enabled auto-merge (squash) March 29, 2026 04:07
@JasonShin JasonShin disabled auto-merge March 29, 2026 04:07
@JasonShin JasonShin merged commit 96b09c0 into main Mar 29, 2026
37 checks passed
@JasonShin JasonShin deleted the grave-quotes branch March 29, 2026 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants