Enum taos_query::common::raw::views::ColumnView
source · pub enum ColumnView {
Show 15 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),
}
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)
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 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_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 unsafe fn as_timestamp_view(&self) -> &TimestampView
Trait Implementations§
source§impl Add<ColumnView> for ColumnView
impl Add<ColumnView> for ColumnView
source§impl Clone for ColumnView
impl Clone for ColumnView
source§fn clone(&self) -> ColumnView
fn clone(&self) -> ColumnView
Returns a copy 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§
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