ebryn / EasyIndexedDB

An IndexedDB wrapper that exposes a promise-based API where possible
17 stars 3 forks source link

Implement Index API #3

Closed CapyTheBeara closed 11 years ago

CapyTheBeara commented 11 years ago

Three commits here:

  1. Fixed the ObjectStore so that it finds existing indexNames when the store is created.
  2. Create EIDB.Index. Deviates from the published API by returning 'event.target.result' instead of the event (as ObjectStore#get does.) ObjectStore returns this instead of IDBIndex.
  3. Added a non-published API method Index#getAll. Seems that this would be useful.

(edit) Realized the cursors need a callback in order to be useful https://github.com/monocle/EasyIndexedDB/commit/594e7d711581c961d27471c09b529dfe660b0f0b

(edit 2) Have added a lot of other things also. Checkout my dev branch https://github.com/monocle/EasyIndexedDB