mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
Update more documentation with the closure syntax
This commit is contained in:
1 parent
0567f69e66
commit
430141344d
11 files changed
+105
-49
No files matched your search
@@ -541,9 +541,15 @@ extension QueryInterfaceRequest {
|
||||
/// For example:
|
||||
///
|
||||
/// ```swift
|
||||
/// struct Player: TableRecord {
|
||||
/// enum Columns {
|
||||
/// static let score = Column("score")
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// try dbQueue.read { db in
|
||||
/// let maxScore: Int? = try Player
|
||||
/// .select(max(scoreColumn))
|
||||
/// .select { max($0.score) }
|
||||
/// .asRequest(of: Int.self) // <--
|
||||
/// .fetchOne(db)
|
||||
/// }
|
||||
|
||||
Reference in new issue
Block a user