mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 01:58:16 +00:00
fix imports
This commit is contained in:
parent
c2453a084d
commit
f66e3925f3
4 changed files with 25 additions and 12 deletions
|
@ -4,6 +4,7 @@ use limbo_core::IO;
|
|||
use pyo3::prelude::*;
|
||||
use pyo3::types::PyList;
|
||||
use pyo3::types::PyTuple;
|
||||
use std::rc::Rc;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
mod errors;
|
||||
|
@ -198,7 +199,7 @@ fn stmt_is_dml(sql: &str) -> bool {
|
|||
#[pyclass]
|
||||
#[derive(Clone)]
|
||||
pub struct Connection {
|
||||
conn: Arc<Mutex<limbo_core::Connection>>,
|
||||
conn: Arc<Mutex<Rc<limbo_core::Connection>>>,
|
||||
io: Arc<limbo_core::PlatformIO>,
|
||||
}
|
||||
|
||||
|
@ -238,7 +239,7 @@ pub fn connect(path: &str) -> Result<Connection> {
|
|||
})?);
|
||||
let db = limbo_core::Database::open_file(io.clone(), path)
|
||||
.map_err(|e| PyErr::new::<DatabaseError, _>(format!("Failed to open database: {:?}", e)))?;
|
||||
let conn: limbo_core::Connection = db.connect();
|
||||
let conn: Rc<limbo_core::Connection> = db.connect();
|
||||
Ok(Connection {
|
||||
conn: Arc::new(Mutex::new(conn)),
|
||||
io,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue