pub struct StreamResultSetConfig {
pub batch_size: usize,
pub backpressure_threshold: usize,
pub pagination_strategy: PaginationStrategy,
pub keyset_column: Option<String>,
pub order_direction: OrderDirection,
pub db_type: DbType,
}Expand description
流式结果集配置
Fields§
§batch_size: usize批次大小(默认 1000)
backpressure_threshold: usize背压阈值(默认 10000)
pagination_strategy: PaginationStrategy分页策略
keyset_column: Option<String>keyset 列名(Keyset 策略时必须设置)
order_direction: OrderDirection排序方向
db_type: DbType数据库类型
Implementations§
Source§impl StreamResultSetConfig
impl StreamResultSetConfig
pub fn new(db_type: DbType) -> Self
pub fn with_batch_size(self, batch_size: usize) -> Self
pub fn with_backpressure_threshold(self, threshold: usize) -> Self
pub fn with_pagination_strategy(self, strategy: PaginationStrategy) -> Self
pub fn with_keyset_column(self, column: impl Into<String>) -> Self
pub fn with_order_direction(self, direction: OrderDirection) -> Self
Trait Implementations§
Source§impl Clone for StreamResultSetConfig
impl Clone for StreamResultSetConfig
Source§fn clone(&self) -> StreamResultSetConfig
fn clone(&self) -> StreamResultSetConfig
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 StreamResultSetConfig
impl Debug for StreamResultSetConfig
Auto Trait Implementations§
impl Freeze for StreamResultSetConfig
impl RefUnwindSafe for StreamResultSetConfig
impl Send for StreamResultSetConfig
impl Sync for StreamResultSetConfig
impl Unpin for StreamResultSetConfig
impl UnsafeUnpin for StreamResultSetConfig
impl UnwindSafe for StreamResultSetConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more