From 9afb36a500a4a1f78b7ad917519a04bcbf239aea Mon Sep 17 00:00:00 2001 From: Camilo Aguilar Date: Sun, 18 Jun 2017 10:34:05 -0400 Subject: [PATCH] Add missing tx.PrepareNamedContext function --- sqlx_context.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sqlx_context.go b/sqlx_context.go index 8a7aed1e..d58ff337 100644 --- a/sqlx_context.go +++ b/sqlx_context.go @@ -245,6 +245,11 @@ func (tx *Tx) PreparexContext(ctx context.Context, query string) (*Stmt, error) return PreparexContext(ctx, tx, query) } +// PrepareNamedContext returns an sqlx.NamedStmt +func (tx *Tx) PrepareNamedContext(ctx context.Context, query string) (*NamedStmt, error) { + return prepareNamedContext(ctx, tx, query) +} + // MustExecContext runs MustExecContext within a transaction. // Any placeholder parameters are replaced with supplied args. func (tx *Tx) MustExecContext(ctx context.Context, query string, args ...interface{}) sql.Result {