Repository navigation
Add landing page and extend the SQL to Delphi converter - #33
Merged
Merged
Conversation
- Fix AND/OR precedence: the MySQL, PostgreSQL and SQLite grammars group AND/OR left to right, so A OR B AND C was converted as (A OR B) AND C. The converter now restores SQL precedence and keeps explicit parentheses. - Emit flat fluent chains for AND/OR sequences; nest callbacks only where the operator changes. - Support COUNT/SUM/AVG/MIN/MAX, aggregates in HAVING and ORDER BY, subqueries in IN, NOT IN, EXISTS, NOT EXISTS and comparisons, and NOT (...). - Error messages quote the unsupported SQL fragment and suggest the fluent or raw method to use instead. - New landing page; the README becomes the Getting started guide. - Convert button between input and output; page transitions no longer fade content in from transparent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix (wrong query logic): For MySQL, PostgreSQL and SQLite input, the parser groups AND/OR strictly left to right, so
A OR B AND Cwas converted as(A OR B) AND C. The converter now rebuilds SQL precedence (AND before OR) from the source order and keeps explicitly parenthesized groups. Covered by a test for all four input dialects.Converter
.WhereBetween(...).WhereIn(...).Where(<OR group>)instead of three nested callbacks).SelectCountetc.; aggregates in HAVING/ORDER BY →HavingRaw/OrderByRawwith bound values; subqueries in IN, NOT IN, EXISTS, NOT EXISTS and comparisons as nestedTQuery.Createchains;NOT (…)→WhereNot.tableList.Website
website/index.html): hero, README example with its generated SQL (read from the README at build time, so it stays compiler-checked), three highlights, install steps, converter call to action, SqlKata attribution.guide.html("Getting started"); README-only links to the website itself are wrapped in<!-- website:skip -->and omitted there.Testing
npm test: 81 passednpm run test:site: passednpx playwright test(Edge): 12 passed, including new landing-page and button-position testsbuild/converter-smoke/*.dprojfor Win32/Win64 in the IDE and runtools/test_converter_smoke.ps1 -TestsOnly. All generated overloads exist inQueryBuilder4Delphi.Query.pasand are already used in existing tests.🤖 Generated with Claude Code