mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
RowConvertible documentation
This commit is contained in:
1 parent
c4ae29eff3
commit
18fc848051
1 file changed
+9
@@ -389,6 +389,15 @@ See [Values](#values) for more information on supported types.
|
||||
You may use the `RowConvertible` protocol, which **grants fetching methods to any type** that can be initialized from a database row:
|
||||
|
||||
```swift
|
||||
public protocol RowConvertible {
|
||||
/// Create an instance initialized with `row`.
|
||||
init(row: Row)
|
||||
|
||||
/// Optional method which gives adopting types an opportunity to complete
|
||||
/// their initialization. Do not call it directly.
|
||||
func awakeFromFetch(row: Row)
|
||||
}
|
||||
|
||||
final class PointOfInterest : NSObject, MKAnnotation, RowConvertible {
|
||||
var coordinate: CLLocationCoordinate2D
|
||||
var title: String?
|
||||
|
||||
Reference in new issue
Block a user