Struct TableServiceClient

Source
pub struct TableServiceClient<T> { /* private fields */ }

Implementations§

Source§

impl TableServiceClient<Channel>

Source

pub async fn connect<D>(dst: D) -> Result<Self, Error>
where D: TryInto<Endpoint>, D::Error: Into<StdError>,

Attempt to create a new client by connecting to a given endpoint.

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,

Source

pub fn new(inner: T) -> Self

Source

pub fn with_origin(inner: T, origin: Uri) -> Self

Source

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,

Source

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.

Source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

Source

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.

Source

pub async fn delete_session( &mut self, request: impl IntoRequest<DeleteSessionRequest>, ) -> Result<Response<DeleteSessionResponse>, Status>

Ends a session, releasing server resources associated with it.

Source

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.

Source

pub async fn create_table( &mut self, request: impl IntoRequest<CreateTableRequest>, ) -> Result<Response<CreateTableResponse>, Status>

Creates new table.

Source

pub async fn drop_table( &mut self, request: impl IntoRequest<DropTableRequest>, ) -> Result<Response<DropTableResponse>, Status>

Drop table.

Source

pub async fn alter_table( &mut self, request: impl IntoRequest<AlterTableRequest>, ) -> Result<Response<AlterTableResponse>, Status>

Modifies schema of given table.

Source

pub async fn copy_table( &mut self, request: impl IntoRequest<CopyTableRequest>, ) -> Result<Response<CopyTableResponse>, Status>

Creates copy of given table.

Source

pub async fn copy_tables( &mut self, request: impl IntoRequest<CopyTablesRequest>, ) -> Result<Response<CopyTablesResponse>, Status>

Creates consistent copy of given tables.

Source

pub async fn rename_tables( &mut self, request: impl IntoRequest<RenameTablesRequest>, ) -> Result<Response<RenameTablesResponse>, Status>

Creates consistent move of given tables.

Source

pub async fn describe_table( &mut self, request: impl IntoRequest<DescribeTableRequest>, ) -> Result<Response<DescribeTableResponse>, Status>

Returns information about given table (metadata).

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub async fn begin_transaction( &mut self, request: impl IntoRequest<BeginTransactionRequest>, ) -> Result<Response<BeginTransactionResponse>, Status>

Begins new transaction.

Source

pub async fn commit_transaction( &mut self, request: impl IntoRequest<CommitTransactionRequest>, ) -> Result<Response<CommitTransactionResponse>, Status>

Commits specified active transaction.

Source

pub async fn rollback_transaction( &mut self, request: impl IntoRequest<RollbackTransactionRequest>, ) -> Result<Response<RollbackTransactionResponse>, Status>

Performs a rollback of the specified active transaction.

Source

pub async fn describe_table_options( &mut self, request: impl IntoRequest<DescribeTableOptionsRequest>, ) -> Result<Response<DescribeTableOptionsResponse>, Status>

Describe supported table options.

Source

pub async fn stream_read_table( &mut self, request: impl IntoRequest<ReadTableRequest>, ) -> Result<Response<Streaming<ReadTableResponse>>, Status>

Streaming read table

Source

pub async fn read_rows( &mut self, request: impl IntoRequest<ReadRowsRequest>, ) -> Result<Response<ReadRowsResponse>, Status>

Reads specified keys non-transactionally from a single table

Source

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.

Source

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>

Source§

fn clone(&self) -> TableServiceClient<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for TableServiceClient<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more