diff options
| author | Claude <noreply@anthropic.com> | 2026-01-12 09:07:43 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-01-12 09:07:43 +0000 |
| commit | 86254f8eb7f812915464c8733f7017a6e0a3dd4d (patch) | |
| tree | fbf632ed9c179dd109afa6e1749a446f540a45c4 | |
| parent | 8524487824f7332223b24e75ab327bf6ec5eccc9 (diff) | |
| download | feedaka-86254f8eb7f812915464c8733f7017a6e0a3dd4d.tar.gz feedaka-86254f8eb7f812915464c8733f7017a6e0a3dd4d.tar.zst feedaka-86254f8eb7f812915464c8733f7017a6e0a3dd4d.zip | |
refactor: remove unused GetAllArticleGUIDs query
| -rw-r--r-- | backend/db/articles.sql.go | 28 | ||||
| -rw-r--r-- | backend/db/queries/articles.sql | 4 |
2 files changed, 0 insertions, 32 deletions
diff --git a/backend/db/articles.sql.go b/backend/db/articles.sql.go index 41c3112..7f6400b 100644 --- a/backend/db/articles.sql.go +++ b/backend/db/articles.sql.go @@ -42,34 +42,6 @@ func (q *Queries) CheckArticleExistsByGUID(ctx context.Context, guid string) (in return article_exists, err } -const getAllArticleGUIDs = `-- name: GetAllArticleGUIDs :many -SELECT DISTINCT guid -FROM articles -` - -func (q *Queries) GetAllArticleGUIDs(ctx context.Context) ([]string, error) { - rows, err := q.db.QueryContext(ctx, getAllArticleGUIDs) - if err != nil { - return nil, err - } - defer rows.Close() - items := []string{} - for rows.Next() { - var guid string - if err := rows.Scan(&guid); err != nil { - return nil, err - } - items = append(items, guid) - } - if err := rows.Close(); err != nil { - return nil, err - } - if err := rows.Err(); err != nil { - return nil, err - } - return items, nil -} - const createArticle = `-- name: CreateArticle :one INSERT INTO articles (feed_id, guid, title, url, is_read) VALUES (?, ?, ?, ?, ?) diff --git a/backend/db/queries/articles.sql b/backend/db/queries/articles.sql index 134b967..2c00678 100644 --- a/backend/db/queries/articles.sql +++ b/backend/db/queries/articles.sql @@ -77,7 +77,3 @@ SELECT EXISTS( SELECT 1 FROM articles WHERE guid = ? ) as article_exists; - --- name: GetAllArticleGUIDs :many -SELECT DISTINCT guid -FROM articles; |
