Skip to main content

nominal_api_proto/proto/
nominal.sql.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct SqlQueryLogEvent {
4    #[prost(string, tag = "1")]
5    pub query_id: ::prost::alloc::string::String,
6    #[prost(enumeration = "SqlQueryEventType", tag = "2")]
7    pub event_type: i32,
8    #[prost(string, tag = "3")]
9    pub workspace_rid: ::prost::alloc::string::String,
10    #[prost(string, tag = "4")]
11    pub user_rid: ::prost::alloc::string::String,
12    #[prost(enumeration = "SqlQueryBackend", repeated, tag = "5")]
13    pub backends: ::prost::alloc::vec::Vec<i32>,
14    #[prost(enumeration = "SqlQueryStatus", optional, tag = "6")]
15    pub status: ::core::option::Option<i32>,
16    #[prost(string, tag = "7")]
17    pub query_text: ::prost::alloc::string::String,
18    #[prost(message, optional, tag = "8")]
19    pub event_time: ::core::option::Option<
20        super::super::super::google::protobuf::Timestamp,
21    >,
22    #[prost(message, optional, tag = "9")]
23    pub started_at: ::core::option::Option<
24        super::super::super::google::protobuf::Timestamp,
25    >,
26    #[prost(message, optional, tag = "10")]
27    pub finished_at: ::core::option::Option<
28        super::super::super::google::protobuf::Timestamp,
29    >,
30    #[prost(int64, optional, tag = "11")]
31    pub duration_ms: ::core::option::Option<i64>,
32    #[prost(string, tag = "12")]
33    pub org_rid: ::prost::alloc::string::String,
34}
35#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
36#[repr(i32)]
37pub enum SqlQueryEventType {
38    QueryStart = 0,
39    QueryFinish = 1,
40    ErrorBeforeStart = 2,
41    ErrorWhileProcessing = 3,
42}
43impl SqlQueryEventType {
44    /// String value of the enum field names used in the ProtoBuf definition.
45    ///
46    /// The values are not transformed in any way and thus are considered stable
47    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
48    pub fn as_str_name(&self) -> &'static str {
49        match self {
50            Self::QueryStart => "SQL_QUERY_EVENT_TYPE_QUERY_START",
51            Self::QueryFinish => "SQL_QUERY_EVENT_TYPE_QUERY_FINISH",
52            Self::ErrorBeforeStart => "SQL_QUERY_EVENT_TYPE_ERROR_BEFORE_START",
53            Self::ErrorWhileProcessing => "SQL_QUERY_EVENT_TYPE_ERROR_WHILE_PROCESSING",
54        }
55    }
56    /// Creates an enum from field names used in the ProtoBuf definition.
57    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
58        match value {
59            "SQL_QUERY_EVENT_TYPE_QUERY_START" => Some(Self::QueryStart),
60            "SQL_QUERY_EVENT_TYPE_QUERY_FINISH" => Some(Self::QueryFinish),
61            "SQL_QUERY_EVENT_TYPE_ERROR_BEFORE_START" => Some(Self::ErrorBeforeStart),
62            "SQL_QUERY_EVENT_TYPE_ERROR_WHILE_PROCESSING" => {
63                Some(Self::ErrorWhileProcessing)
64            }
65            _ => None,
66        }
67    }
68}
69#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
70#[repr(i32)]
71pub enum SqlQueryBackend {
72    Clickhouse = 0,
73    Postgres = 1,
74}
75impl SqlQueryBackend {
76    /// String value of the enum field names used in the ProtoBuf definition.
77    ///
78    /// The values are not transformed in any way and thus are considered stable
79    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
80    pub fn as_str_name(&self) -> &'static str {
81        match self {
82            Self::Clickhouse => "SQL_QUERY_BACKEND_CLICKHOUSE",
83            Self::Postgres => "SQL_QUERY_BACKEND_POSTGRES",
84        }
85    }
86    /// Creates an enum from field names used in the ProtoBuf definition.
87    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
88        match value {
89            "SQL_QUERY_BACKEND_CLICKHOUSE" => Some(Self::Clickhouse),
90            "SQL_QUERY_BACKEND_POSTGRES" => Some(Self::Postgres),
91            _ => None,
92        }
93    }
94}
95#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
96#[repr(i32)]
97pub enum SqlQueryStatus {
98    Succeeded = 0,
99    Failed = 1,
100    Throttled = 2,
101    TimedOut = 3,
102}
103impl SqlQueryStatus {
104    /// String value of the enum field names used in the ProtoBuf definition.
105    ///
106    /// The values are not transformed in any way and thus are considered stable
107    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
108    pub fn as_str_name(&self) -> &'static str {
109        match self {
110            Self::Succeeded => "SQL_QUERY_STATUS_SUCCEEDED",
111            Self::Failed => "SQL_QUERY_STATUS_FAILED",
112            Self::Throttled => "SQL_QUERY_STATUS_THROTTLED",
113            Self::TimedOut => "SQL_QUERY_STATUS_TIMED_OUT",
114        }
115    }
116    /// Creates an enum from field names used in the ProtoBuf definition.
117    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
118        match value {
119            "SQL_QUERY_STATUS_SUCCEEDED" => Some(Self::Succeeded),
120            "SQL_QUERY_STATUS_FAILED" => Some(Self::Failed),
121            "SQL_QUERY_STATUS_THROTTLED" => Some(Self::Throttled),
122            "SQL_QUERY_STATUS_TIMED_OUT" => Some(Self::TimedOut),
123            _ => None,
124        }
125    }
126}
127#[derive(Clone, PartialEq, ::prost::Message)]
128pub struct SqlServiceQueryRequest {
129    #[prost(string, tag = "1")]
130    pub query: ::prost::alloc::string::String,
131    #[prost(int32, optional, tag = "2")]
132    pub max_rows: ::core::option::Option<i32>,
133    #[prost(string, tag = "3")]
134    pub workspace_rid: ::prost::alloc::string::String,
135    #[prost(enumeration = "SqlServiceQueryResultFormat", tag = "4")]
136    pub result_format: i32,
137}
138#[derive(Clone, PartialEq, ::prost::Message)]
139pub struct SqlServiceQueryResponse {
140    #[prost(string, tag = "2")]
141    pub query_id: ::prost::alloc::string::String,
142    #[prost(bytes = "vec", tag = "3")]
143    pub payload: ::prost::alloc::vec::Vec<u8>,
144}
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct SqlServiceExportRequest {
147    #[prost(string, tag = "1")]
148    pub query: ::prost::alloc::string::String,
149    #[prost(string, tag = "2")]
150    pub workspace_rid: ::prost::alloc::string::String,
151}
152#[derive(Clone, PartialEq, ::prost::Message)]
153pub struct SqlServiceExportResponse {
154    #[prost(string, tag = "1")]
155    pub presigned_url: ::prost::alloc::string::String,
156    #[prost(string, tag = "2")]
157    pub query_id: ::prost::alloc::string::String,
158}
159#[derive(Clone, Copy, PartialEq, ::prost::Message)]
160pub struct GetSqlCatalogRequest {}
161#[derive(Clone, PartialEq, ::prost::Message)]
162pub struct SqlCatalogMapType {
163    #[prost(message, optional, boxed, tag = "1")]
164    pub key: ::core::option::Option<::prost::alloc::boxed::Box<SqlCatalogDataType>>,
165    #[prost(message, optional, boxed, tag = "2")]
166    pub value: ::core::option::Option<::prost::alloc::boxed::Box<SqlCatalogDataType>>,
167}
168#[derive(Clone, PartialEq, ::prost::Message)]
169pub struct SqlCatalogDataType {
170    #[prost(oneof = "sql_catalog_data_type::Kind", tags = "1, 2, 3")]
171    pub kind: ::core::option::Option<sql_catalog_data_type::Kind>,
172}
173/// Nested message and enum types in `SqlCatalogDataType`.
174pub mod sql_catalog_data_type {
175    #[derive(Clone, PartialEq, ::prost::Oneof)]
176    pub enum Kind {
177        #[prost(enumeration = "super::SqlCatalogScalarType", tag = "1")]
178        Scalar(i32),
179        #[prost(message, tag = "2")]
180        ArrayElement(::prost::alloc::boxed::Box<super::SqlCatalogDataType>),
181        #[prost(message, tag = "3")]
182        Map(::prost::alloc::boxed::Box<super::SqlCatalogMapType>),
183    }
184}
185#[derive(Clone, PartialEq, ::prost::Message)]
186pub struct SqlCatalogColumn {
187    #[prost(string, tag = "1")]
188    pub name: ::prost::alloc::string::String,
189    #[prost(string, tag = "2")]
190    pub r#type: ::prost::alloc::string::String,
191    #[prost(bool, tag = "3")]
192    pub nullable: bool,
193    #[prost(message, optional, tag = "4")]
194    pub data_type: ::core::option::Option<SqlCatalogDataType>,
195}
196#[derive(Clone, PartialEq, ::prost::Message)]
197pub struct SqlCatalogTable {
198    #[prost(string, tag = "1")]
199    pub name: ::prost::alloc::string::String,
200    #[prost(message, repeated, tag = "2")]
201    pub columns: ::prost::alloc::vec::Vec<SqlCatalogColumn>,
202}
203#[derive(Clone, PartialEq, ::prost::Message)]
204pub struct SqlCatalogFunction {
205    #[prost(string, tag = "1")]
206    pub name: ::prost::alloc::string::String,
207    #[prost(enumeration = "SqlCatalogFunctionKind", tag = "2")]
208    pub kind: i32,
209    #[prost(bool, tag = "3")]
210    pub supports_over: bool,
211    #[prost(int32, tag = "4")]
212    pub min_args: i32,
213    #[prost(int32, optional, tag = "5")]
214    pub max_args: ::core::option::Option<i32>,
215    #[prost(string, repeated, tag = "6")]
216    pub argument_type_families: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
217    #[prost(string, optional, tag = "7")]
218    pub return_type_family: ::core::option::Option<::prost::alloc::string::String>,
219}
220#[derive(Clone, PartialEq, ::prost::Message)]
221pub struct SqlCatalog {
222    #[prost(message, repeated, tag = "1")]
223    pub tables: ::prost::alloc::vec::Vec<SqlCatalogTable>,
224    #[prost(message, repeated, tag = "2")]
225    pub functions: ::prost::alloc::vec::Vec<SqlCatalogFunction>,
226}
227#[derive(Clone, PartialEq, ::prost::Message)]
228pub struct GetSqlCatalogResponse {
229    #[prost(message, optional, tag = "1")]
230    pub sql_catalog: ::core::option::Option<SqlCatalog>,
231}
232#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
233#[repr(i32)]
234pub enum SqlError {
235    Unspecified = 0,
236    InvalidQuery = 1,
237    DatasetsNotFound = 2,
238    ExecutionFailed = 3,
239    ExportNotSupportedForBackend = 4,
240    ExportNotConfigured = 5,
241    QueryTimeout = 6,
242    ResourceExhausted = 7,
243    DatasetStorageTypeNotSupported = 8,
244    DataNotFoundForType = 9,
245    ResultSizeExceeded = 10,
246}
247impl SqlError {
248    /// String value of the enum field names used in the ProtoBuf definition.
249    ///
250    /// The values are not transformed in any way and thus are considered stable
251    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
252    pub fn as_str_name(&self) -> &'static str {
253        match self {
254            Self::Unspecified => "SQL_ERROR_UNSPECIFIED",
255            Self::InvalidQuery => "SQL_ERROR_INVALID_QUERY",
256            Self::DatasetsNotFound => "SQL_ERROR_DATASETS_NOT_FOUND",
257            Self::ExecutionFailed => "SQL_ERROR_EXECUTION_FAILED",
258            Self::ExportNotSupportedForBackend => {
259                "SQL_ERROR_EXPORT_NOT_SUPPORTED_FOR_BACKEND"
260            }
261            Self::ExportNotConfigured => "SQL_ERROR_EXPORT_NOT_CONFIGURED",
262            Self::QueryTimeout => "SQL_ERROR_QUERY_TIMEOUT",
263            Self::ResourceExhausted => "SQL_ERROR_RESOURCE_EXHAUSTED",
264            Self::DatasetStorageTypeNotSupported => {
265                "SQL_ERROR_DATASET_STORAGE_TYPE_NOT_SUPPORTED"
266            }
267            Self::DataNotFoundForType => "SQL_ERROR_DATA_NOT_FOUND_FOR_TYPE",
268            Self::ResultSizeExceeded => "SQL_ERROR_RESULT_SIZE_EXCEEDED",
269        }
270    }
271    /// Creates an enum from field names used in the ProtoBuf definition.
272    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
273        match value {
274            "SQL_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
275            "SQL_ERROR_INVALID_QUERY" => Some(Self::InvalidQuery),
276            "SQL_ERROR_DATASETS_NOT_FOUND" => Some(Self::DatasetsNotFound),
277            "SQL_ERROR_EXECUTION_FAILED" => Some(Self::ExecutionFailed),
278            "SQL_ERROR_EXPORT_NOT_SUPPORTED_FOR_BACKEND" => {
279                Some(Self::ExportNotSupportedForBackend)
280            }
281            "SQL_ERROR_EXPORT_NOT_CONFIGURED" => Some(Self::ExportNotConfigured),
282            "SQL_ERROR_QUERY_TIMEOUT" => Some(Self::QueryTimeout),
283            "SQL_ERROR_RESOURCE_EXHAUSTED" => Some(Self::ResourceExhausted),
284            "SQL_ERROR_DATASET_STORAGE_TYPE_NOT_SUPPORTED" => {
285                Some(Self::DatasetStorageTypeNotSupported)
286            }
287            "SQL_ERROR_DATA_NOT_FOUND_FOR_TYPE" => Some(Self::DataNotFoundForType),
288            "SQL_ERROR_RESULT_SIZE_EXCEEDED" => Some(Self::ResultSizeExceeded),
289            _ => None,
290        }
291    }
292}
293#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
294#[repr(i32)]
295pub enum SqlServiceQueryResultFormat {
296    Unspecified = 0,
297    ArrowStream = 1,
298    JsonLines = 2,
299    Csv = 3,
300}
301impl SqlServiceQueryResultFormat {
302    /// String value of the enum field names used in the ProtoBuf definition.
303    ///
304    /// The values are not transformed in any way and thus are considered stable
305    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
306    pub fn as_str_name(&self) -> &'static str {
307        match self {
308            Self::Unspecified => "SQL_SERVICE_QUERY_RESULT_FORMAT_UNSPECIFIED",
309            Self::ArrowStream => "SQL_SERVICE_QUERY_RESULT_FORMAT_ARROW_STREAM",
310            Self::JsonLines => "SQL_SERVICE_QUERY_RESULT_FORMAT_JSON_LINES",
311            Self::Csv => "SQL_SERVICE_QUERY_RESULT_FORMAT_CSV",
312        }
313    }
314    /// Creates an enum from field names used in the ProtoBuf definition.
315    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
316        match value {
317            "SQL_SERVICE_QUERY_RESULT_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
318            "SQL_SERVICE_QUERY_RESULT_FORMAT_ARROW_STREAM" => Some(Self::ArrowStream),
319            "SQL_SERVICE_QUERY_RESULT_FORMAT_JSON_LINES" => Some(Self::JsonLines),
320            "SQL_SERVICE_QUERY_RESULT_FORMAT_CSV" => Some(Self::Csv),
321            _ => None,
322        }
323    }
324}
325#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
326#[repr(i32)]
327pub enum SqlCatalogScalarType {
328    Unspecified = 0,
329    Varchar = 1,
330    Boolean = 2,
331    Integer = 3,
332    Bigint = 4,
333    Double = 5,
334    Timestamp = 6,
335    Any = 7,
336}
337impl SqlCatalogScalarType {
338    /// String value of the enum field names used in the ProtoBuf definition.
339    ///
340    /// The values are not transformed in any way and thus are considered stable
341    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
342    pub fn as_str_name(&self) -> &'static str {
343        match self {
344            Self::Unspecified => "SQL_CATALOG_SCALAR_TYPE_UNSPECIFIED",
345            Self::Varchar => "SQL_CATALOG_SCALAR_TYPE_VARCHAR",
346            Self::Boolean => "SQL_CATALOG_SCALAR_TYPE_BOOLEAN",
347            Self::Integer => "SQL_CATALOG_SCALAR_TYPE_INTEGER",
348            Self::Bigint => "SQL_CATALOG_SCALAR_TYPE_BIGINT",
349            Self::Double => "SQL_CATALOG_SCALAR_TYPE_DOUBLE",
350            Self::Timestamp => "SQL_CATALOG_SCALAR_TYPE_TIMESTAMP",
351            Self::Any => "SQL_CATALOG_SCALAR_TYPE_ANY",
352        }
353    }
354    /// Creates an enum from field names used in the ProtoBuf definition.
355    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
356        match value {
357            "SQL_CATALOG_SCALAR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
358            "SQL_CATALOG_SCALAR_TYPE_VARCHAR" => Some(Self::Varchar),
359            "SQL_CATALOG_SCALAR_TYPE_BOOLEAN" => Some(Self::Boolean),
360            "SQL_CATALOG_SCALAR_TYPE_INTEGER" => Some(Self::Integer),
361            "SQL_CATALOG_SCALAR_TYPE_BIGINT" => Some(Self::Bigint),
362            "SQL_CATALOG_SCALAR_TYPE_DOUBLE" => Some(Self::Double),
363            "SQL_CATALOG_SCALAR_TYPE_TIMESTAMP" => Some(Self::Timestamp),
364            "SQL_CATALOG_SCALAR_TYPE_ANY" => Some(Self::Any),
365            _ => None,
366        }
367    }
368}
369#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
370#[repr(i32)]
371pub enum SqlCatalogFunctionKind {
372    Unspecified = 0,
373    Scalar = 1,
374    Aggregate = 2,
375    Window = 3,
376    Table = 4,
377}
378impl SqlCatalogFunctionKind {
379    /// String value of the enum field names used in the ProtoBuf definition.
380    ///
381    /// The values are not transformed in any way and thus are considered stable
382    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
383    pub fn as_str_name(&self) -> &'static str {
384        match self {
385            Self::Unspecified => "SQL_CATALOG_FUNCTION_KIND_UNSPECIFIED",
386            Self::Scalar => "SQL_CATALOG_FUNCTION_KIND_SCALAR",
387            Self::Aggregate => "SQL_CATALOG_FUNCTION_KIND_AGGREGATE",
388            Self::Window => "SQL_CATALOG_FUNCTION_KIND_WINDOW",
389            Self::Table => "SQL_CATALOG_FUNCTION_KIND_TABLE",
390        }
391    }
392    /// Creates an enum from field names used in the ProtoBuf definition.
393    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
394        match value {
395            "SQL_CATALOG_FUNCTION_KIND_UNSPECIFIED" => Some(Self::Unspecified),
396            "SQL_CATALOG_FUNCTION_KIND_SCALAR" => Some(Self::Scalar),
397            "SQL_CATALOG_FUNCTION_KIND_AGGREGATE" => Some(Self::Aggregate),
398            "SQL_CATALOG_FUNCTION_KIND_WINDOW" => Some(Self::Window),
399            "SQL_CATALOG_FUNCTION_KIND_TABLE" => Some(Self::Table),
400            _ => None,
401        }
402    }
403}
404/// Generated client implementations.
405pub mod sql_service_client {
406    #![allow(
407        unused_variables,
408        dead_code,
409        missing_docs,
410        clippy::wildcard_imports,
411        clippy::let_unit_value,
412    )]
413    use tonic::codegen::*;
414    use tonic::codegen::http::Uri;
415    #[derive(Debug, Clone)]
416    pub struct SqlServiceClient<T> {
417        inner: tonic::client::Grpc<T>,
418    }
419    impl SqlServiceClient<tonic::transport::Channel> {
420        /// Attempt to create a new client by connecting to a given endpoint.
421        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
422        where
423            D: TryInto<tonic::transport::Endpoint>,
424            D::Error: Into<StdError>,
425        {
426            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
427            Ok(Self::new(conn))
428        }
429    }
430    impl<T> SqlServiceClient<T>
431    where
432        T: tonic::client::GrpcService<tonic::body::Body>,
433        T::Error: Into<StdError>,
434        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
435        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
436    {
437        pub fn new(inner: T) -> Self {
438            let inner = tonic::client::Grpc::new(inner);
439            Self { inner }
440        }
441        pub fn with_origin(inner: T, origin: Uri) -> Self {
442            let inner = tonic::client::Grpc::with_origin(inner, origin);
443            Self { inner }
444        }
445        pub fn with_interceptor<F>(
446            inner: T,
447            interceptor: F,
448        ) -> SqlServiceClient<InterceptedService<T, F>>
449        where
450            F: tonic::service::Interceptor,
451            T::ResponseBody: Default,
452            T: tonic::codegen::Service<
453                http::Request<tonic::body::Body>,
454                Response = http::Response<
455                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
456                >,
457            >,
458            <T as tonic::codegen::Service<
459                http::Request<tonic::body::Body>,
460            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
461        {
462            SqlServiceClient::new(InterceptedService::new(inner, interceptor))
463        }
464        /// Compress requests with the given encoding.
465        ///
466        /// This requires the server to support it otherwise it might respond with an
467        /// error.
468        #[must_use]
469        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
470            self.inner = self.inner.send_compressed(encoding);
471            self
472        }
473        /// Enable decompressing responses.
474        #[must_use]
475        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
476            self.inner = self.inner.accept_compressed(encoding);
477            self
478        }
479        /// Limits the maximum size of a decoded message.
480        ///
481        /// Default: `4MB`
482        #[must_use]
483        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
484            self.inner = self.inner.max_decoding_message_size(limit);
485            self
486        }
487        /// Limits the maximum size of an encoded message.
488        ///
489        /// Default: `usize::MAX`
490        #[must_use]
491        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
492            self.inner = self.inner.max_encoding_message_size(limit);
493            self
494        }
495        pub async fn query(
496            &mut self,
497            request: impl tonic::IntoRequest<super::SqlServiceQueryRequest>,
498        ) -> std::result::Result<
499            tonic::Response<tonic::codec::Streaming<super::SqlServiceQueryResponse>>,
500            tonic::Status,
501        > {
502            self.inner
503                .ready()
504                .await
505                .map_err(|e| {
506                    tonic::Status::unknown(
507                        format!("Service was not ready: {}", e.into()),
508                    )
509                })?;
510            let codec = tonic::codec::ProstCodec::default();
511            let path = http::uri::PathAndQuery::from_static(
512                "/nominal.sql.v1.SqlService/Query",
513            );
514            let mut req = request.into_request();
515            req.extensions_mut()
516                .insert(GrpcMethod::new("nominal.sql.v1.SqlService", "Query"));
517            self.inner.server_streaming(req, path, codec).await
518        }
519        pub async fn export(
520            &mut self,
521            request: impl tonic::IntoRequest<super::SqlServiceExportRequest>,
522        ) -> std::result::Result<
523            tonic::Response<super::SqlServiceExportResponse>,
524            tonic::Status,
525        > {
526            self.inner
527                .ready()
528                .await
529                .map_err(|e| {
530                    tonic::Status::unknown(
531                        format!("Service was not ready: {}", e.into()),
532                    )
533                })?;
534            let codec = tonic::codec::ProstCodec::default();
535            let path = http::uri::PathAndQuery::from_static(
536                "/nominal.sql.v1.SqlService/Export",
537            );
538            let mut req = request.into_request();
539            req.extensions_mut()
540                .insert(GrpcMethod::new("nominal.sql.v1.SqlService", "Export"));
541            self.inner.unary(req, path, codec).await
542        }
543        pub async fn get_sql_catalog(
544            &mut self,
545            request: impl tonic::IntoRequest<super::GetSqlCatalogRequest>,
546        ) -> std::result::Result<
547            tonic::Response<super::GetSqlCatalogResponse>,
548            tonic::Status,
549        > {
550            self.inner
551                .ready()
552                .await
553                .map_err(|e| {
554                    tonic::Status::unknown(
555                        format!("Service was not ready: {}", e.into()),
556                    )
557                })?;
558            let codec = tonic::codec::ProstCodec::default();
559            let path = http::uri::PathAndQuery::from_static(
560                "/nominal.sql.v1.SqlService/GetSqlCatalog",
561            );
562            let mut req = request.into_request();
563            req.extensions_mut()
564                .insert(GrpcMethod::new("nominal.sql.v1.SqlService", "GetSqlCatalog"));
565            self.inner.unary(req, path, codec).await
566        }
567    }
568}