pub struct ParallelScanRequest {
pub table_name: String,
pub index_name: String,
pub scan_query: ScanQuery,
pub session_id: Option<Vec<u8>>,
pub column_return_type: Option<ColumnReturnType>,
pub columns_to_get: HashSet<String>,
pub timeout_ms: Option<u32>,
}
Expand description
Fields§
§table_name: String
数据表名称
index_name: String
多元索引名称
scan_query: ScanQuery
扫描查询配置
session_id: Option<Vec<u8>>
当前 sessionId。使用 sessionId 能够保证获取到的结果集是稳定的
column_return_type: Option<ColumnReturnType>
返回列类型
columns_to_get: HashSet<String>
需要获取的列
timeout_ms: Option<u32>
请求超时时间,单位为毫秒
Implementations§
Source§impl ParallelScanRequest
impl ParallelScanRequest
pub fn new(table_name: &str, index_name: &str, scan_query: ScanQuery) -> Self
Sourcepub fn table_name(self, table_name: String) -> Self
pub fn table_name(self, table_name: String) -> Self
设置数据表名称
Sourcepub fn index_name(self, index_name: String) -> Self
pub fn index_name(self, index_name: String) -> Self
设置多元索引名称
Sourcepub fn scan_query(self, scan_query: ScanQuery) -> Self
pub fn scan_query(self, scan_query: ScanQuery) -> Self
设置扫描查询配置
Sourcepub fn session_id(self, session_id: impl Into<Vec<u8>>) -> Self
pub fn session_id(self, session_id: impl Into<Vec<u8>>) -> Self
设置当前 sessionId
Sourcepub fn column_return_type(self, column_return_type: ColumnReturnType) -> Self
pub fn column_return_type(self, column_return_type: ColumnReturnType) -> Self
设置返回列类型
Sourcepub fn column_to_get(self, column: impl Into<String>) -> Self
pub fn column_to_get(self, column: impl Into<String>) -> Self
添加一个需要获取的列
Sourcepub fn columns_to_get(
self,
columns: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn columns_to_get( self, columns: impl IntoIterator<Item = impl Into<String>>, ) -> Self
设置需要获取的列
Sourcepub fn timeout_ms(self, timeout_ms: u32) -> Self
pub fn timeout_ms(self, timeout_ms: u32) -> Self
设置请求超时时间
Trait Implementations§
Source§impl Clone for ParallelScanRequest
impl Clone for ParallelScanRequest
Source§fn clone(&self) -> ParallelScanRequest
fn clone(&self) -> ParallelScanRequest
Returns a duplicate of the value. Read more
1.0.0 · 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 ParallelScanRequest
impl Debug for ParallelScanRequest
Source§impl From<ParallelScanRequest> for ParallelScanRequest
impl From<ParallelScanRequest> for ParallelScanRequest
Source§fn from(value: ParallelScanRequest) -> Self
fn from(value: ParallelScanRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ParallelScanRequest
impl RefUnwindSafe for ParallelScanRequest
impl Send for ParallelScanRequest
impl Sync for ParallelScanRequest
impl Unpin for ParallelScanRequest
impl UnwindSafe for ParallelScanRequest
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