Saturday, December 1, 2012

IndexedDB.js updated

      IndexedDB.js is a JavaScript library file, which provides api to easily connect and do transactions for data storage and retrieval on in-browser database system (IndexedDB). Its older version is used in my previous post - PetStore, the file been updated to support many if not all features which IndexedDB supports. Its api offers the following operations:
  1. Opens DB connection (creates new if not exists)
  2. Add a data record 
  3. Bulk data insertion
  4. Updates a record
  5. Deletes a record
  6. Get single record (by key)
  7. Get all records
  8. Get records count
  9. Clear/delete all records
       A sample html page along with this file is provided for download, which showcases many of the above features (except, bulk insertion). This html uses Knockout.js, download it to check its working, and how to use this api (don't try it from filesystem, run it from web server).
sample html in action

       From screenshot, you can see grid supports inline edit, delete and insertion, and they can be performed simultaneously. The bottom portion shows the status or result of all operations.
For supporting browsers check my previous blog post.

Download the Zip file or check the demo.