mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 12:17:33 -06:00
[performance] don't use relations to select notification structs, use caches instead (#1072)
This commit is contained in:
parent
91c3489d5f
commit
d98a48b446
3 changed files with 5 additions and 11 deletions
|
|
@ -55,9 +55,6 @@ func (n *notificationDB) GetNotification(ctx context.Context, id string) (*gtsmo
|
|||
|
||||
q := n.conn.NewSelect().
|
||||
Model(¬if).
|
||||
Relation("OriginAccount").
|
||||
Relation("TargetAccount").
|
||||
Relation("Status").
|
||||
Where("? = ?", bun.Ident("notification.id"), id)
|
||||
if err := q.Scan(ctx); err != nil {
|
||||
return nil, n.conn.ProcessError(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue