Trait sqlx::TypeInfo

source ·
pub trait TypeInfo: Debug + Display + Clone + PartialEq<Self> + Send + Sync {
    // Required methods
    fn is_null(&self) -> bool;
    fn name(&self) -> &str;
}
Expand description

Provides information about a SQL type for the database driver.

Required Methods§

source

fn is_null(&self) -> bool

source

fn name(&self) -> &str

Returns the database system name of the type. Length specifiers should not be included. Common type names are VARCHAR, TEXT, or INT. Type names should be uppercase. They should be a rough approximation of how they are written in SQL in the given database.

Implementations on Foreign Types§

source§

impl TypeInfo for MySqlTypeInfo

source§

fn is_null(&self) -> bool

source§

fn name(&self) -> &str

source§

impl TypeInfo for PgTypeInfo

source§

fn name(&self) -> &str

source§

fn is_null(&self) -> bool

source§

impl TypeInfo for SqliteTypeInfo

source§

fn is_null(&self) -> bool

source§

fn name(&self) -> &str

Implementors§