ydb_grpc_bindings/generated/
ydb.scripting.rs

1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct ExecuteYqlRequest {
4    #[prost(message, optional, tag = "1")]
5    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
6    #[prost(string, tag = "2")]
7    pub script: ::prost::alloc::string::String,
8    #[prost(map = "string, message", tag = "3")]
9    pub parameters: ::std::collections::HashMap<
10        ::prost::alloc::string::String,
11        super::TypedValue,
12    >,
13    #[prost(enumeration = "super::table::query_stats_collection::Mode", tag = "4")]
14    pub collect_stats: i32,
15}
16#[allow(clippy::derive_partial_eq_without_eq)]
17#[derive(Clone, PartialEq, ::prost::Message)]
18pub struct ExecuteYqlResponse {
19    #[prost(message, optional, tag = "1")]
20    pub operation: ::core::option::Option<super::operations::Operation>,
21}
22#[allow(clippy::derive_partial_eq_without_eq)]
23#[derive(Clone, PartialEq, ::prost::Message)]
24pub struct ExecuteYqlResult {
25    #[prost(message, repeated, tag = "1")]
26    pub result_sets: ::prost::alloc::vec::Vec<super::ResultSet>,
27    #[prost(message, optional, tag = "2")]
28    pub query_stats: ::core::option::Option<super::table_stats::QueryStats>,
29}
30/// Response for StreamExecuteYql is a stream of ExecuteYqlPartialResponse messages.
31/// These responses can contain ExecuteYqlPartialResult messages with
32/// results (or result parts) for data or scan queries in the script.
33/// YqlScript can have multiple results (result sets).
34/// Each result set has an index (starting at 0).
35#[allow(clippy::derive_partial_eq_without_eq)]
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct ExecuteYqlPartialResponse {
38    #[prost(enumeration = "super::status_ids::StatusCode", tag = "1")]
39    pub status: i32,
40    #[prost(message, repeated, tag = "2")]
41    pub issues: ::prost::alloc::vec::Vec<super::issue::IssueMessage>,
42    #[prost(message, optional, tag = "3")]
43    pub result: ::core::option::Option<ExecuteYqlPartialResult>,
44}
45/// Contains result set (or a result set part) for one data or scan query in the script.
46/// One result set can be split into several responses with same result_index.
47/// Only the final response can contain query stats.
48#[allow(clippy::derive_partial_eq_without_eq)]
49#[derive(Clone, PartialEq, ::prost::Message)]
50pub struct ExecuteYqlPartialResult {
51    /// Index of current result
52    #[prost(uint32, tag = "1")]
53    pub result_set_index: u32,
54    /// Result set (or a result set part) for one data or scan query
55    #[prost(message, optional, tag = "2")]
56    pub result_set: ::core::option::Option<super::ResultSet>,
57    #[prost(message, optional, tag = "3")]
58    pub query_stats: ::core::option::Option<super::table_stats::QueryStats>,
59}
60#[allow(clippy::derive_partial_eq_without_eq)]
61#[derive(Clone, PartialEq, ::prost::Message)]
62pub struct ExplainYqlRequest {
63    #[prost(message, optional, tag = "1")]
64    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
65    #[prost(string, tag = "2")]
66    pub script: ::prost::alloc::string::String,
67    #[prost(enumeration = "explain_yql_request::Mode", tag = "3")]
68    pub mode: i32,
69}
70/// Nested message and enum types in `ExplainYqlRequest`.
71pub mod explain_yql_request {
72    #[derive(
73        Clone,
74        Copy,
75        Debug,
76        PartialEq,
77        Eq,
78        Hash,
79        PartialOrd,
80        Ord,
81        ::prost::Enumeration
82    )]
83    #[repr(i32)]
84    pub enum Mode {
85        Unspecified = 0,
86        /// PARSE = 1;
87        Validate = 2,
88        Plan = 3,
89    }
90    impl Mode {
91        /// String value of the enum field names used in the ProtoBuf definition.
92        ///
93        /// The values are not transformed in any way and thus are considered stable
94        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
95        pub fn as_str_name(&self) -> &'static str {
96            match self {
97                Mode::Unspecified => "MODE_UNSPECIFIED",
98                Mode::Validate => "VALIDATE",
99                Mode::Plan => "PLAN",
100            }
101        }
102        /// Creates an enum from field names used in the ProtoBuf definition.
103        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
104            match value {
105                "MODE_UNSPECIFIED" => Some(Self::Unspecified),
106                "VALIDATE" => Some(Self::Validate),
107                "PLAN" => Some(Self::Plan),
108                _ => None,
109            }
110        }
111    }
112}
113#[allow(clippy::derive_partial_eq_without_eq)]
114#[derive(Clone, PartialEq, ::prost::Message)]
115pub struct ExplainYqlResponse {
116    #[prost(message, optional, tag = "1")]
117    pub operation: ::core::option::Option<super::operations::Operation>,
118}
119#[allow(clippy::derive_partial_eq_without_eq)]
120#[derive(Clone, PartialEq, ::prost::Message)]
121pub struct ExplainYqlResult {
122    #[prost(map = "string, message", tag = "1")]
123    pub parameters_types: ::std::collections::HashMap<
124        ::prost::alloc::string::String,
125        super::Type,
126    >,
127    #[prost(string, tag = "2")]
128    pub plan: ::prost::alloc::string::String,
129}