From 18fc848051740ef7dbca8a5edf12501e5eedb068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 1 Oct 2015 08:12:15 +0200 Subject: [PATCH] RowConvertible documentation --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 621f7af71..175658f24 100644 --- a/README.md +++ b/README.md @@ -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?