MCPcopy
hub / github.com/Masterminds/squirrel / RunWith

Method RunWith

select.go:186–188  ·  view source on GitHub ↗

Runner methods RunWith sets a Runner (like database/sql.DB) to be used with e.g. Exec. For most cases runner will be a database connection. Internally we use this to mock out the database connection for testing.

(runner BaseRunner)

Source from the content-addressed store, hash-verified

184//
185// Internally we use this to mock out the database connection for testing.
186func (b SelectBuilder) RunWith(runner BaseRunner) SelectBuilder {
187 return setRunWith(b, runner).(SelectBuilder)
188}
189
190// Exec builds and Execs the query with the Runner set by RunWith.
191func (b SelectBuilder) Exec() (sql.Result, error) {

Callers

nothing calls this directly

Calls 1

setRunWithFunction · 0.85

Tested by

no test coverage detected