code-atom / IndexedDB.js

Create IndexedDB DAO based Repositories and DbContext

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Create IndexedDB DAO based Repositories and DbContext


Languages

Language:TypeScript 63.8%Language:HTML 26.5%Language:JavaScript 9.7%