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

source

pub fn from_millis_timestamp(values: Vec<impl Into<Option<i64>>>) -> ColumnView

source

pub fn from_micros_timestamp(values: Vec<impl Into<Option<i64>>>) -> ColumnView

source

pub fn from_nanos_timestamp(values: Vec<impl Into<Option<i64>>>) -> ColumnView

source

pub fn from_bools(values: Vec<impl Into<Option<bool>>>) -> ColumnView

source

pub fn from_tiny_ints(values: Vec<impl Into<Option<i8>>>) -> ColumnView

source

pub fn from_small_ints(values: Vec<impl Into<Option<i16>>>) -> ColumnView

source

pub fn from_ints(values: Vec<impl Into<Option<i32>>>) -> ColumnView

source

pub fn from_big_ints(values: Vec<impl Into<Option<i64>>>) -> ColumnView

source

pub fn from_unsigned_tiny_ints(values: Vec<impl Into<Option<u8>>>) -> ColumnView

source

pub fn from_unsigned_small_ints( values: Vec<impl Into<Option<u16>>> ) -> ColumnView

source

pub fn from_unsigned_ints(values: Vec<impl Into<Option<u32>>>) -> ColumnView

source

pub fn from_unsigned_big_ints(values: Vec<impl Into<Option<u64>>>) -> ColumnView

source

pub fn from_floats(values: Vec<impl Into<Option<f32>>>) -> ColumnView

source

pub fn from_doubles(values: Vec<impl Into<Option<f64>>>) -> ColumnView

source

pub fn from_varchar<S, T, I, V>(iter: V) -> ColumnView
where S: AsRef<str>, T: Into<Option<S>>, I: ExactSizeIterator<Item = T>, V: IntoIterator<Item = T, IntoIter = I>,

source

pub fn from_nchar<S, T, I, V>(iter: V) -> ColumnView
where S: AsRef<str>, T: Into<Option<S>>, I: ExactSizeIterator<Item = T>, V: IntoIterator<Item = T, IntoIter = I>,

source

pub fn from_json<S, T, I, V>(iter: V) -> ColumnView
where S: AsRef<str>, T: Into<Option<S>>, I: ExactSizeIterator<Item = T>, V: IntoIterator<Item = T, IntoIter = I>,

source

pub fn concat_iter<'b, 'a>( &'a self, rhs: impl Iterator<Item = BorrowedValue<'b>>, ty: Ty ) -> ColumnView
where 'a: 'b,

source

pub fn concat(&self, rhs: &ColumnView) -> ColumnView

Concatenate another column view, output a new column view with exact type of self.

source

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.

source

pub fn concat_as(&self, rhs: &ColumnView, ty: Ty) -> ColumnView

Concatenate another column view, output a new column view with specified type ty.

source

pub fn null(n: usize, ty: Ty) -> ColumnView

Generate single element view for specified type ty.

source

pub fn len(&self) -> usize

It’s equal to the cols

source

pub fn max_variable_length(&self) -> usize

source

pub fn get(&self, row: usize) -> Option<BorrowedValue<'_>>

source

pub fn iter(&self) -> ColumnViewIter<'_>

source

pub fn slice(&self, range: Range<usize>) -> Option<ColumnView>

source

pub fn as_ty(&self) -> Ty

source

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
source

pub fn cast_precision(&self, precision: Precision) -> ColumnView

source

pub unsafe fn as_timestamp_view(&self) -> &TimestampView

Trait Implementations§

source§

impl Add for ColumnView

§

type Output = ColumnView

The resulting type after applying the + operator.
source§

fn add(self, rhs: ColumnView) -> <ColumnView as Add>::Output

Performs the + operation. Read more
source§

impl Clone for ColumnView

source§

fn clone(&self) -> ColumnView

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ColumnView

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<Value> for ColumnView

source§

fn from(value: Value) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<Option<INChar>>> for ColumnView

source§

fn from(values: Vec<Option<INChar>>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<Option<IVarChar>>> for ColumnView

source§

fn from(values: Vec<Option<IVarChar>>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<Option<bool>>> for ColumnView

source§

fn from(values: Vec<Option<bool>>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<Option<f32>>> for ColumnView

source§

fn from(values: Vec<Option<f32>>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<Option<f64>>> for ColumnView

source§

fn from(values: Vec<Option<f64>>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<Option<i16>>> for ColumnView

source§

fn from(values: Vec<Option<i16>>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<Option<i32>>> for ColumnView

source§

fn from(values: Vec<Option<i32>>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<Option<i64>>> for ColumnView

source§

fn from(values: Vec<Option<i64>>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<Option<i8>>> for ColumnView

source§

fn from(values: Vec<Option<i8>>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<Option<u16>>> for ColumnView

source§

fn from(values: Vec<Option<u16>>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<Option<u32>>> for ColumnView

source§

fn from(values: Vec<Option<u32>>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<Option<u64>>> for ColumnView

source§

fn from(values: Vec<Option<u64>>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<Option<u8>>> for ColumnView

source§

fn from(values: Vec<Option<u8>>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<bool>> for ColumnView

source§

fn from(values: Vec<bool>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<f32>> for ColumnView

source§

fn from(values: Vec<f32>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<f64>> for ColumnView

source§

fn from(values: Vec<f64>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<i16>> for ColumnView

source§

fn from(values: Vec<i16>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<i32>> for ColumnView

source§

fn from(values: Vec<i32>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<i64>> for ColumnView

source§

fn from(values: Vec<i64>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<i8>> for ColumnView

source§

fn from(values: Vec<i8>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<u16>> for ColumnView

source§

fn from(values: Vec<u16>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<u32>> for ColumnView

source§

fn from(values: Vec<u32>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<u64>> for ColumnView

source§

fn from(values: Vec<u64>) -> ColumnView

Converts to this type from the input type.
source§

impl From<Vec<u8>> for ColumnView

source§

fn from(values: Vec<u8>) -> ColumnView

Converts to this type from the input type.
source§

impl<'a> IntoIterator for &'a ColumnView

§

type Item = BorrowedValue<'a>

The type of the elements being iterated over.
§

type IntoIter = ColumnViewIter<'a>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> <&'a ColumnView as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl Send for ColumnView

source§

impl Sync for ColumnView

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more