store/query: access query only through store
Make Mu::Query only accessible through store, so we can lock the db for the duration of a (full, multipass) query.
This commit is contained in:
@ -30,26 +30,7 @@
|
||||
namespace Mu {
|
||||
|
||||
class Query {
|
||||
public:
|
||||
/**
|
||||
* Construct a new Query instance.
|
||||
*
|
||||
* @param store a MuStore object
|
||||
*/
|
||||
Query(const Store& store);
|
||||
/**
|
||||
* DTOR
|
||||
*
|
||||
*/
|
||||
~Query();
|
||||
|
||||
/**
|
||||
* Move CTOR
|
||||
*
|
||||
* @param other
|
||||
*/
|
||||
Query(Query&& other);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Run a query on the store
|
||||
*
|
||||
@ -87,7 +68,28 @@ class Query {
|
||||
*/
|
||||
std::string parse(const std::string& expr, bool xapian) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
friend class Store;
|
||||
|
||||
/**
|
||||
* Construct a new Query instance.
|
||||
*
|
||||
* @param store a MuStore object
|
||||
*/
|
||||
Query(const Store& store);
|
||||
/**
|
||||
* DTOR
|
||||
*
|
||||
*/
|
||||
~Query();
|
||||
|
||||
/**
|
||||
* Move CTOR
|
||||
*
|
||||
* @param other
|
||||
*/
|
||||
Query(Query&& other);
|
||||
|
||||
struct Private;
|
||||
std::unique_ptr<Private> priv_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user