Merge pull request #503 from ivan/master
Add query_one to postgres::Transaction
This commit is contained in:
commit
6c77baad1b
@ -58,6 +58,14 @@ impl<'a> Transaction<'a> {
|
||||
executor::block_on(self.0.query(query, params))
|
||||
}
|
||||
|
||||
/// Like `Client::query_one`.
|
||||
pub fn query_one<T>(&mut self, query: &T, params: &[&(dyn ToSql + Sync)]) -> Result<Row, Error>
|
||||
where
|
||||
T: ?Sized + ToStatement,
|
||||
{
|
||||
executor::block_on(self.0.query_one(query, params))
|
||||
}
|
||||
|
||||
/// Like `Client::query_raw`.
|
||||
pub fn query_raw<'b, T, I>(
|
||||
&mut self,
|
||||
|
Loading…
Reference in New Issue
Block a user