Skip to content

Commit ed31ce0

Browse files
committed
Add: use IN operator for arrays in builder.where()
1 parent a708191 commit ed31ce0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

build/Query/Builder.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,10 @@ var Builder = /*#__PURE__*/function () {
244244
if (!args.length || !args[0]) return this; // If 2 character length, it should be straight forward where
245245

246246
if (args.length == 2) {
247-
args = [args[0], _Where.OPERATOR_EQUALS, args[1]];
247+
if (Array.isArray(args[1]))
248+
args = [args[0], 'IN', args[1]];
249+
else
250+
args = [args[0], _Where.OPERATOR_EQUALS, args[1]];
248251
} // If only one argument, treat it as a single string
249252

250253

0 commit comments

Comments
 (0)