Fix postgres

This commit is contained in:
Steven Fackler 2019-09-25 18:39:51 -07:00
parent 427340d748
commit 983a71c470
2 changed files with 11 additions and 11 deletions

View File

@ -80,7 +80,7 @@ impl Client {
/// # Ok(()) /// # Ok(())
/// # } /// # }
/// ``` /// ```
pub fn execute<T>(&mut self, query: &T, params: &[&dyn ToSql]) -> Result<u64, Error> pub fn execute<T>(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result<u64, Error>
where where
T: ?Sized + ToStatement, T: ?Sized + ToStatement,
{ {
@ -119,7 +119,7 @@ impl Client {
/// # Ok(()) /// # Ok(())
/// # } /// # }
/// ``` /// ```
pub fn query<T>(&mut self, query: &T, params: &[&dyn ToSql]) -> Result<Vec<Row>, Error> pub fn query<T>(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result<Vec<Row>, Error>
where where
T: ?Sized + ToStatement, T: ?Sized + ToStatement,
{ {
@ -155,7 +155,7 @@ impl Client {
pub fn query_iter<'a, T>( pub fn query_iter<'a, T>(
&'a mut self, &'a mut self,
query: &T, query: &T,
params: &[&dyn ToSql], params: &[&(dyn ToSql + Sync)],
) -> Result<impl FallibleIterator<Item = Row, Error = Error> + 'a, Error> ) -> Result<impl FallibleIterator<Item = Row, Error = Error> + 'a, Error>
where where
T: ?Sized + ToStatement, T: ?Sized + ToStatement,
@ -242,7 +242,7 @@ impl Client {
pub fn copy_in<T, R>( pub fn copy_in<T, R>(
&mut self, &mut self,
query: &T, query: &T,
params: &[&dyn ToSql], params: &[&(dyn ToSql + Sync)],
reader: R, reader: R,
) -> Result<u64, Error> ) -> Result<u64, Error>
where where
@ -275,7 +275,7 @@ impl Client {
pub fn copy_out<'a, T>( pub fn copy_out<'a, T>(
&'a mut self, &'a mut self,
query: &T, query: &T,
params: &[&dyn ToSql], params: &[&(dyn ToSql + Sync)],
) -> Result<impl BufRead + 'a, Error> ) -> Result<impl BufRead + 'a, Error>
where where
T: ?Sized + ToStatement, T: ?Sized + ToStatement,

View File

@ -43,7 +43,7 @@ impl<'a> Transaction<'a> {
} }
/// Like `Client::execute`. /// Like `Client::execute`.
pub fn execute<T>(&mut self, query: &T, params: &[&dyn ToSql]) -> Result<u64, Error> pub fn execute<T>(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result<u64, Error>
where where
T: ?Sized + ToStatement, T: ?Sized + ToStatement,
{ {
@ -52,7 +52,7 @@ impl<'a> Transaction<'a> {
} }
/// Like `Client::query`. /// Like `Client::query`.
pub fn query<T>(&mut self, query: &T, params: &[&dyn ToSql]) -> Result<Vec<Row>, Error> pub fn query<T>(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result<Vec<Row>, Error>
where where
T: ?Sized + ToStatement, T: ?Sized + ToStatement,
{ {
@ -63,7 +63,7 @@ impl<'a> Transaction<'a> {
pub fn query_iter<T>( pub fn query_iter<T>(
&mut self, &mut self,
query: &T, query: &T,
params: &[&dyn ToSql], params: &[&(dyn ToSql + Sync)],
) -> Result<impl FallibleIterator<Item = Row, Error = Error>, Error> ) -> Result<impl FallibleIterator<Item = Row, Error = Error>, Error>
where where
T: ?Sized + ToStatement, T: ?Sized + ToStatement,
@ -82,7 +82,7 @@ impl<'a> Transaction<'a> {
/// # Panics /// # Panics
/// ///
/// Panics if the number of parameters provided does not match the number expected. /// Panics if the number of parameters provided does not match the number expected.
pub fn bind<T>(&mut self, query: &T, params: &[&dyn ToSql]) -> Result<Portal, Error> pub fn bind<T>(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result<Portal, Error>
where where
T: ?Sized + ToStatement, T: ?Sized + ToStatement,
{ {
@ -112,7 +112,7 @@ impl<'a> Transaction<'a> {
pub fn copy_in<T, R>( pub fn copy_in<T, R>(
&mut self, &mut self,
query: &T, query: &T,
params: &[&dyn ToSql], params: &[&(dyn ToSql + Sync)],
reader: R, reader: R,
) -> Result<u64, Error> ) -> Result<u64, Error>
where where
@ -127,7 +127,7 @@ impl<'a> Transaction<'a> {
pub fn copy_out<'b, T>( pub fn copy_out<'b, T>(
&'a mut self, &'a mut self,
query: &T, query: &T,
params: &[&dyn ToSql], params: &[&(dyn ToSql + Sync)],
) -> Result<impl BufRead + 'b, Error> ) -> Result<impl BufRead + 'b, Error>
where where
T: ?Sized + ToStatement, T: ?Sized + ToStatement,