TestRejectTopInSQLite checks that TOP is rejected when dialect is SQLite.
(t *testing.T)
| 269 | |
| 270 | // TestRejectTopInSQLite checks that TOP is rejected when dialect is SQLite. |
| 271 | func TestRejectTopInSQLite(t *testing.T) { |
| 272 | sql := "SELECT TOP 10 id, name FROM users" |
| 273 | _, err := ParseWithDialect(sql, keywords.DialectSQLite) |
| 274 | if err == nil { |
| 275 | t.Fatal("expected error: TOP should be rejected in SQLite dialect") |
| 276 | } |
| 277 | if !containsAny(err.Error(), "TOP", "sqlite", "LIMIT") { |
| 278 | t.Errorf("error should mention TOP or SQLite, got: %v", err) |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | // TestRejectTopInOracle checks that TOP is rejected when dialect is Oracle. |
| 283 | func TestRejectTopInOracle(t *testing.T) { |
nothing calls this directly
no test coverage detected