Skip to content

Commit

Permalink
Review changes. Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander.A,Utkin committed Dec 9, 2024
1 parent 1325842 commit 1e4a49f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions pyreindexer/lib/include/query_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ void serializeJoinQuery(JoinType type, reindexer::WrSerializer& data, reindexer:
}
} // namespace

void QueryWrapper::addJoinQueries(const reindexer::h_vector<QueryWrapper*, 2>& queries, reindexer::WrSerializer& buffer)
void QueryWrapper::addJoinQueries(const reindexer::h_vector<QueryWrapper*, 1>& 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)
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions pyreindexer/lib/include/query_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ class QueryWrapper {
void AddEqualPosition(const reindexer::h_vector<std::string, 2>& equalPositions);

DBInterface* GetDB() const { return db_; }
reindexer::Error CreateQuery(reindexer::Query& query);

private:
void addJoinQueries(const reindexer::h_vector<QueryWrapper*, 2>& queries, reindexer::WrSerializer& buffer) const;
reindexer::Error prepareQuery(reindexer::Query& query);
void addJoinQueries(const reindexer::h_vector<QueryWrapper*, 1>& queries, reindexer::WrSerializer& buffer) const;
void putKeys(const reindexer::VariantArray& keys);

DBInterface* db_{nullptr};
Expand Down

0 comments on commit 1e4a49f

Please sign in to comment.