diff --git a/Cargo.toml b/Cargo.toml index b63c38e8b..34cd44229 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -100,7 +100,7 @@ indoc = "0.3" names = "0.11" [dependencies.sqlx] -git = "https://github.com/pimeys/sqlx" +path = "../sqlx" branch = "work-branch" default_features = false features = ["decimal", "json", "chrono", "ipnetwork", "bit-vec"] diff --git a/src/connector/postgres/conversion.rs b/src/connector/postgres/conversion.rs index b791c9466..917d575bb 100644 --- a/src/connector/postgres/conversion.rs +++ b/src/connector/postgres/conversion.rs @@ -10,10 +10,7 @@ use rust_decimal::{ #[cfg(feature = "chrono-0_4")] use sqlx::postgres::types::PgTimeTz; use sqlx::{ - postgres::{ - types::{PgAny, PgMoney}, - PgArguments, PgRow, PgTypeInfo, - }, + postgres::{types::PgMoney, PgArguments, PgRow, PgTypeInfo}, query::Query, types::Json, Column, Postgres, Row, TypeInfo, @@ -95,10 +92,10 @@ impl<'a> Bind<'a, Postgres> for Query<'a, Postgres, PgArguments> { None => self.bind(Option::::None), }, (Value::Text(c), _) if type_info.map(|ti| ti.is_enum()).unwrap_or(false) => { - self.bind(c.map(|c| PgAny(c.into_owned()))) + self.bind(c.map(|c| c.into_owned())) } (Value::Text(c), _) => self.bind(c.map(|c| c.into_owned())), - (Value::Enum(c), _) => self.bind(c.map(|c| PgAny(c.into_owned()))), + (Value::Enum(c), _) => self.bind(c.map(|c| c.into_owned())), (Value::Bytes(c), _) => self.bind(c.map(|c| c.into_owned())), (Value::Boolean(b), _) => self.bind(b), @@ -659,7 +656,7 @@ impl<'a> Bind<'a, Postgres> for Query<'a, Postgres, PgArguments> { for val in ary.into_iter().map(|v| v.into_string()) { match val { Some(val) => { - vals.push(PgAny(val)); + vals.push(val); } None => { let msg = "Non-string parameter when storing a string array"; @@ -670,7 +667,7 @@ impl<'a> Bind<'a, Postgres> for Query<'a, Postgres, PgArguments> { } } - self.bind(PgAny(vals)) + self.bind(vals) } None => self.bind(Option::>::None), },