utils.js
/**
   * Expands all of the asterisks from the end of `soql` back to the beginning.
   */
Expands all of the asterisks from the end of `soql` back to the beginning.
Expands all of the asterisks from the end of ` soql ` back to the beginning .
function expandFromEnd() {
    let star = stars.pop();
    if (star) {
      const sobjectUpper = star.sobject.toUpperCase();
      let description = descriptions[sobjectUpper];
      if (description) {
        soql = soql.slice(0, star.start)
          + description.fields.map(x => `${star.sobject}.${x.name}`).join(',')
          + soql.slice(star.end);
        expandFromEnd();
      }
      else {
        jsforceConn.describe(sobjectUpper, (err, result) => {
          if (err) {
            callback(err, null);
          }
          else {
            descriptions[sobjectUpper] = result;
            stars.push(star);
            expandFromEnd();
          }
        });
      }
    }
    else {
      callback(null, soql);
    }
  }
function expandFromEnd ( ) { let star = stars . pop ( ) ; if ( star ) { const sobjectUpper = star . sobject . toUpperCase ( ) ; let description = descriptions [ sobjectUpper ] ; if ( description ) { soql = soql . slice ( 0 , star . start ) + description . fields . map ( x => ` ${ star . sobject } ${ x . name } ` ) . join ( ',' ) + soql . slice ( star . end ) ; expandFromEnd ( ) ; } else { jsforceConn . describe ( sobjectUpper , ( err , result ) => { if ( err ) { callback ( err , null ) ; } else { descriptions [ sobjectUpper ] = result ; stars . push ( star ) ; expandFromEnd ( ) ; } } ) ; } } else { callback ( null , soql ) ; } }
Expands all of the asterisks from the end of `soql` back to the beginning.
Expands all of the asterisks from the end of ` soql ` back to the beginning .