From b2dfec17d8454a4b93bf002589e9956a15eae682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwenol=C3=A9=20STEPHANT?= Date: Sun, 7 Jun 2020 15:22:28 +0200 Subject: [PATCH] Add: use IN operator for arrays in builder.where() --- build/Query/Builder.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/Query/Builder.js b/build/Query/Builder.js index 31f1114..81566a5 100644 --- a/build/Query/Builder.js +++ b/build/Query/Builder.js @@ -244,7 +244,10 @@ var Builder = /*#__PURE__*/function () { if (!args.length || !args[0]) return this; // If 2 character length, it should be straight forward where if (args.length == 2) { - args = [args[0], _Where.OPERATOR_EQUALS, args[1]]; + if (Array.isArray(args[1])) + args = [args[0], 'IN', args[1]]; + else + args = [args[0], _Where.OPERATOR_EQUALS, args[1]]; } // If only one argument, treat it as a single string