This commit is contained in:
Gwendal Roué committed 2017-03-01 07:56:17 +01:00
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 {