mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-25 14:53:32 -06:00
[bugfix] fix double firing bun.DB query hooks (#2124)
* improve bun.DB wrapping readability + comments, fix double-firing query hooks * fix incorrect code comment placement * fix linter issues * Update internal/db/basic.go * do as the linter commmands ... --------- Signed-off-by: kim <grufwub@gmail.com> Co-authored-by: Daenney <daenney@users.noreply.github.com>
This commit is contained in:
parent
e70629e856
commit
d5d6ad406f
44 changed files with 645 additions and 535 deletions
|
|
@ -57,7 +57,7 @@ import (
|
|||
// This isn't ideal, of course, but at least we could cover the most common use case of
|
||||
// a caller paging down through results.
|
||||
type searchDB struct {
|
||||
db *WrappedDB
|
||||
db *DB
|
||||
state *state.State
|
||||
}
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ func (s *searchDB) SearchForAccounts(
|
|||
}
|
||||
|
||||
if err := q.Scan(ctx, &accountIDs); err != nil {
|
||||
return nil, s.db.ProcessError(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(accountIDs) == 0 {
|
||||
|
|
@ -327,7 +327,7 @@ func (s *searchDB) SearchForStatuses(
|
|||
}
|
||||
|
||||
if err := q.Scan(ctx, &statusIDs); err != nil {
|
||||
return nil, s.db.ProcessError(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(statusIDs) == 0 {
|
||||
|
|
@ -453,7 +453,7 @@ func (s *searchDB) SearchForTags(
|
|||
}
|
||||
|
||||
if err := q.Scan(ctx, &tagIDs); err != nil {
|
||||
return nil, s.db.ProcessError(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(tagIDs) == 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue