Sql
<Sql> shows a query of the report by name, with its title from the
query's first -- line. Use it on the Technical tab of the
dialog, so a reader can see exactly what runs. A
block's own "(i)" shows its SQL from info={{ sql: [...] }} instead.
Example
import { H2, Sql, Technical } from "~/components/report-kit/info"
import regions from "./regions.sql?raw"
// in defineReport({ … })
page: {
info: () => (
<Technical>
<H2>The SQL</H2>
<Sql query="regions" title="Sales per region, from sample rows" />
</Technical>
),
},
queries: { regions: query<{ region: string; sales: number }>(regions) },
Props
Checks
A query that names no query shows "no query" in its place.