winterbaume_sqlengine_duckdb/
lib.rs1mod athena;
2mod exec;
3mod redshift;
4
5use std::sync::{Arc, Mutex};
6
7pub use athena::DuckDbAthenaQueryBackend;
8pub use duckdb::{Connection, Error as DuckDbError, Result as DuckDbResult};
9pub use redshift::DuckDbRedshiftQueryBackend;
10
11pub fn open_database(path: &str) -> DuckDbResult<Arc<Mutex<Connection>>> {
18 let conn = if path.is_empty() || path == ":memory:" {
19 Connection::open_in_memory()?
20 } else {
21 Connection::open(path)?
22 };
23 Ok(Arc::new(Mutex::new(conn)))
24}