Remove unused database functions
This commit is contained in:
parent
97de7883a3
commit
6f5fa6771b
@ -90,19 +90,6 @@ class Database {
|
|||||||
return results;
|
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) {
|
async findTermsExactBulk(termList, readingList, titles) {
|
||||||
this.validate();
|
this.validate();
|
||||||
|
|
||||||
@ -129,19 +116,6 @@ class Database {
|
|||||||
return results;
|
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) {
|
async findTermsBySequenceBulk(sequenceList, mainDictionary) {
|
||||||
this.validate();
|
this.validate();
|
||||||
|
|
||||||
@ -172,36 +146,10 @@ class Database {
|
|||||||
return this.findGenericBulk('termMeta', 'expression', termList, titles, Database.createMeta);
|
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) {
|
async findKanjiBulk(kanjiList, titles) {
|
||||||
return this.findGenericBulk('kanji', 'character', kanjiList, titles, Database.createKanji);
|
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) {
|
async findKanjiMetaBulk(kanjiList, titles) {
|
||||||
return this.findGenericBulk('kanjiMeta', 'character', kanjiList, titles, Database.createMeta);
|
return this.findGenericBulk('kanjiMeta', 'character', kanjiList, titles, Database.createMeta);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user