Skip to content

Create IndexedDB DAO based Repositories and DbContext

Notifications You must be signed in to change notification settings

code-atom/IndexedDB.js

Repository files navigation

IndexedDB.js

inspired from proto-db.

IndexedDB.js enable you to access the indexed Database feature of browser with promise-api. IndexedDB.js create a repository for each Object store in IndexedDB database.

Sample Code of Usage :

var sampleContextBuilder = new IndexedDB.DbContextBuilder(window.indexedDB);
sampleContextBuilder.CreateDB("Sample");
sampleContextBuilder.ConfigureModel({
        name: "Sample",
        keyPath: "id",
        autoIncrement: false
        });
sampleContextBuilder.Build();

TODO

  • Avaiability check
  • Seeding with new created ObjectStore
  • Unit Test for DbContextbuilder and BaseRepository.
  • Performance measurement and optimization.
  • Query interface to repository.
  • Bug-free :)
  • Single Connection Oriented.
  • Web Worker Support.
  • Create a demo for cache the AJAX response.
  • Service Worker Support.
  • Transaction Scope Work between multiple ObjectStore