mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-30 04:28:44 +00:00
Couting requests with CTE uses trivial SQL
This commit is contained in:
1 parent
1d0adaacf6
commit
eb2346dfce
1 file changed
+1
-1
@@ -101,7 +101,7 @@ extension SQLQuery {
|
||||
}
|
||||
|
||||
private func countQuery(_ db: Database) throws -> SQLQuery {
|
||||
guard groupPromise == nil && limit == nil else {
|
||||
guard groupPromise == nil && limit == nil && ctes.isEmpty else {
|
||||
// SELECT ... GROUP BY ...
|
||||
// SELECT ... LIMIT ...
|
||||
return trivialCountQuery
|
||||
|
||||
Reference in new issue
Block a user