#[repr(i32)]pub enum Type {
Show 35 variants
NullType = 0,
Int8 = 257,
Uint8 = 770,
Int16 = 259,
Uint16 = 772,
Int24 = 261,
Uint24 = 774,
Int32 = 263,
Uint32 = 776,
Int64 = 265,
Uint64 = 778,
Float32 = 1_035,
Float64 = 1_036,
Timestamp = 2_061,
Date = 2_062,
Time = 2_063,
Datetime = 2_064,
Year = 785,
Decimal = 18,
Text = 6_163,
Blob = 10_260,
Varchar = 6_165,
Varbinary = 10_262,
Char = 6_167,
Binary = 10_264,
Bit = 2_073,
Enum = 2_074,
Set = 2_075,
Tuple = 28,
Geometry = 2_077,
Json = 2_078,
Expression = 31,
Hexnum = 4_128,
Hexval = 4_129,
Bitnum = 4_130,
}Expand description
Type defines the various supported data types in bind vars and query results.
Variants§
NullType = 0
NULL_TYPE specifies a NULL type.
Int8 = 257
INT8 specifies a TINYINT type. Properties: 1, IsNumber.
Uint8 = 770
UINT8 specifies a TINYINT UNSIGNED type. Properties: 2, IsNumber, IsUnsigned.
Int16 = 259
INT16 specifies a SMALLINT type. Properties: 3, IsNumber.
Uint16 = 772
UINT16 specifies a SMALLINT UNSIGNED type. Properties: 4, IsNumber, IsUnsigned.
Int24 = 261
INT24 specifies a MEDIUMINT type. Properties: 5, IsNumber.
Uint24 = 774
UINT24 specifies a MEDIUMINT UNSIGNED type. Properties: 6, IsNumber, IsUnsigned.
Int32 = 263
INT32 specifies a INTEGER type. Properties: 7, IsNumber.
Uint32 = 776
UINT32 specifies a INTEGER UNSIGNED type. Properties: 8, IsNumber, IsUnsigned.
Int64 = 265
INT64 specifies a BIGINT type. Properties: 9, IsNumber.
Uint64 = 778
UINT64 specifies a BIGINT UNSIGNED type. Properties: 10, IsNumber, IsUnsigned.
Float32 = 1_035
FLOAT32 specifies a FLOAT type. Properties: 11, IsFloat.
Float64 = 1_036
FLOAT64 specifies a DOUBLE or REAL type. Properties: 12, IsFloat.
Timestamp = 2_061
TIMESTAMP specifies a TIMESTAMP type. Properties: 13, IsQuoted.
Date = 2_062
DATE specifies a DATE type. Properties: 14, IsQuoted.
Time = 2_063
TIME specifies a TIME type. Properties: 15, IsQuoted.
Datetime = 2_064
DATETIME specifies a DATETIME type. Properties: 16, IsQuoted.
Year = 785
YEAR specifies a YEAR type. Properties: 17, IsNumber, IsUnsigned.
Decimal = 18
DECIMAL specifies a DECIMAL or NUMERIC type. Properties: 18, None.
Text = 6_163
TEXT specifies a TEXT type. Properties: 19, IsQuoted, IsText.
Blob = 10_260
BLOB specifies a BLOB type. Properties: 20, IsQuoted, IsBinary.
Varchar = 6_165
VARCHAR specifies a VARCHAR type. Properties: 21, IsQuoted, IsText.
Varbinary = 10_262
VARBINARY specifies a VARBINARY type. Properties: 22, IsQuoted, IsBinary.
Char = 6_167
CHAR specifies a CHAR type. Properties: 23, IsQuoted, IsText.
Binary = 10_264
BINARY specifies a BINARY type. Properties: 24, IsQuoted, IsBinary.
Bit = 2_073
BIT specifies a BIT type. Properties: 25, IsQuoted.
Enum = 2_074
ENUM specifies an ENUM type. Properties: 26, IsQuoted.
Set = 2_075
SET specifies a SET type. Properties: 27, IsQuoted.
Tuple = 28
TUPLE specifies a tuple. This cannot be returned in a QueryResult, but it can be sent as a bind var. Properties: 28, None.
Geometry = 2_077
GEOMETRY specifies a GEOMETRY type. Properties: 29, IsQuoted.
Json = 2_078
JSON specifies a JSON type. Properties: 30, IsQuoted.
Expression = 31
EXPRESSION specifies a SQL expression. This type is for internal use only. Properties: 31, None.
Hexnum = 4_128
HEXNUM specifies a HEXNUM type (unquoted varbinary). Properties: 32, IsText.
Hexval = 4_129
HEXVAL specifies a HEXVAL type (unquoted varbinary). Properties: 33, IsText.
Bitnum = 4_130
BITNUM specifies a base 2 binary type (unquoted varbinary). Properties: 34, IsText.
Implementations§
Source§impl Type
impl Type
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Ord for Type
impl Ord for Type
Source§impl PartialOrd for Type
impl PartialOrd for Type
impl Copy for Type
impl Eq for Type
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> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request