summaryrefslogtreecommitdiff
path: root/internal/db/bundb/account.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/bundb/account.go')
-rw-r--r--internal/db/bundb/account.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/db/bundb/account.go b/internal/db/bundb/account.go
index 7ebb79a15..c96d0df9e 100644
--- a/internal/db/bundb/account.go
+++ b/internal/db/bundb/account.go
@@ -110,7 +110,7 @@ func (a *accountDB) GetInstanceAccount(ctx context.Context, domain string) (*gts
} else {
q = q.
Where("account.username = ?", domain).
- Where("? IS NULL", bun.Ident("domain"))
+ WhereGroup(" AND ", whereEmptyOrNull("domain"))
}
err := processErrorResponse(q.Scan(ctx))
@@ -172,7 +172,7 @@ func (a *accountDB) GetLocalAccountByUsername(ctx context.Context, username stri
q := a.newAccountQ(account).
Where("username = ?", username).
- Where("? IS NULL", bun.Ident("domain"))
+ WhereGroup(" AND ", whereEmptyOrNull("domain"))
err := processErrorResponse(q.Scan(ctx))
@@ -218,7 +218,7 @@ func (a *accountDB) GetAccountStatuses(ctx context.Context, accountID string, li
}
if excludeReplies {
- q = q.Where("? IS NULL", bun.Ident("in_reply_to_id"))
+ q = q.WhereGroup(" AND ", whereEmptyOrNull("in_reply_to_id"))
}
if pinnedOnly {