pub fn from_oid(oid: u32) -> Option<Type> {
        let ty = postgres_types::Type::from_oid(oid)?;
        match ty {
            postgres_types::Type::BOOL => Some(Type::Bool),
            postgres_types::Type::BYTEA => Some(Type::Bytea),
            postgres_types::Type::DATE => Some(Type::Date),
            postgres_types::Type::FLOAT4 => Some(Type::Float4),
            postgres_types::Type::FLOAT8 => Some(Type::Float8),
            postgres_types::Type::INT2 => Some(Type::Int2),
            postgres_types::Type::INT4 => Some(Type::Int4),
            postgres_types::Type::INT8 => Some(Type::Int8),
            postgres_types::Type::INTERVAL => Some(Type::Interval),
            postgres_types::Type::JSONB => Some(Type::Jsonb),
            postgres_types::Type::NUMERIC => Some(Type::Numeric),
            postgres_types::Type::OID => Some(Type::Oid),
            postgres_types::Type::TEXT => Some(Type::Text),
            postgres_types::Type::BPCHAR | postgres_types::Type::CHAR => Some(Type::Char),
            postgres_types::Type::VARCHAR => Some(Type::VarChar),
            postgres_types::Type::TIME => Some(Type::Time),
            postgres_types::Type::TIMESTAMP => Some(Type::Timestamp),
            postgres_types::Type::TIMESTAMPTZ => Some(Type::TimestampTz),
            postgres_types::Type::UUID => Some(Type::Uuid),
            postgres_types::Type::REGCLASS => Some(Type::RegClass),
            postgres_types::Type::REGPROC => Some(Type::RegProc),
            postgres_types::Type::REGTYPE => Some(Type::RegType),
            _ => None,
        }
    }
/// Returns the type corresponding to the provided OID, if the OID is known.
Returns the type corresponding to the provided OID, if the OID is known.
Returns the type corresponding to the provided OID if the OID is known .
pub fn from_oid(oid: u32) -> Option<Type> {
        let ty = postgres_types::Type::from_oid(oid)?;
        match ty {
            postgres_types::Type::BOOL => Some(Type::Bool),
            postgres_types::Type::BYTEA => Some(Type::Bytea),
            postgres_types::Type::DATE => Some(Type::Date),
            postgres_types::Type::FLOAT4 => Some(Type::Float4),
            postgres_types::Type::FLOAT8 => Some(Type::Float8),
            postgres_types::Type::INT2 => Some(Type::Int2),
            postgres_types::Type::INT4 => Some(Type::Int4),
            postgres_types::Type::INT8 => Some(Type::Int8),
            postgres_types::Type::INTERVAL => Some(Type::Interval),
            postgres_types::Type::JSONB => Some(Type::Jsonb),
            postgres_types::Type::NUMERIC => Some(Type::Numeric),
            postgres_types::Type::OID => Some(Type::Oid),
            postgres_types::Type::TEXT => Some(Type::Text),
            postgres_types::Type::BPCHAR | postgres_types::Type::CHAR => Some(Type::Char),
            postgres_types::Type::VARCHAR => Some(Type::VarChar),
            postgres_types::Type::TIME => Some(Type::Time),
            postgres_types::Type::TIMESTAMP => Some(Type::Timestamp),
            postgres_types::Type::TIMESTAMPTZ => Some(Type::TimestampTz),
            postgres_types::Type::UUID => Some(Type::Uuid),
            postgres_types::Type::REGCLASS => Some(Type::RegClass),
            postgres_types::Type::REGPROC => Some(Type::RegProc),
            postgres_types::Type::REGTYPE => Some(Type::RegType),
            _ => None,
        }
    }
pub fn from_oid ( oid : u32 ) -> Option < Type > { let ty = postgres_types :: Type :: from_oid ( oid ) ? ; match ty { postgres_types :: Type :: BOOL => Some ( Type :: Bool ) , postgres_types :: Type :: BYTEA => Some ( Type :: Bytea ) , postgres_types :: Type :: DATE => Some ( Type :: Date ) , postgres_types :: Type :: FLOAT4 => Some ( Type :: Float4 ) , postgres_types :: Type :: FLOAT8 => Some ( Type :: Float8 ) , postgres_types :: Type :: INT2 => Some ( Type :: Int2 ) , postgres_types :: Type :: INT4 => Some ( Type :: Int4 ) , postgres_types :: Type :: INT8 => Some ( Type :: Int8 ) , postgres_types :: Type :: INTERVAL => Some ( Type :: Interval ) , postgres_types :: Type :: JSONB => Some ( Type :: Jsonb ) , postgres_types :: Type :: NUMERIC => Some ( Type :: Numeric ) , postgres_types :: Type :: OID => Some ( Type :: Oid ) , postgres_types :: Type :: TEXT => Some ( Type :: Text ) , postgres_types :: Type :: BPCHAR | postgres_types :: Type :: CHAR => Some ( Type :: Char ) , postgres_types :: Type :: VARCHAR => Some ( Type :: VarChar ) , postgres_types :: Type :: TIME => Some ( Type :: Time ) , postgres_types :: Type :: TIMESTAMP => Some ( Type :: Timestamp ) , postgres_types :: Type :: TIMESTAMPTZ => Some ( Type :: TimestampTz ) , postgres_types :: Type :: UUID => Some ( Type :: Uuid ) , postgres_types :: Type :: REGCLASS => Some ( Type :: RegClass ) , postgres_types :: Type :: REGPROC => Some ( Type :: RegProc ) , postgres_types :: Type :: REGTYPE => Some ( Type :: RegType ) , _ => None , } }
Returns the type corresponding to the provided OID, if the OID is known.
Returns the type corresponding to the provided OID if the OID is known .
oid
u32
oid
u32