Giter VIP home page Giter VIP logo

Comments (4)

gilf avatar gilf commented on August 19, 2024

Hi @zeet2020,

Thanks for the request. That functionality can be achieved using IDBKeyRange.
When I'll have spare time, I'll work on adding a new get function that receives step and top arguments and outputs only the relevant records in the range.

from angular2-indexeddb.

gilf avatar gilf commented on August 19, 2024

Hi @zeet2020,

You can use the getAll or openCursor functions with an IDBKeyRange object argument now

from angular2-indexeddb.

zeet2020 avatar zeet2020 commented on August 19, 2024

hi @gif,

that is a real help, by if am not wrong IDBKeyRange, your need to know the keyRange to startWith and endWith key. to define the IDBKeyRange. but if your use uuid as a key. to create record or object. we can't really use IDBkeyRange to fetch a range of objects.

from angular2-indexeddb.

gilf avatar gilf commented on August 19, 2024

Hi @zeet2020,

I know it isn't a perfect solution but if you now the offset and the number of needed records it's sufficient if the key is of type number.
In other scenarios a new function should be introduced in the library API which enables query types. Since such a function is not something that I can implement fast I preferred to add the key range option for now and later implement a query function.

from angular2-indexeddb.

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.