MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestDelete_SQL

Function TestDelete_SQL

pkg/sql/ast/sql_coverage_test.go:264–274  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

262}
263
264func TestDelete_SQL(t *testing.T) {
265 d := &Delete{
266 Table: TableReference{Name: "t"},
267 Where: &Identifier{Name: "true"},
268 ReturningClause: []Expression{&Identifier{Name: "id"}},
269 }
270 sql := d.SQL()
271 if !strings.Contains(sql, "RETURNING id") {
272 t.Errorf("got: %s", sql)
273 }
274}
275
276func TestExtractExpression_SQL(t *testing.T) {
277 e := &ExtractExpression{Field: "YEAR", Source: &Identifier{Name: "created_at"}}

Callers

nothing calls this directly

Calls 2

SQLMethod · 0.95
ErrorfMethod · 0.65

Tested by

no test coverage detected