diff --git a/GRDB/UpdateStatement.swift b/GRDB/UpdateStatement.swift index d8568addc..b0ffcd923 100644 --- a/GRDB/UpdateStatement.swift +++ b/GRDB/UpdateStatement.swift @@ -29,7 +29,7 @@ public final class UpdateStatement : Statement { /// The number of rows changed by the statement. let changedRowCount: Int - /// The last inserted Row ID. Relevant if and only if the statement is + /// The inserted Row ID. Relevant if and only if the statement is /// an INSERT statement. let insertedRowID: Int64? } diff --git a/README.md b/README.md index 298f8aec6..7aab4a5ca 100644 --- a/README.md +++ b/README.md @@ -399,7 +399,9 @@ try dbQueue.inTransaction { db in ] for person in persons { - try statement.execute(bindings: Bindings(person)) + let changes = try statement.execute(bindings: Bindings(person)) + changes.changedRowCount // The number of rows changed by the statement. + changes.insertedRowID // The inserted Row ID. } return .Commit