Closed MinePlay96 closed 3 years ago
Hey, I think there's something wrong with the build logic
@MinePlay96 can you give more details on what case this is supposed to fix ?
Also add or edit the unit tests (although they don't work on the CI).
$('#queryBuilder').queryBuilder('setRulesFromSQL', {
"sql":"Status IN(:Status_1, :Status_2, :Status_3, :Status_4, :Status_5, :Status_6, :Status_7, :Status_8, :Status_9, :Status_10)",
"params":{
"Status_1":1,
"Status_2":2,
"Status_3":4,
"Status_4":5,
"Status_5":6,
"Status_6":9,
"Status_7":10,
"Status_8":11,
"Status_9":12,
"Status_10":13
}
}, 'named');
which would produce the following regex without my adjustments
/\:(Status_1|Status_2|Status_3|Status_4|Status_5|Status_6|Status_7|Status_8|Status_9|Status_10)/g
This regex would map Status_1 instead of Status_10;.
see: https://regex101.com/r/ln3YoL/1
if you had a query with an "IN" with 10 elements or more, the regex of setRulesFromSQL did not match correctly
Merge request checklist
dev
and I am issuing the PR todev
dist
directory__locale
and__author
fields