This commit is contained in:
adlerhurst
2025-07-25 20:05:15 +02:00
parent 513818f55d
commit 889420f2d8
14 changed files with 14 additions and 9 deletions

View File

@@ -33,6 +33,7 @@ func (c *pgxConn) Begin(ctx context.Context, opts *database.TransactionOptions)
// Query implements sql.Client.
// Subtle: this method shadows the method (*Conn).Query of pgxConn.Conn.
func (c *pgxConn) Query(ctx context.Context, sql string, args ...any) (database.Rows, error) {
//nolint:sqlclosecheck // Rows.Close is called by the caller
rows, err := c.Conn.Query(ctx, sql, args...)
if err != nil {
return nil, wrapError(err)

View File

@@ -33,6 +33,7 @@ func (c *pgxPool) Acquire(ctx context.Context) (database.Client, error) {
// Query implements [database.Pool].
// Subtle: this method shadows the method (Pool).Query of pgxPool.Pool.
func (c *pgxPool) Query(ctx context.Context, sql string, args ...any) (database.Rows, error) {
//nolint:sqlclosecheck // Rows.Close is called by the caller
rows, err := c.Pool.Query(ctx, sql, args...)
if err != nil {
return nil, wrapError(err)

View File

@@ -40,6 +40,7 @@ func (tx *pgxTx) End(ctx context.Context, err error) error {
// Query implements [database.Transaction].
// Subtle: this method shadows the method (Tx).Query of pgxTx.Tx.
func (tx *pgxTx) Query(ctx context.Context, sql string, args ...any) (database.Rows, error) {
//nolint:sqlclosecheck // Rows.Close is called by the caller
rows, err := tx.Tx.Query(ctx, sql, args...)
if err != nil {
return nil, wrapError(err)