Breathe life back into this project. #1

Merged
gburd merged 22 commits from gburd/2018edition-fmt-fix-deps into master 2020-01-16 16:27:21 +00:00
2 changed files with 10 additions and 10 deletions
Showing only changes of commit f4002f34f4 - Show all commits

View file

@ -322,17 +322,17 @@ impl<'a, 'c> InProgress<'a, 'c> {
}
pub fn savepoint(&self, name: &str) -> Result<()> {
self.transaction.execute(&format!("SAVEPOINT {}", name), &[])?;
self.transaction.execute(&format!("SAVEPOINT {}", name), rusqlite::params![])?;
Ok(())
}
pub fn rollback_savepoint(&self, name: &str) -> Result<()> {
self.transaction.execute(&format!("ROLLBACK TO {}", name), &[])?;
self.transaction.execute(&format!("ROLLBACK TO {}", name), rusqlite::params![])?;
Ok(())
}
pub fn release_savepoint(&self, name: &str) -> Result<()> {
self.transaction.execute(&format!("RELEASE {}", name), &[])?;
self.transaction.execute(&format!("RELEASE {}", name), rusqlite::params![])?;
Ok(())
}
}

View file

@ -292,7 +292,7 @@ fn run_statement<'sqlite, 'stmt, 'bound>
bindings: &'bound [(String, Rc<rusqlite::types::Value>)]) -> Result<rusqlite::Rows<'stmt>> {
let rows = if bindings.is_empty() {
statement.query(&[])?
statement.query(rusqlite::params![])?
} else {
let refs: Vec<(&str, &ToSql)> =
bindings.iter()
@ -313,8 +313,8 @@ fn run_sql_query<'sqlite, 'sql, 'bound, T, F>
let mut statement = sqlite.prepare(sql)?;
let mut rows = run_statement(&mut statement, &bindings)?;
let mut result = vec![];
while let Some(row_or_error) = rows.next() {
result.push(mapper(&row_or_error?));
while let Some(row_or_error) = rows.next().unwrap() {
result.push(mapper(&row_or_error));
}
Ok(result)
}
@ -453,10 +453,10 @@ pub fn q_explain<'sqlite, 'query, T>
let steps = run_sql_query(sqlite, &plan_sql, &query.args, |row| {
QueryPlanStep {
select_id: row.get(0),
order: row.get(1),
from: row.get(2),
detail: row.get(3)
select_id: row.get(0).unwrap(),
order: row.get(1).unwrap(),
from: row.get(2).unwrap(),
detail: row.get(3).unwrap()
}
})?;