rbdc
Database driver abstraction layer for Rust, providing a unified interface for rbatis.
Features
- Safe:
#![forbid(unsafe_code)]- 100% safe Rust - Async: Native async support based on Tokio
- Extensible: Simple trait definitions for easy driver implementation
Supported Databases
| Database | Driver |
|---|---|
| MySQL | rbdc-mysql |
| PostgreSQL | rbdc-pg |
| SQLite | rbdc-sqlite |
| MSSQL | rbdc-mssql |
Quick Start
use SqliteDriver;
use ConnManager;
use FastPool;
async
Implement Custom Driver
Implement these 6 traits:
use ;
//TODO ....
For databases with blocking APIs, refer to rbdc-sqlite which uses the flume channel library.
See examples for more.
License
MIT