Inner documentation

This commit is contained in:
Gwendal Roué committed 2015-09-03 13:20:24 +02:00
1 parent c9fb2c5032
commit 20c72d7ce4
1 file changed
+9 -3
+9 -3
View File
@@ -145,9 +145,15 @@ public class RowModel {
required public init(row: Row) {
// IMPLEMENTATION NOTE
//
// This initializer is defined so that subclasses can distinguish
// the simple init() from init(row: Row), and perform distinct
// initialization for fetched models.
// Swift requires a required initializer so that we can fetch RowModels
// in SelectStatement.fetch<RowModel: GRDB.RowModel>(type: RowModel.Type, arguments: StatementArguments? = nil) -> AnySequence<RowModel>
//
// This required initializer *can not* be the simple init(), because it
// would prevent subclasses to provide handy initializers made of
// optional arguments like init(firstName: String? = nil, lastName: String? = nil).
// See rdar://22554816 for more information.
//
// OK so the only initializer that we can require in init(row:Row).
//
// IMPLEMENTATION NOTE
//