Skip to content

Format SQL-like input tolerantly and correct block layout - #3

Merged
royashbrook merged 2 commits into
mainfrom
codex/tolerant-formatting
Sep 19, 2026
Merged

royashbrook merged 2 commits into
mainfrom
codex/tolerant-formatting

Conversation

@royashbrook

@royashbrook royashbrook commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

changes

  • expanded CASE blocks, JOIN/APPLY aligned with the primary table, no explicit INNER
  • adjacent CTEs as ), next as ( and plain integer TOP counts
  • DATE_TRUNC/ARRAY_AGG casing and default-mode boolean-shaped TRUE/FALSE operands
  • best-effort formatting by default, with the existing refusal contract behind -Strict
  • useful parser diagnostics on stderr, including line, column and actual message
  • fallback first-projection alignment, counted independently in each SELECT

The fallback preserves unfamiliar syntax rather than translating dialects. It preserves inline spacing, organizes recognizable boundaries, and returns unchanged input with a warning if it cannot retain the tokens. File/dependency/output failures remain errors. No database execution or claim of PostgreSQL/MySQL validation.

checks

  • 67 structural, 15 reported-input/preservation, and 15 CLI checks pass locally at 514d5d7
  • strict coverage unchanged across 129 pinned public SQL samples
  • all 129 public inputs produce second-pass-stable output in default mode
  • docs and generated examples updated, relative links and skill validation pass
  • Windows/macOS/Linux each pass all 97 checks at 514d5d7: https://github.com/royashbrook/roy-sql/actions/runs/35049750596

The published 2.27.0 installation is unchanged. The 2.28.0 candidate is for review.

refs #2

@royashbrook
royashbrook merged commit 9fd24b7 into main Sep 19, 2026
6 checks passed
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