pub struct JsonValues<'a> { /* private fields */ }Expand description
The values of a JSON column, readable as JSONB or as text whichever encoding they arrived in.
Code that computes on JSON, such as tokenizers and indices, reads values through this type, so its behavior does not depend on whether they come from storage or from a caller.
Implementations§
Source§impl<'a> JsonValues<'a>
impl<'a> JsonValues<'a>
Sourcepub fn try_new(field: &ArrowField, array: &'a ArrayRef) -> Option<Self>
pub fn try_new(field: &ArrowField, array: &'a ArrayRef) -> Option<Self>
Read array as the values of field, or None when field does not
hold JSON.
pub fn encoding(&self) -> JsonEncoding
Sourcepub fn to_jsonb(&self) -> Result<LargeBinaryArray, ArrowError>
pub fn to_jsonb(&self) -> Result<LargeBinaryArray, ArrowError>
The values as JSONB. Text values are parsed, so invalid JSON fails.
Trait Implementations§
Source§impl<'a> Clone for JsonValues<'a>
impl<'a> Clone for JsonValues<'a>
impl<'a> Copy for JsonValues<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for JsonValues<'a>
impl<'a> !UnwindSafe for JsonValues<'a>
impl<'a> Freeze for JsonValues<'a>
impl<'a> Send for JsonValues<'a>
impl<'a> Sync for JsonValues<'a>
impl<'a> Unpin for JsonValues<'a>
impl<'a> UnsafeUnpin for JsonValues<'a>
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