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

Function TestMergeAction_InsertDefaultValues

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

Source from the content-addressed store, hash-verified

199}
200
201func TestMergeAction_InsertDefaultValues(t *testing.T) {
202 stmt := &MergeStatement{
203 TargetTable: TableReference{Name: "t"},
204 SourceTable: TableReference{Name: "s"},
205 OnCondition: &Identifier{Name: "true"},
206 WhenClauses: []*MergeWhenClause{
207 {Type: "NOT_MATCHED", Action: &MergeAction{ActionType: "INSERT", DefaultValues: true}},
208 },
209 }
210 sql := stmt.SQL()
211 if !strings.Contains(sql, "INSERT DEFAULT VALUES") {
212 t.Errorf("got: %s", sql)
213 }
214}
215
216func TestSelect_SQL(t *testing.T) {
217 lim := int64(10)

Callers

nothing calls this directly

Calls 2

SQLMethod · 0.95
ErrorfMethod · 0.65

Tested by

no test coverage detected