Giter Club home page Giter Club logo

Comments (5)

jesperfj avatar jesperfj commented on July 17, 2024

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?

from force-rest-api.

raunakbagri avatar raunakbagri commented on July 17, 2024

Setting different batch size gives more flexibility as we would making soql on various collections, giving us an option to fine tune the performance.

from force-rest-api.

jesperfj avatar jesperfj commented on July 17, 2024

Can you give some pseudo code samples of how you would like it to work?

from force-rest-api.

jesperfj avatar jesperfj commented on July 17, 2024

I am leaning heavily towards providing this in ApiConfig and I am looking to understand whether that would be unreasonably burdensome

from force-rest-api.

raunakbagri avatar raunakbagri commented on July 17, 2024

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);
QueryResult queryMore(String nextRecordsUrl, Class clazz, int batchSize);

from force-rest-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.