mirror of
https://github.com/isar/rusqlite.git
synced 2025-11-03 23:48:56 +08:00
Rename SqliteConnection -> Connection.
Leave old name in as a (deprecated) typealias.
This commit is contained in:
10
src/trace.rs
10
src/trace.rs
@@ -8,7 +8,7 @@ use std::str;
|
||||
use std::time::Duration;
|
||||
|
||||
use super::ffi;
|
||||
use {SqliteError, SqliteResult, SqliteConnection};
|
||||
use {SqliteError, SqliteResult, Connection};
|
||||
|
||||
/// Set up the process-wide SQLite error logging callback.
|
||||
/// This function is marked unsafe for two reasons:
|
||||
@@ -60,7 +60,7 @@ pub fn log(err_code: c_int, msg: &str) {
|
||||
}
|
||||
}
|
||||
|
||||
impl SqliteConnection {
|
||||
impl Connection {
|
||||
/// Register or clear a callback function that can be used for tracing the execution of SQL statements.
|
||||
///
|
||||
/// Prepared statement placeholders are replaced/logged with their assigned values.
|
||||
@@ -120,7 +120,7 @@ mod test {
|
||||
use std::sync::Mutex;
|
||||
use std::time::Duration;
|
||||
|
||||
use SqliteConnection;
|
||||
use Connection;
|
||||
|
||||
#[test]
|
||||
fn test_trace() {
|
||||
@@ -132,7 +132,7 @@ mod test {
|
||||
traced_stmts.push(s.to_owned());
|
||||
}
|
||||
|
||||
let mut db = SqliteConnection::open_in_memory().unwrap();
|
||||
let mut db = Connection::open_in_memory().unwrap();
|
||||
db.trace(Some(tracer));
|
||||
{
|
||||
let _ = db.query_row("SELECT ?", &[&1i32], |_| {});
|
||||
@@ -160,7 +160,7 @@ mod test {
|
||||
profiled.push((s.to_owned(), d));
|
||||
}
|
||||
|
||||
let mut db = SqliteConnection::open_in_memory().unwrap();
|
||||
let mut db = Connection::open_in_memory().unwrap();
|
||||
db.profile(Some(profiler));
|
||||
db.execute_batch("PRAGMA application_id = 1").unwrap();
|
||||
db.profile(None);
|
||||
|
||||
Reference in New Issue
Block a user