You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
setup using dreamhouse project, after importing data:
➜ dreamhouse-lwc git:(main) sf data query --query 'SELECT Name FROM Broker__c'
Querying Data... ⣾
NAME
─────────────────
Caroline Kingsley
Michael Jones
Jonathan Bradley
Jennifer Wu
Olivia Green
Miriam Aupont
Michelle Lambert
Victor Ochoa
Querying Data... done
then deleted:
Miriam Aupont
Michelle Lambert
Victor Ochoa
✅ --all-rows include deleted records deleted records only
➜ dreamhouse-lwc git:(main) ../sf/plugin-data/bin/dev data:query --query 'SELECT Name from Broker__c WHERE isDeleted = TRUE' --all-rows
NAME
────────────────
Miriam Aupont
Michelle Lambert
Victor Ochoa
Total number of records retrieved: 3.
Querying Data... done
all records
➜ dreamhouse-lwc git:(main) ../sf/plugin-data/bin/dev data:query --query 'SELECT Name from Broker__c' --all-rows
NAME
─────────────────
Caroline Kingsley
Michael Jones
Jonathan Bradley
Jennifer Wu
Olivia Green
Miriam Aupont
Michelle Lambert
Victor Ochoa
Total number of records retrieved: 8.
Querying Data... done
without --all-rows only active records are returned
➜ dreamhouse-lwc git:(main) ../sf/plugin-data/bin/dev data:query --query 'SELECT Name from Broker__c'
NAME
─────────────────
Caroline Kingsley
Michael Jones
Jonathan Bradley
Jennifer Wu
Olivia Green
Total number of records retrieved: 5.
Querying Data... done
✅ respects max org query limit
➜ dreamhouse-lwc git:(main) SF_ORG_MAX_QUERY_LIMIT=2 ../sf/plugin-data/bin/dev data:query --query 'SELECT Name from Broker__c WHERE isDeleted = TRUE' --all-rows
Warning: The query result is missing 1 records due to a 2 record limit. Increase the number of records returned by setting the config value "org-max-query-limit" or the e
nvironment variable "SF_ORG_MAX_QUERY_LIMIT" to 3 or greater than 2.
NAME
────────────────
Miriam Aupont
Michelle Lambert
Total number of records retrieved: 2.
Querying Data... done
✅ pagination still works
API docs says we can use either query or queryAll for pagination. I wasn't able to find an org with > 2000 deleted records to test but the example below shows pagination still works even if --all-rows is passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
new
--all-rowsflag for soql query command that can query deleted stuffWhat issues does this PR fix or reference?
forcedotcom/cli#1959
@W-12590109@