Skip to content

The SQL lexer lives in the core as Smolquery.Sql, since two edges read SQL with it (PL-66) - #350

Merged
chasers merged 1 commit into
t-481-clickhouse-settings-paramsfrom
sql-lexer-to-core
Sep 20, 2026
Merged

chasers merged 1 commit into
t-481-clickhouse-settings-paramsfrom
sql-lexer-to-core

Conversation

@chasers

@chasers chasers commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

TL;DR: The SQL lexer moves from the Postgres edge to the core, as Smolquery.Sql. A pure move.

Tracker: T-502. Plan PL-66. Stacked on #349 (T-481).

Why

  • Two edges read SQL with this lexer now.
  • The ClickHouse edge depended on a Postgres-edge module for it.
  • One edge should not depend on another.

What changed

  • lib/smolquery_pg/sql.ex → lib/smolquery/sql.ex.
  • Its test moved with it.
  • Every alias renamed. No function changed.

Watch out

  • ⚠️ Smolquery.Ddl still has its own scanner. Moving a parser on the query path is its own change: T-503.

How to review

  • The diff is a rename plus alias lines. git diff -M shows it as one.

Checks

  • ✅ mix precommit
  • ✅ mix ci

🤖 Generated with Claude Code

…d SQL with it (PL-66)

SmolqueryPg.Sql was written for the Postgres edge. The ClickHouse edge has
used it since T-478 and leans on it for everything T-481 added, so one edge
depended on another for a module that is about neither.

A pure move: lib/smolquery_pg/sql.ex to lib/smolquery/sql.ex, its test
with it, and every alias. No function changes. The moduledoc now names
both edges as users.

Smolquery.Ddl still scans for itself. It did so because a service may not
depend on an edge, which no longer stands in its way, but moving a parser
on the query path onto another scanner is its own change, not part of a
rename.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chasers
chasers merged commit 6c78881 into main Sep 20, 2026
13 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