-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for batch size for SOQL #84
Comments
Do you find that you need to set different batch sizes all the time? Or would it be acceptable to set the batch size on the Config object? |
Setting different batch size gives more flexibility as we would making soql on various collections, giving us an option to fine tune the performance. |
Can you give some pseudo code samples of how you would like it to work? |
I am leaning heavily towards providing this in ApiConfig and I am looking to understand whether that would be unreasonably burdensome |
I understand your viewpoint. Just an example of my usecase: I make SOQL with batch sizes varying from collections to collections. Some objects can be processed asynchronously so batch size won't matter. (Maybe in future to tune the backend optimisation, I might need the batch size) Some are rendered on the UI and needs pagination. These can be configured differently for the different pages fetching and rendering respective objects. (Pages for two different collections can be configured with different pagination size). So only I was suggesting argument based interface. I agree with having a default value set in the ApiConfig as it would be useful for many, but the former one shall give amazing flexibility. eg. QueryResult query(String query, Class clazz, int batchSize); |
Currently, if we Query the Sobjects, the size of the result is 2000 which is the default batch size.
However, we can change this batch by using header as mentioned here: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/headers_queryoptions.htm
Need an interface to support the above.
The text was updated successfully, but these errors were encountered: