(t *testing.T)
| 259 | } |
| 260 | |
| 261 | func TestDropStatementSQL(t *testing.T) { |
| 262 | stmt := &DropStatement{ObjectType: "TABLE", IfExists: true, Names: []string{"users"}, CascadeType: "CASCADE"} |
| 263 | want := "DROP TABLE IF EXISTS users CASCADE" |
| 264 | if got := stmt.SQL(); got != want { |
| 265 | t.Errorf("SQL() = %s, want %s", got, want) |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | func TestTruncateStatementSQL(t *testing.T) { |
| 270 | stmt := &TruncateStatement{Tables: []string{"users", "orders"}, RestartIdentity: true, CascadeType: "CASCADE"} |