Implement OFFSET LIMIT

This commit is contained in:
Pijus Kamandulis
2024-03-11 22:02:10 +02:00
parent 5b66828bd0
commit 398584368f
6 changed files with 1118 additions and 975 deletions

View File

@@ -50,6 +50,21 @@ func Test_Parse_Select(t *testing.T) {
)
})
t.Run("Should parse SELECT OFFSET", func(t *testing.T) {
testQueryParse(
t,
`SELECT c.id FROM c OFFSET 3 LIMIT 5`,
parsers.SelectStmt{
SelectItems: []parsers.SelectItem{
{Path: []string{"c", "id"}},
},
Table: parsers.Table{Value: "c"},
Count: 5,
Offset: 3,
},
)
})
t.Run("Should parse SELECT VALUE", func(t *testing.T) {
testQueryParse(
t,