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

Function TestUpdateBuilderRunners

update_test.go:69–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

67}
68
69func TestUpdateBuilderRunners(t *testing.T) {
70 db := &DBStub{}
71 b := Update("test").Set("x", 1).RunWith(db)
72
73 expectedSql := "UPDATE test SET x = ?"
74
75 b.Exec()
76 assert.Equal(t, expectedSql, db.LastExecSql)
77}
78
79func TestUpdateBuilderNoRunner(t *testing.T) {
80 b := Update("test").Set("x", 1)

Callers

nothing calls this directly

Calls 4

UpdateFunction · 0.85
SetMethod · 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…