rat_quickdb 0.4.6

强大的跨数据库ODM库,支持自动索引创建、统一接口和现代异步架构
Documentation
[package]
name = "rat_quickdb"
version = "0.4.6"
edition = "2024"
authors = ["0ldm0s <oldmos@gmail.com>"]
description = "强大的跨数据库ODM库,支持自动索引创建、统一接口和现代异步架构"
license = "LGPL-3.0"
repository = "https://github.com/0ldm0s/rat_quickdb"
homepage = "https://github.com/0ldm0s/rat_quickdb"
documentation = "https://docs.rs/rat_quickdb"
readme = "README.md"
keywords = ["odm", "database", "async", "cross-database", "mongodb"]
categories = [
    "database",
    "asynchronous",
    "web-programming",
    "data-structures",
    "development-tools::procedural-macro-helpers"
]

[dependencies]
# 日志系统 - 使用 rat_logger
rat_logger = "0.2.8"

# 多语言支持系统
rat_embed_lang = "0.1.1"

# 异步运行时
tokio = { version = "1.0", features = ["full"] }
futures = "0.3"
async-trait = "0.1"

# 序列化
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"

# 错误处理
thiserror = "1.0"
anyhow = "1.0"

# 并发数据结构和无锁队列
crossbeam-queue = "0.3"
dashmap = "5.5"
parking_lot = "0.12"
arc-swap = "1.0"
once_cell = "1.0"

# 数据库驱动 - 按特性分离
# SQLite (轻量级,适合测试)
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "sqlite", "chrono", "uuid", "json"], optional = true }
# PostgreSQL
tokio-postgres = { version = "0.7", features = ["with-chrono-0_4", "with-serde_json-1", "with-uuid-1"], optional = true }
# MySQL
mysql_async = { version = "0.34", optional = true }
# MongoDB
mongodb = { version = "2.8", optional = true }

# 时间处理
chrono = { version = "0.4", features = ["serde"] }

# UUID 支持
uuid = { version = "1.0", features = ["v4", "serde"] }

# URL 编码(MongoDB URI 生成需要)
urlencoding = "2.1"

# 字符串处理
regex = "1.0"
base64 = "0.22"
rand = "0.8"
bytes = "1.0"

# 缓存支持
# rat_memcache 的 full-features 特性已经包含了 L1(内存)和 L2(磁盘)缓存功能
# 因此用户无需启用额外的特性即可使用完整的缓存功能
rat_memcache = { version = "0.2.4", features = ["full-features"] }
# 雪花算法ID生成
snowflake = { version = "1.3" }

# PyO3 支持(可选)
pyo3 = { version = "0.21.0", features = ["extension-module"], optional = true }

[lib]
name = "rat_quickdb"
crate-type = ["rlib"]

[features]
# 数据库支持特性 (按需启用)
sqlite-support = ["sqlx"]
postgres-support = ["tokio-postgres", "sqlx/postgres"]
mysql-support = ["mysql_async", "sqlx/mysql"]
mongodb-support = ["dep:mongodb"]

# 核心功能特性
# 注意:melange-storage 特性仅为内部标识符,L2缓存功能已通过 rat_memcache 的 full-features 内置
# 用户无需手动启用此特性即可使用L2缓存功能
melange-storage = []
# PyO3 绑定 (默认禁用)
python-bindings = ["pyo3"]

# 完整功能(所有数据库支持,不包括PyO3)
full = ["sqlite-support", "postgres-support", "mysql-support", "mongodb-support", "melange-storage"]

# Python完整绑定(包含所有数据库支持的Python绑定)
python-full = ["python-bindings", "full"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[package.metadata.playground]
features = ["full-features"]

# Badges for README (these are rendered by shields.io)
# Add these to your README.md:
# [![Crates.io](https://img.shields.io/crates/v/rat_quickdb.svg)](https://crates.io/crates/rat_quickdb)
# [![Documentation](https://docs.rs/rat_quickdb/badge.svg)](https://docs.rs/rat_quickdb)
# [![License](https://img.shields.io/crates/l/rat_quickdb.svg)](https://github.com/0ldm0s/rat_quickdb/blob/main/LICENSE)
# [![Downloads](https://img.shields.io/crates/d/rat_quickdb.svg)](https://crates.io/crates/rat_quickdb)
# [![Rust](https://img.shields.io/badge/rust-1.70%2B-orange.svg)](https://rust-lang.org)

[dev-dependencies]
tokio-test = "0.4"
tempfile = "3.8"

# Examples dependencies for testing
# 所有示例都可以直接运行,不需要额外特性