From 6fe5702d00a4a41d12ffdd30a15c7c8c7f73a59e Mon Sep 17 00:00:00 2001 From: Nathaniel Caza Date: Tue, 2 Apr 2024 09:32:30 -0500 Subject: [PATCH] regen sqlc --- gadb/models.go | 1 + gadb/queries.sql.go | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gadb/models.go b/gadb/models.go index ad25029dd8..8020c14e8c 100644 --- a/gadb/models.go +++ b/gadb/models.go @@ -763,6 +763,7 @@ type Alert struct { type AlertDatum struct { AlertID int64 + ID int64 Metadata pqtype.NullRawMessage } diff --git a/gadb/queries.sql.go b/gadb/queries.sql.go index 2711e9a436..c1a281e26a 100644 --- a/gadb/queries.sql.go +++ b/gadb/queries.sql.go @@ -489,15 +489,20 @@ WHERE alert_id = ANY ($1::bigint[]) ` -func (q *Queries) AlertManyMetadata(ctx context.Context, alertIds []int64) ([]AlertDatum, error) { +type AlertManyMetadataRow struct { + AlertID int64 + Metadata pqtype.NullRawMessage +} + +func (q *Queries) AlertManyMetadata(ctx context.Context, alertIds []int64) ([]AlertManyMetadataRow, error) { rows, err := q.db.QueryContext(ctx, alertManyMetadata, pq.Array(alertIds)) if err != nil { return nil, err } defer rows.Close() - var items []AlertDatum + var items []AlertManyMetadataRow for rows.Next() { - var i AlertDatum + var i AlertManyMetadataRow if err := rows.Scan(&i.AlertID, &i.Metadata); err != nil { return nil, err }