Implement NOT logical operator

This commit is contained in:
Pijus Kamandulis
2025-02-25 19:33:32 +02:00
parent 851b3ca3a8
commit 1711c8fb5c
6 changed files with 1537 additions and 1445 deletions

View File

@@ -148,4 +148,21 @@ func Test_Parse_Were(t *testing.T) {
},
)
})
t.Run("Should correctly parse NOT conditions", func(t *testing.T) {
testQueryParse(
t,
`select c.id
FROM c
WHERE NOT c.boolean`,
parsers.SelectStmt{
SelectItems: []parsers.SelectItem{{Path: []string{"c", "id"}, Alias: ""}},
Table: parsers.Table{SelectItem: testutils.SelectItem_Path("c")},
Filters: parsers.SelectItem{
Path: []string{"c", "boolean"},
Invert: true,
},
},
)
})
}