mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-01 15:03:27 +00:00
Adds a method get the underlying sqlite3 pointer
This commit is contained in:
parent
2adfb1926a
commit
cac3f193d7
@ -4,6 +4,7 @@ use std::sync::Arc;
|
||||
use futures_core::future::BoxFuture;
|
||||
use futures_util::future;
|
||||
use hashbrown::HashMap;
|
||||
use libsqlite3_sys::sqlite3;
|
||||
|
||||
use crate::connection::{Connect, Connection};
|
||||
use crate::error::Error;
|
||||
@ -33,6 +34,13 @@ pub struct SqliteConnection {
|
||||
scratch_row_column_names: Arc<HashMap<UStr, usize>>,
|
||||
}
|
||||
|
||||
impl SqliteConnection {
|
||||
/// Returns the underlying sqlite3* connection handle
|
||||
pub fn as_raw_handle(&self) -> *mut sqlite3 {
|
||||
self.handle.as_ptr()
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for SqliteConnection {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("SqliteConnection").finish()
|
||||
|
Loading…
x
Reference in New Issue
Block a user