Skip to main content

ArrayBuilder

Trait ArrayBuilder 

Source
pub trait ArrayBuilder {
    // Required methods
    fn append_value(
        &mut self,
        value: &Value,
        row: usize,
        column: usize,
    ) -> Result<(), ConversionError>;
    fn finish(&mut self) -> Result<ArrayRef, ConversionError>;
}
Expand description

Trait for building Arrow arrays from JSON values.

Required Methods§

Source

fn append_value( &mut self, value: &Value, row: usize, column: usize, ) -> Result<(), ConversionError>

Append a JSON value to the array builder.

§Arguments
  • value - The JSON value to append (or null)
  • row - The row index for error reporting
  • column - The column index for error reporting
Source

fn finish(&mut self) -> Result<ArrayRef, ConversionError>

Finish building and return the Arrow array.

Implementors§