Type Alias elephantry::pq::Type

source ·
pub type Type = Type;

Aliased Type§

struct Type {
    pub oid: u32,
    pub descr: &'static str,
    pub name: &'static str,
    pub kind: Kind,
}

Fields§

§oid: u32§descr: &'static str§name: &'static str§kind: Kind

Trait Implementations§

source§

impl FromSql for Type

source§

fn from_binary(ty: &Type, raw: Option<&[u8]>) -> Result<Self>

Create a new struct from the binary representation. Read more
source§

fn from_text(ty: &Type, raw: Option<&str>) -> Result<Self>

Create a new struct from the text representation. Read more
source§

fn from_sql(ty: &Type, format: Format, raw: Option<&[u8]>) -> Result<Self>

Create a new struct from SQL value.
source§

fn error<T: Debug>(pg_type: &Type, raw: T) -> Error

source§

impl ToSql for Type

source§

fn ty(&self) -> Type

The corresponding SQL type
source§

fn to_text(&self) -> Result<Option<String>>

Convert the value to text format Read more
source§

fn to_binary(&self) -> Result<Option<Vec<u8>>>

Convert the value to binary format Read more
source§

fn error(&self, message: &str) -> Error