Skip to content

Commit e19240b

Browse files
committed
Add missing Tx.NamedQueryContext
1 parent 28212d4 commit e19240b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sqlx_context.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,12 @@ func (tx *Tx) NamedExecContext(ctx context.Context, query string, arg interface{
358358
return NamedExecContext(ctx, tx, query, arg)
359359
}
360360

361+
// NamedQueryContext within a transaction.
362+
// Any named placeholder parameters are replaced with fields from arg.
363+
func (tx *Tx) NamedQueryContext(ctx context.Context, query string, arg interface{}) (*Rows, error) {
364+
return NamedQueryContext(ctx, tx, query, arg)
365+
}
366+
361367
// SelectContext using the prepared statement.
362368
// Any placeholder parameters are replaced with supplied args.
363369
func (s *Stmt) SelectContext(ctx context.Context, dest interface{}, args ...interface{}) error {

0 commit comments

Comments
 (0)