ReadSessionBuilder

Struct ReadSessionBuilder 

Source
pub struct ReadSessionBuilder<'a, T> { /* private fields */ }
Expand description

A builder for ReadSession. When in doubt about what a field does, please refer to CreateReadSessionRequest and the official API documentation.

Implementations§

Source§

impl<'a, T> ReadSessionBuilder<'a, T>

Source

pub fn data_format(self, data_format: DataFormat) -> Self

Sets the data format of the output data. Defaults to Arrow if not set.

Source

pub fn snapshot_time(self, snapshot_time: Timestamp) -> Self

Sets the snapshot time of the table. If not set, interpreted as now.

Source

pub fn selected_fields(self, selected_fields: Vec<String>) -> Self

Names of the fields in the table that should be read. If empty or not set, all fields will be read. If the specified field is a nested field, all the sub-fields in the field will be selected. The output field order is unrelated to the order of fields in selected_fields.

Source

pub fn row_restriction(self, row_restriction: String) -> Self

SQL text filtering statement, similar to a WHERE clause in a query. Aggregates are not supported. Examples:

  • int_field > 5

  • date_field = CAST('2014-9-27' as DATE)

  • nullable_field is not NULL

  • st_equals(geo_field, st_geofromtext("POINT(2, 2)"))

  • numeric_field BETWEEN 1.0 AND 5.0

Source

pub fn max_stream_count(self, max_stream_count: i32) -> Self

Max initial number of streams. If unset or zero, the server will provide a value of streams so as to produce reasonable throughput. Must be non-negative. The number of streams may be lower than the requested number, depending on the amount parallelism that is reasonable for the table. Error will be returned if the max count is greater than the current system max limit of 1,000.

Source

pub fn parent_project_id(self, parent_project_id: String) -> Self

The request project that owns the session. If not set, defaults to the project owning the table to be read.

Source§

impl<'a, C> ReadSessionBuilder<'a, C>
where C: Connect + Clone + Send + Sync + 'static,

Source

pub async fn build(self) -> Result<ReadSession<'a, C>, Error>

Build the ReadSession. This will hit Google’s API and prepare the desired read streams.

Auto Trait Implementations§

§

impl<'a, T> Freeze for ReadSessionBuilder<'a, T>

§

impl<'a, T> !RefUnwindSafe for ReadSessionBuilder<'a, T>

§

impl<'a, T> Send for ReadSessionBuilder<'a, T>
where T: Sync + Send,

§

impl<'a, T> Sync for ReadSessionBuilder<'a, T>
where T: Sync + Send,

§

impl<'a, T> Unpin for ReadSessionBuilder<'a, T>

§

impl<'a, T> !UnwindSafe for ReadSessionBuilder<'a, T>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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

impl<T> ErasedDestructor for T
where T: 'static,