pub struct SchemaBridge { /* private fields */ }Expand description
Schema bridge for converting between TOON and columnar formats
Implementations§
Source§impl SchemaBridge
impl SchemaBridge
Sourcepub fn register_schema(&mut self, schema: &SochSchema) -> Arc<ColumnMapping>
pub fn register_schema(&mut self, schema: &SochSchema) -> Arc<ColumnMapping>
Register a schema and get its mapping
Sourcepub fn to_columnar(&self, table: &SochTable) -> Result<ColumnarTable>
pub fn to_columnar(&self, table: &SochTable) -> Result<ColumnarTable>
Convert TOON table to columnar format
Sourcepub fn from_columnar(
&self,
columnar: &ColumnarTable,
schema: &SochSchema,
) -> Result<SochTable>
pub fn from_columnar( &self, columnar: &ColumnarTable, schema: &SochSchema, ) -> Result<SochTable>
Convert columnar table back to TOON format
Sourcepub fn project(
&self,
columnar: &ColumnarTable,
columns: &[&str],
) -> Result<ColumnarTable>
pub fn project( &self, columnar: &ColumnarTable, columns: &[&str], ) -> Result<ColumnarTable>
Project specific columns from columnar table
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchemaBridge
impl RefUnwindSafe for SchemaBridge
impl Send for SchemaBridge
impl Sync for SchemaBridge
impl Unpin for SchemaBridge
impl UnwindSafe for SchemaBridge
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> 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