Skip to content

Add GitHub Pages documentation and SQL-to-Delphi converter - #30

Merged
auchri merged 3 commits into
mainfrom
codex/github-pages-sql-converter
Oct 31, 2026
Merged

auchri merged 3 commits into
mainfrom
codex/github-pages-sql-converter

Conversation

@auchri

@auchri auchri commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Changes

Add a static GitHub Pages documentation website and a browser-local SELECT-to-Delphi converter. README.md, CHANGELOG.md and docs/*.md are rendered directly, keeping one documentation source. Relative links, heading anchors and syntax highlighting support the project URL subpath.

The converter accepts MySQL, PostgreSQL, SQL Server and SQLite input, including aliases, simple joins, grouped conditions, ordering and paging. LIKE uses Starts/Ends/Contains helpers when appropriate, with Like as the general fallback and matching NOT/OR/HAVING methods. Unsupported constructs fail without partial output.

Keep the header, main menu and on-page contents visible while reading. Include smooth anchor scrolling, target highlighting, current-section tracking, back-to-top navigation, a horizontal mobile menu and reduced-motion support. The sidebar correctly describes the library's six output dialects; the converter accepts four input dialects.

Numeric output and review fixes

  • Generate readable decimal expressions: .Where('Price', '>', 19.99). Normalize .125 to 0.125, 1.2300 to 1.23, and 1. to 1.0. Do not emit BCD wrappers, additional imports or automatic TValue.From calls for ordinary decimals.
  • Preserve original numeric tokens before parsing SQL. Integer checks use BigInt and retain exact Integer/Int64 boundaries, including values above JavaScript's safe integer range and explicit Low(Integer)/Low(Int64).
  • Accept decimals with at most 15 significant digits after ignoring insignificant zeros, within the normal Double range. Use exact integer/rational range comparisons; never parse/reformat user decimals through JavaScript Number. Reject high precision, overflow, subnormal values and scientific notation with manual-type-selection guidance.
  • Document that standard binary floating point is approximate and does not guarantee exact SQL DECIMAL semantics or a particular schema-dependent parameter type. Applications requiring exact decimals should choose Currency/TBcd manually. There is no automatic BCD mode.
  • Only the latest relevant conversion controls results, errors and loading state. Input/dialect changes invalidate output and disable Copy. Ctrl+Enter follows the Convert button's busy-state rule. Tests cover overlapping successes/failures, retries and unexpected errors.
  • Generate four Delphi smoke projects from the production converter, with nine feature cases each. Add a Win32/Win64 runner and an IDE/TestsOnly workflow with stale-fixture/executable checks. Floating-point assertions accept the standard Double/Extended family, compare approximate values with relative tolerance 1E-14, and print the actual binding type instead of requiring BCD.

Each generated smoke project now includes a stable, unique ProjectGuid and console/MainSource/Win32/Win64 IDE metadata matching the repository's existing Delphi projects. Regression checks validate GUID syntax, uniqueness and deterministic regeneration; the generated XML and GUIDs were also parsed locally. Generated projects derive their structure from test/QueryBuilder.Tests.dproj, preserving Base configuration groups, sanitized names and target/UserTools imports. DCC_* compiler options belong to the conditional Base property group so the IDE resolves the executable output when pressing F9. No debugger host override is needed. Generated Delphi sources and project files use CRLF.

Editors and documentation navigation

Use locally bundled CodeMirror 6 editors with dialect-aware SQL highlighting and read-only, selectable Delphi output. A small Delphi lexical highlighter covers keywords, types, calls, strings, character codes and multiline comments; it is not a complete Delphi parser. Preserve input invalidation, async conversion ownership, errors, Copy/fallback and Ctrl+Enter. Tab indents; Escape then Tab leaves the SQL editor. The converter app bundle is about 362 KiB minified / 122 KiB gzip; documentation pages load only the small navigation script. Runtime dependency licenses are included in the generated notice.

Keep five primary documentation links and group secondary pages under native Advanced details. The active group opens automatically, with aria-current and synchronized aria-expanded. Mobile navigation stays a single horizontal row, reveals the active item on page load and shows an end-aware right-edge fade. CSS is expanded into readable component sections; the existing palette and layout are retained.

Validation

  • npm test: 67 tests passed across all four input dialects, existing SELECT features, integer boundaries, concise decimal output, precision/range rejections, overlapping conversions and smoke-project generation.
  • npm run build: passed; ten documentation pages plus the converter generated from repository sources.
  • npm run test:site: passed; local links, anchors and assets validated under a project URL subpath.
  • Smoke fixture generation and node website/generate-smoke.mjs --check: passed.
  • git diff --check: passed.
  • npm run test:browser: ten Playwright tests passed in installed Edge on Windows under /QueryBuilder4Delphi/, at 1920, 1366, 768, 320, 375 and 390px. Checked highlighting/editor initialization, read-only output, Copy and clipboard fallback, editing/invalidation, conversion shortcuts/errors, dialect changes, native Advanced keyboard operation, active navigation visibility, mobile fade/end behavior, single-row expansion, focus and reduced motion. Desktop/mobile screenshots were visually inspected. Tests observed no external converter requests. CI now runs these tests in Chromium; that Linux run has not been verified locally.
  • The user successfully built the generated MySQL project in the Delphi IDE. Its Win32 executable was then run directly: all nine generated function/binding smoke cases passed, including Integer/Int64 boundaries and ordinary decimal bindings. The executable was verified as PE x86 and newer than its matching source. All six decimal parameters reported Extended bindings on Win32.
  • Command-line compiler attempts remain blocked by the installed Community Edition license. PostgreSQL, SQL Server and SQLite project compilation and all Win64 runs remain unverified. The original IDE launch failure was reproduced locally with F9. After moving compiler options into the conditional Base group and reloading the MySQL project, F9 builds and runs without the missing-executable error. A subsequent direct run of the newly built Win32 executable passes all nine smoke cases.

Deployment

The workflow validates pull requests and deploys Pages only from main; it does not require Delphi. Select GitHub Actions as the Pages source before first deployment. Development, numeric policy and smoke-test instructions are in docs/WEBSITE.md. Repository settings and library implementations/public APIs are unchanged.

@auchri
auchri force-pushed the codex/github-pages-sql-converter branch from 5c4bef2 to 83aca91 Compare October 31, 2026 18:53
@auchri
auchri force-pushed the codex/github-pages-sql-converter branch from 57207e1 to 2c090ef Compare October 31, 2026 19:06
@auchri
auchri merged commit 4b87528 into main Oct 31, 2026
2 checks passed
@auchri
auchri deleted the codex/github-pages-sql-converter branch October 31, 2026 19: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.

1 participant