mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
README.md: more realistic example of RowConvertible
This commit is contained in:
1 parent
ae910fe8b5
commit
a2f7ccd4fc
1 file changed
+2
-2
@@ -344,9 +344,9 @@ for (columnName, databaseValue) in row { ... } // ("a", 1), ("a", 2)
|
||||
You may use the `RowConvertible` protocol, which **grants fetching methods to any type** that can be initialized from a database row:
|
||||
|
||||
```swift
|
||||
struct PointOfInterest : RowConvertible {
|
||||
final class PointOfInterest : NSObject, MKAnnotation, RowConvertible {
|
||||
var coordinate: CLLocationCoordinate2D
|
||||
var title: String
|
||||
var title: String?
|
||||
|
||||
init(row: Row) {
|
||||
self.coordinate = CLLocationCoordinate2DMake(
|
||||
|
||||
Reference in new issue
Block a user