Expand description
Shared SQL QueueBackend for PostgreSQL and SQLite.
Reference implementation for Developing the backend; integrators typically use
boson_backend_sqlite::SqliteQueueBackend or
boson_backend_postgres::PostgresQueueBackend.
§Entry points
SqlQueueBackend— connect, schema bootstrap, and trait implementationSqlDialect/SqlPool— engine selection and pool wrapper
§Example (integrator wiring)
use boson_backend_sql_common::SqlQueueBackend;
let backend = SqlQueueBackend::connect_sqlite("sqlite://:memory:").await?;Macros§
- delegate_
queue_ backend - Delegate every
QueueBackendmethod to$inner. - sql_
execute - sql_
fetch_ all - sql_
fetch_ all_ map - sql_
fetch_ one - sql_
fetch_ one_ map - sql_
fetch_ optional - sql_
fetch_ optional_ map
Structs§
- Enqueue
Rate Limiter - Tracks recent enqueue timestamps per task name (1-second sliding window).
- SqlQueue
Backend - SQL-backed queue backend (
PostgreSQLorSQLite).
Enums§
- SqlDialect
- SQL dialect for query variants.
- SqlPool
- Connection pool for a SQL backend.