WarUI

Reference parameterized SQL translator

GRID-A05-F17P0baselinePlanned

Translates a validated AST into a SQL string containing only placeholders plus a separate ordered parameter array, for PostgreSQL, SQL Server, MySQL and SQLite dialects. Column names come only from schema mappings and are quoted by the dialect, so no user value is ever placed into the SQL text.

Planned. This page shows the specification from issue #182. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A grid with a builder, plus a translator panel showing the SQL text and a parameter table for PostgreSQL.

Expected behavior

The SQL panel shows placeholders ($1, @p1, ? as appropriate) and the parameter table lists each typed value. Switching dialect changes the quoting and paging syntax only.

Planned API surface

toSql()sqlDialectcolumnMapSqlResult.textSqlResult.paramstableSource

Acceptance criteria

  • The SQL text contains no literal values derived from the AST (pending)
  • Identifiers come only from columnMap and are quoted per dialect (pending)
  • The translator refuses unvalidated input (requires a validated token or runs validation internally) (pending)
  • Null ordering and case-insensitive text matching follow a documented per-dialect strategy (pending)