Skip to content

Add landing page and extend the SQL to Delphi converter - #33

Merged
auchri merged 1 commit into
mainfrom
claude/landing-page-converter
Nov 3, 2026
Merged

auchri merged 1 commit into
mainfrom
claude/landing-page-converter

Conversation

@auchri

@auchri auchri commented Nov 3, 2026

Copy link
Copy Markdown
Owner

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 C was 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

  • Flat fluent chains for AND or OR sequences; a callback group only where the operator changes (.WhereBetween(...).WhereIn(...).Where(<OR group>) instead of three nested callbacks).
  • New: COUNT/SUM/AVG/MIN/MAX → SelectCount etc.; aggregates in HAVING/ORDER BY → HavingRaw/OrderByRaw with bound values; subqueries in IN, NOT IN, EXISTS, NOT EXISTS and comparisons as nested TQuery.Create chains; NOT (…) → WhereNot.
  • Error messages quote the unsupported SQL fragment and suggest the fluent or raw alternative; no internal parser terms such as tableList.
  • Two new examples (counts per author, subqueries); the convert button now sits between input and output.

Website

  • New landing page (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.
  • The README becomes guide.html ("Getting started"); README-only links to the website itself are wrapped in <!-- website:skip --> and omitted there.
  • Page transition no longer starts from opacity 0 (content stayed grey where animations are throttled); anchor highlight shortened to 600 ms.

Testing

  • npm test: 81 passed
  • npm run test:site: passed
  • npx playwright test (Edge): 12 passed, including new landing-page and button-position tests
  • Delphi smoke fixtures regenerated with three new cases (Aggregates, Subqueries, Negation). Not compiled: the local Delphi Community Edition does not support command-line compilation. Please build build/converter-smoke/*.dproj for Win32/Win64 in the IDE and run tools/test_converter_smoke.ps1 -TestsOnly. All generated overloads exist in QueryBuilder4Delphi.Query.pas and are already used in existing tests.

🤖 Generated with Claude Code

- 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>
@auchri
auchri merged commit 490098f into main Nov 3, 2026
2 checks passed
@auchri
auchri deleted the claude/landing-page-converter branch November 3, 2026 19:20
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.

1 participant