README.md: more realistic example of RowConvertible

This commit is contained in:
Gwendal Roué committed 2015-09-26 19:40:57 +02:00
1 parent ae910fe8b5
commit a2f7ccd4fc
1 file changed
+2 -2
+2 -2
View File
@@ -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(