From a16a8f53e657596eece7c3eb7c21da4ffc2a0fe7 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 28 Jun 2020 17:29:16 -0400 Subject: [PATCH] Rename GenericDatabase to Database (#634) --- ext/bg/background.html | 2 +- ext/bg/js/{generic-database.js => database.js} | 2 +- ext/bg/js/dictionary-database.js | 6 +++--- test/test-database.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename ext/bg/js/{generic-database.js => database.js} (99%) diff --git a/ext/bg/background.html b/ext/bg/background.html index 0591032d..a30b55a5 100644 --- a/ext/bg/background.html +++ b/ext/bg/background.html @@ -31,7 +31,7 @@ - + diff --git a/ext/bg/js/generic-database.js b/ext/bg/js/database.js similarity index 99% rename from ext/bg/js/generic-database.js rename to ext/bg/js/database.js index a82ad650..96eaa340 100644 --- a/ext/bg/js/generic-database.js +++ b/ext/bg/js/database.js @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -class GenericDatabase { +class Database { constructor() { this._db = null; this._isOpening = false; diff --git a/ext/bg/js/dictionary-database.js b/ext/bg/js/dictionary-database.js index c48320cd..671be7a8 100644 --- a/ext/bg/js/dictionary-database.js +++ b/ext/bg/js/dictionary-database.js @@ -16,13 +16,13 @@ */ /* global - * GenericDatabase + * Database * dictFieldSplit */ class DictionaryDatabase { constructor() { - this._db = new GenericDatabase(); + this._db = new Database(); this._dbName = 'dict'; this._schemas = new Map(); } @@ -118,7 +118,7 @@ class DictionaryDatabase { if (this._db.isOpen()) { this._db.close(); } - await GenericDatabase.deleteDatabase(this._dbName); + await Database.deleteDatabase(this._dbName); await this.prepare(); } diff --git a/test/test-database.js b/test/test-database.js index 535f2e95..5230ed92 100644 --- a/test/test-database.js +++ b/test/test-database.js @@ -115,7 +115,7 @@ vm.execute([ 'bg/js/media-utility.js', 'bg/js/request.js', 'bg/js/dictionary-importer.js', - 'bg/js/generic-database.js', + 'bg/js/database.js', 'bg/js/dictionary-database.js' ]); const DictionaryImporter = vm.get('DictionaryImporter');