Giter Club home page Giter Club logo

Comments (5)

bramski avatar bramski commented on July 23, 2024

This is really difficult to read, can you please use github markup properly?

from angular-indexeddb.

bramski avatar bramski commented on July 23, 2024

So the query interface really isn't very complex. You can't query on multiple indexes. Only the last call to $index is going to be effective. Read the source code, it's pretty stupid simple. Same thing with all of the $lt, $gt, and $lte functions, you're basically overwriting the other query parameters. IndexedDB only supports a basic range check in the iterator.

It's just a thin wrapper around the IDBKeyRange interface:
https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange

So your querying ability is limited by that; and angular-indexed-db essentially implements that.
Any further filtering on "secondary indices" you'll have to implement on your own after the fact or build a compound index on which you can execute your query.

from angular-indexeddb.

bramski avatar bramski commented on July 23, 2024

In chrome it seems that the main index is just called "key", and by default a query executes against this. May vary per browser? I can't find any standards on it's name. If you specify no index for your query you should execute against the primary key.

I haven't used compound indices at all though, so if you get that working do post an example about how it works! I'm guessing you just specify a tuple to run the query? Best of luck.

from angular-indexeddb.

mhsimkin avatar mhsimkin commented on July 23, 2024

Thank you for all the help. If I figure out how to use compound keys, I will let you know.

from angular-indexeddb.

bramski avatar bramski commented on July 23, 2024

Figure this out? I'm closing this issue.

from angular-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.