Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
chore: add spaces to queries
Browse files Browse the repository at this point in the history
  • Loading branch information
alanjaouen committed Oct 20, 2023
1 parent fb39030 commit 0d67a71
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export default class ScratchOrgInfoFetcher {
let query;

if (tag)
query = `SELECT Pooltag__c, Id, CreatedDate, ScratchOrg, ExpirationDate, SignupUsername, SignupEmail, Password__c, Allocation_status__c,LoginUrl,SfdxAuthUrl__c FROM ScratchOrgInfo WHERE Pooltag__c = '${tag}' AND Status = 'Active' `;
query = `SELECT Pooltag__c, Id, CreatedDate, ScratchOrg, ExpirationDate, SignupUsername, SignupEmail, Password__c, Allocation_status__c, LoginUrl, SfdxAuthUrl__c FROM ScratchOrgInfo WHERE Pooltag__c = '${tag}' AND Status = 'Active' `;
else
query = `SELECT Pooltag__c, Id, CreatedDate, ScratchOrg, ExpirationDate, SignupUsername, SignupEmail, Password__c, Allocation_status__c,LoginUrl,SfdxAuthUrl__c FROM ScratchOrgInfo WHERE Pooltag__c != null AND Status = 'Active' `;
query = `SELECT Pooltag__c, Id, CreatedDate, ScratchOrg, ExpirationDate, SignupUsername, SignupEmail, Password__c, Allocation_status__c, LoginUrl, SfdxAuthUrl__c FROM ScratchOrgInfo WHERE Pooltag__c != null AND Status = 'Active' `;

if (isMyPool) {
query = query + ` AND createdby.username = '${this.hubOrg.getUsername()}' `;
Expand All @@ -74,7 +74,7 @@ export default class ScratchOrgInfoFetcher {
return retry(
async (bail) => {
let query;
query = `SELECT Id, Pooltag__c,SignupUsername,Description,ScratchOrg FROM ScratchOrgInfo WHERE Pooltag__c = null AND Status = 'Active'`;
query = `SELECT Id, Pooltag__c, SignupUsername, Description, ScratchOrg FROM ScratchOrgInfo WHERE Pooltag__c = null AND Status = 'Active'`;
query = query + ORDER_BY_FILTER;
SFPLogger.log('QUERY:' + query, LoggerLevel.TRACE);
const results = (await hubConn.query(query)) as any;
Expand Down Expand Up @@ -104,7 +104,7 @@ export default class ScratchOrgInfoFetcher {

return retry(
async (bail) => {
let query = `SELECT Id, CreatedDate, ScratchOrg, ExpirationDate, SignupUsername, SignupEmail, Password__c, Allocation_status__c,LoginUrl FROM ScratchOrgInfo WHERE Pooltag__c = '${tag}' AND Status = 'Active' `;
let query = `SELECT Id, CreatedDate, ScratchOrg, ExpirationDate, SignupUsername, SignupEmail, Password__c, Allocation_status__c, LoginUrl FROM ScratchOrgInfo WHERE Pooltag__c = '${tag}' AND Status = 'Active' `;
SFPLogger.log('QUERY:' + query, LoggerLevel.TRACE);
const results = (await hubConn.query(query)) as any;
SFPLogger.log('RESULT:' + JSON.stringify(results), LoggerLevel.TRACE);
Expand All @@ -119,7 +119,7 @@ export default class ScratchOrgInfoFetcher {

return retry(
async (bail) => {
let query = `SELECT Id, CreatedDate, ScratchOrg, ExpirationDate, SignupUsername, SignupEmail, Password__c, Allocation_status__c,LoginUrl FROM ScratchOrgInfo WHERE Pooltag__c = '${tag}' AND Status = 'Active' `;
let query = `SELECT Id, CreatedDate, ScratchOrg, ExpirationDate, SignupUsername, SignupEmail, Password__c, Allocation_status__c, LoginUrl FROM ScratchOrgInfo WHERE Pooltag__c = '${tag}' AND Status = 'Active' `;
SFPLogger.log('QUERY:' + query, LoggerLevel.TRACE);
const results = (await hubConn.query(query)) as any;
return results.totalSize;
Expand Down

0 comments on commit 0d67a71

Please sign in to comment.