refactor: tidy query APIs and execution (#431)

This commit is contained in:
Qinren Zhou
2026-06-01 21:07:35 +08:00
committed by GitHub
parent 02bfb31cf5
commit 8e8bb81db0
17 changed files with 260 additions and 152 deletions
+6 -5
View File
@@ -15,6 +15,7 @@
#pragma once
#include <zvec/db/query.h>
#include <zvec/db/status.h>
#include "db/sqlengine/common/group_by.h"
#include "db/sqlengine/parser/node.h"
#include "db/sqlengine/parser/sql_info.h"
@@ -23,11 +24,11 @@ namespace zvec::sqlengine {
class SQLInfoHelper {
public:
//! Perform QueryRequest to sql info conversion:
static bool MessageToSQLInfo(const SearchQuery *query, Node::Ptr filter_node,
std::shared_ptr<GroupBy> group_by,
sqlengine::SQLInfo::Ptr *sql_info,
std::string *err_msg);
//! Build SQLInfo from SearchQuery. Takes query by value so callers may copy
//! or move it; vector payloads can be moved while building SQLInfo.
static Result<sqlengine::SQLInfo::Ptr> BuildSQLInfoFromSearchQuery(
SearchQuery query, Node::Ptr filter_node,
std::shared_ptr<GroupBy> group_by);
};
} // namespace zvec::sqlengine