UpdateTableRequest

Struct UpdateTableRequest 

Source
pub struct UpdateTableRequest {
    pub table_name: String,
    pub reserved_throughput_read: Option<i32>,
    pub reserved_throughput_write: Option<i32>,
    pub ttl_seconds: Option<i32>,
    pub max_versions: Option<i32>,
    pub deviation_cell_version_in_sec: Option<i64>,
    pub allow_update: Option<bool>,
    pub stream_enabled: bool,
    pub stream_expiration_hour: Option<i32>,
    pub stream_columns: HashSet<String>,
}
Expand description

修改表的配置信息 table_options 和 Stream 配置 StreamSpecification。 如果表处于 CU 模式(原按量模式)的高性能型实例中, 您还可以为数据表配置预留读/写吞吐量 reserved_throughput,新设定将于更新成功后的一分钟内生效。

官方文档:https://help.aliyun.com/zh/tablestore/developer-reference/updatetable-of-tablestore

Fields§

§table_name: String§reserved_throughput_read: Option<i32>§reserved_throughput_write: Option<i32>§ttl_seconds: Option<i32>§max_versions: Option<i32>§deviation_cell_version_in_sec: Option<i64>§allow_update: Option<bool>§stream_enabled: bool§stream_expiration_hour: Option<i32>§stream_columns: HashSet<String>

Implementations§

Source§

impl UpdateTableRequest

Source

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

Source

pub fn reserved_throughput_read(self, read_cu: i32) -> Self

预设读取吞吐量。最大 100000 CU

Source

pub fn reserved_throughput_write(self, write_cu: i32) -> Self

预设写入吞吐量。最大 100000 CU

Source

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

数据生命周期,即数据的过期时间。当数据的保存时间超过设置的数据生命周期时,系统会自动清理超过数据生命周期的数据。 数据生命周期至少为 86400 秒(一天)或 -1(数据永不过期)。

Source

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

最大版本数,即属性列能够保留数据的最大版本个数。当属性列数据的版本个数超过设置的最大版本数时,系统会自动删除较早版本的数据。

Source

pub fn deviation_cell_version_seconds(self, dev: i64) -> Self

有效版本偏差,即写入数据的时间戳与系统当前时间的偏差允许最大值。只有当写入数据所有列的版本号与写入时时间的差值在数据有效版本偏差范围内,数据才能成功写入。

属性列的有效版本范围为 [max{数据写入时间-有效版本偏差,数据写入时间-数据生命周期},数据写入时间+有效版本偏差)

Source

pub fn allow_update(self, allow_update: bool) -> Self

是否允许通过 UpdateRow 更新写入数据。默认值为 true,表示允许通过 UpdateRow 更新写入数据。

当要使用多元索引生命周期功能时,您必须设置此参数为 false,即不允许通过 UpdateRow 更新写入数据。

Source

pub fn stream(self, enabled: bool) -> Self

设置是否启用 stream

Source

pub fn stream_expiration(self, exp: i32) -> Self

设置 stream 过期时间

Source

pub fn add_stream_column(self, col_name: impl Into<String>) -> Self

添加 stream 列

Trait Implementations§

Source§

impl Clone for UpdateTableRequest

Source§

fn clone(&self) -> UpdateTableRequest

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 UpdateTableRequest

Source§

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

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

impl Default for UpdateTableRequest

Source§

fn default() -> UpdateTableRequest

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

impl From<UpdateTableRequest> for UpdateTableRequest

Source§

fn from(value: UpdateTableRequest) -> 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