Skip to main content

yang_db/
lib.rs

1// 错误类型模块
2pub mod error;
3
4// MySQL 数据库模块
5pub mod mysql;
6
7// Redis 数据库模块
8pub mod redis;
9
10// 重新导出错误类型
11pub use error::DbError;
12
13// 重新导出 MySQL 核心类型
14pub use mysql::{
15    condition_to_sql_owned, Condition, Database, DatabaseConfig, FieldType, QueryBuilder,
16    SqlValue, Transaction,
17};
18
19// 重新导出 Redis 核心类型
20pub use redis::{
21    PoolStatus, RedisClient, RedisConfig, RedisPipeline, RedisTransaction, RedisValue,
22};
23
24// 类型别名
25pub type Result<T> = std::result::Result<T, DbError>;