Fix ExcludedKeywords parsing

This commit is contained in:
Pijus Kamandulis
2026-08-05 20:06:10 +03:00
parent c78842726b
commit 92d956e8fa
4 changed files with 1690 additions and 1605 deletions
+20
View File
@@ -159,6 +159,26 @@ func Test_Parse_Select(t *testing.T) {
)
})
t.Run("Should parse SELECT with orderByItems alias", func(t *testing.T) {
testQueryParse(
t,
`SELECT c.id, c["pk"] AS orderByItems FROM c ORDER BY c.id`,
parsers.SelectStmt{
SelectItems: []parsers.SelectItem{
{Path: []string{"c", "id"}},
{Alias: "orderByItems", Path: []string{"c", "pk"}},
},
Table: parsers.Table{SelectItem: testutils.SelectItem_Path("c")},
OrderExpressions: []parsers.OrderExpression{
{
SelectItem: testutils.SelectItem_Path("c", "id"),
Direction: parsers.OrderDirectionAsc,
},
},
},
)
})
t.Run("Should parse SELECT object", func(t *testing.T) {
testQueryParse(
t,