pub struct Transforms {
pub filter: Option<Filter>,
pub select: Option<Vec<String>>,
pub rename: Vec<(String, String)>,
pub limit: Option<usize>,
}Expand description
Row-level transformations applied between reading and writing.
Transforms are applied in order: filter → rename → select → limit.
All transforms are optional; an empty Transforms is a no-op.
Fields§
§filter: Option<Filter>§select: Option<Vec<String>>§rename: Vec<(String, String)>§limit: Option<usize>Implementations§
Source§impl Transforms
impl Transforms
pub fn is_empty(&self) -> bool
Sourcepub fn apply_to_row(
&self,
row: Vec<(String, CanonicalValue)>,
) -> Option<Vec<(String, CanonicalValue)>>
pub fn apply_to_row( &self, row: Vec<(String, CanonicalValue)>, ) -> Option<Vec<(String, CanonicalValue)>>
Applies transforms to a single row. Returns None if the row was
filtered out.
Sourcepub fn apply_to_array(&self, value: &CanonicalValue) -> CanonicalValue
pub fn apply_to_array(&self, value: &CanonicalValue) -> CanonicalValue
Applies transforms to a CanonicalValue::Array of objects.
Trait Implementations§
Source§impl Clone for Transforms
impl Clone for Transforms
Source§impl Debug for Transforms
impl Debug for Transforms
Auto Trait Implementations§
impl Freeze for Transforms
impl RefUnwindSafe for Transforms
impl Send for Transforms
impl Sync for Transforms
impl Unpin for Transforms
impl UnsafeUnpin for Transforms
impl UnwindSafe for Transforms
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