evento-sql 2.0.0-alpha.28

SQL database implementations for evento event sourcing library.
docs.rs failed to build evento-sql-2.0.0-alpha.28
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: evento-sql-2.0.0-alpha.27

evento-sql

SQL storage backend for the evento event sourcing toolkit: Sql<DB> wraps a sqlx pool and implements the Executor trait for SQLite, MySQL, and PostgreSQL (feature flags sqlite / mysql / postgres).

Most applications depend on the evento facade, which also re-exports the schema migrations:

[dependencies]
evento = { version = "2.0.0-alpha.27", features = ["sqlite"] }

Wire a pool into an executor (run the evento-sql-migrator migrations first):

# #[cfg(feature = "sqlite")]
# async fn run() -> anyhow::Result<()> {
let pool = sqlx::sqlite::SqlitePoolOptions::new()
    .connect("sqlite:events.db")
    .await?;
let executor: evento_sql::Sqlite = pool.into();
// via the facade: let executor: evento::Sqlite = pool.into();
# let _ = executor;
# Ok(())
# }

write stamps events with the database server clock and subscriptions gate on a stability watermark, so multi-process writers stay safe; see the crate docs for the ordering model.

Learn more