Expand description
§ch-database
Connection pools and migrations for MySQL and MariaDB, SpacetimeDB connections, and local or S3 object storage.
§Installation
[dependencies]
ch-database = "0.2.2"Requires Rust 1.99 or newer.
§Features
| Feature | Includes |
|---|---|
mariadb (default) | SQLx connection pools, retries, and migrations |
spacetimedb | Connection and subscription management |
s3 | Local files, Amazon S3, MinIO, and compatible storage |
§Usage
Use connect_mysql_pool with a connection URL or
connect_mysql_pool_with_options with SQLx connection options.
run_migrations applies SQLx migrations under a database lock. Use the same
lock name for every runner of a migration set. The timeout limits how long a
runner waits for the lock.
ObjectStoreClient stores and reads objects from local directories or S3.
See the API documentation for details and examples.
§License
Modules§
- mariadb
- MariaDB and SQLx integration. MariaDB helpers built on top of SQLx.
- migration
- SQL migration statement parsing.
- s3
- Local and S3-compatible object storage.
- spacetimedb
- SpacetimeDB connection lifecycle helpers. Shared SpacetimeDB helper utilities.