(t *testing.T)
| 123 | } |
| 124 | |
| 125 | func TestAddWhere_UnsupportedStatement(t *testing.T) { |
| 126 | stmt := mustParse(t, "INSERT INTO users (name) VALUES ('bob')") |
| 127 | err := Apply(stmt, AddWhereFromSQL("id = 1")) |
| 128 | if err == nil { |
| 129 | t.Fatal("expected error for INSERT statement") |
| 130 | } |
| 131 | if !strings.Contains(err.Error(), "unsupported") { |
| 132 | t.Fatalf("unexpected error: %v", err) |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | func TestAddWhere_DirectExpression(t *testing.T) { |
| 137 | stmt := mustParse(t, "SELECT * FROM users") |
nothing calls this directly
no test coverage detected