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 chrono::{DateTime, Utc};
use ruststream_sqlx::dialect::Column;
use ruststream_sqlx::spec::{Lease, Payload};
use ruststream_sqlx::{InboxSpec, InboxTable};

/// The chain sets the payload before the lease, the type lists them the other way round.
struct OutOfOrder {
    id: i64,
}

impl InboxTable for OutOfOrder {
    type Id = i64;
    type Table = InboxSpec<(Lease<DateTime<Utc>>, Payload)>;
    const TABLE: Self::Table = InboxSpec::new("jobs", Column::new("id"))
        .payload(Column::new("payload"))
        .lease(Column::new("locked_until"));

    fn id(&self) -> &i64 {
        &self.id
    }
}

fn main() {}