Работа над расширенным поиском

This commit is contained in:
Book Pauk
2022-12-06 21:03:46 +07:00
parent 5faa6a1e8f
commit 0c07f638f9
6 changed files with 328 additions and 36 deletions

View File

@@ -571,6 +571,8 @@ class DbSearcher {
checks.push(filterBySearch(f.field, searchValue));
} if (f.type === 'N') {
searchValue = parseInt(searchValue, 10);
if (isNaN(searchValue))
throw new Error(`Wrong query param, ${f.field}=${searchValue}`);
checks.push(`row.${f.field} === ${searchValue}`);
}
}