resultRowColumns

Talks about: , and

Overrides which column a component of the result row type reads

A component reads the column its own name implies, camelCase read as snake_case. Where the two disagree, aliasing the column in the query is usually the better answer, because it puts the mapping next to the column being renamed. This is for when the query is not yours to change — a view you do not own, or SQL generated elsewhere.

Keys are component paths from the root of the result row type, so a component of a nested record is addressed through the component holding it:

-- resultRowColumns:
--   amount.minorUnits: amount_cents
--   at: created_at

A column override belongs to the type rather than to one query, so every statement naming the same result row type shares one set: overrides declared on any of them apply to all of them, and two statements mapping the same component to different columns fail the build.

Configuration Options

Front Matter

In order to configure this option, place the following code in the front matter of your SQL statement:

-- resultRowColumns: configValue
SELECT  something
FROM    your_database_schema
WHERE   some_column = :some_value