Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen committed Apr 14, 2024
1 parent 33e05e7 commit 3f9ebc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lutra/lutra/src/connection.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use std::path::Path;

use anyhow::Result;
use connector_arrow::sqlite::SQLiteConnection;

use crate::project::DatabaseModule;

pub fn open(db: &DatabaseModule, project_root: &Path) -> Result<rusqlite::Connection> {
pub fn open(db: &DatabaseModule, project_root: &Path) -> Result<SQLiteConnection> {
// convert relative to absolute path
let mut sqlite_file_abs = project_root.to_path_buf();
sqlite_file_abs.push(&db.connection_params.file_relative);
Expand All @@ -13,5 +14,5 @@ pub fn open(db: &DatabaseModule, project_root: &Path) -> Result<rusqlite::Connec
// init SQLite
let sqlite_conn = rusqlite::Connection::open(sqlite_file_abs)?;

Ok(sqlite_conn)
Ok(SQLiteConnection::new(sqlite_conn))
}
2 changes: 1 addition & 1 deletion lutra/lutra/src/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn execute_one(project: &ProjectCompiled, pipeline_ident: &Ident) -> Result<Rela
};
log::debug!("executing sql: {pipeline}");

let batches = connector_arrow::query_one(&mut conn, pipeline)?;
let batches = connector_arrow::query(&mut conn, pipeline)?;

Ok(batches)
}

0 comments on commit 3f9ebc7

Please sign in to comment.