a3s-orm 0.2.0

A type-safe, executor-neutral SQL query builder for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use async_trait::async_trait;

use super::{MigrationReport, PreparedMigration};

/// Applies an already validated migration set.
///
/// Implementations must serialize concurrent migrators, verify previously
/// applied checksums, and atomically record every migration they apply.
#[async_trait]
pub trait MigrationBackend: Send + Sync {
    type Error: std::error::Error + Send + Sync + 'static;

    async fn apply(&self, migrations: &[PreparedMigration])
        -> Result<MigrationReport, Self::Error>;
}