mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-24 04:07:47 +00:00
Add Request.fetchCount(). Implements https://github.com/groue/GRDB.swift/issues/176#issuecomment-282783884
This commit is contained in:
1 parent
fa464b489d
commit
2d2c596f75
5 files changed
+64
-5
No files matched your search
@@ -90,8 +90,8 @@ struct QueryInterfaceSelectQueryDefinition {
|
||||
return sql
|
||||
}
|
||||
|
||||
/// Returns a fetch request that counts the number of rows matched by self.
|
||||
var countRequest: AnyTypedRequest<Int> {
|
||||
/// Part of Request protocol
|
||||
func countRequest(_ db: Database) throws -> AnyTypedRequest<Int> {
|
||||
return countQuery.bound(to: Int.self)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user