Skip to content

Commit

Permalink
Merge pull request jmoiron#299 from smthpickboy/add_NamedExecContext_…
Browse files Browse the repository at this point in the history
…for_Tx

Add Tx.NamedExecContext method
  • Loading branch information
jmoiron authored Apr 12, 2017
2 parents 8ed836a + db69506 commit 3564e3a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sqlx_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ func (tx *Tx) QueryRowxContext(ctx context.Context, query string, args ...interf
return &Row{rows: rows, err: err, unsafe: tx.unsafe, Mapper: tx.Mapper}
}

// NamedExecContext using this Tx.
// Any named placeholder parameters are replaced with fields from arg.
func (tx *Tx) NamedExecContext(ctx context.Context, query string, arg interface{}) (sql.Result, error) {
return NamedExecContext(ctx, tx, query, arg)
}

// SelectContext using the prepared statement.
// Any placeholder parameters are replaced with supplied args.
func (s *Stmt) SelectContext(ctx context.Context, dest interface{}, args ...interface{}) error {
Expand Down

0 comments on commit 3564e3a

Please sign in to comment.