aboutsummaryrefslogtreecommitdiffstats
path: root/ydb/core/yq/libs/events/events.h
diff options
context:
space:
mode:
authordinmukhammed <dinmukhammed@yandex-team.ru>2022-02-10 17:56:14 +0300
committerdinmukhammed <dinmukhammed@yandex-team.ru>2022-02-10 17:56:14 +0300
commit4d80d317f1de5ac3f37b2ffa9a59f7ce27ee30fb (patch)
treefb98547446aa605b64924c1e00119088231b5b20 /ydb/core/yq/libs/events/events.h
parentc6af0bf45be29629c5dd6ec5f948f678aadce664 (diff)
downloadydb-4d80d317f1de5ac3f37b2ffa9a59f7ce27ee30fb.tar.gz
YQ-839 Fail query on unresolved database id
Fail query on unresolved ids ref:ae687903e293f90b2406f7a2ec9dc0a75114fc38
Diffstat (limited to 'ydb/core/yq/libs/events/events.h')
-rw-r--r--ydb/core/yq/libs/events/events.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/ydb/core/yq/libs/events/events.h b/ydb/core/yq/libs/events/events.h
index b3c70e5c5f..49405cfba4 100644
--- a/ydb/core/yq/libs/events/events.h
+++ b/ydb/core/yq/libs/events/events.h
@@ -126,19 +126,31 @@ struct TEvents {
{}
};
- struct TEvEndpointResponse : NActors::TEventLocal<TEvEndpointResponse, TEventIds::EvEndpointResponse> {
+ struct TDbResolverResponse {
struct TEndpoint {
TString Endpoint;
TString Database;
bool Secure = false;
};
- THashMap<std::pair<TString, DatabaseType>, TEndpoint> DatabaseId2Endpoint;
- bool Success;
- TEvEndpointResponse(THashMap<std::pair<TString, DatabaseType>, TEndpoint>&& res, bool success)
- : DatabaseId2Endpoint(std::move(res))
+ TDbResolverResponse() = default;
+
+ TDbResolverResponse(
+ THashMap<std::pair<TString, DatabaseType>, TEndpoint>&& databaseId2Endpoint,
+ bool success = false,
+ const NYql::TIssues& issues = {})
+ : DatabaseId2Endpoint(databaseId2Endpoint)
, Success(success)
- { }
+ , Issues(issues) {}
+
+ THashMap<std::pair<TString, DatabaseType>, TEndpoint> DatabaseId2Endpoint;
+ bool Success = false;
+ NYql::TIssues Issues;
+ };
+
+ struct TEvEndpointResponse : NActors::TEventLocal<TEvEndpointResponse, TEventIds::EvEndpointResponse> {
+ TDbResolverResponse DbResolverResponse;
+ explicit TEvEndpointResponse(TDbResolverResponse&& response) noexcept : DbResolverResponse(std::move(response)) {}
};
struct TDatabaseAuth {