mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
Documentation
This commit is contained in:
1 parent
72e4fc620b
commit
d67f4802d3
1 file changed
+2
@@ -96,6 +96,8 @@ extension SQLQuery: _JoinableRequest {
|
||||
|
||||
extension SQLQuery {
|
||||
func fetchCount(_ db: Database) throws -> Int {
|
||||
// FIXME: eventually have the line below generate SQL without trailing "LIMIT 1"
|
||||
// return try QueryInterfaceRequest<Int>(query: countQuery(db)).fetchOne(db)!
|
||||
let (statement, adapter) = try SQLQueryGenerator(query: countQuery(db)).prepare(db)
|
||||
return try Int.fetchOne(statement, adapter: adapter)!
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user