mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
RowConvertible documentation
This commit is contained in:
1 parent
c927faa6ad
commit
4e980b51ab
1 file changed
+17
-6
@@ -19,13 +19,25 @@ or single instances:
|
||||
RowConvertible is adopted by Record.
|
||||
*/
|
||||
public protocol RowConvertible {
|
||||
/// Create an instance initialized with `row`.
|
||||
|
||||
/**
|
||||
Create an instance initialized with `row`.
|
||||
|
||||
For performance reasons, the row argument may be reused between several
|
||||
instance initializations during the iteration of a fetch query. So if you
|
||||
want to keep the row for later use, make sure to store a copy:
|
||||
`self.row = row.copy()`.
|
||||
|
||||
- parameter row: A Row.
|
||||
*/
|
||||
init(row: Row)
|
||||
|
||||
/// Do not call this method directly.
|
||||
///
|
||||
/// Types that adopt RowConvertible have an opportunity to complete their
|
||||
/// initialization.
|
||||
/**
|
||||
Do not call this method directly.
|
||||
|
||||
Types that adopt RowConvertible have an opportunity to complete their
|
||||
initialization.
|
||||
*/
|
||||
func awakeFromFetch(row: Row)
|
||||
}
|
||||
|
||||
@@ -38,7 +50,6 @@ extension RowConvertible {
|
||||
// MARK: - Fetching From SelectStatement
|
||||
|
||||
/**
|
||||
TODO
|
||||
Fetches a sequence.
|
||||
|
||||
let statement = db.selectStatement("SELECT * FROM persons")
|
||||
|
||||
Reference in new issue
Block a user