BREAKING: Throwing FetchableRecord.init(row:)

This commit is contained in:
Gwendal Roué authored and Gwendal Roué committed 2022-08-21 21:22:34 +02:00
1 parent 927fc21f00
commit 895964de16
38 files changed
+264 -684

No files matched your search

@@ -458,7 +458,7 @@ struct SQLQueryGenerator: Refinable {
/// let request = Book.all()
/// for row in try Row.fetchAll(db, request) {
/// row // [id:1, title:"Moby-Dick"]
/// let book = Book(row: row)
/// let book = try Book(row: row)
/// }
///
/// But as soon as the selection includes columns of a included relation,
@@ -468,7 +468,7 @@ struct SQLQueryGenerator: Refinable {
/// let request = Book.including(required: Book.author)
/// for row in try Row.fetchAll(db, request) {
/// row // [id:1, title:"Moby-Dick"]
/// let book = Book(row: row)
/// let book = try Book(row: row)
///
/// row.scopes["author"] // [id:12, name:"Herman Melville"]
/// let author: Author = row["author"]
@@ -644,7 +644,7 @@ private struct SQLQualifiedRelation {
// The RangeRowAdapter hides the columns appended by joined relations:
//
// row // [id:1, title:"Moby-Dick"]
// let book = Book(row: row)
// let book = try Book(row: row)
//
// Scopes give access to those joined relations:
//