Skip to content

Commit a50f2b1

Browse files
committed
1 parent 2a4d373 commit a50f2b1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Sources/SQLite/Typed/Query.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,16 @@ extension Connection {
964964
let columnNames = try columnNamesForQuery(query)
965965

966966
return AnySequence {
967-
AnyIterator { statement.next().map { Row(columnNames, $0) } }
967+
return AnyIterator {
968+
do {
969+
if let model = try statement.failableNext() {
970+
return Row(columnNames,model)
971+
}
972+
} catch {
973+
return nil
974+
}
975+
return nil
976+
}
968977
}
969978
}
970979

0 commit comments

Comments
 (0)