Expand description
rat_quickdb - 跨数据库ODM库
提供统一的数据库操作接口,支持SQLite、PostgreSQL、MySQL和MongoDB 通过连接池和无锁队列实现高性能的数据后端无关性
Re-exports§
pub use error::QuickDbError;pub use error::QuickDbResult;pub use manager::add_database;pub use manager::drop_table;pub use manager::get_aliases;pub use manager::health_check;pub use manager::register_model;pub use manager::set_default_alias;pub use manager::table_exists;pub use pool::DatabaseConnection;pub use manager::clear_all_caches;pub use manager::clear_cache;pub use manager::get_cache_manager;pub use manager::get_cache_stats;pub use model::FieldDefinition;pub use model::FieldType;pub use model::IndexDefinition;pub use model::Model;pub use model::ModelManager;pub use model::ModelMeta;pub use model::ModelOperations;pub use model::array_field;pub use model::boolean_field;pub use model::datetime_field;pub use model::datetime_with_tz_field;pub use model::dict_field;pub use model::float_field;pub use model::integer_field;pub use model::json_field;pub use model::list_field;pub use model::reference_field;pub use model::string_field;pub use model::uuid_field;pub use odm::AsyncOdmManager;pub use odm::OdmOperations;pub use odm::get_odm_manager;pub use odm::get_odm_manager_mut;pub use adapter::DatabaseAdapter;pub use adapter::create_adapter;pub use config::AppConfig;pub use config::AppConfigBuilder;pub use config::DatabaseConfigBuilder;pub use config::Environment;pub use config::GlobalConfig;pub use config::GlobalConfigBuilder;pub use config::LogLevel;pub use config::LoggingConfig;pub use config::LoggingConfigBuilder;pub use config::PoolConfigBuilder;pub use config::mongodb_config;Deprecated pub use config::mysql_config;Deprecated pub use config::postgres_config;Deprecated pub use config::sqlite_config;Deprecated pub use model::conversion::database_aware::convert_datetime_with_tz_aware;pub use model::conversion::datetime_conversion::convert_string_to_datetime_with_tz;pub use serializer::DataSerializer;pub use serializer::OutputFormat;pub use serializer::SerializationResult;pub use serializer::SerializerConfig;pub use table::ColumnDefinition;pub use table::ColumnType;pub use table::IndexType;pub use table::TableManager;pub use table::TableSchema;pub use cache::CacheManager;pub use cache::CacheStats;pub use id_generator::IdGenerator;pub use id_generator::MongoAutoIncrementGenerator;pub use odm::get_server_version;pub use types::*;pub use stored_procedure::*;
Modules§
- adapter
- 数据库适配器模块
- cache
- 缓存管理模块
- config
- 配置管理模块
- error
- 错误处理模块
- i18n
- 多语言错误消息模块
- id_
generator - ID 生成器模块
- join_
macro - 虚拟表格宏定义 用于简化复杂JOIN查询和缓存管理 支持SQL和MongoDB双模式
- manager
- 连接池管理器模块
- model
- 模型定义系统模块
- odm
- 异步ODM层模块
- pool
- 连接池模块
- security
- 数据库安全验证工具
- serializer
- JSON序列化层
- stored_
procedure - 存储过程模块
- table
- 表管理模块
- types
- 数据库类型定义和配置
- utils
- 工具函数模块
Macros§
- debug_
log - define_
join_ table - 虚拟表格定义宏
- define_
model - 便捷宏:定义模型
- field_
types - 便捷宏:定义模型字段类型
- quick_
error - 便捷宏 - 快速创建错误
Constants§
Functions§
- generate_
object_ id - 生成ObjectId字符串
- get_
info - 获取库信息
- init
- 初始化rat_quickdb库
- init_
with_ log_ level Deprecated - 初始化rat_quickdb库
- process_
data_ fields_ from_ metadata