remove order by for count

This commit is contained in:
Yasuhiro Matsumoto
2024-07-12 11:59:04 +09:00
parent 931ea3bc47
commit 73788e0907
2 changed files with 2 additions and 2 deletions

View File

@@ -152,7 +152,7 @@ func (b PostgresBackend) queryEventsSql(filter nostr.Filter, doCount bool) (stri
COUNT(*)
FROM event WHERE `+
strings.Join(conditions, " AND ")+
" ORDER BY created_at DESC LIMIT ?")
" LIMIT ?")
} else {
query = sqlx.Rebind(sqlx.BindType("postgres"), `SELECT
id, pubkey, created_at, kind, tags, content, sig

View File

@@ -151,7 +151,7 @@ func (b SQLite3Backend) queryEventsSql(filter nostr.Filter, doCount bool) (strin
COUNT(*)
FROM event WHERE `+
strings.Join(conditions, " AND ")+
" ORDER BY created_at DESC LIMIT ?")
" LIMIT ?")
} else {
query = sqlx.Rebind(sqlx.BindType("sqlite3"), `SELECT
id, pubkey, created_at, kind, tags, content, sig