From 4a4e5b094f6ba15c39d0edb0af3b40747b3fb3e0 Mon Sep 17 00:00:00 2001 From: touyu Date: Tue, 2 Apr 2019 23:59:08 +0900 Subject: [PATCH] Change from next () to faiableNext () --- Sources/SQLite/Typed/Query.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 } } }