Trait tidb_query_datatype::def::FieldTypeAccessor [−][src]
A uniform FieldType
access interface for FieldType
and ColumnInfo
.
Required methods
fn tp(&self) -> FieldTypeTp
[src]
fn set_tp(&mut self, tp: FieldTypeTp) -> &mut dyn FieldTypeAccessor
[src]
fn flag(&self) -> FieldTypeFlag
[src]
fn set_flag(&mut self, flag: FieldTypeFlag) -> &mut dyn FieldTypeAccessor
[src]
fn flen(&self) -> isize
[src]
fn set_flen(&mut self, flen: isize) -> &mut dyn FieldTypeAccessor
[src]
fn decimal(&self) -> isize
[src]
fn set_decimal(&mut self, decimal: isize) -> &mut dyn FieldTypeAccessor
[src]
fn collation(&self) -> Result<Collation, DataTypeError>
[src]
fn set_collation(&mut self, collation: Collation) -> &mut dyn FieldTypeAccessor
[src]
Provided methods
fn as_accessor(&self) -> &dyn FieldTypeAccessor where
Self: Sized,
[src]
Self: Sized,
Convert reference to FieldTypeAccessor
interface. Useful when an implementer
provides inherent methods with the same name as the accessor trait methods.
fn as_mut_accessor(&mut self) -> &mut dyn FieldTypeAccessor where
Self: Sized,
[src]
Self: Sized,
Convert mutable reference to FieldTypeAccessor
interface.
fn is_hybrid(&self) -> bool
[src]
Whether this type is a hybrid type, which can represent different types of value in specific context.
Please refer to Hybrid
in TiDB.
fn is_blob_like(&self) -> bool
[src]
Whether this type is a blob type.
Please refer to IsTypeBlob
in TiDB.
fn is_char_like(&self) -> bool
[src]
Whether this type is a char-like type like a string type or a varchar type.
Please refer to IsTypeChar
in TiDB.
fn is_varchar_like(&self) -> bool
[src]
Whether this type is a varchar-like type like a varstring type or a varchar type.
Please refer to IsTypeVarchar
in TiDB.
fn is_string_like(&self) -> bool
[src]
Whether this type is a string-like type.
Please refer to IsString
in TiDB.
fn is_binary_string_like(&self) -> bool
[src]
Whether this type is a binary-string-like type.
Please refer to IsBinaryStr
in TiDB.
fn is_non_binary_string_like(&self) -> bool
[src]
Whether this type is a non-binary-string-like type.
Please refer to IsNonBinaryStr
in TiDB.
fn is_unsigned(&self) -> bool
[src]
Whether the flag contains FieldTypeFlag::UNSIGNED
fn is_bool(&self) -> bool
[src]
Whether the flag contains FieldTypeFlag::IS_BOOLEAN