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>
impl<'a, T> ReadSessionBuilder<'a, T>
Sourcepub fn data_format(self, data_format: DataFormat) -> Self
pub fn data_format(self, data_format: DataFormat) -> Self
Sets the data format of the output data. Defaults to Arrow if not set.
Sourcepub fn snapshot_time(self, snapshot_time: Timestamp) -> Self
pub fn snapshot_time(self, snapshot_time: Timestamp) -> Self
Sets the snapshot time of the table. If not set, interpreted as now.
Sourcepub fn selected_fields(self, selected_fields: Vec<String>) -> Self
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.
Sourcepub fn row_restriction(self, row_restriction: String) -> Self
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
Sourcepub fn max_stream_count(self, max_stream_count: i32) -> Self
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.
Sourcepub fn parent_project_id(self, parent_project_id: String) -> Self
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>
impl<'a, C> ReadSessionBuilder<'a, C>
Sourcepub async fn build(self) -> Result<ReadSession<'a, C>, Error>
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>
impl<'a, T> Sync for ReadSessionBuilder<'a, T>
impl<'a, T> Unpin for ReadSessionBuilder<'a, T>
impl<'a, T> !UnwindSafe for ReadSessionBuilder<'a, T>
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> 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> 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