Работа над проектом

This commit is contained in:
Book Pauk
2022-08-20 02:16:27 +07:00
parent d9a03a7e0d
commit 40d6b9c807
4 changed files with 316 additions and 83 deletions

View File

@@ -240,12 +240,13 @@ class DbSearcher {
const totalFound = authorIds.length;
const limit = (query.limit ? query.limit : 1000);
const offset = (query.offset ? query.offset : 0);
//выборка найденных авторов
let result = await db.select({
table: 'author',
map: `(r) => ({id: r.id, author: r.author})`,
where: `@@id(${db.esc(authorIds.slice(0, limit))})`
where: `@@id(${db.esc(authorIds.slice(offset, offset + limit))})`
});
return {result, totalFound};