TestRejectLimitInOracle checks that LIMIT is rejected when dialect is Oracle.
(t *testing.T)
| 293 | |
| 294 | // TestRejectLimitInOracle checks that LIMIT is rejected when dialect is Oracle. |
| 295 | func TestRejectLimitInOracle(t *testing.T) { |
| 296 | sql := "SELECT id, name FROM users LIMIT 10" |
| 297 | _, err := ParseWithDialect(sql, keywords.DialectOracle) |
| 298 | if err == nil { |
| 299 | t.Fatal("expected error: LIMIT should be rejected in Oracle dialect") |
| 300 | } |
| 301 | if !containsAny(err.Error(), "LIMIT", "Oracle", "ROWNUM", "FETCH") { |
| 302 | t.Errorf("error should mention LIMIT or Oracle, got: %v", err) |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | // --------------------------------------------------------------------------- |
| 307 | // ILIKE dialect gate |
nothing calls this directly
no test coverage detected