GithubHelp home page GithubHelp logo

idbwrapper's People

Contributors

johanneslumpe avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

hfeeki

idbwrapper's Issues

[feature] import/export

Would be great to be able to wholesale import/export data.

Example use-case for export would be back up data to Dropbox. Example use-case of import would be to pull that data from dropbox on a new device.

Calling more than one method on the querywrapper inside a transaction before executing it, leads to inactive transaction

#1 is related to this. The transaction gets closed when it's not actively being used. so chaining where conditions and also just calling find multiple times before actually executing it, leads to an inactive transaction.

This is due to the fact that a transaction is being commited as soon as no more requests are being placed against it. Since the TransactionWrapper creates the transaction and then executes the callback, calling where etc. on the QueryWrapper does not immediatly create requests and thus the transaction becomes inactive.

If a store does not have an autoincrement key, the key isn't returned when selecting the item

So when a store has a keyPath and autoIncrement is set to true, then the store sets the key using the provided keyPath and thus the key is always returned when selecting the item. Should this be the default also for other stores?

When inserting data like this:

wrapper.insert([{some:data}]).then(...)
wrapper.insert({some:data}, someKey).then(...)

should the key be set on the object? It might help doing that because else we wouldn't know the key for the object in the first insert.

The same goes for selects like this:

wrapper.find().where.index('someIndex').only('something').then(...);

In an autoIncrement store we will have ids and then could delete some items by key for example. In store which does not use autoincrement keys and does not use a keypath, it would be useful to determine a "default" keyPath on the object and store the returned id there, even though it would not be a real keyPath in the store.

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.