(t *testing.T)
| 149 | } |
| 150 | |
| 151 | func TestParseSQLWithDialect_SQLServerTop(t *testing.T) { |
| 152 | tree, err := ParseSQLWithDialect("SELECT TOP 10 * FROM users", keywords.DialectSQLServer) |
| 153 | if err != nil { |
| 154 | t.Fatalf("parse: %v", err) |
| 155 | } |
| 156 | if len(tree.Statements) == 0 { |
| 157 | t.Fatal("no statements parsed") |
| 158 | } |
| 159 | |
| 160 | got := FormatSQLWithDialect(tree.Statements[0], keywords.DialectSQLServer) |
| 161 | if !strings.Contains(got, "TOP 10") { |
| 162 | t.Errorf("expected TOP 10 preserved, got: %s", got) |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | func TestFormatSQLWithDialect_SQLServerOffset(t *testing.T) { |
| 167 | tree, err := ParseSQL("SELECT * FROM users ORDER BY id") |
nothing calls this directly
no test coverage detected