vitess_grpc/generated/
query.rs

1/// Target describes what the client expects the tablet is.
2/// If the tablet does not match, an error is returned.
3#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Target {
6    #[prost(string, tag = "1")]
7    pub keyspace: ::prost::alloc::string::String,
8    #[prost(string, tag = "2")]
9    pub shard: ::prost::alloc::string::String,
10    #[prost(enumeration = "super::topodata::TabletType", tag = "3")]
11    pub tablet_type: i32,
12    /// cell is used for routing queries between vtgate and vttablets. It
13    /// is not used when Target is part of the Session sent by the client.
14    #[prost(string, tag = "4")]
15    pub cell: ::prost::alloc::string::String,
16}
17/// VTGateCallerID is sent by VTGate to VTTablet to describe the
18/// caller. If possible, this information is secure. For instance,
19/// if using unique certificates that guarantee that VTGate->VTTablet
20/// traffic cannot be spoofed, then VTTablet can trust this information,
21/// and VTTablet will use it for tablet ACLs, for instance.
22/// Because of this security guarantee, this is different than the CallerID
23/// structure, which is not secure at all, because it is provided
24/// by the Vitess client.
25#[allow(clippy::derive_partial_eq_without_eq)]
26#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct VtGateCallerId {
28    #[prost(string, tag = "1")]
29    pub username: ::prost::alloc::string::String,
30    #[prost(string, repeated, tag = "2")]
31    pub groups: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
32}
33/// EventToken is a structure that describes a point in time in a
34/// replication stream on one shard. The most recent known replication
35/// position can be retrieved from vttablet when executing a query. It
36/// is also sent with the replication streams from the binlog service.
37#[allow(clippy::derive_partial_eq_without_eq)]
38#[derive(Clone, PartialEq, ::prost::Message)]
39pub struct EventToken {
40    /// timestamp is the MySQL timestamp of the statements. Seconds since Epoch.
41    #[prost(int64, tag = "1")]
42    pub timestamp: i64,
43    /// The shard name that applied the statements. Note this is not set when
44    /// streaming from a vttablet. It is only used on the client -> vtgate link.
45    #[prost(string, tag = "2")]
46    pub shard: ::prost::alloc::string::String,
47    /// The position on the replication stream after this statement was applied.
48    /// It is not the transaction ID / GTID, but the position / GTIDSet.
49    #[prost(string, tag = "3")]
50    pub position: ::prost::alloc::string::String,
51}
52/// Value represents a typed value.
53#[allow(clippy::derive_partial_eq_without_eq)]
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct Value {
56    #[prost(enumeration = "Type", tag = "1")]
57    pub r#type: i32,
58    #[prost(bytes = "vec", tag = "2")]
59    pub value: ::prost::alloc::vec::Vec<u8>,
60}
61/// BindVariable represents a single bind variable in a Query.
62#[allow(clippy::derive_partial_eq_without_eq)]
63#[derive(Clone, PartialEq, ::prost::Message)]
64pub struct BindVariable {
65    #[prost(enumeration = "Type", tag = "1")]
66    pub r#type: i32,
67    #[prost(bytes = "vec", tag = "2")]
68    pub value: ::prost::alloc::vec::Vec<u8>,
69    /// values are set if type is TUPLE.
70    #[prost(message, repeated, tag = "3")]
71    pub values: ::prost::alloc::vec::Vec<Value>,
72}
73/// BoundQuery is a query with its bind variables
74#[allow(clippy::derive_partial_eq_without_eq)]
75#[derive(Clone, PartialEq, ::prost::Message)]
76pub struct BoundQuery {
77    /// sql is the SQL query to execute
78    #[prost(string, tag = "1")]
79    pub sql: ::prost::alloc::string::String,
80    /// bind_variables is a map of all bind variables to expand in the query.
81    /// nil values are not allowed. Use NULL_TYPE to express a NULL value.
82    #[prost(map = "string, message", tag = "2")]
83    pub bind_variables: ::std::collections::HashMap<
84        ::prost::alloc::string::String,
85        BindVariable,
86    >,
87}
88/// ExecuteOptions is passed around for all Execute calls.
89#[allow(clippy::derive_partial_eq_without_eq)]
90#[derive(Clone, PartialEq, ::prost::Message)]
91pub struct ExecuteOptions {
92    /// Controls what fields are returned in Field message responses from mysql, i.e.
93    /// field name, table name, etc. This is an optimization for high-QPS queries where
94    /// the client knows what it's getting
95    #[prost(enumeration = "execute_options::IncludedFields", tag = "4")]
96    pub included_fields: i32,
97    /// client_rows_found specifies if rows_affected should return
98    /// rows found instead of rows affected. Behavior is defined
99    /// by MySQL's CLIENT_FOUND_ROWS flag.
100    #[prost(bool, tag = "5")]
101    pub client_found_rows: bool,
102    /// workload specifies the type of workload:
103    /// OLTP: DMLs allowed, results have row count limit, and
104    /// query timeouts are shorter.
105    /// OLAP: DMLS not allowed, no limit on row count, timeouts
106    /// can be as high as desired.
107    /// DBA: no limit on rowcount or timeout, all queries allowed
108    /// but intended for long DMLs and DDLs.
109    #[prost(enumeration = "execute_options::Workload", tag = "6")]
110    pub workload: i32,
111    /// sql_select_limit sets an implicit limit on all select statements. Since
112    /// vitess also sets a rowcount limit on queries, the smallest value wins.
113    #[prost(int64, tag = "8")]
114    pub sql_select_limit: i64,
115    #[prost(enumeration = "execute_options::TransactionIsolation", tag = "9")]
116    pub transaction_isolation: i32,
117    /// skip_query_plan_cache specifies if the query plan should be cached by vitess.
118    /// By default all query plans are cached.
119    #[prost(bool, tag = "10")]
120    pub skip_query_plan_cache: bool,
121    /// PlannerVersion specifies which planner to use.
122    /// If DEFAULT is chosen, whatever vtgate was started with will be used
123    #[prost(enumeration = "execute_options::PlannerVersion", tag = "11")]
124    pub planner_version: i32,
125    /// has_created_temp_tables signals whether plans created in this session should be cached or not
126    /// if the user has created temp tables, Vitess will not reuse plans created for this session in other sessions.
127    /// The current session can still use other sessions cached plans.
128    #[prost(bool, tag = "12")]
129    pub has_created_temp_tables: bool,
130    #[prost(enumeration = "execute_options::Consolidator", tag = "13")]
131    pub consolidator: i32,
132    /// TransactionAccessMode specifies the access modes to be used while starting the transaction i.e. READ WRITE/READ ONLY/WITH CONSISTENT SNAPSHOT
133    /// If not specified, the transaction will be started with the default access mode on the connection.
134    #[prost(
135        enumeration = "execute_options::TransactionAccessMode",
136        repeated,
137        tag = "14"
138    )]
139    pub transaction_access_mode: ::prost::alloc::vec::Vec<i32>,
140    /// WorkloadName specifies the name of the workload as indicated in query directives. This is used for instrumentation
141    /// in metrics and tracing spans.
142    #[prost(string, tag = "15")]
143    pub workload_name: ::prost::alloc::string::String,
144    /// priority specifies the priority of the query, between 0 and 100. This is leveraged by the transaction
145    /// throttler to determine whether, under resource contention, a query should or should not be throttled.
146    #[prost(string, tag = "16")]
147    pub priority: ::prost::alloc::string::String,
148}
149/// Nested message and enum types in `ExecuteOptions`.
150pub mod execute_options {
151    #[derive(
152        Clone,
153        Copy,
154        Debug,
155        PartialEq,
156        Eq,
157        Hash,
158        PartialOrd,
159        Ord,
160        ::prost::Enumeration
161    )]
162    #[repr(i32)]
163    pub enum IncludedFields {
164        TypeAndName = 0,
165        TypeOnly = 1,
166        All = 2,
167    }
168    impl IncludedFields {
169        /// String value of the enum field names used in the ProtoBuf definition.
170        ///
171        /// The values are not transformed in any way and thus are considered stable
172        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
173        pub fn as_str_name(&self) -> &'static str {
174            match self {
175                IncludedFields::TypeAndName => "TYPE_AND_NAME",
176                IncludedFields::TypeOnly => "TYPE_ONLY",
177                IncludedFields::All => "ALL",
178            }
179        }
180        /// Creates an enum from field names used in the ProtoBuf definition.
181        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
182            match value {
183                "TYPE_AND_NAME" => Some(Self::TypeAndName),
184                "TYPE_ONLY" => Some(Self::TypeOnly),
185                "ALL" => Some(Self::All),
186                _ => None,
187            }
188        }
189    }
190    #[derive(
191        Clone,
192        Copy,
193        Debug,
194        PartialEq,
195        Eq,
196        Hash,
197        PartialOrd,
198        Ord,
199        ::prost::Enumeration
200    )]
201    #[repr(i32)]
202    pub enum Workload {
203        Unspecified = 0,
204        Oltp = 1,
205        Olap = 2,
206        Dba = 3,
207    }
208    impl Workload {
209        /// String value of the enum field names used in the ProtoBuf definition.
210        ///
211        /// The values are not transformed in any way and thus are considered stable
212        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
213        pub fn as_str_name(&self) -> &'static str {
214            match self {
215                Workload::Unspecified => "UNSPECIFIED",
216                Workload::Oltp => "OLTP",
217                Workload::Olap => "OLAP",
218                Workload::Dba => "DBA",
219            }
220        }
221        /// Creates an enum from field names used in the ProtoBuf definition.
222        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
223            match value {
224                "UNSPECIFIED" => Some(Self::Unspecified),
225                "OLTP" => Some(Self::Oltp),
226                "OLAP" => Some(Self::Olap),
227                "DBA" => Some(Self::Dba),
228                _ => None,
229            }
230        }
231    }
232    #[derive(
233        Clone,
234        Copy,
235        Debug,
236        PartialEq,
237        Eq,
238        Hash,
239        PartialOrd,
240        Ord,
241        ::prost::Enumeration
242    )]
243    #[repr(i32)]
244    pub enum TransactionIsolation {
245        Default = 0,
246        RepeatableRead = 1,
247        ReadCommitted = 2,
248        ReadUncommitted = 3,
249        Serializable = 4,
250        /// This is not an "official" transaction level but it will do a
251        /// START TRANSACTION WITH CONSISTENT SNAPSHOT, READ ONLY
252        ConsistentSnapshotReadOnly = 5,
253        /// This not an "official" transaction level, it will send queries to mysql
254        /// without wrapping them in a transaction
255        Autocommit = 6,
256    }
257    impl TransactionIsolation {
258        /// String value of the enum field names used in the ProtoBuf definition.
259        ///
260        /// The values are not transformed in any way and thus are considered stable
261        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
262        pub fn as_str_name(&self) -> &'static str {
263            match self {
264                TransactionIsolation::Default => "DEFAULT",
265                TransactionIsolation::RepeatableRead => "REPEATABLE_READ",
266                TransactionIsolation::ReadCommitted => "READ_COMMITTED",
267                TransactionIsolation::ReadUncommitted => "READ_UNCOMMITTED",
268                TransactionIsolation::Serializable => "SERIALIZABLE",
269                TransactionIsolation::ConsistentSnapshotReadOnly => {
270                    "CONSISTENT_SNAPSHOT_READ_ONLY"
271                }
272                TransactionIsolation::Autocommit => "AUTOCOMMIT",
273            }
274        }
275        /// Creates an enum from field names used in the ProtoBuf definition.
276        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
277            match value {
278                "DEFAULT" => Some(Self::Default),
279                "REPEATABLE_READ" => Some(Self::RepeatableRead),
280                "READ_COMMITTED" => Some(Self::ReadCommitted),
281                "READ_UNCOMMITTED" => Some(Self::ReadUncommitted),
282                "SERIALIZABLE" => Some(Self::Serializable),
283                "CONSISTENT_SNAPSHOT_READ_ONLY" => Some(Self::ConsistentSnapshotReadOnly),
284                "AUTOCOMMIT" => Some(Self::Autocommit),
285                _ => None,
286            }
287        }
288    }
289    #[derive(
290        Clone,
291        Copy,
292        Debug,
293        PartialEq,
294        Eq,
295        Hash,
296        PartialOrd,
297        Ord,
298        ::prost::Enumeration
299    )]
300    #[repr(i32)]
301    pub enum PlannerVersion {
302        DefaultPlanner = 0,
303        V3 = 1,
304        Gen4 = 2,
305        Gen4Greedy = 3,
306        Gen4Left2Right = 4,
307        Gen4WithFallback = 5,
308        Gen4CompareV3 = 6,
309        V3Insert = 7,
310    }
311    impl PlannerVersion {
312        /// String value of the enum field names used in the ProtoBuf definition.
313        ///
314        /// The values are not transformed in any way and thus are considered stable
315        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
316        pub fn as_str_name(&self) -> &'static str {
317            match self {
318                PlannerVersion::DefaultPlanner => "DEFAULT_PLANNER",
319                PlannerVersion::V3 => "V3",
320                PlannerVersion::Gen4 => "Gen4",
321                PlannerVersion::Gen4Greedy => "Gen4Greedy",
322                PlannerVersion::Gen4Left2Right => "Gen4Left2Right",
323                PlannerVersion::Gen4WithFallback => "Gen4WithFallback",
324                PlannerVersion::Gen4CompareV3 => "Gen4CompareV3",
325                PlannerVersion::V3Insert => "V3Insert",
326            }
327        }
328        /// Creates an enum from field names used in the ProtoBuf definition.
329        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
330            match value {
331                "DEFAULT_PLANNER" => Some(Self::DefaultPlanner),
332                "V3" => Some(Self::V3),
333                "Gen4" => Some(Self::Gen4),
334                "Gen4Greedy" => Some(Self::Gen4Greedy),
335                "Gen4Left2Right" => Some(Self::Gen4Left2Right),
336                "Gen4WithFallback" => Some(Self::Gen4WithFallback),
337                "Gen4CompareV3" => Some(Self::Gen4CompareV3),
338                "V3Insert" => Some(Self::V3Insert),
339                _ => None,
340            }
341        }
342    }
343    #[derive(
344        Clone,
345        Copy,
346        Debug,
347        PartialEq,
348        Eq,
349        Hash,
350        PartialOrd,
351        Ord,
352        ::prost::Enumeration
353    )]
354    #[repr(i32)]
355    pub enum Consolidator {
356        Unspecified = 0,
357        Disabled = 1,
358        Enabled = 2,
359        EnabledReplicas = 3,
360    }
361    impl Consolidator {
362        /// String value of the enum field names used in the ProtoBuf definition.
363        ///
364        /// The values are not transformed in any way and thus are considered stable
365        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
366        pub fn as_str_name(&self) -> &'static str {
367            match self {
368                Consolidator::Unspecified => "CONSOLIDATOR_UNSPECIFIED",
369                Consolidator::Disabled => "CONSOLIDATOR_DISABLED",
370                Consolidator::Enabled => "CONSOLIDATOR_ENABLED",
371                Consolidator::EnabledReplicas => "CONSOLIDATOR_ENABLED_REPLICAS",
372            }
373        }
374        /// Creates an enum from field names used in the ProtoBuf definition.
375        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
376            match value {
377                "CONSOLIDATOR_UNSPECIFIED" => Some(Self::Unspecified),
378                "CONSOLIDATOR_DISABLED" => Some(Self::Disabled),
379                "CONSOLIDATOR_ENABLED" => Some(Self::Enabled),
380                "CONSOLIDATOR_ENABLED_REPLICAS" => Some(Self::EnabledReplicas),
381                _ => None,
382            }
383        }
384    }
385    #[derive(
386        Clone,
387        Copy,
388        Debug,
389        PartialEq,
390        Eq,
391        Hash,
392        PartialOrd,
393        Ord,
394        ::prost::Enumeration
395    )]
396    #[repr(i32)]
397    pub enum TransactionAccessMode {
398        ConsistentSnapshot = 0,
399        ReadWrite = 1,
400        ReadOnly = 2,
401    }
402    impl TransactionAccessMode {
403        /// String value of the enum field names used in the ProtoBuf definition.
404        ///
405        /// The values are not transformed in any way and thus are considered stable
406        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
407        pub fn as_str_name(&self) -> &'static str {
408            match self {
409                TransactionAccessMode::ConsistentSnapshot => "CONSISTENT_SNAPSHOT",
410                TransactionAccessMode::ReadWrite => "READ_WRITE",
411                TransactionAccessMode::ReadOnly => "READ_ONLY",
412            }
413        }
414        /// Creates an enum from field names used in the ProtoBuf definition.
415        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
416            match value {
417                "CONSISTENT_SNAPSHOT" => Some(Self::ConsistentSnapshot),
418                "READ_WRITE" => Some(Self::ReadWrite),
419                "READ_ONLY" => Some(Self::ReadOnly),
420                _ => None,
421            }
422        }
423    }
424}
425/// Field describes a single column returned by a query
426#[allow(clippy::derive_partial_eq_without_eq)]
427#[derive(Clone, PartialEq, ::prost::Message)]
428pub struct Field {
429    /// name of the field as returned by mysql C API
430    #[prost(string, tag = "1")]
431    pub name: ::prost::alloc::string::String,
432    /// vitess-defined type. Conversion function is in sqltypes package.
433    #[prost(enumeration = "Type", tag = "2")]
434    pub r#type: i32,
435    /// Remaining fields from mysql C API.
436    /// These fields are only populated when ExecuteOptions.included_fields
437    /// is set to IncludedFields.ALL.
438    #[prost(string, tag = "3")]
439    pub table: ::prost::alloc::string::String,
440    #[prost(string, tag = "4")]
441    pub org_table: ::prost::alloc::string::String,
442    #[prost(string, tag = "5")]
443    pub database: ::prost::alloc::string::String,
444    #[prost(string, tag = "6")]
445    pub org_name: ::prost::alloc::string::String,
446    /// column_length is really a uint32. All 32 bits can be used.
447    #[prost(uint32, tag = "7")]
448    pub column_length: u32,
449    /// charset is actually a uint16. Only the lower 16 bits are used.
450    #[prost(uint32, tag = "8")]
451    pub charset: u32,
452    /// decimals is actually a uint8. Only the lower 8 bits are used.
453    #[prost(uint32, tag = "9")]
454    pub decimals: u32,
455    /// flags is actually a uint16. Only the lower 16 bits are used.
456    #[prost(uint32, tag = "10")]
457    pub flags: u32,
458    /// column_type is optionally populated from information_schema.columns
459    #[prost(string, tag = "11")]
460    pub column_type: ::prost::alloc::string::String,
461}
462/// Row is a database row.
463#[allow(clippy::derive_partial_eq_without_eq)]
464#[derive(Clone, PartialEq, ::prost::Message)]
465pub struct Row {
466    /// lengths contains the length of each value in values.
467    /// A length of -1 means that the field is NULL. While
468    /// reading values, you have to accummulate the length
469    /// to know the offset where the next value begins in values.
470    #[prost(sint64, repeated, tag = "1")]
471    pub lengths: ::prost::alloc::vec::Vec<i64>,
472    /// values contains a concatenation of all values in the row.
473    #[prost(bytes = "vec", tag = "2")]
474    pub values: ::prost::alloc::vec::Vec<u8>,
475}
476/// QueryResult is returned by Execute and ExecuteStream.
477///
478/// As returned by Execute, len(fields) is always equal to len(row)
479/// (for each row in rows).
480///
481/// As returned by StreamExecute, the first QueryResult has the fields
482/// set, and subsequent QueryResult have rows set. And as Execute,
483/// len(QueryResult\[0\].fields) is always equal to len(row) (for each
484/// row in rows for each QueryResult in QueryResult\[1:\]).
485#[allow(clippy::derive_partial_eq_without_eq)]
486#[derive(Clone, PartialEq, ::prost::Message)]
487pub struct QueryResult {
488    #[prost(message, repeated, tag = "1")]
489    pub fields: ::prost::alloc::vec::Vec<Field>,
490    #[prost(uint64, tag = "2")]
491    pub rows_affected: u64,
492    #[prost(uint64, tag = "3")]
493    pub insert_id: u64,
494    #[prost(message, repeated, tag = "4")]
495    pub rows: ::prost::alloc::vec::Vec<Row>,
496    #[prost(string, tag = "6")]
497    pub info: ::prost::alloc::string::String,
498    #[prost(string, tag = "7")]
499    pub session_state_changes: ::prost::alloc::string::String,
500}
501/// QueryWarning is used to convey out of band query execution warnings
502/// by storing in the vtgate.Session
503#[allow(clippy::derive_partial_eq_without_eq)]
504#[derive(Clone, PartialEq, ::prost::Message)]
505pub struct QueryWarning {
506    #[prost(uint32, tag = "1")]
507    pub code: u32,
508    #[prost(string, tag = "2")]
509    pub message: ::prost::alloc::string::String,
510}
511/// StreamEvent describes a set of transformations that happened as a
512/// single transactional unit on a server. It is streamed back by the
513/// Update Stream calls.
514#[allow(clippy::derive_partial_eq_without_eq)]
515#[derive(Clone, PartialEq, ::prost::Message)]
516pub struct StreamEvent {
517    /// The statements in this transaction.
518    #[prost(message, repeated, tag = "1")]
519    pub statements: ::prost::alloc::vec::Vec<stream_event::Statement>,
520    /// The Event Token for this event.
521    #[prost(message, optional, tag = "2")]
522    pub event_token: ::core::option::Option<EventToken>,
523}
524/// Nested message and enum types in `StreamEvent`.
525pub mod stream_event {
526    /// One individual Statement in a transaction.
527    #[allow(clippy::derive_partial_eq_without_eq)]
528    #[derive(Clone, PartialEq, ::prost::Message)]
529    pub struct Statement {
530        #[prost(enumeration = "statement::Category", tag = "1")]
531        pub category: i32,
532        /// table_name, primary_key_fields and primary_key_values are set for DML.
533        #[prost(string, tag = "2")]
534        pub table_name: ::prost::alloc::string::String,
535        #[prost(message, repeated, tag = "3")]
536        pub primary_key_fields: ::prost::alloc::vec::Vec<super::Field>,
537        #[prost(message, repeated, tag = "4")]
538        pub primary_key_values: ::prost::alloc::vec::Vec<super::Row>,
539        /// sql is set for all queries.
540        /// FIXME(alainjobart) we may not need it for DMLs.
541        #[prost(bytes = "vec", tag = "5")]
542        pub sql: ::prost::alloc::vec::Vec<u8>,
543    }
544    /// Nested message and enum types in `Statement`.
545    pub mod statement {
546        /// The category of one statement.
547        #[derive(
548            Clone,
549            Copy,
550            Debug,
551            PartialEq,
552            Eq,
553            Hash,
554            PartialOrd,
555            Ord,
556            ::prost::Enumeration
557        )]
558        #[repr(i32)]
559        pub enum Category {
560            Error = 0,
561            Dml = 1,
562            Ddl = 2,
563        }
564        impl Category {
565            /// String value of the enum field names used in the ProtoBuf definition.
566            ///
567            /// The values are not transformed in any way and thus are considered stable
568            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
569            pub fn as_str_name(&self) -> &'static str {
570                match self {
571                    Category::Error => "Error",
572                    Category::Dml => "DML",
573                    Category::Ddl => "DDL",
574                }
575            }
576            /// Creates an enum from field names used in the ProtoBuf definition.
577            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
578                match value {
579                    "Error" => Some(Self::Error),
580                    "DML" => Some(Self::Dml),
581                    "DDL" => Some(Self::Ddl),
582                    _ => None,
583                }
584            }
585        }
586    }
587}
588/// ExecuteRequest is the payload to Execute
589#[allow(clippy::derive_partial_eq_without_eq)]
590#[derive(Clone, PartialEq, ::prost::Message)]
591pub struct ExecuteRequest {
592    #[prost(message, optional, tag = "1")]
593    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
594    #[prost(message, optional, tag = "2")]
595    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
596    #[prost(message, optional, tag = "3")]
597    pub target: ::core::option::Option<Target>,
598    #[prost(message, optional, tag = "4")]
599    pub query: ::core::option::Option<BoundQuery>,
600    #[prost(int64, tag = "5")]
601    pub transaction_id: i64,
602    #[prost(message, optional, tag = "6")]
603    pub options: ::core::option::Option<ExecuteOptions>,
604    #[prost(int64, tag = "7")]
605    pub reserved_id: i64,
606}
607/// ExecuteResponse is the returned value from Execute
608#[allow(clippy::derive_partial_eq_without_eq)]
609#[derive(Clone, PartialEq, ::prost::Message)]
610pub struct ExecuteResponse {
611    #[prost(message, optional, tag = "1")]
612    pub result: ::core::option::Option<QueryResult>,
613}
614/// ResultWithError represents a query response
615/// in the form of result or error but not both.
616/// TODO: To be used in ExecuteBatchResponse and BeginExecuteBatchResponse.
617#[allow(clippy::derive_partial_eq_without_eq)]
618#[derive(Clone, PartialEq, ::prost::Message)]
619pub struct ResultWithError {
620    /// error contains an query level error, only set if result is unset.
621    #[prost(message, optional, tag = "1")]
622    pub error: ::core::option::Option<super::vtrpc::RpcError>,
623    /// result contains the query result, only set if error is unset.
624    #[prost(message, optional, tag = "2")]
625    pub result: ::core::option::Option<QueryResult>,
626}
627/// StreamExecuteRequest is the payload to StreamExecute
628#[allow(clippy::derive_partial_eq_without_eq)]
629#[derive(Clone, PartialEq, ::prost::Message)]
630pub struct StreamExecuteRequest {
631    #[prost(message, optional, tag = "1")]
632    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
633    #[prost(message, optional, tag = "2")]
634    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
635    #[prost(message, optional, tag = "3")]
636    pub target: ::core::option::Option<Target>,
637    #[prost(message, optional, tag = "4")]
638    pub query: ::core::option::Option<BoundQuery>,
639    #[prost(message, optional, tag = "5")]
640    pub options: ::core::option::Option<ExecuteOptions>,
641    #[prost(int64, tag = "6")]
642    pub transaction_id: i64,
643    #[prost(int64, tag = "7")]
644    pub reserved_id: i64,
645}
646/// StreamExecuteResponse is the returned value from StreamExecute
647#[allow(clippy::derive_partial_eq_without_eq)]
648#[derive(Clone, PartialEq, ::prost::Message)]
649pub struct StreamExecuteResponse {
650    #[prost(message, optional, tag = "1")]
651    pub result: ::core::option::Option<QueryResult>,
652}
653/// BeginRequest is the payload to Begin
654#[allow(clippy::derive_partial_eq_without_eq)]
655#[derive(Clone, PartialEq, ::prost::Message)]
656pub struct BeginRequest {
657    #[prost(message, optional, tag = "1")]
658    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
659    #[prost(message, optional, tag = "2")]
660    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
661    #[prost(message, optional, tag = "3")]
662    pub target: ::core::option::Option<Target>,
663    #[prost(message, optional, tag = "4")]
664    pub options: ::core::option::Option<ExecuteOptions>,
665}
666/// BeginResponse is the returned value from Begin
667#[allow(clippy::derive_partial_eq_without_eq)]
668#[derive(Clone, PartialEq, ::prost::Message)]
669pub struct BeginResponse {
670    #[prost(int64, tag = "1")]
671    pub transaction_id: i64,
672    #[prost(message, optional, tag = "2")]
673    pub tablet_alias: ::core::option::Option<super::topodata::TabletAlias>,
674    /// The session_state_changes might be set if the transaction is a snapshot transaction
675    /// and the MySQL implementation supports getting a start gtid on snapshot
676    #[prost(string, tag = "3")]
677    pub session_state_changes: ::prost::alloc::string::String,
678}
679/// CommitRequest is the payload to Commit
680#[allow(clippy::derive_partial_eq_without_eq)]
681#[derive(Clone, PartialEq, ::prost::Message)]
682pub struct CommitRequest {
683    #[prost(message, optional, tag = "1")]
684    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
685    #[prost(message, optional, tag = "2")]
686    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
687    #[prost(message, optional, tag = "3")]
688    pub target: ::core::option::Option<Target>,
689    #[prost(int64, tag = "4")]
690    pub transaction_id: i64,
691}
692/// CommitResponse is the returned value from Commit
693#[allow(clippy::derive_partial_eq_without_eq)]
694#[derive(Clone, PartialEq, ::prost::Message)]
695pub struct CommitResponse {
696    #[prost(int64, tag = "1")]
697    pub reserved_id: i64,
698}
699/// RollbackRequest is the payload to Rollback
700#[allow(clippy::derive_partial_eq_without_eq)]
701#[derive(Clone, PartialEq, ::prost::Message)]
702pub struct RollbackRequest {
703    #[prost(message, optional, tag = "1")]
704    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
705    #[prost(message, optional, tag = "2")]
706    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
707    #[prost(message, optional, tag = "3")]
708    pub target: ::core::option::Option<Target>,
709    #[prost(int64, tag = "4")]
710    pub transaction_id: i64,
711}
712/// RollbackResponse is the returned value from Rollback
713#[allow(clippy::derive_partial_eq_without_eq)]
714#[derive(Clone, PartialEq, ::prost::Message)]
715pub struct RollbackResponse {
716    #[prost(int64, tag = "1")]
717    pub reserved_id: i64,
718}
719/// PrepareRequest is the payload to Prepare
720#[allow(clippy::derive_partial_eq_without_eq)]
721#[derive(Clone, PartialEq, ::prost::Message)]
722pub struct PrepareRequest {
723    #[prost(message, optional, tag = "1")]
724    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
725    #[prost(message, optional, tag = "2")]
726    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
727    #[prost(message, optional, tag = "3")]
728    pub target: ::core::option::Option<Target>,
729    #[prost(int64, tag = "4")]
730    pub transaction_id: i64,
731    #[prost(string, tag = "5")]
732    pub dtid: ::prost::alloc::string::String,
733}
734/// PrepareResponse is the returned value from Prepare
735#[allow(clippy::derive_partial_eq_without_eq)]
736#[derive(Clone, PartialEq, ::prost::Message)]
737pub struct PrepareResponse {}
738/// CommitPreparedRequest is the payload to CommitPrepared
739#[allow(clippy::derive_partial_eq_without_eq)]
740#[derive(Clone, PartialEq, ::prost::Message)]
741pub struct CommitPreparedRequest {
742    #[prost(message, optional, tag = "1")]
743    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
744    #[prost(message, optional, tag = "2")]
745    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
746    #[prost(message, optional, tag = "3")]
747    pub target: ::core::option::Option<Target>,
748    #[prost(string, tag = "4")]
749    pub dtid: ::prost::alloc::string::String,
750}
751/// CommitPreparedResponse is the returned value from CommitPrepared
752#[allow(clippy::derive_partial_eq_without_eq)]
753#[derive(Clone, PartialEq, ::prost::Message)]
754pub struct CommitPreparedResponse {}
755/// RollbackPreparedRequest is the payload to RollbackPrepared
756#[allow(clippy::derive_partial_eq_without_eq)]
757#[derive(Clone, PartialEq, ::prost::Message)]
758pub struct RollbackPreparedRequest {
759    #[prost(message, optional, tag = "1")]
760    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
761    #[prost(message, optional, tag = "2")]
762    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
763    #[prost(message, optional, tag = "3")]
764    pub target: ::core::option::Option<Target>,
765    #[prost(int64, tag = "4")]
766    pub transaction_id: i64,
767    #[prost(string, tag = "5")]
768    pub dtid: ::prost::alloc::string::String,
769}
770/// RollbackPreparedResponse is the returned value from RollbackPrepared
771#[allow(clippy::derive_partial_eq_without_eq)]
772#[derive(Clone, PartialEq, ::prost::Message)]
773pub struct RollbackPreparedResponse {}
774/// CreateTransactionRequest is the payload to CreateTransaction
775#[allow(clippy::derive_partial_eq_without_eq)]
776#[derive(Clone, PartialEq, ::prost::Message)]
777pub struct CreateTransactionRequest {
778    #[prost(message, optional, tag = "1")]
779    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
780    #[prost(message, optional, tag = "2")]
781    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
782    #[prost(message, optional, tag = "3")]
783    pub target: ::core::option::Option<Target>,
784    #[prost(string, tag = "4")]
785    pub dtid: ::prost::alloc::string::String,
786    #[prost(message, repeated, tag = "5")]
787    pub participants: ::prost::alloc::vec::Vec<Target>,
788}
789/// CreateTransactionResponse is the returned value from CreateTransaction
790#[allow(clippy::derive_partial_eq_without_eq)]
791#[derive(Clone, PartialEq, ::prost::Message)]
792pub struct CreateTransactionResponse {}
793/// StartCommitRequest is the payload to StartCommit
794#[allow(clippy::derive_partial_eq_without_eq)]
795#[derive(Clone, PartialEq, ::prost::Message)]
796pub struct StartCommitRequest {
797    #[prost(message, optional, tag = "1")]
798    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
799    #[prost(message, optional, tag = "2")]
800    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
801    #[prost(message, optional, tag = "3")]
802    pub target: ::core::option::Option<Target>,
803    #[prost(int64, tag = "4")]
804    pub transaction_id: i64,
805    #[prost(string, tag = "5")]
806    pub dtid: ::prost::alloc::string::String,
807}
808/// StartCommitResponse is the returned value from StartCommit
809#[allow(clippy::derive_partial_eq_without_eq)]
810#[derive(Clone, PartialEq, ::prost::Message)]
811pub struct StartCommitResponse {}
812/// SetRollbackRequest is the payload to SetRollback
813#[allow(clippy::derive_partial_eq_without_eq)]
814#[derive(Clone, PartialEq, ::prost::Message)]
815pub struct SetRollbackRequest {
816    #[prost(message, optional, tag = "1")]
817    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
818    #[prost(message, optional, tag = "2")]
819    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
820    #[prost(message, optional, tag = "3")]
821    pub target: ::core::option::Option<Target>,
822    #[prost(int64, tag = "4")]
823    pub transaction_id: i64,
824    #[prost(string, tag = "5")]
825    pub dtid: ::prost::alloc::string::String,
826}
827/// SetRollbackResponse is the returned value from SetRollback
828#[allow(clippy::derive_partial_eq_without_eq)]
829#[derive(Clone, PartialEq, ::prost::Message)]
830pub struct SetRollbackResponse {}
831/// ConcludeTransactionRequest is the payload to ConcludeTransaction
832#[allow(clippy::derive_partial_eq_without_eq)]
833#[derive(Clone, PartialEq, ::prost::Message)]
834pub struct ConcludeTransactionRequest {
835    #[prost(message, optional, tag = "1")]
836    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
837    #[prost(message, optional, tag = "2")]
838    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
839    #[prost(message, optional, tag = "3")]
840    pub target: ::core::option::Option<Target>,
841    #[prost(string, tag = "4")]
842    pub dtid: ::prost::alloc::string::String,
843}
844/// ConcludeTransactionResponse is the returned value from ConcludeTransaction
845#[allow(clippy::derive_partial_eq_without_eq)]
846#[derive(Clone, PartialEq, ::prost::Message)]
847pub struct ConcludeTransactionResponse {}
848/// ReadTransactionRequest is the payload to ReadTransaction
849#[allow(clippy::derive_partial_eq_without_eq)]
850#[derive(Clone, PartialEq, ::prost::Message)]
851pub struct ReadTransactionRequest {
852    #[prost(message, optional, tag = "1")]
853    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
854    #[prost(message, optional, tag = "2")]
855    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
856    #[prost(message, optional, tag = "3")]
857    pub target: ::core::option::Option<Target>,
858    #[prost(string, tag = "4")]
859    pub dtid: ::prost::alloc::string::String,
860}
861/// ReadTransactionResponse is the returned value from ReadTransaction
862#[allow(clippy::derive_partial_eq_without_eq)]
863#[derive(Clone, PartialEq, ::prost::Message)]
864pub struct ReadTransactionResponse {
865    #[prost(message, optional, tag = "1")]
866    pub metadata: ::core::option::Option<TransactionMetadata>,
867}
868/// BeginExecuteRequest is the payload to BeginExecute
869#[allow(clippy::derive_partial_eq_without_eq)]
870#[derive(Clone, PartialEq, ::prost::Message)]
871pub struct BeginExecuteRequest {
872    #[prost(message, optional, tag = "1")]
873    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
874    #[prost(message, optional, tag = "2")]
875    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
876    #[prost(message, optional, tag = "3")]
877    pub target: ::core::option::Option<Target>,
878    #[prost(message, optional, tag = "4")]
879    pub query: ::core::option::Option<BoundQuery>,
880    #[prost(message, optional, tag = "5")]
881    pub options: ::core::option::Option<ExecuteOptions>,
882    #[prost(int64, tag = "6")]
883    pub reserved_id: i64,
884    #[prost(string, repeated, tag = "7")]
885    pub pre_queries: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
886}
887/// BeginExecuteResponse is the returned value from BeginExecute
888#[allow(clippy::derive_partial_eq_without_eq)]
889#[derive(Clone, PartialEq, ::prost::Message)]
890pub struct BeginExecuteResponse {
891    /// error contains an application level error if necessary. Note the
892    /// transaction_id may be set, even when an error is returned, if the begin
893    /// worked but the execute failed.
894    #[prost(message, optional, tag = "1")]
895    pub error: ::core::option::Option<super::vtrpc::RpcError>,
896    #[prost(message, optional, tag = "2")]
897    pub result: ::core::option::Option<QueryResult>,
898    /// transaction_id might be non-zero even if an error is present.
899    #[prost(int64, tag = "3")]
900    pub transaction_id: i64,
901    #[prost(message, optional, tag = "4")]
902    pub tablet_alias: ::core::option::Option<super::topodata::TabletAlias>,
903    /// The session_state_changes might be set if the transaction is a snapshot transaction
904    /// and the MySQL implementation supports getting a start gtid on snapshot
905    #[prost(string, tag = "5")]
906    pub session_state_changes: ::prost::alloc::string::String,
907}
908/// BeginStreamExecuteRequest is the payload to BeginStreamExecute
909#[allow(clippy::derive_partial_eq_without_eq)]
910#[derive(Clone, PartialEq, ::prost::Message)]
911pub struct BeginStreamExecuteRequest {
912    #[prost(message, optional, tag = "1")]
913    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
914    #[prost(message, optional, tag = "2")]
915    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
916    #[prost(message, optional, tag = "3")]
917    pub target: ::core::option::Option<Target>,
918    #[prost(message, optional, tag = "4")]
919    pub query: ::core::option::Option<BoundQuery>,
920    #[prost(message, optional, tag = "5")]
921    pub options: ::core::option::Option<ExecuteOptions>,
922    #[prost(string, repeated, tag = "6")]
923    pub pre_queries: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
924    #[prost(int64, tag = "7")]
925    pub reserved_id: i64,
926}
927/// BeginStreamExecuteResponse is the returned value from BeginStreamExecute
928#[allow(clippy::derive_partial_eq_without_eq)]
929#[derive(Clone, PartialEq, ::prost::Message)]
930pub struct BeginStreamExecuteResponse {
931    /// error contains an application level error if necessary. Note the
932    /// transaction_id may be set, even when an error is returned, if the begin
933    /// worked but the stream execute failed.
934    #[prost(message, optional, tag = "1")]
935    pub error: ::core::option::Option<super::vtrpc::RpcError>,
936    #[prost(message, optional, tag = "2")]
937    pub result: ::core::option::Option<QueryResult>,
938    /// transaction_id might be non-zero even if an error is present.
939    #[prost(int64, tag = "3")]
940    pub transaction_id: i64,
941    #[prost(message, optional, tag = "4")]
942    pub tablet_alias: ::core::option::Option<super::topodata::TabletAlias>,
943    /// The session_state_changes might be set if the transaction is a snapshot transaction
944    /// and the MySQL implementation supports getting a start gtid on snapshot
945    #[prost(string, tag = "5")]
946    pub session_state_changes: ::prost::alloc::string::String,
947}
948/// MessageStreamRequest is the request payload for MessageStream.
949#[allow(clippy::derive_partial_eq_without_eq)]
950#[derive(Clone, PartialEq, ::prost::Message)]
951pub struct MessageStreamRequest {
952    #[prost(message, optional, tag = "1")]
953    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
954    #[prost(message, optional, tag = "2")]
955    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
956    #[prost(message, optional, tag = "3")]
957    pub target: ::core::option::Option<Target>,
958    /// name is the message table name.
959    #[prost(string, tag = "4")]
960    pub name: ::prost::alloc::string::String,
961}
962/// MessageStreamResponse is a response for MessageStream.
963#[allow(clippy::derive_partial_eq_without_eq)]
964#[derive(Clone, PartialEq, ::prost::Message)]
965pub struct MessageStreamResponse {
966    #[prost(message, optional, tag = "1")]
967    pub result: ::core::option::Option<QueryResult>,
968}
969/// MessageAckRequest is the request payload for MessageAck.
970#[allow(clippy::derive_partial_eq_without_eq)]
971#[derive(Clone, PartialEq, ::prost::Message)]
972pub struct MessageAckRequest {
973    #[prost(message, optional, tag = "1")]
974    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
975    #[prost(message, optional, tag = "2")]
976    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
977    #[prost(message, optional, tag = "3")]
978    pub target: ::core::option::Option<Target>,
979    /// name is the message table name.
980    #[prost(string, tag = "4")]
981    pub name: ::prost::alloc::string::String,
982    #[prost(message, repeated, tag = "5")]
983    pub ids: ::prost::alloc::vec::Vec<Value>,
984}
985/// MessageAckResponse is the response for MessageAck.
986#[allow(clippy::derive_partial_eq_without_eq)]
987#[derive(Clone, PartialEq, ::prost::Message)]
988pub struct MessageAckResponse {
989    /// result contains the result of the ack operation.
990    /// Since this acts like a DML, only
991    /// RowsAffected is returned in the result.
992    #[prost(message, optional, tag = "1")]
993    pub result: ::core::option::Option<QueryResult>,
994}
995/// ReserveExecuteRequest is the payload to ReserveExecute
996#[allow(clippy::derive_partial_eq_without_eq)]
997#[derive(Clone, PartialEq, ::prost::Message)]
998pub struct ReserveExecuteRequest {
999    #[prost(message, optional, tag = "1")]
1000    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
1001    #[prost(message, optional, tag = "2")]
1002    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
1003    #[prost(message, optional, tag = "3")]
1004    pub target: ::core::option::Option<Target>,
1005    #[prost(message, optional, tag = "4")]
1006    pub query: ::core::option::Option<BoundQuery>,
1007    #[prost(int64, tag = "5")]
1008    pub transaction_id: i64,
1009    #[prost(message, optional, tag = "6")]
1010    pub options: ::core::option::Option<ExecuteOptions>,
1011    #[prost(string, repeated, tag = "7")]
1012    pub pre_queries: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1013}
1014/// ReserveExecuteResponse is the returned value from ReserveExecute
1015#[allow(clippy::derive_partial_eq_without_eq)]
1016#[derive(Clone, PartialEq, ::prost::Message)]
1017pub struct ReserveExecuteResponse {
1018    #[prost(message, optional, tag = "1")]
1019    pub error: ::core::option::Option<super::vtrpc::RpcError>,
1020    #[prost(message, optional, tag = "2")]
1021    pub result: ::core::option::Option<QueryResult>,
1022    /// The following fields might be non-zero even if an error is present.
1023    #[prost(int64, tag = "3")]
1024    pub reserved_id: i64,
1025    #[prost(message, optional, tag = "4")]
1026    pub tablet_alias: ::core::option::Option<super::topodata::TabletAlias>,
1027}
1028/// ReserveStreamExecuteRequest is the payload to ReserveStreamExecute
1029#[allow(clippy::derive_partial_eq_without_eq)]
1030#[derive(Clone, PartialEq, ::prost::Message)]
1031pub struct ReserveStreamExecuteRequest {
1032    #[prost(message, optional, tag = "1")]
1033    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
1034    #[prost(message, optional, tag = "2")]
1035    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
1036    #[prost(message, optional, tag = "3")]
1037    pub target: ::core::option::Option<Target>,
1038    #[prost(message, optional, tag = "4")]
1039    pub query: ::core::option::Option<BoundQuery>,
1040    #[prost(message, optional, tag = "5")]
1041    pub options: ::core::option::Option<ExecuteOptions>,
1042    #[prost(int64, tag = "6")]
1043    pub transaction_id: i64,
1044    #[prost(string, repeated, tag = "7")]
1045    pub pre_queries: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1046}
1047/// ReserveStreamExecuteResponse is the returned value from ReserveStreamExecute
1048#[allow(clippy::derive_partial_eq_without_eq)]
1049#[derive(Clone, PartialEq, ::prost::Message)]
1050pub struct ReserveStreamExecuteResponse {
1051    #[prost(message, optional, tag = "1")]
1052    pub error: ::core::option::Option<super::vtrpc::RpcError>,
1053    #[prost(message, optional, tag = "2")]
1054    pub result: ::core::option::Option<QueryResult>,
1055    /// The following fields might be non-zero even if an error is present.
1056    #[prost(int64, tag = "3")]
1057    pub reserved_id: i64,
1058    #[prost(message, optional, tag = "4")]
1059    pub tablet_alias: ::core::option::Option<super::topodata::TabletAlias>,
1060}
1061/// ReserveBeginExecuteRequest is the payload to ReserveBeginExecute
1062#[allow(clippy::derive_partial_eq_without_eq)]
1063#[derive(Clone, PartialEq, ::prost::Message)]
1064pub struct ReserveBeginExecuteRequest {
1065    #[prost(message, optional, tag = "1")]
1066    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
1067    #[prost(message, optional, tag = "2")]
1068    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
1069    #[prost(message, optional, tag = "3")]
1070    pub target: ::core::option::Option<Target>,
1071    #[prost(message, optional, tag = "4")]
1072    pub query: ::core::option::Option<BoundQuery>,
1073    #[prost(message, optional, tag = "5")]
1074    pub options: ::core::option::Option<ExecuteOptions>,
1075    #[prost(string, repeated, tag = "6")]
1076    pub pre_queries: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1077    #[prost(string, repeated, tag = "7")]
1078    pub post_begin_queries: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1079}
1080/// ReserveBeginExecuteResponse is the returned value from ReserveBeginExecute
1081#[allow(clippy::derive_partial_eq_without_eq)]
1082#[derive(Clone, PartialEq, ::prost::Message)]
1083pub struct ReserveBeginExecuteResponse {
1084    /// error contains an application level error if necessary. Note the
1085    /// transaction_id may be set, even when an error is returned, if the begin
1086    /// worked but the execute failed.
1087    #[prost(message, optional, tag = "1")]
1088    pub error: ::core::option::Option<super::vtrpc::RpcError>,
1089    #[prost(message, optional, tag = "2")]
1090    pub result: ::core::option::Option<QueryResult>,
1091    /// The following fields might be non-zero even if an error is present.
1092    #[prost(int64, tag = "3")]
1093    pub transaction_id: i64,
1094    #[prost(int64, tag = "4")]
1095    pub reserved_id: i64,
1096    #[prost(message, optional, tag = "5")]
1097    pub tablet_alias: ::core::option::Option<super::topodata::TabletAlias>,
1098    /// The session_state_changes might be set if the transaction is a snapshot transaction
1099    /// and the MySQL implementation supports getting a start gtid on snapshot
1100    #[prost(string, tag = "6")]
1101    pub session_state_changes: ::prost::alloc::string::String,
1102}
1103/// ReserveBeginStreamExecuteRequest is the payload to ReserveBeginStreamExecute
1104#[allow(clippy::derive_partial_eq_without_eq)]
1105#[derive(Clone, PartialEq, ::prost::Message)]
1106pub struct ReserveBeginStreamExecuteRequest {
1107    #[prost(message, optional, tag = "1")]
1108    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
1109    #[prost(message, optional, tag = "2")]
1110    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
1111    #[prost(message, optional, tag = "3")]
1112    pub target: ::core::option::Option<Target>,
1113    #[prost(message, optional, tag = "4")]
1114    pub query: ::core::option::Option<BoundQuery>,
1115    #[prost(message, optional, tag = "5")]
1116    pub options: ::core::option::Option<ExecuteOptions>,
1117    #[prost(string, repeated, tag = "6")]
1118    pub pre_queries: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1119    #[prost(string, repeated, tag = "7")]
1120    pub post_begin_queries: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1121}
1122/// ReserveBeginStreamExecuteResponse is the returned value from ReserveBeginStreamExecute
1123#[allow(clippy::derive_partial_eq_without_eq)]
1124#[derive(Clone, PartialEq, ::prost::Message)]
1125pub struct ReserveBeginStreamExecuteResponse {
1126    /// error contains an application level error if necessary. Note the
1127    /// transaction_id may be set, even when an error is returned, if the begin
1128    /// worked but the stream execute failed.
1129    #[prost(message, optional, tag = "1")]
1130    pub error: ::core::option::Option<super::vtrpc::RpcError>,
1131    #[prost(message, optional, tag = "2")]
1132    pub result: ::core::option::Option<QueryResult>,
1133    /// The following fields might be non-zero even if an error is present.
1134    #[prost(int64, tag = "3")]
1135    pub transaction_id: i64,
1136    #[prost(int64, tag = "4")]
1137    pub reserved_id: i64,
1138    #[prost(message, optional, tag = "5")]
1139    pub tablet_alias: ::core::option::Option<super::topodata::TabletAlias>,
1140    /// The session_state_changes might be set if the transaction is a snapshot transaction
1141    /// and the MySQL implementation supports getting a start gtid on snapshot
1142    #[prost(string, tag = "6")]
1143    pub session_state_changes: ::prost::alloc::string::String,
1144}
1145/// ReleaseRequest is the payload to Release
1146#[allow(clippy::derive_partial_eq_without_eq)]
1147#[derive(Clone, PartialEq, ::prost::Message)]
1148pub struct ReleaseRequest {
1149    #[prost(message, optional, tag = "1")]
1150    pub effective_caller_id: ::core::option::Option<super::vtrpc::CallerId>,
1151    #[prost(message, optional, tag = "2")]
1152    pub immediate_caller_id: ::core::option::Option<VtGateCallerId>,
1153    #[prost(message, optional, tag = "3")]
1154    pub target: ::core::option::Option<Target>,
1155    #[prost(int64, tag = "4")]
1156    pub transaction_id: i64,
1157    #[prost(int64, tag = "5")]
1158    pub reserved_id: i64,
1159}
1160/// ReleaseResponse is the returned value from Release
1161#[allow(clippy::derive_partial_eq_without_eq)]
1162#[derive(Clone, PartialEq, ::prost::Message)]
1163pub struct ReleaseResponse {}
1164/// StreamHealthRequest is the payload for StreamHealth
1165#[allow(clippy::derive_partial_eq_without_eq)]
1166#[derive(Clone, PartialEq, ::prost::Message)]
1167pub struct StreamHealthRequest {}
1168/// RealtimeStats contains information about the tablet status.
1169/// It is only valid for a single tablet.
1170#[allow(clippy::derive_partial_eq_without_eq)]
1171#[derive(Clone, PartialEq, ::prost::Message)]
1172pub struct RealtimeStats {
1173    /// health_error is the last error we got from health check,
1174    /// or empty is the server is healthy. This is used for subset selection,
1175    /// we do not send queries to servers that are not healthy.
1176    #[prost(string, tag = "1")]
1177    pub health_error: ::prost::alloc::string::String,
1178    /// replication_lag_seconds is populated for replicas only. It indicates
1179    /// how far behind on (MySQL) replication a replica currently is.  It is used
1180    /// by clients for subset selection (so we don't try to send traffic
1181    /// to tablets that are too far behind).
1182    /// NOTE: This field must not be evaluated if "health_error" is not empty.
1183    /// TODO(mberlin): Let's switch it to int64 instead?
1184    #[prost(uint32, tag = "2")]
1185    pub replication_lag_seconds: u32,
1186    /// bin_log_players_count is the number of currently running binlog players.
1187    /// if the value is 0, it means that filtered replication is currently not
1188    /// running on the tablet. If >0, filtered replication is running.
1189    /// NOTE: This field must not be evaluated if "health_error" is not empty.
1190    #[prost(int32, tag = "3")]
1191    pub binlog_players_count: i32,
1192    /// filtered_replication_lag_seconds is populated for the receiving
1193    /// primary of an ongoing filtered replication only.
1194    /// It specifies how far the receiving primary lags behind the sending primary.
1195    /// NOTE: This field must not be evaluated if "health_error" is not empty.
1196    /// NOTE: This field must not be evaluated if "bin_log_players_count" is 0.
1197    #[prost(int64, tag = "4")]
1198    pub filtered_replication_lag_seconds: i64,
1199    /// cpu_usage is used for load-based balancing
1200    #[prost(double, tag = "5")]
1201    pub cpu_usage: f64,
1202    /// qps is the average QPS (queries per second) rate in the last XX seconds
1203    /// where XX is usually 60 (See query_service_stats.go).
1204    #[prost(double, tag = "6")]
1205    pub qps: f64,
1206    /// table_schema_changed is to provide list of tables that have schema changes detected by the tablet.
1207    #[prost(string, repeated, tag = "7")]
1208    pub table_schema_changed: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1209    /// view_schema_changed is to provide list of views that have schema changes detected by the tablet.
1210    #[prost(string, repeated, tag = "8")]
1211    pub view_schema_changed: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1212}
1213/// AggregateStats contains information about the health of a group of
1214/// tablets for a Target.  It is used to propagate stats from a vtgate
1215/// to another, or from the Gateway layer of a vtgate to the routing
1216/// layer.
1217#[allow(clippy::derive_partial_eq_without_eq)]
1218#[derive(Clone, PartialEq, ::prost::Message)]
1219pub struct AggregateStats {
1220    /// healthy_tablet_count is the number of healthy tablets in the group.
1221    #[prost(int32, tag = "1")]
1222    pub healthy_tablet_count: i32,
1223    /// unhealthy_tablet_count is the number of unhealthy tablets in the group.
1224    #[prost(int32, tag = "2")]
1225    pub unhealthy_tablet_count: i32,
1226    /// replication_lag_seconds_min is the minimum of the
1227    /// replication_lag_seconds values of the healthy tablets. It is unset
1228    /// if the tablet type is primary.
1229    #[prost(uint32, tag = "3")]
1230    pub replication_lag_seconds_min: u32,
1231    /// replication_lag_seconds_max is the maximum of the
1232    /// replication_lag_seconds values of the healthy tablets. It is unset
1233    /// if the tablet type is primary.
1234    #[prost(uint32, tag = "4")]
1235    pub replication_lag_seconds_max: u32,
1236}
1237/// StreamHealthResponse is streamed by StreamHealth on a regular basis.
1238/// It is expected to be used between a vtgate and vttablet:
1239/// - target describes the tablet.
1240/// - realtime_stats is set.
1241/// - aggregate_stats is not set (deprecated)
1242#[allow(clippy::derive_partial_eq_without_eq)]
1243#[derive(Clone, PartialEq, ::prost::Message)]
1244pub struct StreamHealthResponse {
1245    /// target is the current server type. Only queries with that exact Target
1246    /// record will be accepted (the cell may not match, however).
1247    #[prost(message, optional, tag = "1")]
1248    pub target: ::core::option::Option<Target>,
1249    /// serving is true iff the tablet is serving. A tablet may not be serving
1250    /// if filtered replication is enabled on a primary for instance,
1251    /// or if a replica should not be used because the keyspace is being resharded.
1252    #[prost(bool, tag = "2")]
1253    pub serving: bool,
1254    /// primary_term_start_timestamp can be interpreted as the
1255    /// last time we knew that this tablet was promoted to a PRIMARY of this shard
1256    /// (if StreamHealthResponse describes a group of tablets, between
1257    /// two vtgates, only one primary will be present in the group, and
1258    /// this is this primary's value).
1259    ///
1260    /// It is used by vtgate when determining the current PRIMARY of a shard.
1261    /// If vtgate sees more than one PRIMARY tablet, this timestamp is used
1262    /// as tiebreaker where the PRIMARY with the highest timestamp wins.
1263    /// Another usage of this timestamp is in go/vt/vtgate/buffer to detect the end
1264    /// of a reparent (failover) and stop buffering.
1265    ///
1266    /// In practice, this field is set to:
1267    /// a) the last time the RPC tabletmanager.TabletExternallyReparented was
1268    ///     called on this tablet (usually done by an external failover tool e.g.
1269    ///     Orchestrator). The failover tool can call this as long as we are the
1270    ///     primary i.e. even ages after the last reparent occurred.
1271    /// OR
1272    /// b) the last time an active reparent was executed through a vtctl command
1273    ///     (InitShardPrimary, PlannedReparentShard, EmergencyReparentShard)
1274    /// OR
1275    /// c) the last time vttablet was started and it initialized its tablet type
1276    ///     as PRIMARY because it was recorded as the shard's current primary in the
1277    ///     topology (see go/vt/vttablet/tabletmanager/init_tablet.go)
1278    /// OR
1279    /// d) 0 if the vttablet is not a PRIMARY.
1280    #[prost(int64, tag = "3")]
1281    pub primary_term_start_timestamp: i64,
1282    /// realtime_stats contains information about the tablet status.
1283    /// It is only filled in if the information is about a tablet.
1284    #[prost(message, optional, tag = "4")]
1285    pub realtime_stats: ::core::option::Option<RealtimeStats>,
1286    /// tablet_alias is the alias of the sending tablet. The discovery/healthcheck.go
1287    /// code uses it to verify that it's talking to the correct tablet and that it
1288    /// hasn't changed in the meantime e.g. due to tablet restarts where ports or
1289    /// ips have been reused but assigned differently.
1290    #[prost(message, optional, tag = "5")]
1291    pub tablet_alias: ::core::option::Option<super::topodata::TabletAlias>,
1292}
1293/// TransactionMetadata contains the metadata for a distributed transaction.
1294#[allow(clippy::derive_partial_eq_without_eq)]
1295#[derive(Clone, PartialEq, ::prost::Message)]
1296pub struct TransactionMetadata {
1297    #[prost(string, tag = "1")]
1298    pub dtid: ::prost::alloc::string::String,
1299    #[prost(enumeration = "TransactionState", tag = "2")]
1300    pub state: i32,
1301    #[prost(int64, tag = "3")]
1302    pub time_created: i64,
1303    #[prost(message, repeated, tag = "4")]
1304    pub participants: ::prost::alloc::vec::Vec<Target>,
1305}
1306/// GetSchemaRequest is the payload to GetSchema
1307#[allow(clippy::derive_partial_eq_without_eq)]
1308#[derive(Clone, PartialEq, ::prost::Message)]
1309pub struct GetSchemaRequest {
1310    #[prost(message, optional, tag = "1")]
1311    pub target: ::core::option::Option<Target>,
1312    #[prost(enumeration = "SchemaTableType", tag = "2")]
1313    pub table_type: i32,
1314    #[prost(string, repeated, tag = "3")]
1315    pub table_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1316}
1317/// GetSchemaResponse is the returned value from GetSchema
1318#[allow(clippy::derive_partial_eq_without_eq)]
1319#[derive(Clone, PartialEq, ::prost::Message)]
1320pub struct GetSchemaResponse {
1321    /// this is for the schema definition for the requested tables.
1322    #[prost(map = "string, string", tag = "2")]
1323    pub table_definition: ::std::collections::HashMap<
1324        ::prost::alloc::string::String,
1325        ::prost::alloc::string::String,
1326    >,
1327}
1328/// Flags sent from the MySQL C API
1329#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1330#[repr(i32)]
1331pub enum MySqlFlag {
1332    Empty = 0,
1333    NotNullFlag = 1,
1334    PriKeyFlag = 2,
1335    UniqueKeyFlag = 4,
1336    MultipleKeyFlag = 8,
1337    BlobFlag = 16,
1338    UnsignedFlag = 32,
1339    ZerofillFlag = 64,
1340    BinaryFlag = 128,
1341    EnumFlag = 256,
1342    AutoIncrementFlag = 512,
1343    TimestampFlag = 1024,
1344    SetFlag = 2048,
1345    NoDefaultValueFlag = 4096,
1346    OnUpdateNowFlag = 8192,
1347    NumFlag = 32768,
1348    PartKeyFlag = 16384,
1349    UniqueFlag = 65536,
1350    BincmpFlag = 131072,
1351}
1352impl MySqlFlag {
1353    /// String value of the enum field names used in the ProtoBuf definition.
1354    ///
1355    /// The values are not transformed in any way and thus are considered stable
1356    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1357    pub fn as_str_name(&self) -> &'static str {
1358        match self {
1359            MySqlFlag::Empty => "EMPTY",
1360            MySqlFlag::NotNullFlag => "NOT_NULL_FLAG",
1361            MySqlFlag::PriKeyFlag => "PRI_KEY_FLAG",
1362            MySqlFlag::UniqueKeyFlag => "UNIQUE_KEY_FLAG",
1363            MySqlFlag::MultipleKeyFlag => "MULTIPLE_KEY_FLAG",
1364            MySqlFlag::BlobFlag => "BLOB_FLAG",
1365            MySqlFlag::UnsignedFlag => "UNSIGNED_FLAG",
1366            MySqlFlag::ZerofillFlag => "ZEROFILL_FLAG",
1367            MySqlFlag::BinaryFlag => "BINARY_FLAG",
1368            MySqlFlag::EnumFlag => "ENUM_FLAG",
1369            MySqlFlag::AutoIncrementFlag => "AUTO_INCREMENT_FLAG",
1370            MySqlFlag::TimestampFlag => "TIMESTAMP_FLAG",
1371            MySqlFlag::SetFlag => "SET_FLAG",
1372            MySqlFlag::NoDefaultValueFlag => "NO_DEFAULT_VALUE_FLAG",
1373            MySqlFlag::OnUpdateNowFlag => "ON_UPDATE_NOW_FLAG",
1374            MySqlFlag::NumFlag => "NUM_FLAG",
1375            MySqlFlag::PartKeyFlag => "PART_KEY_FLAG",
1376            MySqlFlag::UniqueFlag => "UNIQUE_FLAG",
1377            MySqlFlag::BincmpFlag => "BINCMP_FLAG",
1378        }
1379    }
1380    /// Creates an enum from field names used in the ProtoBuf definition.
1381    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1382        match value {
1383            "EMPTY" => Some(Self::Empty),
1384            "NOT_NULL_FLAG" => Some(Self::NotNullFlag),
1385            "PRI_KEY_FLAG" => Some(Self::PriKeyFlag),
1386            "UNIQUE_KEY_FLAG" => Some(Self::UniqueKeyFlag),
1387            "MULTIPLE_KEY_FLAG" => Some(Self::MultipleKeyFlag),
1388            "BLOB_FLAG" => Some(Self::BlobFlag),
1389            "UNSIGNED_FLAG" => Some(Self::UnsignedFlag),
1390            "ZEROFILL_FLAG" => Some(Self::ZerofillFlag),
1391            "BINARY_FLAG" => Some(Self::BinaryFlag),
1392            "ENUM_FLAG" => Some(Self::EnumFlag),
1393            "AUTO_INCREMENT_FLAG" => Some(Self::AutoIncrementFlag),
1394            "TIMESTAMP_FLAG" => Some(Self::TimestampFlag),
1395            "SET_FLAG" => Some(Self::SetFlag),
1396            "NO_DEFAULT_VALUE_FLAG" => Some(Self::NoDefaultValueFlag),
1397            "ON_UPDATE_NOW_FLAG" => Some(Self::OnUpdateNowFlag),
1398            "NUM_FLAG" => Some(Self::NumFlag),
1399            "PART_KEY_FLAG" => Some(Self::PartKeyFlag),
1400            "UNIQUE_FLAG" => Some(Self::UniqueFlag),
1401            "BINCMP_FLAG" => Some(Self::BincmpFlag),
1402            _ => None,
1403        }
1404    }
1405}
1406/// Flag allows us to qualify types by their common properties.
1407#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1408#[repr(i32)]
1409pub enum Flag {
1410    None = 0,
1411    Isintegral = 256,
1412    Isunsigned = 512,
1413    Isfloat = 1024,
1414    Isquoted = 2048,
1415    Istext = 4096,
1416    Isbinary = 8192,
1417}
1418impl Flag {
1419    /// String value of the enum field names used in the ProtoBuf definition.
1420    ///
1421    /// The values are not transformed in any way and thus are considered stable
1422    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1423    pub fn as_str_name(&self) -> &'static str {
1424        match self {
1425            Flag::None => "NONE",
1426            Flag::Isintegral => "ISINTEGRAL",
1427            Flag::Isunsigned => "ISUNSIGNED",
1428            Flag::Isfloat => "ISFLOAT",
1429            Flag::Isquoted => "ISQUOTED",
1430            Flag::Istext => "ISTEXT",
1431            Flag::Isbinary => "ISBINARY",
1432        }
1433    }
1434    /// Creates an enum from field names used in the ProtoBuf definition.
1435    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1436        match value {
1437            "NONE" => Some(Self::None),
1438            "ISINTEGRAL" => Some(Self::Isintegral),
1439            "ISUNSIGNED" => Some(Self::Isunsigned),
1440            "ISFLOAT" => Some(Self::Isfloat),
1441            "ISQUOTED" => Some(Self::Isquoted),
1442            "ISTEXT" => Some(Self::Istext),
1443            "ISBINARY" => Some(Self::Isbinary),
1444            _ => None,
1445        }
1446    }
1447}
1448/// Type defines the various supported data types in bind vars
1449/// and query results.
1450#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1451#[repr(i32)]
1452pub enum Type {
1453    /// NULL_TYPE specifies a NULL type.
1454    NullType = 0,
1455    /// INT8 specifies a TINYINT type.
1456    /// Properties: 1, IsNumber.
1457    Int8 = 257,
1458    /// UINT8 specifies a TINYINT UNSIGNED type.
1459    /// Properties: 2, IsNumber, IsUnsigned.
1460    Uint8 = 770,
1461    /// INT16 specifies a SMALLINT type.
1462    /// Properties: 3, IsNumber.
1463    Int16 = 259,
1464    /// UINT16 specifies a SMALLINT UNSIGNED type.
1465    /// Properties: 4, IsNumber, IsUnsigned.
1466    Uint16 = 772,
1467    /// INT24 specifies a MEDIUMINT type.
1468    /// Properties: 5, IsNumber.
1469    Int24 = 261,
1470    /// UINT24 specifies a MEDIUMINT UNSIGNED type.
1471    /// Properties: 6, IsNumber, IsUnsigned.
1472    Uint24 = 774,
1473    /// INT32 specifies a INTEGER type.
1474    /// Properties: 7, IsNumber.
1475    Int32 = 263,
1476    /// UINT32 specifies a INTEGER UNSIGNED type.
1477    /// Properties: 8, IsNumber, IsUnsigned.
1478    Uint32 = 776,
1479    /// INT64 specifies a BIGINT type.
1480    /// Properties: 9, IsNumber.
1481    Int64 = 265,
1482    /// UINT64 specifies a BIGINT UNSIGNED type.
1483    /// Properties: 10, IsNumber, IsUnsigned.
1484    Uint64 = 778,
1485    /// FLOAT32 specifies a FLOAT type.
1486    /// Properties: 11, IsFloat.
1487    Float32 = 1035,
1488    /// FLOAT64 specifies a DOUBLE or REAL type.
1489    /// Properties: 12, IsFloat.
1490    Float64 = 1036,
1491    /// TIMESTAMP specifies a TIMESTAMP type.
1492    /// Properties: 13, IsQuoted.
1493    Timestamp = 2061,
1494    /// DATE specifies a DATE type.
1495    /// Properties: 14, IsQuoted.
1496    Date = 2062,
1497    /// TIME specifies a TIME type.
1498    /// Properties: 15, IsQuoted.
1499    Time = 2063,
1500    /// DATETIME specifies a DATETIME type.
1501    /// Properties: 16, IsQuoted.
1502    Datetime = 2064,
1503    /// YEAR specifies a YEAR type.
1504    /// Properties: 17, IsNumber, IsUnsigned.
1505    Year = 785,
1506    /// DECIMAL specifies a DECIMAL or NUMERIC type.
1507    /// Properties: 18, None.
1508    Decimal = 18,
1509    /// TEXT specifies a TEXT type.
1510    /// Properties: 19, IsQuoted, IsText.
1511    Text = 6163,
1512    /// BLOB specifies a BLOB type.
1513    /// Properties: 20, IsQuoted, IsBinary.
1514    Blob = 10260,
1515    /// VARCHAR specifies a VARCHAR type.
1516    /// Properties: 21, IsQuoted, IsText.
1517    Varchar = 6165,
1518    /// VARBINARY specifies a VARBINARY type.
1519    /// Properties: 22, IsQuoted, IsBinary.
1520    Varbinary = 10262,
1521    /// CHAR specifies a CHAR type.
1522    /// Properties: 23, IsQuoted, IsText.
1523    Char = 6167,
1524    /// BINARY specifies a BINARY type.
1525    /// Properties: 24, IsQuoted, IsBinary.
1526    Binary = 10264,
1527    /// BIT specifies a BIT type.
1528    /// Properties: 25, IsQuoted.
1529    Bit = 2073,
1530    /// ENUM specifies an ENUM type.
1531    /// Properties: 26, IsQuoted.
1532    Enum = 2074,
1533    /// SET specifies a SET type.
1534    /// Properties: 27, IsQuoted.
1535    Set = 2075,
1536    /// TUPLE specifies a tuple. This cannot
1537    /// be returned in a QueryResult, but it can
1538    /// be sent as a bind var.
1539    /// Properties: 28, None.
1540    Tuple = 28,
1541    /// GEOMETRY specifies a GEOMETRY type.
1542    /// Properties: 29, IsQuoted.
1543    Geometry = 2077,
1544    /// JSON specifies a JSON type.
1545    /// Properties: 30, IsQuoted.
1546    Json = 2078,
1547    /// EXPRESSION specifies a SQL expression.
1548    /// This type is for internal use only.
1549    /// Properties: 31, None.
1550    Expression = 31,
1551    /// HEXNUM specifies a HEXNUM type (unquoted varbinary).
1552    /// Properties: 32, IsText.
1553    Hexnum = 4128,
1554    /// HEXVAL specifies a HEXVAL type (unquoted varbinary).
1555    /// Properties: 33, IsText.
1556    Hexval = 4129,
1557    /// BITNUM specifies a base 2 binary type (unquoted varbinary).
1558    /// Properties: 34, IsText.
1559    Bitnum = 4130,
1560}
1561impl Type {
1562    /// String value of the enum field names used in the ProtoBuf definition.
1563    ///
1564    /// The values are not transformed in any way and thus are considered stable
1565    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1566    pub fn as_str_name(&self) -> &'static str {
1567        match self {
1568            Type::NullType => "NULL_TYPE",
1569            Type::Int8 => "INT8",
1570            Type::Uint8 => "UINT8",
1571            Type::Int16 => "INT16",
1572            Type::Uint16 => "UINT16",
1573            Type::Int24 => "INT24",
1574            Type::Uint24 => "UINT24",
1575            Type::Int32 => "INT32",
1576            Type::Uint32 => "UINT32",
1577            Type::Int64 => "INT64",
1578            Type::Uint64 => "UINT64",
1579            Type::Float32 => "FLOAT32",
1580            Type::Float64 => "FLOAT64",
1581            Type::Timestamp => "TIMESTAMP",
1582            Type::Date => "DATE",
1583            Type::Time => "TIME",
1584            Type::Datetime => "DATETIME",
1585            Type::Year => "YEAR",
1586            Type::Decimal => "DECIMAL",
1587            Type::Text => "TEXT",
1588            Type::Blob => "BLOB",
1589            Type::Varchar => "VARCHAR",
1590            Type::Varbinary => "VARBINARY",
1591            Type::Char => "CHAR",
1592            Type::Binary => "BINARY",
1593            Type::Bit => "BIT",
1594            Type::Enum => "ENUM",
1595            Type::Set => "SET",
1596            Type::Tuple => "TUPLE",
1597            Type::Geometry => "GEOMETRY",
1598            Type::Json => "JSON",
1599            Type::Expression => "EXPRESSION",
1600            Type::Hexnum => "HEXNUM",
1601            Type::Hexval => "HEXVAL",
1602            Type::Bitnum => "BITNUM",
1603        }
1604    }
1605    /// Creates an enum from field names used in the ProtoBuf definition.
1606    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1607        match value {
1608            "NULL_TYPE" => Some(Self::NullType),
1609            "INT8" => Some(Self::Int8),
1610            "UINT8" => Some(Self::Uint8),
1611            "INT16" => Some(Self::Int16),
1612            "UINT16" => Some(Self::Uint16),
1613            "INT24" => Some(Self::Int24),
1614            "UINT24" => Some(Self::Uint24),
1615            "INT32" => Some(Self::Int32),
1616            "UINT32" => Some(Self::Uint32),
1617            "INT64" => Some(Self::Int64),
1618            "UINT64" => Some(Self::Uint64),
1619            "FLOAT32" => Some(Self::Float32),
1620            "FLOAT64" => Some(Self::Float64),
1621            "TIMESTAMP" => Some(Self::Timestamp),
1622            "DATE" => Some(Self::Date),
1623            "TIME" => Some(Self::Time),
1624            "DATETIME" => Some(Self::Datetime),
1625            "YEAR" => Some(Self::Year),
1626            "DECIMAL" => Some(Self::Decimal),
1627            "TEXT" => Some(Self::Text),
1628            "BLOB" => Some(Self::Blob),
1629            "VARCHAR" => Some(Self::Varchar),
1630            "VARBINARY" => Some(Self::Varbinary),
1631            "CHAR" => Some(Self::Char),
1632            "BINARY" => Some(Self::Binary),
1633            "BIT" => Some(Self::Bit),
1634            "ENUM" => Some(Self::Enum),
1635            "SET" => Some(Self::Set),
1636            "TUPLE" => Some(Self::Tuple),
1637            "GEOMETRY" => Some(Self::Geometry),
1638            "JSON" => Some(Self::Json),
1639            "EXPRESSION" => Some(Self::Expression),
1640            "HEXNUM" => Some(Self::Hexnum),
1641            "HEXVAL" => Some(Self::Hexval),
1642            "BITNUM" => Some(Self::Bitnum),
1643            _ => None,
1644        }
1645    }
1646}
1647/// TransactionState represents the state of a distributed transaction.
1648#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1649#[repr(i32)]
1650pub enum TransactionState {
1651    Unknown = 0,
1652    Prepare = 1,
1653    Commit = 2,
1654    Rollback = 3,
1655}
1656impl TransactionState {
1657    /// String value of the enum field names used in the ProtoBuf definition.
1658    ///
1659    /// The values are not transformed in any way and thus are considered stable
1660    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1661    pub fn as_str_name(&self) -> &'static str {
1662        match self {
1663            TransactionState::Unknown => "UNKNOWN",
1664            TransactionState::Prepare => "PREPARE",
1665            TransactionState::Commit => "COMMIT",
1666            TransactionState::Rollback => "ROLLBACK",
1667        }
1668    }
1669    /// Creates an enum from field names used in the ProtoBuf definition.
1670    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1671        match value {
1672            "UNKNOWN" => Some(Self::Unknown),
1673            "PREPARE" => Some(Self::Prepare),
1674            "COMMIT" => Some(Self::Commit),
1675            "ROLLBACK" => Some(Self::Rollback),
1676            _ => None,
1677        }
1678    }
1679}
1680/// SchemaTableType represents the type of table requested.
1681#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1682#[repr(i32)]
1683pub enum SchemaTableType {
1684    Views = 0,
1685    Tables = 1,
1686    All = 2,
1687}
1688impl SchemaTableType {
1689    /// String value of the enum field names used in the ProtoBuf definition.
1690    ///
1691    /// The values are not transformed in any way and thus are considered stable
1692    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1693    pub fn as_str_name(&self) -> &'static str {
1694        match self {
1695            SchemaTableType::Views => "VIEWS",
1696            SchemaTableType::Tables => "TABLES",
1697            SchemaTableType::All => "ALL",
1698        }
1699    }
1700    /// Creates an enum from field names used in the ProtoBuf definition.
1701    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1702        match value {
1703            "VIEWS" => Some(Self::Views),
1704            "TABLES" => Some(Self::Tables),
1705            "ALL" => Some(Self::All),
1706            _ => None,
1707        }
1708    }
1709}