github dexie/Dexie.js v1.1.0
Dexie v1.1.0

latest releases: v4.0.0-alpha.4, v3.0.4, v4.0.0-alpha.3...
8 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

Don't miss a new Dexie.js release

NewReleases is sending notifications on new releases.