2
0

Add docs clarifying that FieldDescriptions may return nil

https://github.com/jackc/pgx/issues/1634
This commit is contained in:
Jack Christensen
2023-06-14 07:42:11 -05:00
parent c542df4fb4
commit 5f28621394
3 changed files with 10 additions and 2 deletions
+3
View File
@@ -648,6 +648,9 @@ type QueryRewriter interface {
// returned Rows even if an error is returned. The error will be the available in rows.Err() after rows are closed. It
// is allowed to ignore the error returned from Query and handle it in Rows.
//
// It is possible for a call of FieldDescriptions on the returned Rows to return nil even if the Query call did not
// return an error.
//
// It is possible for a query to return one or more rows before encountering an error. In most cases the rows should be
// collected before processing rather than processed while receiving each row. This avoids the possibility of the
// application processing rows from a query that the server rejected. The CollectRows function is useful here.