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

Implementations§

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

Examples found in repository?
src/generated/ydb.table.v1.rs (line 18)
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: std::convert::TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> TableServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::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 {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> TableServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            TableServiceClient::new(InterceptedService::new(inner, interceptor))
        }

Compress requests with the given encoding. This requires the server to support it otherwise it might respond with an error.

Enable decompressing responses.

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.

Ends a session, releasing server resources associated with it.

Idle sessions can be kept alive by calling KeepAlive periodically.

Creates new table.

Drop table.

Modifies schema of given table.

Creates copy of given table.

Creates consistent copy of given tables.

Creates consistent move of given tables.

Returns information about given table (metadata).

Explains data query. SessionId of previously created session must be provided.

Prepares data query, returns query id. SessionId of previously created session must be provided.

Executes data query. SessionId of previously created session must be provided.

Executes scheme query. SessionId of previously created session must be provided.

Begins new transaction.

Commits specified active transaction.

Performs a rollback of the specified active transaction.

Describe supported table options.

Streaming read table

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.

Executes scan query with streaming result.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Converts to this type from a reference to the input type.
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Wrap the input message T in a tonic::Request
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more