Добавлена возможность отображения всех книг серии

This commit is contained in:
Book Pauk
2022-10-10 22:03:59 +07:00
parent 09b7c38348
commit 58f2483b97
5 changed files with 113 additions and 54 deletions

View File

@@ -292,7 +292,7 @@ class DbSearcher {
}
}
async getSeriesBookList(seriesId) {
async getSeriesBookList(series) {
if (this.closed)
throw new Error('DbSearcher closed');
@@ -301,10 +301,11 @@ class DbSearcher {
try {
const db = this.db;
//выборка серии по seriesId
series = series.toLowerCase();
//выборка серии по названию серии
const rows = await db.select({
table: 'series',
where: `@@id(${db.esc(seriesId)})`
where: `@@dirtyIndexLR('value', ${db.esc(series)}, ${db.esc(series)})`
});
return {books: (rows.length ? rows[0].books : '')};