From a26edaed3d68c2d946753f09e98c6c16064d5487 Mon Sep 17 00:00:00 2001 From: Pavel Date: Sun, 17 Mar 2024 21:48:19 +0300 Subject: [PATCH] update sqlc gen --- dal/db_query/queries.sql | 2 +- dal/sqlcgen/queries.sql.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dal/db_query/queries.sql b/dal/db_query/queries.sql index 1dedf0d..7444268 100644 --- a/dal/db_query/queries.sql +++ b/dal/db_query/queries.sql @@ -539,7 +539,7 @@ WITH Funnel AS ( q.title AS question_title, a.content AS answer_content, CAST( - COUNT(CASE WHEN a.result = FALSE THEN 1 ELSE NULL END) * 100.0 / NULLIF(SUM(COUNT(CASE WHEN a.result = FALSE THEN 1 ELSE NULL END)) OVER (PARTITION BY q.id), 0) AS INTEGER + COUNT(CASE WHEN a.result = FALSE THEN 1 ELSE NULL END) * 100.0 / NULLIF(SUM(COUNT(CASE WHEN a.result = FALSE THEN 1 ELSE NULL END)) OVER (PARTITION BY q.id), 0) AS NUMERIC(10, 2) ) AS percentage FROM question q diff --git a/dal/sqlcgen/queries.sql.go b/dal/sqlcgen/queries.sql.go index 26fd097..e1c6815 100644 --- a/dal/sqlcgen/queries.sql.go +++ b/dal/sqlcgen/queries.sql.go @@ -1633,7 +1633,7 @@ WITH Funnel AS ( q.title AS question_title, a.content AS answer_content, CAST( - COUNT(CASE WHEN a.result = FALSE THEN 1 ELSE NULL END) * 100.0 / NULLIF(SUM(COUNT(CASE WHEN a.result = FALSE THEN 1 ELSE NULL END)) OVER (PARTITION BY q.id), 0) AS INTEGER + COUNT(CASE WHEN a.result = FALSE THEN 1 ELSE NULL END) * 100.0 / NULLIF(SUM(COUNT(CASE WHEN a.result = FALSE THEN 1 ELSE NULL END)) OVER (PARTITION BY q.id), 0) AS NUMERIC(10, 2) ) AS percentage FROM question q @@ -1680,7 +1680,7 @@ type QuestionsStatisticsRow struct { ResultsPercentage int32 `db:"results_percentage" json:"results_percentage"` QuestionsTitle string `db:"questions_title" json:"questions_title"` AnswerContent sql.NullString `db:"answer_content" json:"answer_content"` - QuestionsPercentage int32 `db:"questions_percentage" json:"questions_percentage"` + QuestionsPercentage string `db:"questions_percentage" json:"questions_percentage"` } func (q *Queries) QuestionsStatistics(ctx context.Context, arg QuestionsStatisticsParams) ([]QuestionsStatisticsRow, error) {