From d9c69f6ce05daddf2f6d5d8c6c03b4c3d55df93a Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 5 Jul 2023 12:34:37 +0200 Subject: [chore/performance] Remove remaining 'whereEmptyOrNull' funcs (#1946) --- internal/db/bundb/instance.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/db/bundb/instance.go') diff --git a/internal/db/bundb/instance.go b/internal/db/bundb/instance.go index 4fa898639..95f6ad5b8 100644 --- a/internal/db/bundb/instance.go +++ b/internal/db/bundb/instance.go @@ -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) } -- cgit v1.2.3