Remove quotes from sample code in apex docs #503
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
In the apex docs for the SOQLRecipes.cls, the code example is shown as follows:
The trouble is, the code snippet
SOQLRecipes.getSecond10AccountRecords()
needs to be executed, not passed as a string literal.When run as currently committed, here's the output from exec anonymous:
Obviously, no soql was actually executed in this transaction. Meaning the code doesn't do what it's supposed to do: demonstrate execution of the code.
When removing the single quotes, the transaction reports back as follows:
Here we actually get a soql query and some soql rows reported back. This is the correct invocation of the code that demonstrates the use of this method.
What issues does this PR fix or reference?
#
The PR fulfills these requirements:
[X] Tests for the proposed changes have been added/updated.
[X] Code linting and formatting was performed.
[no actual changes to code were made, only to comments and to documentation.]
Functionality Before
Execution of the code did not occur
Functionality After
The code executes as expected.