Skip to content

Commit a5950dd

Browse files
MinePlay96mistic100
authored andcommitted
Fixed Unexpected 'NUMBER'
if you had a query with an "IN" with 10 elements or more, the regex of setRulesFromSQL did not match correctly
1 parent 7027a02 commit a5950dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugins/sql-support/plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ QueryBuilder.defaults({
214214
'named': function(values, char) {
215215
if (!char || char.length > 1) char = ':';
216216
var regex1 = new RegExp('^\\' + char);
217-
var regex2 = new RegExp('\\' + char + '(' + Object.keys(values).join('|') + ')', 'g');
217+
var regex2 = new RegExp('\\' + char + '(' + Object.keys(values).join('|') + ')\\b', 'g');
218218
return {
219219
parse: function(v) {
220220
return regex1.test(v) ? values[v.slice(1)] : v;

0 commit comments

Comments
 (0)