pub struct BuilderFactory { /* private fields */ }Expand description
Factory for creating type-safe Arrow builders.
The factory ensures builders are created with appropriate capacity and configuration for each Arrow data type.
Implementations§
Source§impl BuilderFactory
impl BuilderFactory
Sourcepub const fn new(capacity: usize) -> Self
pub const fn new(capacity: usize) -> Self
Create a new factory with the specified row capacity.
Sourcepub fn from_config(config: &BatchConfig) -> Self
pub fn from_config(config: &BatchConfig) -> Self
Create from BatchConfig.
Sourcepub const fn with_string_capacity(self, capacity: usize) -> Self
pub const fn with_string_capacity(self, capacity: usize) -> Self
Set the string data capacity.
Sourcepub const fn with_binary_capacity(self, capacity: usize) -> Self
pub const fn with_binary_capacity(self, capacity: usize) -> Self
Set the binary data capacity.
Sourcepub const fn with_max_lob_bytes(self, max: Option<usize>) -> Self
pub const fn with_max_lob_bytes(self, max: Option<usize>) -> Self
Set the maximum LOB size in bytes.
Sourcepub fn create_builder(
&self,
data_type: &DataType,
) -> Box<dyn HanaCompatibleBuilder>
pub fn create_builder( &self, data_type: &DataType, ) -> Box<dyn HanaCompatibleBuilder>
Create a builder for the specified Arrow data type.
Returns a boxed trait object that implements HanaCompatibleBuilder.
§Panics
Panics if the data type is not supported (should not happen if using
hana_type_to_arrow for type mapping).
Sourcepub fn create_builders_for_schema(
&self,
schema: &Schema,
) -> Vec<Box<dyn HanaCompatibleBuilder>>
pub fn create_builders_for_schema( &self, schema: &Schema, ) -> Vec<Box<dyn HanaCompatibleBuilder>>
Create builders for all fields in a schema.
Returns a vector of boxed builders in the same order as schema fields.
Trait Implementations§
Source§impl Clone for BuilderFactory
impl Clone for BuilderFactory
Source§fn clone(&self) -> BuilderFactory
fn clone(&self) -> BuilderFactory
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 BuilderFactory
impl Debug for BuilderFactory
Auto Trait Implementations§
impl Freeze for BuilderFactory
impl RefUnwindSafe for BuilderFactory
impl Send for BuilderFactory
impl Sync for BuilderFactory
impl Unpin for BuilderFactory
impl UnwindSafe for BuilderFactory
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