typed_sqlx_client
A type-safe, extensible Rust library for managing multiple SQL databases and tables with sqlx.
- Provides generic, type-safe wrappers (
SqlPool
,SqlTable
) for sqlx connection pools and table handles. - Supports storing multiple pools (for different databases) in frameworks like actix-web.
- Enables per-table trait implementations (e.g.,
CrudOps
,CrudOpsRef
) for flexible, type-driven database access. - Designed for projects needing clear separation and type safety across many databases and tables.
Features
- Type-safe pool and table wrappers for sqlx
- Easy integration with actix-web and other frameworks
- Per-table trait implementations for CRUD and custom operations
- Supports multiple databases and tables in a single project
Example Usage
use ;
use MySqlPoolOptions;
;
async
Example: Implementing CRUD Trait for a Table-Entity Binding
use ;
use MySql;
;
License
MIT OR Apache-2.0