Rename GenericDatabase to Database (#634)

This commit is contained in:
toasted-nutbread 2020-06-28 17:29:16 -04:00 committed by GitHub
parent 441c23bf3b
commit a16a8f53e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -31,7 +31,7 @@
<script src="/bg/js/audio-uri-builder.js"></script> <script src="/bg/js/audio-uri-builder.js"></script>
<script src="/bg/js/clipboard-monitor.js"></script> <script src="/bg/js/clipboard-monitor.js"></script>
<script src="/bg/js/conditions.js"></script> <script src="/bg/js/conditions.js"></script>
<script src="/bg/js/generic-database.js"></script> <script src="/bg/js/database.js"></script>
<script src="/bg/js/dictionary-database.js"></script> <script src="/bg/js/dictionary-database.js"></script>
<script src="/bg/js/dictionary-importer.js"></script> <script src="/bg/js/dictionary-importer.js"></script>
<script src="/bg/js/deinflector.js"></script> <script src="/bg/js/deinflector.js"></script>

View File

@ -15,7 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
class GenericDatabase { class Database {
constructor() { constructor() {
this._db = null; this._db = null;
this._isOpening = false; this._isOpening = false;

View File

@ -16,13 +16,13 @@
*/ */
/* global /* global
* GenericDatabase * Database
* dictFieldSplit * dictFieldSplit
*/ */
class DictionaryDatabase { class DictionaryDatabase {
constructor() { constructor() {
this._db = new GenericDatabase(); this._db = new Database();
this._dbName = 'dict'; this._dbName = 'dict';
this._schemas = new Map(); this._schemas = new Map();
} }
@ -118,7 +118,7 @@ class DictionaryDatabase {
if (this._db.isOpen()) { if (this._db.isOpen()) {
this._db.close(); this._db.close();
} }
await GenericDatabase.deleteDatabase(this._dbName); await Database.deleteDatabase(this._dbName);
await this.prepare(); await this.prepare();
} }

View File

@ -115,7 +115,7 @@ vm.execute([
'bg/js/media-utility.js', 'bg/js/media-utility.js',
'bg/js/request.js', 'bg/js/request.js',
'bg/js/dictionary-importer.js', 'bg/js/dictionary-importer.js',
'bg/js/generic-database.js', 'bg/js/database.js',
'bg/js/dictionary-database.js' 'bg/js/dictionary-database.js'
]); ]);
const DictionaryImporter = vm.get('DictionaryImporter'); const DictionaryImporter = vm.get('DictionaryImporter');