ColumnExpr import type {ColumnExpr} from '@fuzdev/fuz_app/db/sql_columns.js'; Per-column expression override for a projection — return the SQL to
project for column, or undefined to keep the bare column reference.
Twin of the expr closure fuz_db::qualify_columns takes. The Rust side
decodes rows positionally, so its overrides need no output name; TS reads
rows by name, so columns_sql / qualify_columns alias every override
back to its column (… AS created_at) — otherwise a to_char(…)
projection would arrive under Postgres' derived name and read as
undefined.
undefined is the *only* decline sentinel. An empty string is a returned
expression, not a decline: it renders AS created_at and the query fails
to parse. This is documented rather than guarded — every override in the
repo is a literal lookup returning a fragment or nothing, and a malformed
projection failing loud at the first query beats silently swallowing an
expression the caller meant to supply.
(call)
type (column: string): string | undefined
column
stringstring | undefined