diff --git a/sql/select.go b/sql/select.go index 1a4a1868..9c9a04b9 100644 --- a/sql/select.go +++ b/sql/select.go @@ -90,7 +90,7 @@ func (p *Parser) parseWhere() (Expr, error) { } w.LHS = declare(tok, lit) - tok, lit, err = p.shouldBe(IN, EQ, NEQ, GT, LT, GTE, LTE, EQR, NER) + tok, lit, err = p.shouldBe(IN, EQ, NEQ, GT, LT, GTE, LTE, EQR, NER, SEQ, SNE) if err != nil { return nil, err } diff --git a/sql/sql_test.go b/sql/sql_test.go index 6eae6bab..346dd2d8 100644 --- a/sql/sql_test.go +++ b/sql/sql_test.go @@ -306,7 +306,7 @@ func Test_Parse_Queries_Select(t *testing.T) { }, { sql: "SELECT * FROM person WHERE id", - err: "found `` but expected `IN, =, !=, >, <, >=, <=, =~, !~`", + err: "found `` but expected `IN, =, !=, >, <, >=, <=, =~, !~, ∋, ∌`", }, { sql: "SELECT * FROM person WHERE id =", diff --git a/sql/token.go b/sql/token.go index 5c4b5b36..814a102a 100644 --- a/sql/token.go +++ b/sql/token.go @@ -73,6 +73,8 @@ const ( GTE // >= EQR // =~ NER // !~ + SEQ // ∋ + SNE // ∌ operatorEnd @@ -176,6 +178,8 @@ var tokens = [...]string{ GTE: ">=", EQR: "=~", NER: "!~", + SEQ: "∋", + SNE: "∌", // keywords