Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
salesforce-3257058
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
salesforce-3257058
Commits
b79fd6b2
Commit
b79fd6b2
authored
7 years ago
by
Aaron Bauman
Browse files
Options
Downloads
Patches
Plain Diff
- Add queryAll() to RestClient
parent
1a80efcb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Rest/RestClient.php
+9
-16
9 additions, 16 deletions
src/Rest/RestClient.php
src/Rest/RestClientInterface.php
+12
-0
12 additions, 0 deletions
src/Rest/RestClientInterface.php
with
21 additions
and
16 deletions
src/Rest/RestClient.php
+
9
−
16
View file @
b79fd6b2
...
@@ -678,15 +678,7 @@ class RestClient implements RestClientInterface {
...
@@ -678,15 +678,7 @@ class RestClient implements RestClientInterface {
}
}
/**
/**
* Use SOQL to get objects based on query string.
* {@inheritdoc}
*
* @param \Drupal\salesforce\SelectQuery $query
* The constructed SOQL query.
*
* @return \Drupal\salesforce\SelectQueryResult
* Query result object.
*
* @addtogroup salesforce_apicalls
*/
*/
public
function
query
(
SelectQuery
$query
)
{
public
function
query
(
SelectQuery
$query
)
{
// $this->moduleHandler->alter('salesforce_query', $query);
// $this->moduleHandler->alter('salesforce_query', $query);
...
@@ -695,13 +687,14 @@ class RestClient implements RestClientInterface {
...
@@ -695,13 +687,14 @@ class RestClient implements RestClientInterface {
}
}
/**
/**
* Given a select query result, fetch the next results set, if it exists.
* {@inheritdoc}
*
*/
* @param \Drupal\salesforce\SelectQueryResult $results
public
function
queryAll
(
SelectQuery
$query
)
{
* The query result which potentially has more records.
return
new
SelectQueryResult
(
$this
->
apiCall
(
'queryAll?q='
.
(
string
)
$query
));
*
}
* @return \Drupal\salesforce\SelectQueryResult
* If there are no more results, $results->records will be empty.
/**
* {@inheritdoc}
*/
*/
public
function
queryMore
(
SelectQueryResult
$results
)
{
public
function
queryMore
(
SelectQueryResult
$results
)
{
if
(
$results
->
done
())
{
if
(
$results
->
done
())
{
...
...
This diff is collapsed.
Click to expand it.
src/Rest/RestClientInterface.php
+
12
−
0
View file @
b79fd6b2
...
@@ -249,6 +249,18 @@ interface RestClientInterface {
...
@@ -249,6 +249,18 @@ interface RestClientInterface {
*/
*/
public
function
query
(
SelectQuery
$query
);
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.
* Given a select query result, fetch the next results set, if it exists.
*
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment