easy-sql 0.101.1

Macro-first SQL toolkit with compile-time checked queries, optional migrations on top of sqlx.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use easy_macros::always_context;

use crate::traits::{Driver, EasyExecutor};

#[always_context]
/// Defines part of the database to initialize
///
/// Prefer implementing this trait via the [`DatabaseSetup`](macro@crate::DatabaseSetup) derive macro;
/// manual implementations may need updates across releases.
pub trait DatabaseSetup<D: Driver + 'static> {
    async fn setup(conn: &mut (impl EasyExecutor<D> + Send + Sync)) -> anyhow::Result<()>;
}