Trait diesel::sql_types::HasSqlType[][src]

pub trait HasSqlType<ST>: TypeMetadata {
    fn metadata(lookup: &mut Self::MetadataLookup) -> Self::TypeMetadata;
}
Expand description

Indicates that a SQL type exists for a backend.

This trait can be derived using the SqlType derive

Example

#[derive(diesel::sql_types::SqlType)]
#[postgres(oid = "23", array_oid = "1007")]
#[sqlite_type = "Integer"]
#[mysql_type = "Long"]
pub struct Integer;

Required methods

Fetch the metadata for the given type

This method may use lookup to do dynamic runtime lookup. Implementors of this method should not do dynamic lookup unless absolutely necessary

Implementors