refactor(db): move the heard-IATA lookup into sqlc

This commit is contained in:
MrAlders0n authored and MrAlders0n committed 2026-10-02 16:53:32 -04:00
1 parent b30668bac4
commit ec0ecd321b
5 files changed
+44 -5

No files matched your search

+3
View File
@@ -21,6 +21,9 @@ SELECT * FROM iata_codes WHERE iata = $1;
-- name: ListIATAs :many
SELECT * FROM iata_codes ORDER BY iata;
-- name: ListHeardIATAs :many
SELECT DISTINCT last_iata::text AS iata FROM observers WHERE last_iata IS NOT NULL ORDER BY 1;
-- name: UpsertIATADetails :exec
INSERT INTO iata_codes (iata, display_name, approx_lat, approx_lng)
VALUES ($1, $2, $3, $4)