From e72873cca7f8d1a26457a84510b530f1f37f3ccb Mon Sep 17 00:00:00 2001 From: Michael Li Date: Sat, 11 Feb 2023 17:27:46 +0800 Subject: [PATCH] sqlc: fixed topic query sql error: --- internal/dao/slonik/ce/postgres/query/topic.sql | 2 +- internal/dao/slonik/ce/postgres/topic.sql.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/dao/slonik/ce/postgres/query/topic.sql b/internal/dao/slonik/ce/postgres/query/topic.sql index b43048ca..b549b6fc 100644 --- a/internal/dao/slonik/ce/postgres/query/topic.sql +++ b/internal/dao/slonik/ce/postgres/query/topic.sql @@ -1,7 +1,7 @@ -- name: NewestTags :many SELECT t.id, t.tag, t.quote_num, u.id user_id, u.nickname, u.username, u.status, u.avatar, u.is_admin FROM p_tag t JOIN p_user u ON t.user_id = u.id -WHERE t.is_del = 0 AND t.quote_num > 0 +WHERE t.is_del = false AND t.quote_num > 0 ORDER BY t.id DESC OFFSET $1 LIMIT $2; diff --git a/internal/dao/slonik/ce/postgres/topic.sql.go b/internal/dao/slonik/ce/postgres/topic.sql.go index 79a9b757..9bf82268 100644 --- a/internal/dao/slonik/ce/postgres/topic.sql.go +++ b/internal/dao/slonik/ce/postgres/topic.sql.go @@ -159,7 +159,7 @@ func (q *Queries) InsertTags(ctx context.Context, arg *InsertTagsParams) (int64, const newestTags = `-- name: NewestTags :many SELECT t.id, t.tag, t.quote_num, u.id user_id, u.nickname, u.username, u.status, u.avatar, u.is_admin FROM p_tag t JOIN p_user u ON t.user_id = u.id -WHERE t.is_del = 0 AND t.quote_num > 0 +WHERE t.is_del = false AND t.quote_num > 0 ORDER BY t.id DESC OFFSET $1 LIMIT $2 `