mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 11:47:31 -06:00
[chore/performance] Remove remaining 'whereEmptyOrNull' funcs (#1946)
This commit is contained in:
parent
3d16962173
commit
d9c69f6ce0
6 changed files with 13 additions and 38 deletions
|
|
@ -164,8 +164,10 @@ func (t *timelineDB) GetPublicTimeline(ctx context.Context, maxID string, sinceI
|
|||
NewSelect().
|
||||
TableExpr("? AS ?", bun.Ident("statuses"), bun.Ident("status")).
|
||||
Column("status.id").
|
||||
// Public only.
|
||||
Where("? = ?", bun.Ident("status.visibility"), gtsmodel.VisibilityPublic).
|
||||
WhereGroup(" AND ", whereEmptyOrNull("status.boost_of_id")).
|
||||
// Ignore boosts.
|
||||
Where("? IS NULL", bun.Ident("status.boost_of_id")).
|
||||
Order("status.id DESC")
|
||||
|
||||
if maxID == "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue