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

Function TestUpdateBuilderFrom

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

Source from the content-addressed store, hash-verified

84}
85
86func TestUpdateBuilderFrom(t *testing.T) {
87 sql, _, err := Update("employees").Set("sales_count", 100).From("accounts").Where("accounts.name = ?", "ACME").ToSql()
88 assert.NoError(t, err)
89 assert.Equal(t, "UPDATE employees SET sales_count = ? FROM accounts WHERE accounts.name = ?", sql)
90}
91
92func TestUpdateBuilderFromSelect(t *testing.T) {
93 sql, _, err := Update("employees").

Callers

nothing calls this directly

Calls 5

UpdateFunction · 0.85
SetMethod · 0.80
ToSqlMethod · 0.65
WhereMethod · 0.45
FromMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…