chore: add twt help

This commit is contained in:
xuu
2025-03-30 12:12:10 -06:00
parent 2bb2eec993
commit 6579c50c09
3 changed files with 42 additions and 15 deletions

10
feed.go
View File

@@ -75,10 +75,12 @@ var (
refresh_rate
)
values (?, ?, ?, ?, ?, ?, ?)` + repeat + `
ON CONFLICT (feed_id) DO NOTHING`, r * 7
ON CONFLICT (feed_id) DO NOTHING
`, r * 7
}
updateFeed = `
update feeds set
nick = ?,
state = ?,
last_scan_on = ?,
refresh_rate = ?,
@@ -104,7 +106,10 @@ var (
tags
)
values (?, ?, ?, ?, ?, ?, ?)` + repeat + `
ON CONFLICT (feed_id, ulid) DO NOTHING`, r * 7
ON CONFLICT (feed_id, ulid) DO UPDATE SET
conv = excluded.conv,
hash = excluded.hash
`, r * 7
}
fetchFeeds = `
@@ -155,6 +160,7 @@ func (f *Feed) Save(ctx context.Context, db db) error {
_, err := db.ExecContext(
ctx,
updateFeed,
f.Nick,
f.State, // state
f.LastScanOn, // last_scan_on
f.RefreshRate, // refresh_rate