//! Connection trait for abstracting over Pool and Transaction.
//!
//! Rather than defining our own `Connection` trait, fletch leverages
//! [`sqlx::Executor`] directly. The [`Executor`] re-export allows
//! users to write functions generic over any SQLx executor (pool,
//! connection, or transaction) without importing sqlx themselves.
/// Re-export of the SQLx `Executor` trait.
///
/// Use this as a bound when you need a function that works with
/// both a `Pool` and a `Transaction`:
///
/// ```ignore
/// async fn my_query<'e, E>(executor: E) -> Result<(), FletchError>
/// where
/// E: Executor<'e, Database = Sqlite>,
/// {
/// sqlx::query("SELECT 1").execute(executor).await?;
/// Ok(())
/// }
/// ```
pub use Executor;