@@ -737,13 +737,13 @@ func (p *Pool) Exec(ctx context.Context, sql string, arguments ...any) (pgconn.C
737737func (p * Pool ) Query (ctx context.Context , sql string , args ... any ) (pgx.Rows , error ) {
738738 c , err := p .Acquire (ctx )
739739 if err != nil {
740- return errRows { err : err } , err
740+ return pgx . ErrRows ( err ) , err
741741 }
742742
743743 rows , err := c .Query (ctx , sql , args ... )
744744 if err != nil {
745745 c .Release ()
746- return errRows { err : err } , err
746+ return pgx . ErrRows ( err ) , err
747747 }
748748
749749 return c .getPoolRows (rows ), nil
@@ -764,7 +764,7 @@ func (p *Pool) Query(ctx context.Context, sql string, args ...any) (pgx.Rows, er
764764func (p * Pool ) QueryRow (ctx context.Context , sql string , args ... any ) pgx.Row {
765765 c , err := p .Acquire (ctx )
766766 if err != nil {
767- return errRow { err : err }
767+ return pgx . ErrRow ( err )
768768 }
769769
770770 row := c .QueryRow (ctx , sql , args ... )
@@ -774,7 +774,7 @@ func (p *Pool) QueryRow(ctx context.Context, sql string, args ...any) pgx.Row {
774774func (p * Pool ) SendBatch (ctx context.Context , b * pgx.Batch ) pgx.BatchResults {
775775 c , err := p .Acquire (ctx )
776776 if err != nil {
777- return errBatchResults { err : err }
777+ return pgx . ErrBatchResults ( err )
778778 }
779779
780780 br := c .SendBatch (ctx , b )
0 commit comments