Skip to content

Commit a914ba6

Browse files
authored
Merge pull request #7 from JavaScriptor/fix-comparison-operator-sort
fix: comparison operator <> not support caused by comparison_operator…
2 parents 7323beb + bd71f3f commit a914ba6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/sqlParser.jison

+4-4
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,20 @@ LIMIT return 'LIMIT'
9999
"!" return '!'
100100
"|" return '|'
101101
"&" return '&'
102-
"<<" return '<<'
103-
">>" return '>>'
104102
"+" return '+'
105103
"-" return '-'
106104
"*" return '*'
107105
"/" return '/'
108106
"%" return '%'
109107
"^" return '^'
108+
">>" return '>>'
110109
">=" return '>='
110+
">" return '>'
111+
"<<" return '<<'
111112
"<=>" return '<=>'
112113
"<=" return '<='
113-
">" return '>'
114-
"<" return '<'
115114
"<>" return '<>'
115+
"<" return '<'
116116
"{" return '{'
117117
"}" return '}'
118118
";" return ';'

test/main.test.js

+4
Original file line numberDiff line numberDiff line change
@@ -134,5 +134,9 @@ AND (rd.rd_numberofrooms <= (select sum(rn.reservation_numberofrooms) as count_r
134134
it ('limit support.', function () {
135135
testParser('select a from b limit 2, 3');
136136
});
137+
138+
it ('fix not equal.', function () {
139+
testParser('select a from b where a <> 1 limit 2, 3');
140+
});
137141
});
138142

0 commit comments

Comments
 (0)