public function RestClient::query in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 src/Rest/RestClient.php \Drupal\salesforce\Rest\RestClient::query()
- 8.3 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 454
Class
- RestClient
- Objects, properties, and methods to communicate with the Salesforce REST API.
Namespace
Drupal\salesforce\RestCode
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));
}