vr-commons 1.0.163 → 1.0.164
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -640,15 +640,14 @@ exports.stockUtil = {
|
|
|
640
640
|
batchNumber++;
|
|
641
641
|
offset = (batchNumber - 1) * batchSize;
|
|
642
642
|
const pairIdsResult = await sequelizeInstance.query(`
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
OFFSET $2
|
|
643
|
+
SELECT "pairId"
|
|
644
|
+
FROM "devices"
|
|
645
|
+
WHERE ${whereClause}
|
|
646
|
+
GROUP BY "pairId"
|
|
647
|
+
HAVING COUNT(*) = 2
|
|
648
|
+
ORDER BY "pairId" ASC
|
|
649
|
+
LIMIT $1
|
|
650
|
+
OFFSET $2
|
|
652
651
|
`, {
|
|
653
652
|
bind: [batchSize, offset],
|
|
654
653
|
type: "SELECT",
|