mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +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
@@ -234,12 +234,11 @@ extension QueryInterfaceRequest {
|
||||
|
||||
// MARK: Counting
|
||||
|
||||
/// Returns a request that selects the number of rows. Don't call it
|
||||
/// directly: instead, use the `fetchCount` method.
|
||||
/// The number of rows matched by the request.
|
||||
///
|
||||
/// - parameter db: A database connection.
|
||||
public func countRequest(_ db: Database) throws -> AnyTypedRequest<Int> {
|
||||
return try query.countRequest(db)
|
||||
public func fetchCount(_ db: Database) throws -> Int {
|
||||
return try query.fetchCount(db)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user