Rustfmt
This commit is contained in:
parent
6fea7624d3
commit
bc04239a1d
@ -746,7 +746,7 @@ impl InnerConnection {
|
|||||||
try!(self.wait_for_ready());
|
try!(self.wait_for_ready());
|
||||||
return DbError::new(fields);
|
return DbError::new(fields);
|
||||||
}
|
}
|
||||||
_ => bad_response!(self)
|
_ => bad_response!(self),
|
||||||
};
|
};
|
||||||
match try!(self.read_message()) {
|
match try!(self.read_message()) {
|
||||||
CommandComplete { .. } => {}
|
CommandComplete { .. } => {}
|
||||||
@ -973,7 +973,12 @@ impl Connection {
|
|||||||
/// ```
|
/// ```
|
||||||
pub fn query<'a>(&'a self, query: &str, params: &[&ToSql]) -> Result<Rows<'a>> {
|
pub fn query<'a>(&'a self, query: &str, params: &[&ToSql]) -> Result<Rows<'a>> {
|
||||||
let (param_types, columns) = try!(self.conn.borrow_mut().raw_prepare("", query));
|
let (param_types, columns) = try!(self.conn.borrow_mut().raw_prepare("", query));
|
||||||
let stmt = Statement::new(self, "".to_owned(), param_types, columns, Cell::new(0), true);
|
let stmt = Statement::new(self,
|
||||||
|
"".to_owned(),
|
||||||
|
param_types,
|
||||||
|
columns,
|
||||||
|
Cell::new(0),
|
||||||
|
true);
|
||||||
stmt.into_query(params)
|
stmt.into_query(params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ impl<'a> Row<'a> {
|
|||||||
let conn = self.stmt.conn().conn.borrow();
|
let conn = self.stmt.conn().conn.borrow();
|
||||||
match self.data[idx] {
|
match self.data[idx] {
|
||||||
Some(ref data) => FromSql::from_sql(ty, &mut &**data, &SessionInfo::new(&*conn)),
|
Some(ref data) => FromSql::from_sql(ty, &mut &**data, &SessionInfo::new(&*conn)),
|
||||||
None => FromSql::from_sql_null(ty, &SessionInfo::new(&*conn))
|
None => FromSql::from_sql_null(ty, &SessionInfo::new(&*conn)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,9 +65,8 @@ impl<'conn> StatementInternals<'conn> for Statement<'conn> {
|
|||||||
|
|
||||||
fn into_query(self, params: &[&ToSql]) -> Result<Rows<'conn>> {
|
fn into_query(self, params: &[&ToSql]) -> Result<Rows<'conn>> {
|
||||||
check_desync!(self.conn);
|
check_desync!(self.conn);
|
||||||
self.inner_query("", 0, params).map(|(buf, _)| {
|
self.inner_query("", 0, params)
|
||||||
Rows::new_owned(self, buf.into_iter().collect())
|
.map(|(buf, _)| Rows::new_owned(self, buf.into_iter().collect()))
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user