Fix findTermMetaBulk and findKanjiMetaBulk not returning expression/character
This commit is contained in:
parent
d7ce829107
commit
00bbcff8a2
@ -225,7 +225,7 @@ class Database {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async findTermMetaBulk(termList, titles) {
|
async findTermMetaBulk(termList, titles) {
|
||||||
return this.findGenericBulk('termMeta', 'expression', termList, titles, Database.createMeta);
|
return this.findGenericBulk('termMeta', 'expression', termList, titles, Database.createTermMeta);
|
||||||
}
|
}
|
||||||
|
|
||||||
async findKanjiBulk(kanjiList, titles) {
|
async findKanjiBulk(kanjiList, titles) {
|
||||||
@ -233,7 +233,7 @@ class Database {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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.createKanjiMeta);
|
||||||
}
|
}
|
||||||
|
|
||||||
async findGenericBulk(tableName, indexName, indexValueList, titles, createResult) {
|
async findGenericBulk(tableName, indexName, indexValueList, titles, createResult) {
|
||||||
@ -632,13 +632,12 @@ class Database {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static createMeta(row, index) {
|
static createTermMeta({expression, mode, data, dictionary}, index) {
|
||||||
return {
|
return {expression, mode, data, dictionary, index};
|
||||||
index,
|
}
|
||||||
mode: row.mode,
|
|
||||||
data: row.data,
|
static createKanjiMeta({character, mode, data, dictionary}, index) {
|
||||||
dictionary: row.dictionary
|
return {character, mode, data, dictionary, index};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static getAll(dbIndex, query, context, processRow) {
|
static getAll(dbIndex, query, context, processRow) {
|
||||||
|
Loading…
Reference in New Issue
Block a user