TestRejectTopInOracle checks that TOP is rejected when dialect is Oracle.
(t *testing.T)
| 281 | |
| 282 | // TestRejectTopInOracle checks that TOP is rejected when dialect is Oracle. |
| 283 | func TestRejectTopInOracle(t *testing.T) { |
| 284 | sql := "SELECT TOP 10 id, name FROM users" |
| 285 | _, err := ParseWithDialect(sql, keywords.DialectOracle) |
| 286 | if err == nil { |
| 287 | t.Fatal("expected error: TOP should be rejected in Oracle dialect") |
| 288 | } |
| 289 | if !containsAny(err.Error(), "TOP", "oracle", "LIMIT") { |
| 290 | t.Errorf("error should mention TOP or Oracle, got: %v", err) |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | // TestRejectLimitInOracle checks that LIMIT is rejected when dialect is Oracle. |
| 295 | func TestRejectLimitInOracle(t *testing.T) { |
nothing calls this directly
no test coverage detected