1#[derive(serde::Serialize, serde::Deserialize)]
3#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct Limit {
5 #[prost(oneof = "limit::Kind", tags = "1, 2, 3, 4, 5, 6")]
6 pub kind: ::core::option::Option<limit::Kind>,
7}
8pub mod limit {
10 #[derive(serde::Serialize, serde::Deserialize)]
11 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
12 pub struct Range {
13 #[prost(uint32, tag = "1")]
14 pub min: u32,
15 #[prost(uint32, tag = "2")]
16 pub max: u32,
17 }
18 #[derive(serde::Serialize, serde::Deserialize)]
19 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
20 pub enum Kind {
21 #[prost(message, tag = "1")]
22 Range(Range),
23 #[prost(uint32, tag = "2")]
24 Lt(u32),
25 #[prost(uint32, tag = "3")]
26 Le(u32),
27 #[prost(uint32, tag = "4")]
28 Eq(u32),
29 #[prost(uint32, tag = "5")]
30 Ge(u32),
31 #[prost(uint32, tag = "6")]
32 Gt(u32),
33 }
34}
35#[derive(serde::Serialize, serde::Deserialize)]
36#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
37pub struct MapKey {
38 #[prost(message, optional, tag = "1")]
39 pub length: ::core::option::Option<Limit>,
40 #[prost(string, tag = "2")]
41 pub value: ::prost::alloc::string::String,
42}
43#[derive(serde::Serialize, serde::Deserialize)]
44#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
45pub struct FeatureFlag {}
46pub mod feature_flag {
48 #[derive(serde::Serialize, serde::Deserialize)]
49 #[derive(
50 Clone,
51 Copy,
52 Debug,
53 PartialEq,
54 Eq,
55 Hash,
56 PartialOrd,
57 Ord,
58 ::prost::Enumeration
59 )]
60 #[repr(i32)]
61 pub enum Status {
62 Unspecified = 0,
63 Enabled = 1,
64 Disabled = 2,
65 }
66 impl Status {
67 pub fn as_str_name(&self) -> &'static str {
71 match self {
72 Self::Unspecified => "STATUS_UNSPECIFIED",
73 Self::Enabled => "ENABLED",
74 Self::Disabled => "DISABLED",
75 }
76 }
77 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
79 match value {
80 "STATUS_UNSPECIFIED" => Some(Self::Unspecified),
81 "ENABLED" => Some(Self::Enabled),
82 "DISABLED" => Some(Self::Disabled),
83 _ => None,
84 }
85 }
86 }
87}
88#[derive(serde::Serialize, serde::Deserialize)]
89#[derive(Clone, Copy, PartialEq, ::prost::Message)]
90pub struct CostInfo {
91 #[prost(double, tag = "1")]
93 pub consumed_units: f64,
94}
95#[derive(serde::Serialize, serde::Deserialize)]
96#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
97pub struct QuotaExceeded {
98 #[prost(bool, tag = "1")]
99 pub disk: bool,
100}
101#[derive(serde::Serialize, serde::Deserialize)]
103#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
104pub struct VirtualTimestamp {
105 #[prost(uint64, tag = "1")]
106 pub plan_step: u64,
107 #[prost(uint64, tag = "2")]
108 pub tx_id: u64,
109}
110#[derive(serde::Serialize, serde::Deserialize)]
111#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
112pub struct StatusIds {}
113pub mod status_ids {
115 #[derive(serde::Serialize, serde::Deserialize)]
117 #[derive(
118 Clone,
119 Copy,
120 Debug,
121 PartialEq,
122 Eq,
123 Hash,
124 PartialOrd,
125 Ord,
126 ::prost::Enumeration
127 )]
128 #[repr(i32)]
129 pub enum StatusCode {
130 Unspecified = 0,
131 Success = 400000,
132 BadRequest = 400010,
133 Unauthorized = 400020,
134 InternalError = 400030,
135 Aborted = 400040,
136 Unavailable = 400050,
137 Overloaded = 400060,
138 SchemeError = 400070,
139 GenericError = 400080,
140 Timeout = 400090,
141 BadSession = 400100,
142 PreconditionFailed = 400120,
143 AlreadyExists = 400130,
144 NotFound = 400140,
145 SessionExpired = 400150,
146 Cancelled = 400160,
147 Undetermined = 400170,
148 Unsupported = 400180,
149 SessionBusy = 400190,
150 ExternalError = 400200,
151 }
152 impl StatusCode {
153 pub fn as_str_name(&self) -> &'static str {
157 match self {
158 Self::Unspecified => "STATUS_CODE_UNSPECIFIED",
159 Self::Success => "SUCCESS",
160 Self::BadRequest => "BAD_REQUEST",
161 Self::Unauthorized => "UNAUTHORIZED",
162 Self::InternalError => "INTERNAL_ERROR",
163 Self::Aborted => "ABORTED",
164 Self::Unavailable => "UNAVAILABLE",
165 Self::Overloaded => "OVERLOADED",
166 Self::SchemeError => "SCHEME_ERROR",
167 Self::GenericError => "GENERIC_ERROR",
168 Self::Timeout => "TIMEOUT",
169 Self::BadSession => "BAD_SESSION",
170 Self::PreconditionFailed => "PRECONDITION_FAILED",
171 Self::AlreadyExists => "ALREADY_EXISTS",
172 Self::NotFound => "NOT_FOUND",
173 Self::SessionExpired => "SESSION_EXPIRED",
174 Self::Cancelled => "CANCELLED",
175 Self::Undetermined => "UNDETERMINED",
176 Self::Unsupported => "UNSUPPORTED",
177 Self::SessionBusy => "SESSION_BUSY",
178 Self::ExternalError => "EXTERNAL_ERROR",
179 }
180 }
181 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
183 match value {
184 "STATUS_CODE_UNSPECIFIED" => Some(Self::Unspecified),
185 "SUCCESS" => Some(Self::Success),
186 "BAD_REQUEST" => Some(Self::BadRequest),
187 "UNAUTHORIZED" => Some(Self::Unauthorized),
188 "INTERNAL_ERROR" => Some(Self::InternalError),
189 "ABORTED" => Some(Self::Aborted),
190 "UNAVAILABLE" => Some(Self::Unavailable),
191 "OVERLOADED" => Some(Self::Overloaded),
192 "SCHEME_ERROR" => Some(Self::SchemeError),
193 "GENERIC_ERROR" => Some(Self::GenericError),
194 "TIMEOUT" => Some(Self::Timeout),
195 "BAD_SESSION" => Some(Self::BadSession),
196 "PRECONDITION_FAILED" => Some(Self::PreconditionFailed),
197 "ALREADY_EXISTS" => Some(Self::AlreadyExists),
198 "NOT_FOUND" => Some(Self::NotFound),
199 "SESSION_EXPIRED" => Some(Self::SessionExpired),
200 "CANCELLED" => Some(Self::Cancelled),
201 "UNDETERMINED" => Some(Self::Undetermined),
202 "UNSUPPORTED" => Some(Self::Unsupported),
203 "SESSION_BUSY" => Some(Self::SessionBusy),
204 "EXTERNAL_ERROR" => Some(Self::ExternalError),
205 _ => None,
206 }
207 }
208 }
209}
210#[derive(serde::Serialize, serde::Deserialize)]
211#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
212pub struct DecimalType {
213 #[prost(uint32, tag = "1")]
214 pub precision: u32,
215 #[prost(uint32, tag = "2")]
216 pub scale: u32,
217}
218#[derive(serde::Serialize, serde::Deserialize)]
219#[derive(Clone, PartialEq, ::prost::Message)]
220pub struct OptionalType {
221 #[prost(message, optional, boxed, tag = "1")]
222 pub item: ::core::option::Option<::prost::alloc::boxed::Box<Type>>,
223}
224#[derive(serde::Serialize, serde::Deserialize)]
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct ListType {
227 #[prost(message, optional, boxed, tag = "1")]
228 pub item: ::core::option::Option<::prost::alloc::boxed::Box<Type>>,
229}
230#[derive(serde::Serialize, serde::Deserialize)]
231#[derive(Clone, PartialEq, ::prost::Message)]
232pub struct VariantType {
233 #[prost(oneof = "variant_type::Type", tags = "1, 2")]
234 pub r#type: ::core::option::Option<variant_type::Type>,
235}
236pub mod variant_type {
238 #[derive(serde::Serialize, serde::Deserialize)]
239 #[derive(Clone, PartialEq, ::prost::Oneof)]
240 pub enum Type {
241 #[prost(message, tag = "1")]
242 TupleItems(super::TupleType),
243 #[prost(message, tag = "2")]
244 StructItems(super::StructType),
245 }
246}
247#[derive(serde::Serialize, serde::Deserialize)]
248#[derive(Clone, PartialEq, ::prost::Message)]
249pub struct TupleType {
250 #[prost(message, repeated, tag = "1")]
251 pub elements: ::prost::alloc::vec::Vec<Type>,
252}
253#[derive(serde::Serialize, serde::Deserialize)]
254#[derive(Clone, PartialEq, ::prost::Message)]
255pub struct StructMember {
256 #[prost(string, tag = "1")]
257 pub name: ::prost::alloc::string::String,
258 #[prost(message, optional, tag = "2")]
259 pub r#type: ::core::option::Option<Type>,
260}
261#[derive(serde::Serialize, serde::Deserialize)]
262#[derive(Clone, PartialEq, ::prost::Message)]
263pub struct StructType {
264 #[prost(message, repeated, tag = "1")]
265 pub members: ::prost::alloc::vec::Vec<StructMember>,
266}
267#[derive(serde::Serialize, serde::Deserialize)]
268#[derive(Clone, PartialEq, ::prost::Message)]
269pub struct DictType {
270 #[prost(message, optional, boxed, tag = "1")]
271 pub key: ::core::option::Option<::prost::alloc::boxed::Box<Type>>,
272 #[prost(message, optional, boxed, tag = "2")]
273 pub payload: ::core::option::Option<::prost::alloc::boxed::Box<Type>>,
274}
275#[derive(serde::Serialize, serde::Deserialize)]
276#[derive(Clone, PartialEq, ::prost::Message)]
277pub struct TaggedType {
278 #[prost(string, tag = "1")]
279 pub tag: ::prost::alloc::string::String,
280 #[prost(message, optional, boxed, tag = "2")]
281 pub r#type: ::core::option::Option<::prost::alloc::boxed::Box<Type>>,
282}
283#[derive(serde::Serialize, serde::Deserialize)]
284#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
285pub struct PgType {
286 #[prost(string, tag = "10")]
287 pub type_name: ::prost::alloc::string::String,
288 #[prost(string, tag = "11")]
289 pub type_modifier: ::prost::alloc::string::String,
290 #[prost(uint32, tag = "1")]
293 pub oid: u32,
294 #[prost(int32, tag = "2")]
296 pub typlen: i32,
297 #[prost(int32, tag = "3")]
298 pub typmod: i32,
299}
300#[derive(serde::Serialize, serde::Deserialize)]
301#[derive(Clone, PartialEq, ::prost::Message)]
302pub struct Type {
303 #[prost(
304 oneof = "r#type::Type",
305 tags = "1, 2, 101, 102, 103, 104, 105, 106, 107, 201, 202, 203, 204, 205"
306 )]
307 pub r#type: ::core::option::Option<r#type::Type>,
308}
309pub mod r#type {
311 #[derive(serde::Serialize, serde::Deserialize)]
312 #[derive(
313 Clone,
314 Copy,
315 Debug,
316 PartialEq,
317 Eq,
318 Hash,
319 PartialOrd,
320 Ord,
321 ::prost::Enumeration
322 )]
323 #[repr(i32)]
324 pub enum PrimitiveTypeId {
325 Unspecified = 0,
326 Bool = 6,
327 Int8 = 7,
328 Uint8 = 5,
329 Int16 = 8,
330 Uint16 = 9,
331 Int32 = 1,
332 Uint32 = 2,
333 Int64 = 3,
334 Uint64 = 4,
335 Float = 33,
336 Double = 32,
337 Date = 48,
338 Datetime = 49,
339 Timestamp = 50,
340 Interval = 51,
341 TzDate = 52,
342 TzDatetime = 53,
343 TzTimestamp = 54,
344 Date32 = 64,
345 Datetime64 = 65,
346 Timestamp64 = 66,
347 Interval64 = 67,
348 String = 4097,
349 Utf8 = 4608,
350 Yson = 4609,
351 Json = 4610,
352 Uuid = 4611,
353 JsonDocument = 4612,
354 Dynumber = 4866,
355 }
356 impl PrimitiveTypeId {
357 pub fn as_str_name(&self) -> &'static str {
361 match self {
362 Self::Unspecified => "PRIMITIVE_TYPE_ID_UNSPECIFIED",
363 Self::Bool => "BOOL",
364 Self::Int8 => "INT8",
365 Self::Uint8 => "UINT8",
366 Self::Int16 => "INT16",
367 Self::Uint16 => "UINT16",
368 Self::Int32 => "INT32",
369 Self::Uint32 => "UINT32",
370 Self::Int64 => "INT64",
371 Self::Uint64 => "UINT64",
372 Self::Float => "FLOAT",
373 Self::Double => "DOUBLE",
374 Self::Date => "DATE",
375 Self::Datetime => "DATETIME",
376 Self::Timestamp => "TIMESTAMP",
377 Self::Interval => "INTERVAL",
378 Self::TzDate => "TZ_DATE",
379 Self::TzDatetime => "TZ_DATETIME",
380 Self::TzTimestamp => "TZ_TIMESTAMP",
381 Self::Date32 => "DATE32",
382 Self::Datetime64 => "DATETIME64",
383 Self::Timestamp64 => "TIMESTAMP64",
384 Self::Interval64 => "INTERVAL64",
385 Self::String => "STRING",
386 Self::Utf8 => "UTF8",
387 Self::Yson => "YSON",
388 Self::Json => "JSON",
389 Self::Uuid => "UUID",
390 Self::JsonDocument => "JSON_DOCUMENT",
391 Self::Dynumber => "DYNUMBER",
392 }
393 }
394 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
396 match value {
397 "PRIMITIVE_TYPE_ID_UNSPECIFIED" => Some(Self::Unspecified),
398 "BOOL" => Some(Self::Bool),
399 "INT8" => Some(Self::Int8),
400 "UINT8" => Some(Self::Uint8),
401 "INT16" => Some(Self::Int16),
402 "UINT16" => Some(Self::Uint16),
403 "INT32" => Some(Self::Int32),
404 "UINT32" => Some(Self::Uint32),
405 "INT64" => Some(Self::Int64),
406 "UINT64" => Some(Self::Uint64),
407 "FLOAT" => Some(Self::Float),
408 "DOUBLE" => Some(Self::Double),
409 "DATE" => Some(Self::Date),
410 "DATETIME" => Some(Self::Datetime),
411 "TIMESTAMP" => Some(Self::Timestamp),
412 "INTERVAL" => Some(Self::Interval),
413 "TZ_DATE" => Some(Self::TzDate),
414 "TZ_DATETIME" => Some(Self::TzDatetime),
415 "TZ_TIMESTAMP" => Some(Self::TzTimestamp),
416 "DATE32" => Some(Self::Date32),
417 "DATETIME64" => Some(Self::Datetime64),
418 "TIMESTAMP64" => Some(Self::Timestamp64),
419 "INTERVAL64" => Some(Self::Interval64),
420 "STRING" => Some(Self::String),
421 "UTF8" => Some(Self::Utf8),
422 "YSON" => Some(Self::Yson),
423 "JSON" => Some(Self::Json),
424 "UUID" => Some(Self::Uuid),
425 "JSON_DOCUMENT" => Some(Self::JsonDocument),
426 "DYNUMBER" => Some(Self::Dynumber),
427 _ => None,
428 }
429 }
430 }
431 #[derive(serde::Serialize, serde::Deserialize)]
432 #[derive(Clone, PartialEq, ::prost::Oneof)]
433 pub enum Type {
434 #[prost(enumeration = "PrimitiveTypeId", tag = "1")]
436 TypeId(i32),
437 #[prost(message, tag = "2")]
438 DecimalType(super::DecimalType),
439 #[prost(message, tag = "101")]
441 OptionalType(::prost::alloc::boxed::Box<super::OptionalType>),
442 #[prost(message, tag = "102")]
443 ListType(::prost::alloc::boxed::Box<super::ListType>),
444 #[prost(message, tag = "103")]
445 TupleType(super::TupleType),
446 #[prost(message, tag = "104")]
447 StructType(super::StructType),
448 #[prost(message, tag = "105")]
449 DictType(::prost::alloc::boxed::Box<super::DictType>),
450 #[prost(message, tag = "106")]
451 VariantType(super::VariantType),
452 #[prost(message, tag = "107")]
453 TaggedType(::prost::alloc::boxed::Box<super::TaggedType>),
454 #[prost(enumeration = "super::super::google::protobuf::NullValue", tag = "201")]
456 VoidType(i32),
457 #[prost(enumeration = "super::super::google::protobuf::NullValue", tag = "202")]
458 NullType(i32),
459 #[prost(enumeration = "super::super::google::protobuf::NullValue", tag = "203")]
460 EmptyListType(i32),
461 #[prost(enumeration = "super::super::google::protobuf::NullValue", tag = "204")]
462 EmptyDictType(i32),
463 #[prost(message, tag = "205")]
464 PgType(super::PgType),
465 }
466}
467#[derive(serde::Serialize, serde::Deserialize)]
468#[derive(Clone, PartialEq, ::prost::Message)]
469pub struct ValuePair {
470 #[prost(message, optional, tag = "1")]
471 pub key: ::core::option::Option<Value>,
472 #[prost(message, optional, tag = "2")]
473 pub payload: ::core::option::Option<Value>,
474}
475#[derive(serde::Serialize, serde::Deserialize)]
476#[derive(Clone, PartialEq, ::prost::Message)]
477pub struct Value {
478 #[prost(message, repeated, tag = "12")]
480 pub items: ::prost::alloc::vec::Vec<Value>,
481 #[prost(message, repeated, tag = "13")]
483 pub pairs: ::prost::alloc::vec::Vec<ValuePair>,
484 #[prost(uint32, tag = "14")]
486 pub variant_index: u32,
487 #[prost(fixed64, tag = "16")]
488 pub high_128: u64,
489 #[prost(oneof = "value::Value", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15")]
490 pub value: ::core::option::Option<value::Value>,
491}
492pub mod value {
494 #[derive(serde::Serialize, serde::Deserialize)]
495 #[derive(Clone, PartialEq, ::prost::Oneof)]
496 pub enum Value {
497 #[prost(bool, tag = "1")]
498 BoolValue(bool),
499 #[prost(sfixed32, tag = "2")]
500 Int32Value(i32),
501 #[prost(fixed32, tag = "3")]
502 Uint32Value(u32),
503 #[prost(sfixed64, tag = "4")]
504 Int64Value(i64),
505 #[prost(fixed64, tag = "5")]
506 Uint64Value(u64),
507 #[prost(float, tag = "6")]
508 FloatValue(f32),
509 #[prost(double, tag = "7")]
510 DoubleValue(f64),
511 #[prost(bytes, tag = "8")]
512 BytesValue(::prost::alloc::vec::Vec<u8>),
513 #[prost(string, tag = "9")]
514 TextValue(::prost::alloc::string::String),
515 #[prost(enumeration = "super::super::google::protobuf::NullValue", tag = "10")]
517 NullFlagValue(i32),
518 #[prost(message, tag = "11")]
520 NestedValue(::prost::alloc::boxed::Box<super::Value>),
521 #[prost(fixed64, tag = "15")]
522 Low128(u64),
523 }
524}
525#[derive(serde::Serialize, serde::Deserialize)]
526#[derive(Clone, PartialEq, ::prost::Message)]
527pub struct TypedValue {
528 #[prost(message, optional, tag = "1")]
529 pub r#type: ::core::option::Option<Type>,
530 #[prost(message, optional, tag = "2")]
531 pub value: ::core::option::Option<Value>,
532}
533#[derive(serde::Serialize, serde::Deserialize)]
534#[derive(Clone, PartialEq, ::prost::Message)]
535pub struct Column {
536 #[prost(string, tag = "1")]
538 pub name: ::prost::alloc::string::String,
539 #[prost(message, optional, tag = "2")]
541 pub r#type: ::core::option::Option<Type>,
542}
543#[derive(serde::Serialize, serde::Deserialize)]
545#[derive(Clone, PartialEq, ::prost::Message)]
546pub struct ResultSet {
547 #[prost(message, repeated, tag = "1")]
549 pub columns: ::prost::alloc::vec::Vec<Column>,
550 #[prost(message, repeated, tag = "2")]
552 pub rows: ::prost::alloc::vec::Vec<Value>,
553 #[prost(bool, tag = "3")]
555 pub truncated: bool,
556}