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

Function TestDeleteBuilderPlaceholders

delete_test.go:46–54  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

44}
45
46func TestDeleteBuilderPlaceholders(t *testing.T) {
47 b := Delete("test").Where("x = ? AND y = ?", 1, 2)
48
49 sql, _, _ := b.PlaceholderFormat(Question).ToSql()
50 assert.Equal(t, "DELETE FROM test WHERE x = ? AND y = ?", sql)
51
52 sql, _, _ = b.PlaceholderFormat(Dollar).ToSql()
53 assert.Equal(t, "DELETE FROM test WHERE x = $1 AND y = $2", sql)
54}
55
56func TestDeleteBuilderRunners(t *testing.T) {
57 db := &DBStub{}

Callers

nothing calls this directly

Calls 4

DeleteFunction · 0.85
ToSqlMethod · 0.65
WhereMethod · 0.45
PlaceholderFormatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…