Giter Club home page Giter Club logo

Comments (7)

neonstalwart avatar neonstalwart commented on July 29, 2024

sample code...

store
    .range(existingItems.length, existingItems.length + count)
    .forEach(function (item) {
        // ...
    })

from dstore.

kriszyp avatar kriszyp commented on July 29, 2024

The range method no longer exists, we are using fetchRange() now (which behaves like fetch()). What type of range parameters are you using (headers, named query parameters, or limit())?

from dstore.

neonstalwart avatar neonstalwart commented on July 29, 2024

i'm using rql - so limit() is my range mechanism. i guess range should have been removed from Request if it no longer exists 😉

will fetchRange hurt my use case since i want to do a forEach over a range?

from dstore.

kriszyp avatar kriszyp commented on July 29, 2024

Yes, fetchRange will hurt your use case, if you want to do a (safe) forEach, as fetchRange returns (a promise to) an array. We had talked about adding a forEach to the value result returned from fetch{Range} for convenience. As it is, you have to wait for the promise and iterate over the plain array.

from dstore.

neonstalwart avatar neonstalwart commented on July 29, 2024

the ability to stream results would be very attractive if the API could support it. technology is advancing to where it is becoming possible so is there some way to not have the API be the limiting factor?

from dstore.

kriszyp avatar kriszyp commented on July 29, 2024

Yes, having forEach available on the result of fetchRange() does seem desirable.
Also, 1fcf181

from dstore.

neonstalwart avatar neonstalwart commented on July 29, 2024

thanks - 1fcf181 is enough to close this issue out.

from dstore.

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.