Library::filter() works in two stages

1. Get the subset of books matching the q (title/description) parameter
   of the search

2. Filter out books not matching the other parameters of the search.

Stage 1. currently works in the old way, but will be replaced by Xapian
based search in subsequent commits.
This commit is contained in:
Veloman Yunkan
2021-03-06 20:03:41 +04:00
committed by Matthieu Gautier
parent f7c867f8a7
commit a20f9e2ce1
2 changed files with 28 additions and 3 deletions

View File

@ -105,7 +105,11 @@ class Filter {
Filter& query(std::string query);
Filter& name(std::string name);
bool hasQuery() const;
bool accept(const Book& book) const;
bool acceptByQueryOnly(const Book& book) const;
bool acceptByNonQueryCriteria(const Book& book) const;
};