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

Function TestStatementBuilderPlaceholderFormat

statement_test.go:19–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

17}
18
19func TestStatementBuilderPlaceholderFormat(t *testing.T) {
20 db := &DBStub{}
21 sb := StatementBuilder.RunWith(db).PlaceholderFormat(Dollar)
22
23 sb.Select("test").Where("x = ?").Exec()
24 assert.Equal(t, "SELECT test WHERE x = $1", db.LastExecSql)
25}
26
27func TestRunWithDB(t *testing.T) {
28 db := &sql.DB{}

Callers

nothing calls this directly

Calls 5

ExecMethod · 0.65
PlaceholderFormatMethod · 0.45
RunWithMethod · 0.45
WhereMethod · 0.45
SelectMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…