#12 - update feeds

This commit is contained in:
2025-03-11 15:25:52 +02:00
parent a76915c7fc
commit f561eb4c34
10 changed files with 131 additions and 22 deletions

View File

@@ -0,0 +1,29 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.28.0
// source: getNextFeedToFetch.sql
package database
import (
"context"
)
const getNextFeedToFetch = `-- name: GetNextFeedToFetch :one
SELECT id, created_at, updated_at, name, url, user_id, last_fetched_at FROM feeds ORDER BY last_fetched_at NULLS FIRST LIMIT 1
`
func (q *Queries) GetNextFeedToFetch(ctx context.Context) (Feed, error) {
row := q.db.QueryRowContext(ctx, getNextFeedToFetch)
var i Feed
err := row.Scan(
&i.ID,
&i.CreatedAt,
&i.UpdatedAt,
&i.Name,
&i.Url,
&i.UserID,
&i.LastFetchedAt,
)
return i, err
}