pub struct TableServiceClient<T> { /* private fields */ }
Implementations§
Source§impl<T> TableServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: 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: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> TableServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding. This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
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 read_rows(
&mut self,
request: impl IntoRequest<ReadRowsRequest>,
) -> Result<Response<ReadRowsResponse>, Status>
pub async fn read_rows( &mut self, request: impl IntoRequest<ReadRowsRequest>, ) -> Result<Response<ReadRowsResponse>, Status>
Reads specified keys non-transactionally from a single 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§
Source§impl<T: Clone> Clone for TableServiceClient<T>
impl<T: Clone> Clone for TableServiceClient<T>
Source§fn clone(&self) -> TableServiceClient<T>
fn clone(&self) -> TableServiceClient<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for TableServiceClient<T>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request