mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-24 04:07:47 +00:00
Keep Request.fetchCount() simple (https://github.com/groue/GRDB.swift/issues/176#issuecomment-282783884)
This commit is contained in:
1 parent
2d2c596f75
commit
42ebffc4fc
4 files changed
+13
-30
No files matched your search
@@ -91,8 +91,8 @@ struct QueryInterfaceSelectQueryDefinition {
|
||||
}
|
||||
|
||||
/// Part of Request protocol
|
||||
func countRequest(_ db: Database) throws -> AnyTypedRequest<Int> {
|
||||
return countQuery.bound(to: Int.self)
|
||||
func fetchCount(_ db: Database) throws -> Int {
|
||||
return try Int.fetchOne(db, countQuery)!
|
||||
}
|
||||
|
||||
private var countQuery: QueryInterfaceSelectQueryDefinition {
|
||||
|
||||
Reference in new issue
Block a user