mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-22 16:09:27 +08:00
parent
a1b83423a5
commit
b346d02b98
@ -949,12 +949,10 @@ impl Connection {
|
|||||||
/// and owned by the caller, e.g. as a result of calling ffi::sqlite3_open().
|
/// and owned by the caller, e.g. as a result of calling ffi::sqlite3_open().
|
||||||
#[inline]
|
#[inline]
|
||||||
pub unsafe fn from_handle_owned(db: *mut ffi::sqlite3) -> Result<Connection> {
|
pub unsafe fn from_handle_owned(db: *mut ffi::sqlite3) -> Result<Connection> {
|
||||||
let db_path = db_filename(db);
|
|
||||||
let db = InnerConnection::new(db, true);
|
let db = InnerConnection::new(db, true);
|
||||||
Ok(Connection {
|
Ok(Connection {
|
||||||
db: RefCell::new(db),
|
db: RefCell::new(db),
|
||||||
cache: StatementCache::with_capacity(STATEMENT_CACHE_DEFAULT_CAPACITY),
|
cache: StatementCache::with_capacity(STATEMENT_CACHE_DEFAULT_CAPACITY),
|
||||||
path: db_path,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user