Enum taos::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>>>) -> ColumnView
pub fn from_micros_timestamp(values: Vec<impl Into<Option<i64>>>) -> ColumnView
pub fn from_nanos_timestamp(values: Vec<impl Into<Option<i64>>>) -> ColumnView
pub fn from_bools(values: Vec<impl Into<Option<bool>>>) -> ColumnView
pub fn from_tiny_ints(values: Vec<impl Into<Option<i8>>>) -> ColumnView
pub fn from_small_ints(values: Vec<impl Into<Option<i16>>>) -> ColumnView
pub fn from_ints(values: Vec<impl Into<Option<i32>>>) -> ColumnView
pub fn from_big_ints(values: Vec<impl Into<Option<i64>>>) -> ColumnView
pub fn from_unsigned_tiny_ints(values: Vec<impl Into<Option<u8>>>) -> ColumnView
pub fn from_unsigned_small_ints( values: Vec<impl Into<Option<u16>>> ) -> ColumnView
pub fn from_unsigned_ints(values: Vec<impl Into<Option<u32>>>) -> ColumnView
pub fn from_unsigned_big_ints(values: Vec<impl Into<Option<u64>>>) -> ColumnView
pub fn from_floats(values: Vec<impl Into<Option<f32>>>) -> ColumnView
pub fn from_doubles(values: Vec<impl Into<Option<f64>>>) -> ColumnView
pub fn from_varchar<S, T, I, V>(iter: V) -> ColumnViewwhere
S: AsRef<str>,
T: Into<Option<S>>,
I: ExactSizeIterator<Item = T>,
V: IntoIterator<Item = T, IntoIter = I>,
pub fn from_nchar<S, T, I, V>(iter: V) -> ColumnViewwhere
S: AsRef<str>,
T: Into<Option<S>>,
I: ExactSizeIterator<Item = T>,
V: IntoIterator<Item = T, IntoIter = I>,
pub fn from_json<S, T, I, V>(iter: V) -> ColumnViewwhere
S: AsRef<str>,
T: Into<Option<S>>,
I: ExactSizeIterator<Item = T>,
V: IntoIterator<Item = T, IntoIter = I>,
pub fn concat_iter<'b, 'a>(
&'a self,
rhs: impl Iterator<Item = BorrowedValue<'b>>,
ty: Ty
) -> ColumnViewwhere
'a: 'b,
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
.
sourcepub fn null(n: usize, ty: Ty) -> ColumnView
pub fn null(n: usize, ty: Ty) -> ColumnView
Generate single element view for 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<ColumnView>
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
§type Output = ColumnView
type Output = ColumnView
The resulting type after applying the
+
operator.source§fn add(self, rhs: ColumnView) -> <ColumnView as Add>::Output
fn add(self, rhs: ColumnView) -> <ColumnView as Add>::Output
Performs the
+
operation. Read moresource§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§fn from(value: Value) -> ColumnView
fn from(value: Value) -> ColumnView
Converts to this type from the input type.
source§impl<'a> IntoIterator for &'a ColumnView
impl<'a> IntoIterator for &'a ColumnView
§type Item = BorrowedValue<'a>
type Item = BorrowedValue<'a>
The type of the elements being iterated over.
§type IntoIter = ColumnViewIter<'a>
type IntoIter = ColumnViewIter<'a>
Which kind of iterator are we turning this into?
source§fn into_iter(self) -> <&'a ColumnView as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a ColumnView as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
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