Skip to content
Snippets Groups Projects
Commit b79fd6b2 authored by Aaron Bauman's avatar Aaron Bauman
Browse files

- Add queryAll() to RestClient

parent 1a80efcb
No related branches found
No related tags found
No related merge requests found
......@@ -678,15 +678,7 @@ class RestClient implements RestClientInterface {
}
/**
* Use SOQL to get objects based on query string.
*
* @param \Drupal\salesforce\SelectQuery $query
* The constructed SOQL query.
*
* @return \Drupal\salesforce\SelectQueryResult
* Query result object.
*
* @addtogroup salesforce_apicalls
* {@inheritdoc}
*/
public function query(SelectQuery $query) {
// $this->moduleHandler->alter('salesforce_query', $query);
......@@ -695,13 +687,14 @@ class RestClient implements RestClientInterface {
}
/**
* Given a select query result, fetch the next results set, if it exists.
*
* @param \Drupal\salesforce\SelectQueryResult $results
* The query result which potentially has more records.
*
* @return \Drupal\salesforce\SelectQueryResult
* If there are no more results, $results->records will be empty.
* {@inheritdoc}
*/
public function queryAll(SelectQuery $query) {
return new SelectQueryResult($this->apiCall('queryAll?q=' . (string) $query));
}
/**
* {@inheritdoc}
*/
public function queryMore(SelectQueryResult $results) {
if ($results->done()) {
......
......@@ -249,6 +249,18 @@ interface RestClientInterface {
*/
public function query(SelectQuery $query);
/**
* Same as ::query(), but also returns deleted or archived records.
*
* @param \Drupal\salesforce\SelectQuery $query
* The constructed SOQL query.
*
* @return \Drupal\salesforce\SelectQueryResult
*
* @addtogroup salesforce_apicalls
*/
public function queryAll(SelectQuery $query);
/**
* Given a select query result, fetch the next results set, if it exists.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment