mirror of
https://github.com/nkanaev/yarr.git
synced 2026-06-24 09:05:16 +00:00
storage: postgres fixes
This commit is contained in:
@@ -87,10 +87,10 @@ func (s *PostgresStorage) UpdateFeedState(feedID int64, params model.UpdateFeedS
|
|||||||
, coalesce($5, '')
|
, coalesce($5, '')
|
||||||
)
|
)
|
||||||
on conflict (feed_id) do update set
|
on conflict (feed_id) do update set
|
||||||
last_refreshed = coalesce($2, last_refreshed),
|
last_refreshed = coalesce($2, feed_states.last_refreshed),
|
||||||
last_error = coalesce($3, last_error),
|
last_error = coalesce($3, feed_states.last_error),
|
||||||
http_lmod = coalesce($4, http_lmod),
|
http_lmod = coalesce($4, feed_states.http_lmod),
|
||||||
http_etag = coalesce($5, http_etag)
|
http_etag = coalesce($5, feed_states.http_etag)
|
||||||
`,
|
`,
|
||||||
feedID,
|
feedID,
|
||||||
params.LastRefreshed,
|
params.LastRefreshed,
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ func listQueryPredicate(filter model.ItemFilter, newestFirst bool) (string, []an
|
|||||||
args = append(args, filter.Before)
|
args = append(args, filter.Before)
|
||||||
}
|
}
|
||||||
|
|
||||||
predicate := "1"
|
predicate := "true"
|
||||||
if len(cond) > 0 {
|
if len(cond) > 0 {
|
||||||
predicate = strings.Join(cond, " and ")
|
predicate = strings.Join(cond, " and ")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user