mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-03 07:45:30 +00:00
feat: support the postgres bool type
This commit is contained in:
parent
33aee07094
commit
0eb2ee9365
@ -182,6 +182,7 @@ impl<'a> TryFrom<&'a PgTypeInfo> for AnyTypeInfo {
|
|||||||
fn try_from(pg_type: &'a PgTypeInfo) -> Result<Self, Self::Error> {
|
fn try_from(pg_type: &'a PgTypeInfo) -> Result<Self, Self::Error> {
|
||||||
Ok(AnyTypeInfo {
|
Ok(AnyTypeInfo {
|
||||||
kind: match &pg_type.0 {
|
kind: match &pg_type.0 {
|
||||||
|
PgType::Bool => AnyTypeInfoKind::Bool,
|
||||||
PgType::Void => AnyTypeInfoKind::Null,
|
PgType::Void => AnyTypeInfoKind::Null,
|
||||||
PgType::Int2 => AnyTypeInfoKind::SmallInt,
|
PgType::Int2 => AnyTypeInfoKind::SmallInt,
|
||||||
PgType::Int4 => AnyTypeInfoKind::Integer,
|
PgType::Int4 => AnyTypeInfoKind::Integer,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user