pub enum ColumnView {
Show 17 variants
Bool(BoolView),
TinyInt(TinyIntView),
SmallInt(SmallIntView),
Int(IntView),
BigInt(BigIntView),
Float(FloatView),
Double(DoubleView),
VarChar(VarCharView),
Timestamp(TimestampView),
NChar(NCharView),
UTinyInt(UTinyIntView),
USmallInt(USmallIntView),
UInt(UIntView),
UBigInt(UBigIntView),
Json(JsonView),
VarBinary(VarBinaryView),
Geometry(GeometryView),
}
Variants§
Bool(BoolView)
TinyInt(TinyIntView)
SmallInt(SmallIntView)
Int(IntView)
BigInt(BigIntView)
Float(FloatView)
Double(DoubleView)
VarChar(VarCharView)
Timestamp(TimestampView)
NChar(NCharView)
UTinyInt(UTinyIntView)
USmallInt(USmallIntView)
UInt(UIntView)
UBigInt(UBigIntView)
Json(JsonView)
VarBinary(VarBinaryView)
Geometry(GeometryView)
Implementations§
Source§impl ColumnView
impl ColumnView
pub fn from_millis_timestamp(values: Vec<impl Into<Option<i64>>>) -> Self
pub fn from_micros_timestamp(values: Vec<impl Into<Option<i64>>>) -> Self
pub fn from_nanos_timestamp(values: Vec<impl Into<Option<i64>>>) -> Self
pub fn from_bools(values: Vec<impl Into<Option<bool>>>) -> Self
pub fn from_tiny_ints(values: Vec<impl Into<Option<i8>>>) -> Self
pub fn from_small_ints(values: Vec<impl Into<Option<i16>>>) -> Self
pub fn from_ints(values: Vec<impl Into<Option<i32>>>) -> Self
pub fn from_big_ints(values: Vec<impl Into<Option<i64>>>) -> Self
pub fn from_unsigned_tiny_ints(values: Vec<impl Into<Option<u8>>>) -> Self
pub fn from_unsigned_small_ints(values: Vec<impl Into<Option<u16>>>) -> Self
pub fn from_unsigned_ints(values: Vec<impl Into<Option<u32>>>) -> Self
pub fn from_unsigned_big_ints(values: Vec<impl Into<Option<u64>>>) -> Self
pub fn from_floats(values: Vec<impl Into<Option<f32>>>) -> Self
pub fn from_doubles(values: Vec<impl Into<Option<f64>>>) -> Self
pub fn from_varchar<S: AsRef<str>, T: Into<Option<S>>, I: ExactSizeIterator<Item = T>, V: IntoIterator<Item = T, IntoIter = I>>( iter: V, ) -> Self
pub fn from_nchar<S: AsRef<str>, T: Into<Option<S>>, I: ExactSizeIterator<Item = T>, V: IntoIterator<Item = T, IntoIter = I>>( iter: V, ) -> Self
pub fn from_json<S: AsRef<str>, T: Into<Option<S>>, I: ExactSizeIterator<Item = T>, V: IntoIterator<Item = T, IntoIter = I>>( iter: V, ) -> Self
pub fn from_bytes<S: AsRef<[u8]>, T: Into<Option<S>>, I: ExactSizeIterator<Item = T>, V: IntoIterator<Item = T, IntoIter = I>>( iter: V, ) -> Self
pub fn from_geobytes<S: AsRef<[u8]>, T: Into<Option<S>>, I: ExactSizeIterator<Item = T>, V: IntoIterator<Item = T, IntoIter = I>>( iter: V, ) -> Self
pub fn concat_iter<'b, 'a: 'b>( &'a self, rhs: impl Iterator<Item = BorrowedValue<'b>>, ty: Ty, ) -> ColumnView
Sourcepub fn concat(&self, rhs: &ColumnView) -> ColumnView
pub fn concat(&self, rhs: &ColumnView) -> ColumnView
Concatenate another column view, output a new column view with exact type of self.
Sourcepub fn concat_strictly(&self, rhs: &ColumnView) -> ColumnView
pub fn concat_strictly(&self, rhs: &ColumnView) -> ColumnView
Concatenate another column view strictly, output a new column view with exact type of self.
§Panics
Panics if the two column views have different types.
Sourcepub fn concat_as(&self, rhs: &ColumnView, ty: Ty) -> ColumnView
pub fn concat_as(&self, rhs: &ColumnView, ty: Ty) -> ColumnView
Concatenate another column view, output a new column view with specified type ty
.
pub fn max_variable_length(&self) -> usize
pub fn get(&self, row: usize) -> Option<BorrowedValue<'_>>
pub fn iter(&self) -> ColumnViewIter<'_> ⓘ
pub fn slice(&self, range: Range<usize>) -> Option<Self>
pub fn as_ty(&self) -> Ty
Sourcepub fn cast(&self, ty: Ty) -> Result<ColumnView, CastError>
pub fn cast(&self, ty: Ty) -> Result<ColumnView, CastError>
Cast behaviors:
- BOOL to VARCHAR/NCHAR: true => “true”, false => “false”
- numeric(integers/float/double) to string(varchar/nchar): like print or to_string.
- string to primitive: can be parsed => primitive, others => null.
- timestamp to string: RFC3339 with localized timezone.
Not supported:
- any to timestamp
pub fn cast_precision(&self, precision: Precision) -> ColumnView
pub unsafe fn as_timestamp_view(&self) -> &TimestampView
Trait Implementations§
Source§impl Add for ColumnView
impl Add for ColumnView
Source§impl Clone for ColumnView
impl Clone for ColumnView
Source§fn clone(&self) -> ColumnView
fn clone(&self) -> ColumnView
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 ColumnView
impl Debug for ColumnView
Source§impl From<Value> for ColumnView
impl From<Value> for ColumnView
Source§impl<'a> IntoIterator for &'a ColumnView
impl<'a> IntoIterator for &'a ColumnView
impl Send for ColumnView
impl Sync for ColumnView
Auto Trait Implementations§
impl !Freeze for ColumnView
impl !RefUnwindSafe for ColumnView
impl Unpin for ColumnView
impl !UnwindSafe for ColumnView
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more