mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-14 02:17:27 -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
|
|
@ -39,8 +39,9 @@ func (i *instanceDB) CountInstanceUsers(ctx context.Context, domain string) (int
|
|||
Where("? IS NULL", bun.Ident("account.suspended_at"))
|
||||
|
||||
if domain == config.GetHost() || domain == config.GetAccountDomain() {
|
||||
// if the domain is *this* domain, just count where the domain field is null
|
||||
q = q.WhereGroup(" AND ", whereEmptyOrNull("account.domain"))
|
||||
// If the domain is *this* domain, just
|
||||
// count where the domain field is null.
|
||||
q = q.Where("? IS NULL", bun.Ident("account.domain"))
|
||||
} else {
|
||||
q = q.Where("? = ?", bun.Ident("account.domain"), domain)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue