Type

Enum Type 

Source
pub enum Type {
Show 62 variants UInt8, UInt16, UInt32, UInt64, UInt128, UInt256, Int8, Int16, Int32, Int64, Int128, Int256, Float32, Float64, Decimal(u8, u8), Decimal32(u8), Decimal64(u8), Decimal128(u8), Decimal256(u8), Bool, String, FixedString(u8), UUID, Date, Date32, DateTime, DateTime64(u8), Enum8(BTreeMap<String, i8>), Enum16(BTreeMap<String, i16>), Array(Box<Type>), Tuple(Vec<Type>), Map(Box<Type>, Box<Type>), Nested(Vec<(String, Type)>), NullableUInt8, NullableUInt16, NullableUInt32, NullableUInt64, NullableUInt128, NullableUInt256, NullableInt8, NullableInt16, NullableInt32, NullableInt64, NullableInt128, NullableInt256, NullableFloat32, NullableFloat64, NullableDecimal(u8, u8), NullableDecimal32(u8), NullableDecimal64(u8), NullableDecimal128(u8), NullableDecimal256(u8), NullableBool, NullableString, NullableFixedString(u8), NullableUUID, NullableDate, NullableDate32, NullableDateTime, NullableDateTime64(u8), NullableEnum8(BTreeMap<String, i8>), NullableEnum16(BTreeMap<String, i16>),
}
Expand description

Data type

Variants§

§

UInt8

u8

§

UInt16

u16

§

UInt32

u32

§

UInt64

u64

§

UInt128

u128

§

UInt256

u256

§

Int8

i8

§

Int16

i16

§

Int32

i32

§

Int64

i64

§

Int128

i128

§

Int256

i256

§

Float32

f32

§

Float64

f64

§

Decimal(u8, u8)

Decimal(P,S) (precision ∈ [1:76], scale ∈ [0:P], range ( -1 * 10^(P - S), 1 * 10^(P - S) )

§

Decimal32(u8)

Decimal(P ∈ [1:9])

§

Decimal64(u8)

Decimal(P ∈ [19:18])

§

Decimal128(u8)

Decimal(P ∈ [19:38])

§

Decimal256(u8)

Decimal(P ∈ [39:76])

§

Bool

Boolean

§

String

String

§

FixedString(u8)

Fixed string

§

UUID

UUID (16 bytes)

§

Date

Date (number of days since 1970-01-01, 2 bytes)

§

Date32

Date32 (number of days since 1970-01-01, signed i32)

§

DateTime

DateTime (seconds since EPOCH, [1970-01-01 00:00:00, 2106-02-07 06:28:15])

§

DateTime64(u8)

Ticks since since epoch start (1970-01-01 00:00:00 UTC)

Precision [0:9] defines the resolution, eg 3=ms, 6=us, 9=ns

§

Enum8(BTreeMap<String, i8>)

Enum (256 values, i8)

Keys and indices must be unique

§

Enum16(BTreeMap<String, i16>)

Enum (65536 values, i16)

Keys and indices must be unique

§

Array(Box<Type>)

Array

An array element can have any type

§

Tuple(Vec<Type>)

Tuple

Each element can have a different type

§

Map(Box<Type>, Box<Type>)

Map

  • key: String, Integer, LowCardinality, FixedString, UUID, Date, DateTime, Date32, Enum
  • value: any type
§

Nested(Vec<(String, Type)>)

Nested

A nested structure is a table inside a cell.

Each type can have a name (optional)

§

NullableUInt8

Nullable u8

§

NullableUInt16

Nullable u16

§

NullableUInt32

Nullable u32

§

NullableUInt64

Nullable u64

§

NullableUInt128

Nullable u128

§

NullableUInt256

Nullable u256

§

NullableInt8

Nullable i8

§

NullableInt16

Nullable i16

§

NullableInt32

Nullable i32

§

NullableInt64

Nullable i64

§

NullableInt128

Nullable i128

§

NullableInt256

Nullable i256

§

NullableFloat32

Nullable f32

§

NullableFloat64

Nullable f64

§

NullableDecimal(u8, u8)

Nullable decimal

§

NullableDecimal32(u8)

Nullable decimal32

§

NullableDecimal64(u8)

Nullable decimal64

§

NullableDecimal128(u8)

Nullable decimal128

§

NullableDecimal256(u8)

Nullable decimal256

§

NullableBool

Nullable bool

§

NullableString

Nullable string

§

NullableFixedString(u8)

Nullable fixed string

§

NullableUUID

Nullbale UUID

§

NullableDate

Nullable date

§

NullableDate32

Nullable date32

§

NullableDateTime

Nullable datetime

§

NullableDateTime64(u8)

Nullable datetime64

§

NullableEnum8(BTreeMap<String, i8>)

Nullable Enum8

§

NullableEnum16(BTreeMap<String, i16>)

Nullable Enum16

Trait Implementations§

Source§

impl Clone for Type

Source§

fn clone(&self) -> Type

Returns a duplicate 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 Type

Source§

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

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

impl Display for Type

Source§

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

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

impl FromStr for Type

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl PartialEq for Type

Source§

fn eq(&self, other: &Type) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Type

Source§

impl StructuralPartialEq for Type

Auto Trait Implementations§

§

impl Freeze for Type

§

impl RefUnwindSafe for Type

§

impl Send for Type

§

impl Sync for Type

§

impl Unpin for Type

§

impl UnwindSafe for Type

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

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>,

Source§

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<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