pub type StringViewBuilder = GenericByteViewBuilder<StringViewType>;Expand description
Array builder for StringViewArray
Values can be appended using GenericByteViewBuilder::append_value, and nulls with
GenericByteViewBuilder::append_null as normal.
§Example
let mut builder = StringViewBuilder::new();
builder.append_value("hello");
builder.append_null();
builder.append_value("world");
let array = builder.finish();
let expected = vec![Some("hello"), None, Some("world")];
let actual: Vec<_> = array.iter().collect();
assert_eq!(expected, actual);Aliased Type§
pub struct StringViewBuilder { /* private fields */ }Trait Implementations§
Source§impl StringLikeArrayBuilder for StringViewBuilder
impl StringLikeArrayBuilder for StringViewBuilder
Source§fn with_capacity(capacity: usize) -> Self
fn with_capacity(capacity: usize) -> Self
Creates a new builder with the given row capacity.
Source§fn append_value(&mut self, value: &str)
fn append_value(&mut self, value: &str)
Appends a non-null string value to the builder.
Source§fn append_null(&mut self)
fn append_null(&mut self)
Appends a null value to the builder.