Little cleanup
This commit is contained in:
parent
d3c75d5787
commit
4c90977cb0
12
src/lib.rs
12
src/lib.rs
@ -1479,23 +1479,23 @@ impl<'conn> Statement<'conn> {
|
|||||||
self.next_portal_id.set(id + 1);
|
self.next_portal_id.set(id + 1);
|
||||||
let portal_name = format!("{}p{}", self.name, id);
|
let portal_name = format!("{}p{}", self.name, id);
|
||||||
|
|
||||||
match self.inner_query(&*portal_name, row_limit, params) {
|
self.inner_query(&*portal_name, row_limit, params).map(move |(result, more_rows)| {
|
||||||
Ok((result, more_rows)) => {
|
LazyRows {
|
||||||
Ok(LazyRows {
|
|
||||||
_trans: trans,
|
_trans: trans,
|
||||||
result: result,
|
result: result,
|
||||||
name: portal_name,
|
name: portal_name,
|
||||||
row_limit: row_limit,
|
row_limit: row_limit,
|
||||||
more_rows: more_rows,
|
more_rows: more_rows,
|
||||||
finished: false,
|
finished: false,
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Err(err) => Err(err),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Consumes the statement, clearing it from the Postgres session.
|
/// Consumes the statement, clearing it from the Postgres session.
|
||||||
///
|
///
|
||||||
|
/// If this statement was created via the `prepare_cached` method, `finish`
|
||||||
|
/// does nothing.
|
||||||
|
///
|
||||||
/// Functionally identical to the `Drop` implementation of the
|
/// Functionally identical to the `Drop` implementation of the
|
||||||
/// `Statement` except that it returns any error to the caller.
|
/// `Statement` except that it returns any error to the caller.
|
||||||
pub fn finish(mut self) -> Result<()> {
|
pub fn finish(mut self) -> Result<()> {
|
||||||
|
Loading…
Reference in New Issue
Block a user