#[cfg(feature = "duckdb")]
use std::sync::{Arc, Mutex};
#[cfg(feature = "duckdb")]
use crate::adapters::motherduck_bridge::models::BridgeConnection;
#[cfg(feature = "duckdb")]
#[derive(Debug, Clone)]
pub struct DuckDbDestination {
pub connection: DuckDbConnection,
pub ddl: Arc<tokio::sync::Mutex<()>>,
pub motherduck: bool,
pub bridge_duckdb: String,
}
#[cfg(feature = "duckdb")]
#[derive(Debug, Clone)]
pub enum DuckDbConnection {
Local(Arc<Mutex<duckdb::Connection>>),
Bridge(BridgeConnection),
}
#[derive(Debug, Clone, Copy, Default)]
pub struct DuckDbSql;
#[cfg(feature = "duckdb")]
#[derive(Debug)]
pub struct DuckDbWriter {
pub destination: DuckDbDestination,
pub open_transaction: bool,
}