Skip to content

Commit

Permalink
fix: fix edge case, updated messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
WillieRuemmele committed Aug 7, 2020
1 parent 7f1a12d commit a8f9a54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,11 @@ export class Connection extends JSForceConnection {
.on('record', rec => records.push(rec))
.on('error', err => reject(err))
.on('end', () => {
const totalSize = getNumber(query, 'totalSize') || maxFetch;
const totalSize = getNumber(query, 'totalSize') || 0;
if (totalSize > records.length) {
process.emitWarning(
`The query result is missing ${totalSize -
records.length} records due to a 10,000 limit for performance reasons. Increase the number of records returned by setting the config value "maxQueryLimit" or the environment variable "SFDX_MAX_QUERY_LIMIT" to ${totalSize} or greater than 10,000.`
records.length} records due to a ${maxFetch} record limit for performance reasons. Increase the number of records returned by setting the config value "maxQueryLimit" or the environment variable "SFDX_MAX_QUERY_LIMIT" to ${totalSize} or greater than 10,000.`
);
this._logger.warn(
`The query: ${soql} result is missing ${totalSize - records.length} records due to an API limit.`
Expand Down

0 comments on commit a8f9a54

Please sign in to comment.