Skip to content

Commit 9afb36a

Browse files
committed
Add missing tx.PrepareNamedContext function
1 parent 502e7d6 commit 9afb36a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sqlx_context.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ func (tx *Tx) PreparexContext(ctx context.Context, query string) (*Stmt, error)
245245
return PreparexContext(ctx, tx, query)
246246
}
247247

248+
// PrepareNamedContext returns an sqlx.NamedStmt
249+
func (tx *Tx) PrepareNamedContext(ctx context.Context, query string) (*NamedStmt, error) {
250+
return prepareNamedContext(ctx, tx, query)
251+
}
252+
248253
// MustExecContext runs MustExecContext within a transaction.
249254
// Any placeholder parameters are replaced with supplied args.
250255
func (tx *Tx) MustExecContext(ctx context.Context, query string, args ...interface{}) sql.Result {

0 commit comments

Comments
 (0)