pub struct ReadRequestBuilder { /* private fields */ }Expand description
Represents an incomplete read operation that requires specifying keys.
§Example
// Read all rows from a table using its primary key.
let read_all = ReadRequest::builder("Users", vec!["Id", "Name"])
.with_keys(KeySet::all())
.build();
// Read specific rows using an index.
let read_by_id = ReadRequest::builder("Users", vec!["Id", "Name"])
.with_index("UsersByIndex", key![1_i64])
.set_limit(10)
.build();Use ReadRequest::builder to define the table and columns to be read.
Keys must be supplied using with_keys (for the primary key) or with_index (for an index)
to obtain an executable ReadRequest.
Implementations§
Source§impl ReadRequestBuilder
impl ReadRequestBuilder
Sourcepub fn with_keys(self, keys: impl Into<KeySet>) -> ConfiguredReadRequestBuilder
pub fn with_keys(self, keys: impl Into<KeySet>) -> ConfiguredReadRequestBuilder
Supplies the KeySet targeting the table’s primary key.
§Example
let request = ReadRequest::builder("Users", vec!["Id", "Name"]).with_keys(KeySet::all());The keys parameter identifies the rows to be yielded by naming the primary keys
of the rows in the table. Rows are yielded in table primary key order.
Sourcepub fn with_index(
self,
index: impl Into<String>,
keys: impl Into<KeySet>,
) -> ConfiguredReadRequestBuilder
pub fn with_index( self, index: impl Into<String>, keys: impl Into<KeySet>, ) -> ConfiguredReadRequestBuilder
Supplies an index name and its associated KeySet.
§Example
let request = ReadRequest::builder("Users", vec!["Id", "Name"]).with_index("UsersByIndex", key![1_i64]);The keys parameter identifies the rows to be yielded by naming the index keys
in the provided index. Rows are yielded in index key order.
Trait Implementations§
Source§impl Clone for ReadRequestBuilder
impl Clone for ReadRequestBuilder
Source§fn clone(&self) -> ReadRequestBuilder
fn clone(&self) -> ReadRequestBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReadRequestBuilder
impl Debug for ReadRequestBuilder
Source§impl PartialEq for ReadRequestBuilder
impl PartialEq for ReadRequestBuilder
Source§fn eq(&self, other: &ReadRequestBuilder) -> bool
fn eq(&self, other: &ReadRequestBuilder) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ReadRequestBuilder
Auto Trait Implementations§
impl Freeze for ReadRequestBuilder
impl RefUnwindSafe for ReadRequestBuilder
impl Send for ReadRequestBuilder
impl Sync for ReadRequestBuilder
impl Unpin for ReadRequestBuilder
impl UnsafeUnpin for ReadRequestBuilder
impl UnwindSafe for ReadRequestBuilder
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<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>
Wrap the input message
T in a tonic::Request