aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/db/articles.sql.go28
-rw-r--r--backend/db/queries/articles.sql4
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;