diff --git a/Sources/SQLite/Typed/Query.swift b/Sources/SQLite/Typed/Query.swift index f6ef6df8..22a06c1a 100644 --- a/Sources/SQLite/Typed/Query.swift +++ b/Sources/SQLite/Typed/Query.swift @@ -923,8 +923,9 @@ extension Connection { let columnNames = try columnNamesForQuery(query) + let rows = try statement.failableNext().map { Row(columnNames, $0) } return AnySequence { - AnyIterator { statement.next().map { Row(columnNames, $0) } } + AnyIterator { rows } } }