| 199 | } |
| 200 | |
| 201 | func 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 | |
| 216 | func TestSelect_SQL(t *testing.T) { |
| 217 | lim := int64(10) |