Skip to content

Commit b902d3f

Browse files
authored
fix(Datastore) : Use throwing iterator to avoid hidden force try (#1411)
1 parent 89f5226 commit b902d3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

AmplifyPlugins/DataStore/AWSDataStoreCategoryPlugin/Storage/SQLite/Statement+Model.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ extension Statement: StatementModelConvertible {
5858
var elements: [ModelValues] = []
5959

6060
// parse each row of the result
61-
for row in self {
61+
let iter = self.makeIterator()
62+
while let row = try iter.failableNext() {
6263
let modelDictionary = try convert(row: row, withSchema: modelSchema, using: statement)
6364
elements.append(modelDictionary)
6465
}

0 commit comments

Comments
 (0)