diff --git a/pyreindexer/lib/include/query_wrapper.cc b/pyreindexer/lib/include/query_wrapper.cc index 5d178b3..7c1161a 100644 --- a/pyreindexer/lib/include/query_wrapper.cc +++ b/pyreindexer/lib/include/query_wrapper.cc @@ -184,14 +184,14 @@ void serializeJoinQuery(JoinType type, reindexer::WrSerializer& data, reindexer: } } // namespace -void QueryWrapper::addJoinQueries(const reindexer::h_vector& queries, reindexer::WrSerializer& buffer) +void QueryWrapper::addJoinQueries(const reindexer::h_vector& queries, reindexer::WrSerializer& buffer) const { for (auto query : queries) { serializeJoinQuery(query->joinType_, query->ser_, buffer); } } -reindexer::Error QueryWrapper::prepareQuery(reindexer::Query& query) { +reindexer::Error QueryWrapper::CreateQuery(reindexer::Query& query) { reindexer::Error error = errOK; try { // current query (root) @@ -221,7 +221,7 @@ reindexer::Error QueryWrapper::prepareQuery(reindexer::Query& query) { reindexer::Error QueryWrapper::SelectQuery(QueryResultsWrapper& qr) { reindexer::Query query; - auto err = prepareQuery(query); + auto err = CreateQuery(query); if (!err.ok()) { return err; } @@ -235,7 +235,7 @@ reindexer::Error QueryWrapper::SelectQuery(QueryResultsWrapper& qr) { reindexer::Error QueryWrapper::UpdateQuery(QueryResultsWrapper& qr) { reindexer::Query query; - auto err = prepareQuery(query); + auto err = CreateQuery(query); if (!err.ok()) { return err; } @@ -244,7 +244,7 @@ reindexer::Error QueryWrapper::UpdateQuery(QueryResultsWrapper& qr) { reindexer::Error QueryWrapper::DeleteQuery(size_t& count) { reindexer::Query query; - auto err = prepareQuery(query); + auto err = CreateQuery(query); if (!err.ok()) { return err; } diff --git a/pyreindexer/lib/include/query_wrapper.h b/pyreindexer/lib/include/query_wrapper.h index 920757f..1e0163f 100644 --- a/pyreindexer/lib/include/query_wrapper.h +++ b/pyreindexer/lib/include/query_wrapper.h @@ -74,10 +74,10 @@ class QueryWrapper { void AddEqualPosition(const reindexer::h_vector& equalPositions); DBInterface* GetDB() const { return db_; } + reindexer::Error CreateQuery(reindexer::Query& query); private: - void addJoinQueries(const reindexer::h_vector& queries, reindexer::WrSerializer& buffer) const; - reindexer::Error prepareQuery(reindexer::Query& query); + void addJoinQueries(const reindexer::h_vector& queries, reindexer::WrSerializer& buffer) const; void putKeys(const reindexer::VariantArray& keys); DBInterface* db_{nullptr};