Dexie.js

A Minimalistic Wrapper for IndexedDB

APACHE-2.0 License

Downloads
2.2M
Stars
10.7K
Committers
98
Dexie.js - Dexie v1.1.0

Published by dfahlander over 9 years ago

New Features

  • New addon Dexie.Yield gives support for ES6 yield for awaiting Promises in the exact same way as with synchronous multithreaded programming. Works TODAY on Chrome, Opera and Firefox without transpiling(!)
    // Include addon "Dexie.Yield", and simplify your application code dramatically:
    db.transaction('rw', db.friends, db.pets, function* () {
        var catId = yield db.pets.add({ name: "Tito", kind: "cat" });
        var dogId = yield db.pets.add({ name: "Josephina", kind: "dog" });
        var friendId = yield db.friends.add({ name: "Gurra G", pets: [catId, dogId] });

        var gurra = yield db.friends.where('name').equals("Gurra G").first();
        var gurrasPets = yield db.pets.where('id').anyOf(gurra.pets).toArray();
        console.log(JSON.stringify(gurrasPets));
    });

In short, any method that returns a promise can be yielded instead of .then():ed. See more samples in tests-yield.html

  • Typescript definition file added (nuget: Install-Package dexie.TypeScript.DefinitelyTyped)
  • Support for AMD Module Loading (see samples/requirejs)

API Changes

  • Dexie.spawn() deprecated and replaced by Dexie.ignoreTransaction(). Still backward compliant though.

Solved Issues

  • Fixed broken CommonJS support (browserify) with sample added.
  • #81: TypeError undefined not an object. Kind of a regression bug. Systems that lacks indexedDB should get a promise rejection on db.open() not a TypeError thrown at them.
  • #102 Empty array in anyOf()
  • Broken intellisense / code completion when using Visual Studio 2013.
  • Transaction/Promise issues #91, #95 and #97
  • A little bit more defensive to IndexedDBShim issues
  • #62 Performance improvement on mobile devices
  • #100 Must abort upgrade transaction if schema error
Dexie.js - Dexie v1.0.4

Published by dfahlander over 9 years ago

Fixes since v1.0.3:

Features:

  • Global exception handler for promises #69 (Promise.on('error'))
  • Issue #77: Make Dexie adapt to IndexedDBShim without hacks when it's included
  • HTML5 web worker support #76
  • Commit 635c7f19243dd96cef304d35fd8c1f4e65d4d1dd: May create a Dexie instance with inactive addons

Bugs:

  • Exception can be thrown in WhereClause methods #67
  • If returning a Promise from from a sub transaction, parent transaction will abort #71
  • Neither this.onsuccess or this.onerror called for hook('updating') #72
  • Exception in a promise may result in loosing the callback totally #73
  • Issue #66 Using Dexie.js inside Chrome App
  • Possible stall if error in modify()/delete() (commit c889d845e3a8a66495ce3b63170f82a56c7d19aa)
  • Support for using other db within a transaction (commit 8d9c062aeed685a545fd998f98115ec470a1b87d)

Bugs in addons:

  • Wrong order of changes Dexie.Observable/Syncable when using sub transactions #75
  • Dexie.Syncable may store changes in the wrong table #74
Dexie.js - Dexie v1.0.3

Published by dfahlander over 9 years ago

Safari native indeedDB support.

  • This version contains workaround for Safari's native indexedDB. Note however, that a transaction must not include multiple stores since Safari has that limitation. But if you keep querying one object store at a time, it will work with native Safari.

Alternate Safari support using indexedDBShim:

  • For those prefering indexedDBShim, the shim became unfunctional since Safari released its native support. Latest version of indexedDBShim uses a workaround for that that this version of Dexie should be compatible with (untested).
Dexie.js - Dexie v1.0.2

Published by dfahlander almost 10 years ago

Dexie.js - Dexie v1.0.1

Published by dfahlander almost 10 years ago

Releasing patch version 1.0.1

Dexie.js - Dexie v1.0

Published by dfahlander almost 10 years ago

Dexie v1.0 testing