ch-database 0.2.2

Database and object storage primitives for SQLx, SpacetimeDB, and S3
Documentation

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

Sustainable Use License 1.0.