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

Function TestInsertBuilderRunners

insert_test.go:59–67  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

57}
58
59func TestInsertBuilderRunners(t *testing.T) {
60 db := &DBStub{}
61 b := Insert("test").Values(1).RunWith(db)
62
63 expectedSQL := "INSERT INTO test VALUES (?)"
64
65 b.Exec()
66 assert.Equal(t, expectedSQL, db.LastExecSql)
67}
68
69func TestInsertBuilderNoRunner(t *testing.T) {
70 b := Insert("test").Values(1)

Callers

nothing calls this directly

Calls 4

InsertFunction · 0.85
ValuesMethod · 0.80
ExecMethod · 0.65
RunWithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…