mirror of
https://github.com/MeshCore-Beacon/beacon-server.git
synced 2026-10-22 14:11:27 +00:00
refactor(db): move the heard-IATA lookup into sqlc
This commit is contained in:
1 parent
b30668bac4
commit
ec0ecd321b
5 files changed
+44
-5
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user