refactored database

This commit is contained in:
Kevin Jahns
2015-10-14 19:28:19 +02:00
parent ee133ef334
commit 181595293f
10 changed files with 79 additions and 170 deletions

View File

@@ -3,9 +3,8 @@
'use strict'
Y.IndexedDB = (function () {
class Transaction extends Y.AbstractTransaction {
class Transaction {
constructor (store) {
super(store)
this.transaction = store.db.transaction(['OperationStore', 'StateVector'], 'readwrite')
this.sv = this.transaction.objectStore('StateVector')
this.os = this.transaction.objectStore('OperationStore')
@@ -83,7 +82,7 @@ Y.IndexedDB = (function () {
return ops
}
}
class OperationStore extends Y.AbstractOperationStore {
class OperationStore extends Y.AbstractDatabase {
constructor (y, opts) {
super(y, opts)
if (opts == null) {