IndexedDB wrapper for Vuejs based on Dexie
npm install vue-idb --save
import Vue from 'vue'
import VueIdb from 'vue-idb'
Vue.use(VueIdb)
const idb = new VueIdb({
version: 1,
database: 'test',
schemas: [
{ tests: 'id, title, created_at, updated_at' },
{ posts: 'id, owner' }
]
})
new Vue({
el: '#app',
idb: idb,
render: h => h(App)
})
idb.test.test.toArray().then(results => (){ // do something here})
idb.test.test.Add({
id:10, title: 'title', created_at:new Date(), updated_at:new Date()
}).then(r=> (){//do something})
idb.test.test.Update(10, // the id
{
updated_at:new Date()
}).then(r => () { // do something })
BUGFIX on adding schemas on existing DB UPDATES dependencies #32
ADD xxxReset action ADD payload to load action
RETURN Promise.reject() BUGFIX #22
BUGFIX on listSelect vuex action BUGFIX on toggleSelect vuex action
Add Dexie DB version in options
Add Select action in biglist