Struct ydb_grpc::ydb_proto::table::v1::table_service_client::TableServiceClient
source · [−]pub struct TableServiceClient<T> { /* private fields */ }Implementations
sourceimpl<T> TableServiceClient<T> where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Default + Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> TableServiceClient<T> where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Default + Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> TableServiceClient<InterceptedService<T, F>> where
F: Interceptor,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_gzip(self) -> Self
pub fn send_gzip(self) -> Self
Compress requests with gzip.
This requires the server to support it otherwise it might respond with an
error.
sourcepub fn accept_gzip(self) -> Self
pub fn accept_gzip(self) -> Self
Enable decompressing responses with gzip.
sourcepub async fn create_session(
&mut self,
request: impl IntoRequest<CreateSessionRequest>
) -> Result<Response<CreateSessionResponse>, Status>
pub async fn create_session(
&mut self,
request: impl IntoRequest<CreateSessionRequest>
) -> Result<Response<CreateSessionResponse>, Status>
Create new session. Implicit session creation is forbidden, so user must create new session before execute any query, otherwise BAD_SESSION status will be returned. Simultaneous execution of requests are forbiden. Sessions are volatile, can be invalidated by server, for example in case of fatal errors. All requests with this session will fail with BAD_SESSION status. So, client must be able to handle BAD_SESSION status.
sourcepub async fn delete_session(
&mut self,
request: impl IntoRequest<DeleteSessionRequest>
) -> Result<Response<DeleteSessionResponse>, Status>
pub async fn delete_session(
&mut self,
request: impl IntoRequest<DeleteSessionRequest>
) -> Result<Response<DeleteSessionResponse>, Status>
Ends a session, releasing server resources associated with it.
sourcepub async fn keep_alive(
&mut self,
request: impl IntoRequest<KeepAliveRequest>
) -> Result<Response<KeepAliveResponse>, Status>
pub async fn keep_alive(
&mut self,
request: impl IntoRequest<KeepAliveRequest>
) -> Result<Response<KeepAliveResponse>, Status>
Idle sessions can be kept alive by calling KeepAlive periodically.
sourcepub async fn create_table(
&mut self,
request: impl IntoRequest<CreateTableRequest>
) -> Result<Response<CreateTableResponse>, Status>
pub async fn create_table(
&mut self,
request: impl IntoRequest<CreateTableRequest>
) -> Result<Response<CreateTableResponse>, Status>
Creates new table.
sourcepub async fn drop_table(
&mut self,
request: impl IntoRequest<DropTableRequest>
) -> Result<Response<DropTableResponse>, Status>
pub async fn drop_table(
&mut self,
request: impl IntoRequest<DropTableRequest>
) -> Result<Response<DropTableResponse>, Status>
Drop table.
sourcepub async fn alter_table(
&mut self,
request: impl IntoRequest<AlterTableRequest>
) -> Result<Response<AlterTableResponse>, Status>
pub async fn alter_table(
&mut self,
request: impl IntoRequest<AlterTableRequest>
) -> Result<Response<AlterTableResponse>, Status>
Modifies schema of given table.
sourcepub async fn copy_table(
&mut self,
request: impl IntoRequest<CopyTableRequest>
) -> Result<Response<CopyTableResponse>, Status>
pub async fn copy_table(
&mut self,
request: impl IntoRequest<CopyTableRequest>
) -> Result<Response<CopyTableResponse>, Status>
Creates copy of given table.
sourcepub async fn copy_tables(
&mut self,
request: impl IntoRequest<CopyTablesRequest>
) -> Result<Response<CopyTablesResponse>, Status>
pub async fn copy_tables(
&mut self,
request: impl IntoRequest<CopyTablesRequest>
) -> Result<Response<CopyTablesResponse>, Status>
Creates consistent copy of given tables.
sourcepub async fn rename_tables(
&mut self,
request: impl IntoRequest<RenameTablesRequest>
) -> Result<Response<RenameTablesResponse>, Status>
pub async fn rename_tables(
&mut self,
request: impl IntoRequest<RenameTablesRequest>
) -> Result<Response<RenameTablesResponse>, Status>
Creates consistent move of given tables.
sourcepub async fn describe_table(
&mut self,
request: impl IntoRequest<DescribeTableRequest>
) -> Result<Response<DescribeTableResponse>, Status>
pub async fn describe_table(
&mut self,
request: impl IntoRequest<DescribeTableRequest>
) -> Result<Response<DescribeTableResponse>, Status>
Returns information about given table (metadata).
sourcepub async fn explain_data_query(
&mut self,
request: impl IntoRequest<ExplainDataQueryRequest>
) -> Result<Response<ExplainDataQueryResponse>, Status>
pub async fn explain_data_query(
&mut self,
request: impl IntoRequest<ExplainDataQueryRequest>
) -> Result<Response<ExplainDataQueryResponse>, Status>
Explains data query. SessionId of previously created session must be provided.
sourcepub async fn prepare_data_query(
&mut self,
request: impl IntoRequest<PrepareDataQueryRequest>
) -> Result<Response<PrepareDataQueryResponse>, Status>
pub async fn prepare_data_query(
&mut self,
request: impl IntoRequest<PrepareDataQueryRequest>
) -> Result<Response<PrepareDataQueryResponse>, Status>
Prepares data query, returns query id. SessionId of previously created session must be provided.
sourcepub async fn execute_data_query(
&mut self,
request: impl IntoRequest<ExecuteDataQueryRequest>
) -> Result<Response<ExecuteDataQueryResponse>, Status>
pub async fn execute_data_query(
&mut self,
request: impl IntoRequest<ExecuteDataQueryRequest>
) -> Result<Response<ExecuteDataQueryResponse>, Status>
Executes data query. SessionId of previously created session must be provided.
sourcepub async fn execute_scheme_query(
&mut self,
request: impl IntoRequest<ExecuteSchemeQueryRequest>
) -> Result<Response<ExecuteSchemeQueryResponse>, Status>
pub async fn execute_scheme_query(
&mut self,
request: impl IntoRequest<ExecuteSchemeQueryRequest>
) -> Result<Response<ExecuteSchemeQueryResponse>, Status>
Executes scheme query. SessionId of previously created session must be provided.
sourcepub async fn begin_transaction(
&mut self,
request: impl IntoRequest<BeginTransactionRequest>
) -> Result<Response<BeginTransactionResponse>, Status>
pub async fn begin_transaction(
&mut self,
request: impl IntoRequest<BeginTransactionRequest>
) -> Result<Response<BeginTransactionResponse>, Status>
Begins new transaction.
sourcepub async fn commit_transaction(
&mut self,
request: impl IntoRequest<CommitTransactionRequest>
) -> Result<Response<CommitTransactionResponse>, Status>
pub async fn commit_transaction(
&mut self,
request: impl IntoRequest<CommitTransactionRequest>
) -> Result<Response<CommitTransactionResponse>, Status>
Commits specified active transaction.
sourcepub async fn rollback_transaction(
&mut self,
request: impl IntoRequest<RollbackTransactionRequest>
) -> Result<Response<RollbackTransactionResponse>, Status>
pub async fn rollback_transaction(
&mut self,
request: impl IntoRequest<RollbackTransactionRequest>
) -> Result<Response<RollbackTransactionResponse>, Status>
Performs a rollback of the specified active transaction.
sourcepub async fn describe_table_options(
&mut self,
request: impl IntoRequest<DescribeTableOptionsRequest>
) -> Result<Response<DescribeTableOptionsResponse>, Status>
pub async fn describe_table_options(
&mut self,
request: impl IntoRequest<DescribeTableOptionsRequest>
) -> Result<Response<DescribeTableOptionsResponse>, Status>
Describe supported table options.
sourcepub async fn stream_read_table(
&mut self,
request: impl IntoRequest<ReadTableRequest>
) -> Result<Response<Streaming<ReadTableResponse>>, Status>
pub async fn stream_read_table(
&mut self,
request: impl IntoRequest<ReadTableRequest>
) -> Result<Response<Streaming<ReadTableResponse>>, Status>
Streaming read table
sourcepub async fn bulk_upsert(
&mut self,
request: impl IntoRequest<BulkUpsertRequest>
) -> Result<Response<BulkUpsertResponse>, Status>
pub async fn bulk_upsert(
&mut self,
request: impl IntoRequest<BulkUpsertRequest>
) -> Result<Response<BulkUpsertResponse>, Status>
Upserts a batch of rows non-transactionally. Returns success only when all rows were successfully upserted. In case of an error some rows might be upserted and some might not.
sourcepub async fn stream_execute_scan_query(
&mut self,
request: impl IntoRequest<ExecuteScanQueryRequest>
) -> Result<Response<Streaming<ExecuteScanQueryPartialResponse>>, Status>
pub async fn stream_execute_scan_query(
&mut self,
request: impl IntoRequest<ExecuteScanQueryRequest>
) -> Result<Response<Streaming<ExecuteScanQueryPartialResponse>>, Status>
Executes scan query with streaming result.
Trait Implementations
sourceimpl<T: Clone> Clone for TableServiceClient<T>
impl<T: Clone> Clone for TableServiceClient<T>
sourcefn clone(&self) -> TableServiceClient<T>
fn clone(&self) -> TableServiceClient<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for TableServiceClient<T> where
T: RefUnwindSafe,
impl<T> Send for TableServiceClient<T> where
T: Send,
impl<T> Sync for TableServiceClient<T> where
T: Sync,
impl<T> Unpin for TableServiceClient<T> where
T: Unpin,
impl<T> UnwindSafe for TableServiceClient<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T in a tonic::Request
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more