Trait tidb_query_datatype::prelude::FieldTypeAccessor[][src]

pub trait FieldTypeAccessor {
    fn tp(&self) -> FieldTypeTp;
fn set_tp(&mut self, tp: FieldTypeTp) -> &mut dyn FieldTypeAccessor;
fn flag(&self) -> FieldTypeFlag;
fn set_flag(&mut self, flag: FieldTypeFlag) -> &mut dyn FieldTypeAccessor;
fn flen(&self) -> isize;
fn set_flen(&mut self, flen: isize) -> &mut dyn FieldTypeAccessor;
fn decimal(&self) -> isize;
fn set_decimal(&mut self, decimal: isize) -> &mut dyn FieldTypeAccessor;
fn collation(&self) -> Result<Collation, DataTypeError>;
fn set_collation(
        &mut self,
        collation: Collation
    ) -> &mut dyn FieldTypeAccessor; fn as_accessor(&self) -> &dyn FieldTypeAccessor
    where
        Self: Sized
, { ... }
fn as_mut_accessor(&mut self) -> &mut dyn FieldTypeAccessor
    where
        Self: Sized
, { ... }
fn is_hybrid(&self) -> bool { ... }
fn is_blob_like(&self) -> bool { ... }
fn is_char_like(&self) -> bool { ... }
fn is_varchar_like(&self) -> bool { ... }
fn is_string_like(&self) -> bool { ... }
fn is_binary_string_like(&self) -> bool { ... }
fn is_non_binary_string_like(&self) -> bool { ... }
fn is_unsigned(&self) -> bool { ... }
fn is_bool(&self) -> bool { ... }
fn need_restored_data(&self) -> bool { ... } }

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]

Loading content...

Provided methods

fn as_accessor(&self) -> &dyn FieldTypeAccessor where
    Self: Sized
[src]

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]

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

fn need_restored_data(&self) -> bool[src]

Loading content...

Implementations on Foreign Types

impl FieldTypeAccessor for FieldType[src]

impl FieldTypeAccessor for ColumnInfo[src]

Loading content...

Implementors

Loading content...