ruststream-sqlx 0.7.0

SQL databases for the RustStream messaging framework through sqlx: a transactional outbox over any RustStream broker and task queues in Postgres, MySQL/MariaDB and SQLite tables.
Documentation
use ruststream_sqlx::{Inbox, Insert};
use sqlx::PgConnection;

#[derive(sqlx::FromRow, Clone)]
struct Envelope {
    subject: String,
}

#[derive(Inbox, sqlx::FromRow, Clone)]
#[inbox(table = "jobs")]
struct Flattening {
    #[field(id, generated)]
    id: i64,
    #[sqlx(flatten)]
    envelope: Envelope,
}

async fn write(job: &Flattening, conn: &mut PgConnection) -> Result<(), sqlx::Error> {
    Insert::insert(job, conn).await
}

fn main() {
    let _ = write;
}