Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enhance query builder with improved alias handling #285

Merged
merged 2 commits into from
Oct 12, 2024

Conversation

itsumura-h
Copy link
Owner

  • Updated quote function to handle SQL expressions with aliases more robustly.
  • Added support for quoting function expressions like COUNT(id) as count and MAX(id) as maxId.
  • Improved test coverage by adding a test case for select count in both v1 and v2 test suites.
  • Ensured consistent quoting of standalone identifiers and expressions in query generation.

This change improves the flexibility and correctness of SQL query generation, particularly in handling complex expressions with aliases.

- Updated `quote` function to handle SQL expressions with aliases more robustly.
- Added support for quoting function expressions like `COUNT(id) as count` and `MAX(id) as maxId`.
- Improved test coverage by adding a test case for `select count` in both v1 and v2 test suites.
- Ensured consistent quoting of standalone identifiers and expressions in query generation.

This change improves the flexibility and correctness of SQL query generation, particularly in handling complex expressions with aliases.
@itsumura-h itsumura-h linked an issue Oct 12, 2024 that may be closed by this pull request
@itsumura-h itsumura-h merged commit 4ab094f into main Oct 12, 2024
4 checks passed
@itsumura-h itsumura-h deleted the 282-able-to-use-function-in-select-clause branch October 12, 2024 05:21
@itsumura-h itsumura-h mentioned this pull request Oct 12, 2024
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.

able to use function in select clause
1 participant