Git Product home page Git Product logo

Comments (5)

jensarps avatar jensarps commented on August 20, 2024

Hi,

thanks for reporting! Submitting issues here on github is the best way to go, because everything is public, everybody is able to participate, and there's a history of events.

But first, thanks for your commitment, that's awesome!

I thought about removing indexing from IDBWrapper, because the new versioning API, which will eventually land in Chrome, too, will make creating indices lazily a bit troublesome – it might lead to developers losing control of the version number of their database.

But that decision is not set in stone, and I will look into this issue next week :)

from idbwrapper.

shajz avatar shajz commented on August 20, 2024

Hi,

Unfortunately, while IndexedDb is not supported on most browsers (especially mobile ones), I'll have to switch to WebSQL for now (well, the company I work for decided that. Why go for a technology that works for 2% of our users when another one will work for 99% of em...) :/ I'll try to keep up with IDB and give you all the necessary feedback, but I'm afraid you won't hear from me for some time... (Special message to all major browsers : C'mon already ! Get rid of WebSQL and switch to IDB !)

Well, for indexing, I thought about something : Why don't we do the createIndex stuff in the "constructor" of the IDBStore ? Like an option :

customers = new IDBStore({
    dbName: 'appdb',
    storeName: 'customer',
    keyPath: 'customerid',
    autoIncrement: true,
    indexes: [
        {indexName:'oneIndex', indexStuff:'sameIndex', { unique: true }}, 
        {/*etc...*/}
    ]
    onStoreReady: storeIsReady
});

What do you think ?

from idbwrapper.

jensarps avatar jensarps commented on August 20, 2024

Hi,

yeah, understandable that your company doesn't want to go for IndexedDB yet. Though WebSQL wouldn't have been my choice, I'd rather recommend going for localStorage.

Setting up indexes in the constructor will probably be the way to go, though I'd still love to have the possibility to lazily add them at any point. But, we'll see; first I gotta fix this :)

from idbwrapper.

RyanQuackenbush avatar RyanQuackenbush commented on August 20, 2024

I'm currently on a project where were migrating from WebSql to indexDB simply to support more browsers in the web app (including IE here at version 10.. .amazing I know, but at least Chrome Frame is an option). There is a good article here on migration from html5rocks. Also W3C has deprecated it since a few major players didn't want to implement WebSql W3C

Thanks for the wrapper though.

from idbwrapper.

jensarps avatar jensarps commented on August 20, 2024

Index creation now works. Please see README or the tutorial (http://jensarps.de/2012/11/13/working-with-idbwrapper-part-2/) for details.

from idbwrapper.

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.