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

Function TestInsert_SQL

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

Source from the content-addressed store, hash-verified

236}
237
238func TestInsert_SQL(t *testing.T) {
239 i := &Insert{
240 Table: TableReference{Name: "t"},
241 Columns: []Expression{&Identifier{Name: "a"}},
242 Values: [][]Expression{{&LiteralValue{Value: "1"}}},
243 ReturningClause: []Expression{&Identifier{Name: "id"}},
244 }
245 sql := i.SQL()
246 if !strings.Contains(sql, "RETURNING id") {
247 t.Errorf("got: %s", sql)
248 }
249}
250
251func TestUpdate_SQL(t *testing.T) {
252 u := &Update{

Callers

nothing calls this directly

Calls 2

SQLMethod · 0.95
ErrorfMethod · 0.65

Tested by

no test coverage detected