MCPcopy Index your code
hub / github.com/Masterminds/squirrel / TestRunWithDB

Function TestRunWithDB

statement_test.go:27–36  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25}
26
27func TestRunWithDB(t *testing.T) {
28 db := &sql.DB{}
29 assert.NotPanics(t, func() {
30 builder.GetStruct(Select().RunWith(db))
31 builder.GetStruct(Insert("t").RunWith(db))
32 builder.GetStruct(Update("t").RunWith(db))
33 builder.GetStruct(Delete("t").RunWith(db))
34 }, "RunWith(*sql.DB) should not panic")
35
36}
37
38func TestRunWithTx(t *testing.T) {
39 tx := &sql.Tx{}

Callers

nothing calls this directly

Calls 5

SelectFunction · 0.85
InsertFunction · 0.85
UpdateFunction · 0.85
DeleteFunction · 0.85
RunWithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…