mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-12-01 13:42:16 -05:00
24 lines
470 B
JavaScript
24 lines
470 B
JavaScript
|
"use strict";
|
||
|
|
||
|
function ArchiveStorage(storage) {
|
||
|
this.storage = storage;
|
||
|
}
|
||
|
|
||
|
ArchiveStorage.prototype = {
|
||
|
constructor: {
|
||
|
value: ArchiveStorage
|
||
|
},
|
||
|
setup: function (db) {
|
||
|
db.createObjectStore('archive', {
|
||
|
keyPath: 'id'
|
||
|
});
|
||
|
},
|
||
|
transaction: function (mode) {
|
||
|
var trans = this.storage.db.transaction('archive', mode);
|
||
|
return trans.objectStore('archive');
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|
||
|
module.exports = ArchiveStorage;
|