Resolved conflicts after rebase - Add log statements to IndexedDbProvider open
This commit is contained in:
Родитель
b1f2ffb77f
Коммит
c5b9a714b0
|
@ -178,6 +178,7 @@ export class IndexedDbProvider extends DbProvider {
|
|||
|
||||
this._lockHelper = new TransactionLockHelper(schema, true);
|
||||
|
||||
this.logger.log(`Opening db: ${dbName}, version: ${schema.version}`);
|
||||
const dbOpen = this._dbFactory.open(dbName, schema.version);
|
||||
|
||||
let migrationPutters: Promise<void>[] = [];
|
||||
|
@ -194,6 +195,8 @@ export class IndexedDbProvider extends DbProvider {
|
|||
throw new Error("onupgradeneeded: target is null!");
|
||||
}
|
||||
|
||||
this.logger.log(`Upgrade needed for db: ${dbName}`);
|
||||
|
||||
// Avoid clearing object stores when event.oldVersion returns 0.
|
||||
// oldVersion returns 0 if db doesn't exist yet: https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent/oldVersion
|
||||
if (event.oldVersion) {
|
||||
|
@ -622,11 +625,7 @@ class IndexedDbTransaction implements DbTransaction {
|
|||
private _transToken: TransactionToken,
|
||||
private _schema: DbSchema,
|
||||
private _fakeComplicatedKeys: boolean,
|
||||
<<<<<<< HEAD
|
||||
private logWriter: LogWriter
|
||||
=======
|
||||
private logger: IObjectStoreProviderLogger
|
||||
>>>>>>> d757f1c (renaming logger interface name and moving it to a proper home)
|
||||
) {
|
||||
this._stores = map(this._transToken.storeNames, (storeName) =>
|
||||
this._trans.objectStore(storeName)
|
||||
|
|
Загрузка…
Ссылка в новой задаче