MCPcopy
hub / github.com/jmoiron/sqlx / NamedStmtContext

Method NamedStmtContext

sqlx_context.go:299–305  ·  view source on GitHub ↗

NamedStmtContext returns a version of the prepared statement which runs within a transaction.

(ctx context.Context, stmt *NamedStmt)

Source from the content-addressed store, hash-verified

297// NamedStmtContext returns a version of the prepared statement which runs
298// within a transaction.
299func (tx *Tx) NamedStmtContext(ctx context.Context, stmt *NamedStmt) *NamedStmt {
300 return &NamedStmt{
301 QueryString: stmt.QueryString,
302 Params: stmt.Params,
303 Stmt: tx.StmtxContext(ctx, stmt.Stmt),
304 }
305}
306
307// PreparexContext returns an sqlx.Stmt instead of a sql.Stmt.
308//

Callers 1

TestNamedContextQueriesFunction · 0.80

Calls 1

StmtxContextMethod · 0.95

Tested by 1

TestNamedContextQueriesFunction · 0.64