From 4a614c426312c4e603384b68a7e72627ab253d0d Mon Sep 17 00:00:00 2001 From: Pawel Kosiec Date: Fri, 22 May 2026 15:39:35 +0200 Subject: [PATCH] fix: add @param type annotations to template SQL queries Template query files (hello_world.sql, mocked_sales.sql) lacked `-- @param` annotations, causing warnings during `appkit generate-types` on freshly scaffolded apps. Adding STRING and INT annotations silences the warnings and produces properly typed query parameters. Signed-off-by: Pawel Kosiec --- template/config/queries/hello_world.sql | 1 + template/config/queries/mocked_sales.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/template/config/queries/hello_world.sql b/template/config/queries/hello_world.sql index 2ee26aa59..a09ef265a 100644 --- a/template/config/queries/hello_world.sql +++ b/template/config/queries/hello_world.sql @@ -1,3 +1,4 @@ {{if .plugins.analytics -}} +-- @param message STRING SELECT :message AS value; {{- end}} diff --git a/template/config/queries/mocked_sales.sql b/template/config/queries/mocked_sales.sql index 526b5fd83..bab03dd7e 100644 --- a/template/config/queries/mocked_sales.sql +++ b/template/config/queries/mocked_sales.sql @@ -1,4 +1,5 @@ {{if .plugins.analytics -}} +-- @param max_month_num INT WITH mock_data AS ( SELECT 'January' AS month, 1 AS month_num, 65000 AS revenue, 45000 AS expenses, 850 AS customers UNION ALL SELECT 'February', 2, 72000, 48000, 920