mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-04-13 07:15:14 +00:00
Change HasSqlType to Type
This commit is contained in:
@@ -19,9 +19,9 @@ impl Type<Postgres> for [bool] {
|
||||
PgTypeInfo::new(TypeId::ARRAY_BOOL, "BOOL[]")
|
||||
}
|
||||
}
|
||||
impl HasSqlType<Vec<bool>> for Postgres {
|
||||
impl Type<Postgres> for Vec<bool> {
|
||||
fn type_info() -> PgTypeInfo {
|
||||
<Self as HasSqlType<[bool]>>::type_info()
|
||||
<[bool] as Type<Postgres>>::type_info()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ impl Type<Postgres> for [f32] {
|
||||
PgTypeInfo::new(TypeId::ARRAY_FLOAT4, "FLOAT4[]")
|
||||
}
|
||||
}
|
||||
impl HasSqlType<Vec<f32>> for Postgres {
|
||||
impl Type<Postgres> for Vec<f32> {
|
||||
fn type_info() -> PgTypeInfo {
|
||||
<Self as HasSqlType<[f32]>>::type_info()
|
||||
<[f32] as Type<Postgres>>::type_info()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,9 +58,9 @@ impl Type<Postgres> for [f64] {
|
||||
PgTypeInfo::new(TypeId::ARRAY_FLOAT8, "FLOAT8[]")
|
||||
}
|
||||
}
|
||||
impl HasSqlType<Vec<f64>> for Postgres {
|
||||
impl Type<Postgres> for Vec<f64> {
|
||||
fn type_info() -> PgTypeInfo {
|
||||
<Self as HasSqlType<[f64]>>::type_info()
|
||||
<[f64] as Type<Postgres>>::type_info()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ impl Type<Postgres> for [i16] {
|
||||
PgTypeInfo::new(TypeId::ARRAY_INT2, "INT2[]")
|
||||
}
|
||||
}
|
||||
impl HasSqlType<Vec<i16>> for Postgres {
|
||||
impl Type<Postgres> for Vec<i16> {
|
||||
fn type_info() -> PgTypeInfo {
|
||||
<Self as HasSqlType<[i16]>>::type_info()
|
||||
<[i16] as Type<Postgres>>::type_info()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,9 +54,9 @@ impl Type<Postgres> for [i32] {
|
||||
PgTypeInfo::new(TypeId::ARRAY_INT4, "INT4[]")
|
||||
}
|
||||
}
|
||||
impl HasSqlType<Vec<i32>> for Postgres {
|
||||
impl Type<Postgres> for Vec<i32> {
|
||||
fn type_info() -> PgTypeInfo {
|
||||
<Self as HasSqlType<[i32]>>::type_info()
|
||||
<[i32] as Type<Postgres>>::type_info()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,9 +86,9 @@ impl Type<Postgres> for [i64] {
|
||||
PgTypeInfo::new(TypeId::ARRAY_INT8, "INT8[]")
|
||||
}
|
||||
}
|
||||
impl HasSqlType<Vec<i64>> for Postgres {
|
||||
impl Type<Postgres> for Vec<i64> {
|
||||
fn type_info() -> PgTypeInfo {
|
||||
<Self as HasSqlType<[i64]>>::type_info()
|
||||
<[i64] as Type<Postgres>>::type_info()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,9 +21,10 @@ impl Type<Postgres> for [&'_ str] {
|
||||
PgTypeInfo::new(TypeId::ARRAY_TEXT, "TEXT[]")
|
||||
}
|
||||
}
|
||||
impl HasSqlType<Vec<&'_ str>> for Postgres {
|
||||
|
||||
impl Type<Postgres> for Vec<&'_ str> {
|
||||
fn type_info() -> PgTypeInfo {
|
||||
<Self as HasSqlType<[&'_ str]>>::type_info()
|
||||
<[&'_ str] as Type<Postgres>>::type_info()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,14 +33,16 @@ impl Type<Postgres> for String {
|
||||
<str as Type<Postgres>>::type_info()
|
||||
}
|
||||
}
|
||||
impl HasSqlType<[String]> for Postgres {
|
||||
|
||||
impl Type<Postgres> for [String] {
|
||||
fn type_info() -> PgTypeInfo {
|
||||
<Self as HasSqlType<[&'_ str]>>::type_info()
|
||||
<[&'_ str] as Type<Postgres>>::type_info()
|
||||
}
|
||||
}
|
||||
impl HasSqlType<Vec<String>> for Postgres {
|
||||
|
||||
impl Type<Postgres> for Vec<String> {
|
||||
fn type_info() -> PgTypeInfo {
|
||||
<Self as HasSqlType<Vec<&'_ str>>>::type_info()
|
||||
<Vec<&'_ str> as Type<Postgres>>::type_info()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ impl Type<Postgres> for [Uuid] {
|
||||
}
|
||||
}
|
||||
|
||||
impl HasSqlType<Vec<Uuid>> for Postgres {
|
||||
impl Type<Postgres> for Vec<Uuid> {
|
||||
fn type_info() -> PgTypeInfo {
|
||||
<Postgres as HasSqlType<[Uuid]>>::type_info()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user