pub struct SelectiveReadOptions {
pub include_fields: HashSet<AllocationField>,
pub filters: Vec<AllocationFilter>,
pub limit: Option<usize>,
pub offset: Option<usize>,
pub sort_by: Option<SortField>,
pub sort_order: SortOrder,
pub enable_batch_processing: bool,
pub batch_size: usize,
}
Expand description
Configuration options for selective reading operations
Fields§
§include_fields: HashSet<AllocationField>
Fields to include in the read operation
filters: Vec<AllocationFilter>
Filters to apply during reading
limit: Option<usize>
Maximum number of records to read (None for unlimited)
offset: Option<usize>
Number of records to skip from the beginning
sort_by: Option<SortField>
Field to sort results by
sort_order: SortOrder
Sort order (ascending or descending)
enable_batch_processing: bool
Whether to enable batch processing optimizations
batch_size: usize
Batch size for processing (default: 1000)
Implementations§
Source§impl SelectiveReadOptions
impl SelectiveReadOptions
Sourcepub fn with_fields(self, fields: HashSet<AllocationField>) -> Self
pub fn with_fields(self, fields: HashSet<AllocationField>) -> Self
Set the fields to include in the read operation
Sourcepub fn include_field(self, field: AllocationField) -> Self
pub fn include_field(self, field: AllocationField) -> Self
Add a single field to include
Sourcepub fn include_fields(self, fields: &[AllocationField]) -> Self
pub fn include_fields(self, fields: &[AllocationField]) -> Self
Add multiple fields to include
Sourcepub fn with_filters(self, filters: Vec<AllocationFilter>) -> Self
pub fn with_filters(self, filters: Vec<AllocationFilter>) -> Self
Set filters to apply during reading
Sourcepub fn add_filter(self, filter: AllocationFilter) -> Self
pub fn add_filter(self, filter: AllocationFilter) -> Self
Add a single filter
Sourcepub fn with_limit(self, limit: usize) -> Self
pub fn with_limit(self, limit: usize) -> Self
Set the maximum number of records to read
Sourcepub fn with_offset(self, offset: usize) -> Self
pub fn with_offset(self, offset: usize) -> Self
Set the number of records to skip
Sourcepub fn with_batch_processing(
self,
enabled: bool,
batch_size: Option<usize>,
) -> Self
pub fn with_batch_processing( self, enabled: bool, batch_size: Option<usize>, ) -> Self
Enable or disable batch processing
Sourcepub fn validate(&self) -> Result<(), BinaryExportError>
pub fn validate(&self) -> Result<(), BinaryExportError>
Validate the configuration options
Sourcepub fn includes_field(&self, field: &AllocationField) -> bool
pub fn includes_field(&self, field: &AllocationField) -> bool
Check if a specific field is included
Sourcepub fn effective_limit(&self) -> Option<usize>
pub fn effective_limit(&self) -> Option<usize>
Get the effective limit considering offset
Trait Implementations§
Source§impl Clone for SelectiveReadOptions
impl Clone for SelectiveReadOptions
Source§fn clone(&self) -> SelectiveReadOptions
fn clone(&self) -> SelectiveReadOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SelectiveReadOptions
impl Debug for SelectiveReadOptions
Auto Trait Implementations§
impl Freeze for SelectiveReadOptions
impl RefUnwindSafe for SelectiveReadOptions
impl Send for SelectiveReadOptions
impl Sync for SelectiveReadOptions
impl Unpin for SelectiveReadOptions
impl UnwindSafe for SelectiveReadOptions
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
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>
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>
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