From 6f5fa6771bac24bb56c137fea6d7387d507aaf39 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 19 Oct 2019 12:44:23 -0400 Subject: Remove unused database functions --- ext/bg/js/database.js | 52 --------------------------------------------------- 1 file changed, 52 deletions(-) (limited to 'ext/bg/js') diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js index 37f19359..c4d332bf 100644 --- a/ext/bg/js/database.js +++ b/ext/bg/js/database.js @@ -90,19 +90,6 @@ class Database { return results; } - async findTermsExact(term, reading, titles) { - this.validate(); - - const results = []; - await this.db.terms.where('expression').equals(term).each(row => { - if (row.reading === reading && titles.includes(row.dictionary)) { - results.push(Database.createTerm(row)); - } - }); - - return results; - } - async findTermsExactBulk(termList, readingList, titles) { this.validate(); @@ -129,19 +116,6 @@ class Database { return results; } - async findTermsBySequence(sequence, mainDictionary) { - this.validate(); - - const results = []; - await this.db.terms.where('sequence').equals(sequence).each(row => { - if (row.dictionary === mainDictionary) { - results.push(Database.createTerm(row)); - } - }); - - return results; - } - async findTermsBySequenceBulk(sequenceList, mainDictionary) { this.validate(); @@ -172,36 +146,10 @@ class Database { return this.findGenericBulk('termMeta', 'expression', termList, titles, Database.createMeta); } - async findKanji(kanji, titles) { - this.validate(); - - const results = []; - await this.db.kanji.where('character').equals(kanji).each(row => { - if (titles.includes(row.dictionary)) { - results.push(Database.createKanji(row)); - } - }); - - return results; - } - async findKanjiBulk(kanjiList, titles) { return this.findGenericBulk('kanji', 'character', kanjiList, titles, Database.createKanji); } - async findKanjiMeta(kanji, titles) { - this.validate(); - - const results = []; - await this.db.kanjiMeta.where('character').equals(kanji).each(row => { - if (titles.includes(row.dictionary)) { - results.push(Database.createMeta(row)); - } - }); - - return results; - } - async findKanjiMetaBulk(kanjiList, titles) { return this.findGenericBulk('kanjiMeta', 'character', kanjiList, titles, Database.createMeta); } -- cgit v1.2.3