pub struct XmlBatchBuilder { /* private fields */ }Expand description
Builds Arrow batches from complete XML record elements.
Implementations§
Source§impl XmlBatchBuilder
impl XmlBatchBuilder
Sourcepub fn new(schema: XmlSchema, batch_size: usize) -> Result<Self>
pub fn new(schema: XmlSchema, batch_size: usize) -> Result<Self>
Creates a builder with a positive row limit.
Sourcepub fn new_projected(
schema: XmlSchema,
batch_size: usize,
projection: &[usize],
) -> Result<Self>
pub fn new_projected( schema: XmlSchema, batch_size: usize, projection: &[usize], ) -> Result<Self>
Selects columns in order; duplicate or invalid indices fail. Only selected fields are converted; an empty projection counts rows. XML syntax is always checked.
Sourcepub fn append_xml(&mut self, input: &str) -> Result<()>
pub fn append_xml(&mut self, input: &str) -> Result<()>
Appends a complete XML record. Errors leave pending rows unchanged.
Sourcepub fn flush(&mut self) -> Result<Option<RecordBatch>>
pub fn flush(&mut self) -> Result<Option<RecordBatch>>
Flushes pending rows; returns None if empty.
Auto Trait Implementations§
impl !RefUnwindSafe for XmlBatchBuilder
impl !UnwindSafe for XmlBatchBuilder
impl Forget for XmlBatchBuilder
impl Freeze for XmlBatchBuilder
impl Send for XmlBatchBuilder
impl Sync for XmlBatchBuilder
impl Unpin for XmlBatchBuilder
impl UnsafeUnpin for XmlBatchBuilder
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