Skip to content

Commit 650884b

Browse files
committed
simpleQuery and query should continue after errors
1 parent 305e2d2 commit 650884b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Sources/NIOPostgres/Connection/PostgresClient+Query.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ private final class PostgresParameterizedQuery: PostgresRequest {
3939

4040
func respond(to message: PostgresMessage) throws -> [PostgresMessage]? {
4141
if case .error = message.identifier {
42-
return nil
42+
// we should continue after errors
43+
return []
4344
}
4445
switch message.identifier {
4546
case .bindComplete:

Sources/NIOPostgres/Connection/PostgresClient+SimpleQuery.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ private final class PostgresSimpleQuery: PostgresRequest {
3131

3232
func respond(to message: PostgresMessage) throws -> [PostgresMessage]? {
3333
if case .error = message.identifier {
34-
return nil
34+
// we should continue after errors
35+
return []
3536
}
3637
switch message.identifier {
3738
case .dataRow:

0 commit comments

Comments
 (0)