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

Method GetContext

sqlx_context.go:147–149  ·  view source on GitHub ↗

GetContext using this DB. Any placeholder parameters are replaced with supplied args. An error is returned if the result set is empty.

(ctx context.Context, dest interface{}, query string, args ...interface{})

Source from the content-addressed store, hash-verified

145// Any placeholder parameters are replaced with supplied args.
146// An error is returned if the result set is empty.
147func (db *DB) GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error {
148 return GetContext(ctx, db, dest, query, args...)
149}
150
151// PreparexContext returns an sqlx.Stmt instead of a sql.Stmt.
152//

Callers 9

TestNamedContextQueriesFunction · 0.45
TestNilReceiverContextFunction · 0.45
TestNilInsertsContextFunction · 0.45
TestUsageContextFunction · 0.45
TestEmbeddedMapsContextFunction · 0.45
TestIssue197ContextFunction · 0.45
TestConnFunction · 0.45

Calls 1

GetContextFunction · 0.85

Tested by 9

TestNamedContextQueriesFunction · 0.36
TestNilReceiverContextFunction · 0.36
TestNilInsertsContextFunction · 0.36
TestUsageContextFunction · 0.36
TestEmbeddedMapsContextFunction · 0.36
TestIssue197ContextFunction · 0.36
TestConnFunction · 0.36