MCPcopy Index your code
hub / github.com/upper/db / TestTemplateDelete

Function TestTemplateDelete

adapter/sqlite/template_test.go:233–246  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

231}
232
233func TestTemplateDelete(t *testing.T) {
234 b := sqlbuilder.WithTemplate(template)
235 assert := assert.New(t)
236
237 assert.Equal(
238 `DELETE FROM "artist" WHERE (name = $1)`,
239 b.DeleteFrom("artist").Where("name = ?", "Chavela Vargas").String(),
240 )
241
242 assert.Equal(
243 `DELETE FROM "artist" WHERE (id > 5)`,
244 b.DeleteFrom("artist").Where("id > 5").String(),
245 )
246}

Callers

nothing calls this directly

Calls 5

WithTemplateFunction · 0.92
NewMethod · 0.65
StringMethod · 0.65
WhereMethod · 0.65
DeleteFromMethod · 0.65

Tested by

no test coverage detected