Expand description
rat_quickdb - 跨数据库ODM库
提供统一的数据库操作接口,支持SQLite、PostgreSQL、MySQL和MongoDB 通过连接池和无锁队列实现高性能的数据后端无关性
Re-exports§
pub use error::QuickDbError;
pub use error::QuickDbResult;
pub use pool::ConnectionPool;
pub use pool::DatabaseConnection;
pub use manager::PoolManager;
pub use manager::add_database;
pub use manager::remove_database;
pub use manager::get_connection;
pub use manager::release_connection;
pub use manager::get_aliases;
pub use manager::set_default_alias;
pub use manager::health_check;
pub use manager::shutdown;
pub use manager::get_id_generator;
pub use manager::get_mongo_auto_increment_generator;
pub use manager::get_cache_manager;
pub use manager::get_cache_stats;
pub use manager::clear_cache;
pub use manager::clear_all_caches;
pub use odm::AsyncOdmManager;
pub use odm::OdmOperations;
pub use odm::get_odm_manager;
pub use odm::get_odm_manager_mut;
pub use model::Model;
pub use model::ModelOperations;
pub use model::ModelManager;
pub use model::FieldType;
pub use model::FieldDefinition;
pub use model::ModelMeta;
pub use model::IndexDefinition;
pub use model::array_field;
pub use model::list_field;
pub use model::string_field;
pub use model::integer_field;
pub use model::float_field;
pub use model::boolean_field;
pub use model::datetime_field;
pub use model::uuid_field;
pub use model::json_field;
pub use model::dict_field;
pub use model::reference_field;
pub use serializer::DataSerializer;
pub use serializer::SerializerConfig;
pub use serializer::OutputFormat;
pub use serializer::SerializationResult;
pub use adapter::DatabaseAdapter;
pub use adapter::create_adapter;
pub use config::GlobalConfig;
pub use config::GlobalConfigBuilder;
pub use config::DatabaseConfigBuilder;
pub use config::PoolConfigBuilder;
pub use config::AppConfig;
pub use config::AppConfigBuilder;
pub use config::LoggingConfig;
pub use config::LoggingConfigBuilder;
pub use config::Environment;
pub use config::LogLevel;
pub use config::sqlite_config;
pub use config::postgres_config;
pub use config::mysql_config;
pub use config::mongodb_config;
pub use config::mongodb_config_with_builder;
pub use task_queue::TaskQueueManager;
pub use task_queue::get_global_task_queue;
pub use task_queue::initialize_global_task_queue;
pub use task_queue::shutdown_global_task_queue;
pub use table::TableManager;
pub use table::TableSchema;
pub use table::ColumnDefinition;
pub use table::ColumnType;
pub use table::IndexType;
pub use cache::CacheManager;
pub use cache::CacheStats;
pub use id_generator::IdGenerator;
pub use id_generator::MongoAutoIncrementGenerator;
pub use odm::create;
pub use odm::find_by_id;
pub use odm::find;
pub use odm::update;
pub use odm::update_by_id;
pub use odm::delete;
pub use odm::delete_by_id;
pub use odm::count;
pub use odm::exists;
pub use types::*;
Modules§
- adapter
- 数据库适配器模块
- cache
- 缓存管理模块
- config
- 配置管理模块
- error
- 错误处理模块
- id_
generator - ID 生成器模块
- manager
- 连接池管理器
- model
- 模型定义系统
- odm
- 异步ODM层 - 使用无锁队列解决生命周期问题
- pool
- 连接池模块
- python_
api - Python API 模块
- serializer
- JSON序列化层
- table
- 表管理模块
- task_
queue - 任务队列模块
- types
- 数据库类型定义和配置
Macros§
- define_
model - 便捷宏:定义模型
- field_
types - 便捷宏:定义模型字段类型
- quick_
error - 便捷宏 - 快速创建错误
Constants§
Functions§
- get_
info - 获取库信息
- init
- 初始化rat_quickdb库
- init_
with_ log_ level Deprecated - 初始化rat_quickdb库