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

Function TestInsertBuilderPlaceholders

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

Source from the content-addressed store, hash-verified

47}
48
49func TestInsertBuilderPlaceholders(t *testing.T) {
50 b := Insert("test").Values(1, 2)
51
52 sql, _, _ := b.PlaceholderFormat(Question).ToSql()
53 assert.Equal(t, "INSERT INTO test VALUES (?,?)", sql)
54
55 sql, _, _ = b.PlaceholderFormat(Dollar).ToSql()
56 assert.Equal(t, "INSERT INTO test VALUES ($1,$2)", sql)
57}
58
59func TestInsertBuilderRunners(t *testing.T) {
60 db := &DBStub{}

Callers

nothing calls this directly

Calls 4

InsertFunction · 0.85
ValuesMethod · 0.80
ToSqlMethod · 0.65
PlaceholderFormatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…