TableInBatchGetRowRequest

Struct TableInBatchGetRowRequest 

Source
pub struct TableInBatchGetRowRequest {
    pub table_name: String,
    pub primary_keys: Vec<PrimaryKey>,
    pub columns_to_get: HashSet<String>,
    pub time_range_start_ms: Option<i64>,
    pub time_range_end_ms: Option<i64>,
    pub time_range_specific_ms: Option<i64>,
    pub max_versions: Option<i32>,
    pub start_column: Option<String>,
    pub end_column: Option<String>,
}
Expand description

单个表读取数据的配置

Fields§

§table_name: String§primary_keys: Vec<PrimaryKey>§columns_to_get: HashSet<String>§time_range_start_ms: Option<i64>§time_range_end_ms: Option<i64>§time_range_specific_ms: Option<i64>§max_versions: Option<i32>§start_column: Option<String>§end_column: Option<String>

Implementations§

Source§

impl TableInBatchGetRowRequest

Source

pub fn new(table_name: &str) -> Self

Source

pub fn primary_key(self, primary_key: PrimaryKey) -> Self

添加一个主键

Source

pub fn primary_keys(self, pks: impl IntoIterator<Item = PrimaryKey>) -> Self

设置多个主键

Source

pub fn column_to_get(self, name: &str) -> Self

需要返回的全部列的列名。如果为空,则返回指定行的所有列。columns_to_get 个数不应超过128个。 如果指定的列不存在,则不会返回指定列的数据;如果给出了重复的列名,返回结果只会包含一次指定列。

Source

pub fn columns_to_get( self, names: impl IntoIterator<Item = impl Into<String>>, ) -> Self

设置需要返回的列

Source

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

读取数据时,返回的最多版本个数。和 time_range 至少存在一个 如果指定 max_versions2 ,则每一列最多返回 2 个版本的数据。

Source

pub fn time_range(self, start_ms: i64, end_ms: i64) -> Self

查询数据时指定的时间戳范围 [start_time, end_time) 或特定时间戳值 time_specific。 时间范围和特定时间戳值二者指定其一即可。

  • start_ms: 起始时间戳。单位是毫秒。时间戳的取值最小值为 0,最大值为 i64::MAX
  • end_ms: 结束时间戳。单位是毫秒。时间戳的取值最小值为 0,最大值为 i64::MAX
Source

pub fn specific_time_ms(self, time_ms: i64) -> Self

指定精确的时间戳

Source

pub fn start_column(self, name: &str) -> Self

指定读取时的起始列,主要用于宽行读。列的顺序按照列名的字典序排序。返回的结果中包含当前起始列。 如果一张表有 abc 三列,读取时指定 start_columnb ,则会从 b 列开始读,返回 bc 两列。

Source

pub fn end_column(self, name: &str) -> Self

返回的结果中不包含当前结束列。列的顺序按照列名的字典序排序。 如果一张表有 abc 三列,读取时指定 end_columnb,则读到 b 列时会结束,返回 a 列。

Source

pub fn column_range( self, start_column_inclusive: Option<impl Into<String>>, end_column_exclusive: Option<impl Into<String>>, ) -> Self

设置读取的列范围。包含开始列名,不包含结束列名

Trait Implementations§

Source§

impl Clone for TableInBatchGetRowRequest

Source§

fn clone(&self) -> TableInBatchGetRowRequest

Returns a duplicate 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 Debug for TableInBatchGetRowRequest

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for TableInBatchGetRowRequest

Source§

fn default() -> TableInBatchGetRowRequest

Returns the “default value” for a type. Read more
Source§

impl From<TableInBatchGetRowRequest> for TableInBatchGetRowRequest

Source§

fn from(value: TableInBatchGetRowRequest) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

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

Source§

type Output = T

Should always be Self
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<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,

Source§

impl<T> MaybeSendSync for T