1#[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 #[prost(string, tag = "4")]
15 pub cell: ::prost::alloc::string::String,
16}
17#[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#[allow(clippy::derive_partial_eq_without_eq)]
38#[derive(Clone, PartialEq, ::prost::Message)]
39pub struct EventToken {
40 #[prost(int64, tag = "1")]
42 pub timestamp: i64,
43 #[prost(string, tag = "2")]
46 pub shard: ::prost::alloc::string::String,
47 #[prost(string, tag = "3")]
50 pub position: ::prost::alloc::string::String,
51}
52#[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#[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 #[prost(message, repeated, tag = "3")]
71 pub values: ::prost::alloc::vec::Vec<Value>,
72}
73#[allow(clippy::derive_partial_eq_without_eq)]
75#[derive(Clone, PartialEq, ::prost::Message)]
76pub struct BoundQuery {
77 #[prost(string, tag = "1")]
79 pub sql: ::prost::alloc::string::String,
80 #[prost(map = "string, message", tag = "2")]
83 pub bind_variables: ::std::collections::HashMap<
84 ::prost::alloc::string::String,
85 BindVariable,
86 >,
87}
88#[allow(clippy::derive_partial_eq_without_eq)]
90#[derive(Clone, PartialEq, ::prost::Message)]
91pub struct ExecuteOptions {
92 #[prost(enumeration = "execute_options::IncludedFields", tag = "4")]
96 pub included_fields: i32,
97 #[prost(bool, tag = "5")]
101 pub client_found_rows: bool,
102 #[prost(enumeration = "execute_options::Workload", tag = "6")]
110 pub workload: i32,
111 #[prost(int64, tag = "8")]
114 pub sql_select_limit: i64,
115 #[prost(enumeration = "execute_options::TransactionIsolation", tag = "9")]
116 pub transaction_isolation: i32,
117 #[prost(bool, tag = "10")]
120 pub skip_query_plan_cache: bool,
121 #[prost(enumeration = "execute_options::PlannerVersion", tag = "11")]
124 pub planner_version: i32,
125 #[prost(bool, tag = "12")]
129 pub has_created_temp_tables: bool,
130 #[prost(enumeration = "execute_options::Consolidator", tag = "13")]
131 pub consolidator: i32,
132 #[prost(
135 enumeration = "execute_options::TransactionAccessMode",
136 repeated,
137 tag = "14"
138 )]
139 pub transaction_access_mode: ::prost::alloc::vec::Vec<i32>,
140 #[prost(string, tag = "15")]
143 pub workload_name: ::prost::alloc::string::String,
144 #[prost(string, tag = "16")]
147 pub priority: ::prost::alloc::string::String,
148}
149pub 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 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 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 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 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 ConsistentSnapshotReadOnly = 5,
253 Autocommit = 6,
256 }
257 impl TransactionIsolation {
258 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 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 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 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 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 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 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 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#[allow(clippy::derive_partial_eq_without_eq)]
427#[derive(Clone, PartialEq, ::prost::Message)]
428pub struct Field {
429 #[prost(string, tag = "1")]
431 pub name: ::prost::alloc::string::String,
432 #[prost(enumeration = "Type", tag = "2")]
434 pub r#type: i32,
435 #[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 #[prost(uint32, tag = "7")]
448 pub column_length: u32,
449 #[prost(uint32, tag = "8")]
451 pub charset: u32,
452 #[prost(uint32, tag = "9")]
454 pub decimals: u32,
455 #[prost(uint32, tag = "10")]
457 pub flags: u32,
458 #[prost(string, tag = "11")]
460 pub column_type: ::prost::alloc::string::String,
461}
462#[allow(clippy::derive_partial_eq_without_eq)]
464#[derive(Clone, PartialEq, ::prost::Message)]
465pub struct Row {
466 #[prost(sint64, repeated, tag = "1")]
471 pub lengths: ::prost::alloc::vec::Vec<i64>,
472 #[prost(bytes = "vec", tag = "2")]
474 pub values: ::prost::alloc::vec::Vec<u8>,
475}
476#[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#[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#[allow(clippy::derive_partial_eq_without_eq)]
515#[derive(Clone, PartialEq, ::prost::Message)]
516pub struct StreamEvent {
517 #[prost(message, repeated, tag = "1")]
519 pub statements: ::prost::alloc::vec::Vec<stream_event::Statement>,
520 #[prost(message, optional, tag = "2")]
522 pub event_token: ::core::option::Option<EventToken>,
523}
524pub mod stream_event {
526 #[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 #[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 #[prost(bytes = "vec", tag = "5")]
542 pub sql: ::prost::alloc::vec::Vec<u8>,
543 }
544 pub mod statement {
546 #[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 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 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#[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#[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#[allow(clippy::derive_partial_eq_without_eq)]
618#[derive(Clone, PartialEq, ::prost::Message)]
619pub struct ResultWithError {
620 #[prost(message, optional, tag = "1")]
622 pub error: ::core::option::Option<super::vtrpc::RpcError>,
623 #[prost(message, optional, tag = "2")]
625 pub result: ::core::option::Option<QueryResult>,
626}
627#[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#[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#[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#[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 #[prost(string, tag = "3")]
677 pub session_state_changes: ::prost::alloc::string::String,
678}
679#[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#[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#[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#[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#[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#[allow(clippy::derive_partial_eq_without_eq)]
736#[derive(Clone, PartialEq, ::prost::Message)]
737pub struct PrepareResponse {}
738#[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#[allow(clippy::derive_partial_eq_without_eq)]
753#[derive(Clone, PartialEq, ::prost::Message)]
754pub struct CommitPreparedResponse {}
755#[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#[allow(clippy::derive_partial_eq_without_eq)]
772#[derive(Clone, PartialEq, ::prost::Message)]
773pub struct RollbackPreparedResponse {}
774#[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#[allow(clippy::derive_partial_eq_without_eq)]
791#[derive(Clone, PartialEq, ::prost::Message)]
792pub struct CreateTransactionResponse {}
793#[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#[allow(clippy::derive_partial_eq_without_eq)]
810#[derive(Clone, PartialEq, ::prost::Message)]
811pub struct StartCommitResponse {}
812#[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#[allow(clippy::derive_partial_eq_without_eq)]
829#[derive(Clone, PartialEq, ::prost::Message)]
830pub struct SetRollbackResponse {}
831#[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#[allow(clippy::derive_partial_eq_without_eq)]
846#[derive(Clone, PartialEq, ::prost::Message)]
847pub struct ConcludeTransactionResponse {}
848#[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#[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#[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#[allow(clippy::derive_partial_eq_without_eq)]
889#[derive(Clone, PartialEq, ::prost::Message)]
890pub struct BeginExecuteResponse {
891 #[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 #[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 #[prost(string, tag = "5")]
906 pub session_state_changes: ::prost::alloc::string::String,
907}
908#[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#[allow(clippy::derive_partial_eq_without_eq)]
929#[derive(Clone, PartialEq, ::prost::Message)]
930pub struct BeginStreamExecuteResponse {
931 #[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 #[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 #[prost(string, tag = "5")]
946 pub session_state_changes: ::prost::alloc::string::String,
947}
948#[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 #[prost(string, tag = "4")]
960 pub name: ::prost::alloc::string::String,
961}
962#[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#[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 #[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#[allow(clippy::derive_partial_eq_without_eq)]
987#[derive(Clone, PartialEq, ::prost::Message)]
988pub struct MessageAckResponse {
989 #[prost(message, optional, tag = "1")]
993 pub result: ::core::option::Option<QueryResult>,
994}
995#[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#[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 #[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#[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#[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 #[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#[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#[allow(clippy::derive_partial_eq_without_eq)]
1082#[derive(Clone, PartialEq, ::prost::Message)]
1083pub struct ReserveBeginExecuteResponse {
1084 #[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 #[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 #[prost(string, tag = "6")]
1101 pub session_state_changes: ::prost::alloc::string::String,
1102}
1103#[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#[allow(clippy::derive_partial_eq_without_eq)]
1124#[derive(Clone, PartialEq, ::prost::Message)]
1125pub struct ReserveBeginStreamExecuteResponse {
1126 #[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 #[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 #[prost(string, tag = "6")]
1143 pub session_state_changes: ::prost::alloc::string::String,
1144}
1145#[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#[allow(clippy::derive_partial_eq_without_eq)]
1162#[derive(Clone, PartialEq, ::prost::Message)]
1163pub struct ReleaseResponse {}
1164#[allow(clippy::derive_partial_eq_without_eq)]
1166#[derive(Clone, PartialEq, ::prost::Message)]
1167pub struct StreamHealthRequest {}
1168#[allow(clippy::derive_partial_eq_without_eq)]
1171#[derive(Clone, PartialEq, ::prost::Message)]
1172pub struct RealtimeStats {
1173 #[prost(string, tag = "1")]
1177 pub health_error: ::prost::alloc::string::String,
1178 #[prost(uint32, tag = "2")]
1185 pub replication_lag_seconds: u32,
1186 #[prost(int32, tag = "3")]
1191 pub binlog_players_count: i32,
1192 #[prost(int64, tag = "4")]
1198 pub filtered_replication_lag_seconds: i64,
1199 #[prost(double, tag = "5")]
1201 pub cpu_usage: f64,
1202 #[prost(double, tag = "6")]
1205 pub qps: f64,
1206 #[prost(string, repeated, tag = "7")]
1208 pub table_schema_changed: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1209 #[prost(string, repeated, tag = "8")]
1211 pub view_schema_changed: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1212}
1213#[allow(clippy::derive_partial_eq_without_eq)]
1218#[derive(Clone, PartialEq, ::prost::Message)]
1219pub struct AggregateStats {
1220 #[prost(int32, tag = "1")]
1222 pub healthy_tablet_count: i32,
1223 #[prost(int32, tag = "2")]
1225 pub unhealthy_tablet_count: i32,
1226 #[prost(uint32, tag = "3")]
1230 pub replication_lag_seconds_min: u32,
1231 #[prost(uint32, tag = "4")]
1235 pub replication_lag_seconds_max: u32,
1236}
1237#[allow(clippy::derive_partial_eq_without_eq)]
1243#[derive(Clone, PartialEq, ::prost::Message)]
1244pub struct StreamHealthResponse {
1245 #[prost(message, optional, tag = "1")]
1248 pub target: ::core::option::Option<Target>,
1249 #[prost(bool, tag = "2")]
1253 pub serving: bool,
1254 #[prost(int64, tag = "3")]
1281 pub primary_term_start_timestamp: i64,
1282 #[prost(message, optional, tag = "4")]
1285 pub realtime_stats: ::core::option::Option<RealtimeStats>,
1286 #[prost(message, optional, tag = "5")]
1291 pub tablet_alias: ::core::option::Option<super::topodata::TabletAlias>,
1292}
1293#[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#[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#[allow(clippy::derive_partial_eq_without_eq)]
1319#[derive(Clone, PartialEq, ::prost::Message)]
1320pub struct GetSchemaResponse {
1321 #[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#[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 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 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#[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 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 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#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1451#[repr(i32)]
1452pub enum Type {
1453 NullType = 0,
1455 Int8 = 257,
1458 Uint8 = 770,
1461 Int16 = 259,
1464 Uint16 = 772,
1467 Int24 = 261,
1470 Uint24 = 774,
1473 Int32 = 263,
1476 Uint32 = 776,
1479 Int64 = 265,
1482 Uint64 = 778,
1485 Float32 = 1035,
1488 Float64 = 1036,
1491 Timestamp = 2061,
1494 Date = 2062,
1497 Time = 2063,
1500 Datetime = 2064,
1503 Year = 785,
1506 Decimal = 18,
1509 Text = 6163,
1512 Blob = 10260,
1515 Varchar = 6165,
1518 Varbinary = 10262,
1521 Char = 6167,
1524 Binary = 10264,
1527 Bit = 2073,
1530 Enum = 2074,
1533 Set = 2075,
1536 Tuple = 28,
1541 Geometry = 2077,
1544 Json = 2078,
1547 Expression = 31,
1551 Hexnum = 4128,
1554 Hexval = 4129,
1557 Bitnum = 4130,
1560}
1561impl Type {
1562 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 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#[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 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 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#[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 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 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}