(t *testing.T)
| 168 | } |
| 169 | |
| 170 | func TestDeleteStatementSQL(t *testing.T) { |
| 171 | stmt := &DeleteStatement{ |
| 172 | TableName: "users", |
| 173 | Where: &BinaryExpression{Left: &Identifier{Name: "id"}, Operator: "=", Right: &LiteralValue{Value: 1, Type: "INTEGER"}}, |
| 174 | } |
| 175 | want := "DELETE FROM users WHERE id = 1" |
| 176 | if got := stmt.SQL(); got != want { |
| 177 | t.Errorf("SQL() = %s, want %s", got, want) |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | func TestCreateTableStatementSQL(t *testing.T) { |
| 182 | stmt := &CreateTableStatement{ |