You are here

public function SalesforceCommands::executeQuery in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 src/Commands/SalesforceCommands.php \Drupal\salesforce\Commands\SalesforceCommands::executeQuery()
  2. 5.0.x src/Commands/SalesforceCommands.php \Drupal\salesforce\Commands\SalesforceCommands::executeQuery()

Execute a SOQL query.

@command salesforce:execute-query @aliases sfeq,soql,sf-execute-query

Parameters

string $query: The query to execute.

Return value

\Drupal\salesforce\Commands\QueryResult The query result.

File

src/Commands/SalesforceCommands.php, line 669

Class

SalesforceCommands
A Drush commandfile.

Namespace

Drupal\salesforce\Commands

Code

public function executeQuery($query) {
  $query = new SelectQueryRaw($query);
  return $this
    ->returnQueryResult(new QueryResult($query, $this->client
    ->query($query)));
}