You are here

public function RestClient::query in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 src/Rest/RestClient.php \Drupal\salesforce\Rest\RestClient::query()
  2. 5.0.x src/Rest/RestClient.php \Drupal\salesforce\Rest\RestClient::query()

Use SOQL to get objects based on query string.

Parameters

\Drupal\salesforce\SelectQueryInterface $query: The constructed SOQL query.

Return value

\Drupal\salesforce\SelectQueryResult The query result.

Overrides RestClientInterface::query

1 call to RestClient::query()
RestClient::getRecordTypes in src/Rest/RestClient.php
Retrieve all record types for this org.
1 method overrides RestClient::query()
TestRestClient::query in src/Tests/TestRestClient.php
Mock a query result for test_mapping.

File

src/Rest/RestClient.php, line 446

Class

RestClient
Objects, properties, and methods to communicate with the Salesforce REST API.

Namespace

Drupal\salesforce\Rest

Code

public function query(SelectQueryInterface $query) {

  // $this->moduleHandler->alter('salesforce_query', $query);
  // Casting $query as a string calls SelectQuery::__toString().
  return new SelectQueryResult($this
    ->apiCall('query?q=' . (string) $query));
}