Skip to content

Commit 5ecc74a

Browse files
committed
Small correction to Boron
1 parent b932f57 commit 5ecc74a

File tree

9 files changed

+58
-33
lines changed

9 files changed

+58
-33
lines changed

build/dist/orgcheck/orgcheck-api.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11013,7 +11013,7 @@ class SalesforceManager extends SalesforceManagerIntf {
1101311013
if (isAggregateQuery === false) {
1101411014
realQuery = `${query} AND ${field} > '${startingValue}' ORDER BY ${field} LIMIT ${MAX_NOQUERYMORE_BATCH_SIZE}`;
1101511015
} else {
11016-
realQuery = `${query.substring(0, indexOfFromStatment)}, MAX(${field}) `+
11016+
realQuery = `${query.substring(0, indexOfFromStatment)}, MAX(${field}) qmField `+ // Note that the max field is aliased to "qmField"
1101711017
`${query.substring(indexOfFromStatment, indexOfGroupByStatment)} `+
1101811018
(startingValue ? `WHERE ${field} > ${startingValue} ` : '')+
1101911019
`${query.substring(indexOfGroupByStatment)} `+
@@ -11035,10 +11035,14 @@ class SalesforceManager extends SalesforceManagerIntf {
1103511035
allRecords.push(... results.records);
1103611036
// Check if this was the last batch?
1103711037
if (results.records.length >= MAX_NOQUERYMORE_BATCH_SIZE) { // this was not yet the last batch
11038-
// Update the last ID to start the next batch
11039-
const newStartingValue = allRecords[allRecords.length-1][isAggregateQuery ? `MAX(${field})`: field];
11040-
// call the next Batch
11041-
await doNextQuery(newStartingValue);
11038+
const lastRecord = allRecords[allRecords.length-1];
11039+
if (isAggregateQuery === false) {
11040+
// call the next Batch with lastRecord field
11041+
await doNextQuery(lastRecord[field]);
11042+
} else {
11043+
// if aggregate query, call the next Batch with lastRecord 'qmField' (the alias of "MAX(field)" )'
11044+
await doNextQuery(lastRecord['qmField']);
11045+
}
1104211046
}
1104311047
};
1104411048
try {

build/dist/orgcheck/orgcheck-api.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/src/api/core/orgcheck-api-salesforcemanager-impl.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ export class SalesforceManager extends SalesforceManagerIntf {
316316
if (isAggregateQuery === false) {
317317
realQuery = `${query} AND ${field} > '${startingValue}' ORDER BY ${field} LIMIT ${MAX_NOQUERYMORE_BATCH_SIZE}`;
318318
} else {
319-
realQuery = `${query.substring(0, indexOfFromStatment)}, MAX(${field}) `+
319+
realQuery = `${query.substring(0, indexOfFromStatment)}, MAX(${field}) qmField `+ // Note that the max field is aliased to "qmField"
320320
`${query.substring(indexOfFromStatment, indexOfGroupByStatment)} `+
321321
(startingValue ? `WHERE ${field} > ${startingValue} ` : '')+
322322
`${query.substring(indexOfGroupByStatment)} `+
@@ -338,10 +338,14 @@ export class SalesforceManager extends SalesforceManagerIntf {
338338
allRecords.push(... results.records);
339339
// Check if this was the last batch?
340340
if (results.records.length >= MAX_NOQUERYMORE_BATCH_SIZE) { // this was not yet the last batch
341-
// Update the last ID to start the next batch
342-
const newStartingValue = allRecords[allRecords.length-1][isAggregateQuery ? `MAX(${field})`: field];
343-
// call the next Batch
344-
await doNextQuery(newStartingValue);
341+
const lastRecord = allRecords[allRecords.length-1];
342+
if (isAggregateQuery === false) {
343+
// call the next Batch with lastRecord field
344+
await doNextQuery(lastRecord[field]);
345+
} else {
346+
// if aggregate query, call the next Batch with lastRecord 'qmField' (the alias of "MAX(field)" )'
347+
await doNextQuery(lastRecord['qmField']);
348+
}
345349
}
346350
}
347351
try {

force-app/main/default/lwc/orgcheckApp/libs/orgcheck-api.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11013,7 +11013,7 @@ class SalesforceManager extends SalesforceManagerIntf {
1101311013
if (isAggregateQuery === false) {
1101411014
realQuery = `${query} AND ${field} > '${startingValue}' ORDER BY ${field} LIMIT ${MAX_NOQUERYMORE_BATCH_SIZE}`;
1101511015
} else {
11016-
realQuery = `${query.substring(0, indexOfFromStatment)}, MAX(${field}) `+
11016+
realQuery = `${query.substring(0, indexOfFromStatment)}, MAX(${field}) qmField `+ // Note that the max field is aliased to "qmField"
1101711017
`${query.substring(indexOfFromStatment, indexOfGroupByStatment)} `+
1101811018
(startingValue ? `WHERE ${field} > ${startingValue} ` : '')+
1101911019
`${query.substring(indexOfGroupByStatment)} `+
@@ -11035,10 +11035,14 @@ class SalesforceManager extends SalesforceManagerIntf {
1103511035
allRecords.push(... results.records);
1103611036
// Check if this was the last batch?
1103711037
if (results.records.length >= MAX_NOQUERYMORE_BATCH_SIZE) { // this was not yet the last batch
11038-
// Update the last ID to start the next batch
11039-
const newStartingValue = allRecords[allRecords.length-1][isAggregateQuery ? `MAX(${field})`: field];
11040-
// call the next Batch
11041-
await doNextQuery(newStartingValue);
11038+
const lastRecord = allRecords[allRecords.length-1];
11039+
if (isAggregateQuery === false) {
11040+
// call the next Batch with lastRecord field
11041+
await doNextQuery(lastRecord[field]);
11042+
} else {
11043+
// if aggregate query, call the next Batch with lastRecord 'qmField' (the alias of "MAX(field)" )'
11044+
await doNextQuery(lastRecord['qmField']);
11045+
}
1104211046
}
1104311047
};
1104411048
try {

force-app/main/default/lwc/orgcheckDependencyLink/libs/orgcheck-api.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11013,7 +11013,7 @@ class SalesforceManager extends SalesforceManagerIntf {
1101311013
if (isAggregateQuery === false) {
1101411014
realQuery = `${query} AND ${field} > '${startingValue}' ORDER BY ${field} LIMIT ${MAX_NOQUERYMORE_BATCH_SIZE}`;
1101511015
} else {
11016-
realQuery = `${query.substring(0, indexOfFromStatment)}, MAX(${field}) `+
11016+
realQuery = `${query.substring(0, indexOfFromStatment)}, MAX(${field}) qmField `+ // Note that the max field is aliased to "qmField"
1101711017
`${query.substring(indexOfFromStatment, indexOfGroupByStatment)} `+
1101811018
(startingValue ? `WHERE ${field} > ${startingValue} ` : '')+
1101911019
`${query.substring(indexOfGroupByStatment)} `+
@@ -11035,10 +11035,14 @@ class SalesforceManager extends SalesforceManagerIntf {
1103511035
allRecords.push(... results.records);
1103611036
// Check if this was the last batch?
1103711037
if (results.records.length >= MAX_NOQUERYMORE_BATCH_SIZE) { // this was not yet the last batch
11038-
// Update the last ID to start the next batch
11039-
const newStartingValue = allRecords[allRecords.length-1][isAggregateQuery ? `MAX(${field})`: field];
11040-
// call the next Batch
11041-
await doNextQuery(newStartingValue);
11038+
const lastRecord = allRecords[allRecords.length-1];
11039+
if (isAggregateQuery === false) {
11040+
// call the next Batch with lastRecord field
11041+
await doNextQuery(lastRecord[field]);
11042+
} else {
11043+
// if aggregate query, call the next Batch with lastRecord 'qmField' (the alias of "MAX(field)" )'
11044+
await doNextQuery(lastRecord['qmField']);
11045+
}
1104211046
}
1104311047
};
1104411048
try {

force-app/main/default/lwc/orgcheckDependencyViewer/libs/orgcheck-api.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11013,7 +11013,7 @@ class SalesforceManager extends SalesforceManagerIntf {
1101311013
if (isAggregateQuery === false) {
1101411014
realQuery = `${query} AND ${field} > '${startingValue}' ORDER BY ${field} LIMIT ${MAX_NOQUERYMORE_BATCH_SIZE}`;
1101511015
} else {
11016-
realQuery = `${query.substring(0, indexOfFromStatment)}, MAX(${field}) `+
11016+
realQuery = `${query.substring(0, indexOfFromStatment)}, MAX(${field}) qmField `+ // Note that the max field is aliased to "qmField"
1101711017
`${query.substring(indexOfFromStatment, indexOfGroupByStatment)} `+
1101811018
(startingValue ? `WHERE ${field} > ${startingValue} ` : '')+
1101911019
`${query.substring(indexOfGroupByStatment)} `+
@@ -11035,10 +11035,14 @@ class SalesforceManager extends SalesforceManagerIntf {
1103511035
allRecords.push(... results.records);
1103611036
// Check if this was the last batch?
1103711037
if (results.records.length >= MAX_NOQUERYMORE_BATCH_SIZE) { // this was not yet the last batch
11038-
// Update the last ID to start the next batch
11039-
const newStartingValue = allRecords[allRecords.length-1][isAggregateQuery ? `MAX(${field})`: field];
11040-
// call the next Batch
11041-
await doNextQuery(newStartingValue);
11038+
const lastRecord = allRecords[allRecords.length-1];
11039+
if (isAggregateQuery === false) {
11040+
// call the next Batch with lastRecord field
11041+
await doNextQuery(lastRecord[field]);
11042+
} else {
11043+
// if aggregate query, call the next Batch with lastRecord 'qmField' (the alias of "MAX(field)" )'
11044+
await doNextQuery(lastRecord['qmField']);
11045+
}
1104211046
}
1104311047
};
1104411048
try {

force-app/main/default/lwc/orgcheckExtendedDatatable/libs/orgcheck-api.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11013,7 +11013,7 @@ class SalesforceManager extends SalesforceManagerIntf {
1101311013
if (isAggregateQuery === false) {
1101411014
realQuery = `${query} AND ${field} > '${startingValue}' ORDER BY ${field} LIMIT ${MAX_NOQUERYMORE_BATCH_SIZE}`;
1101511015
} else {
11016-
realQuery = `${query.substring(0, indexOfFromStatment)}, MAX(${field}) `+
11016+
realQuery = `${query.substring(0, indexOfFromStatment)}, MAX(${field}) qmField `+ // Note that the max field is aliased to "qmField"
1101711017
`${query.substring(indexOfFromStatment, indexOfGroupByStatment)} `+
1101811018
(startingValue ? `WHERE ${field} > ${startingValue} ` : '')+
1101911019
`${query.substring(indexOfGroupByStatment)} `+
@@ -11035,10 +11035,14 @@ class SalesforceManager extends SalesforceManagerIntf {
1103511035
allRecords.push(... results.records);
1103611036
// Check if this was the last batch?
1103711037
if (results.records.length >= MAX_NOQUERYMORE_BATCH_SIZE) { // this was not yet the last batch
11038-
// Update the last ID to start the next batch
11039-
const newStartingValue = allRecords[allRecords.length-1][isAggregateQuery ? `MAX(${field})`: field];
11040-
// call the next Batch
11041-
await doNextQuery(newStartingValue);
11038+
const lastRecord = allRecords[allRecords.length-1];
11039+
if (isAggregateQuery === false) {
11040+
// call the next Batch with lastRecord field
11041+
await doNextQuery(lastRecord[field]);
11042+
} else {
11043+
// if aggregate query, call the next Batch with lastRecord 'qmField' (the alias of "MAX(field)" )'
11044+
await doNextQuery(lastRecord['qmField']);
11045+
}
1104211046
}
1104311047
};
1104411048
try {
0 Bytes
Binary file not shown.

sfdx-project.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"default": true,
66
"package": "OrgCheck",
77
"versionName": "Boron",
8-
"versionNumber": "5.5.0.NEXT",
8+
"versionNumber": "5.6.0.NEXT",
99
"versionDescription": "Org Check is an easy-to-install and easy-to-use Salesforce application in order to quickly analyze your org and its technical debt."
1010
}
1111
],
@@ -24,6 +24,7 @@
2424
"[email protected]": "04tKB000000DHlpYAG",
2525
"[email protected]": "04tKB000000DHluYAG",
2626
"[email protected]": "04tKB000000DI6sYAG",
27-
"[email protected]": "04tKB000000DIi7YAG"
27+
"[email protected]": "04tKB000000DIi7YAG",
28+
"[email protected]": "04tKB000000DIiHYAW"
2829
}
2930
}

0 commit comments

Comments
 (0)