Skip to content

mzsm/Jaid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jaid

Jane Indexed Database library

How to use

var db = Jaid.Database({
  name: 'library',
  version: 1,
  objectStores: [
    {
      name: 'books',
      keyPath: 'isbn',
      autoIncrement: false,
      indexes: [
        {name: 'title', keyPath: 'title'},
        {name: 'publisher', keyPath: 'publisher'},
        {name: 'author', keyPath: 'authors', multiEntry: true}
      ]
    }
  ]
});
db.onSuccess(function(){
  var transaction = db.readWriteTransaction('books');
  transaction.put(
    'books',
    {
      title: 'TypeScript Reference',
      publisher: 'Impress Japan',
      isbn: '9784844335887',
      authors: ['WAKAME Masahiro']
    }
  );
});

About

Jane Indexed Database Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published