24个版本
0.6.7 | 2024年7月22日 |
---|---|
0.6.6 | 2023年8月20日 |
0.6.5 | 2023年3月27日 |
0.6.4 | 2022年4月30日 |
0.1.1 | 2016年11月22日 |
#392 在 数据库接口 中
503,282 每月下载量
用于 631 个包 (直接使用30个)
95KB
2.5K SLoC
Rust-Postgres
为Rust提供PostgreSQL支持。
postgres 
原生的、同步的PostgreSQL客户端。
tokio-postgres 
原生的、异步的PostgreSQL客户端。
postgres-types 
Rust和Postgres类型之间的转换。
postgres-native-tls 
通过native-tls为postgres和tokio-postgres提供TLS支持。
postgres-openssl 
通过openssl为postgres和tokio-postgres提供TLS支持。
运行测试套件
测试套件需要Postgres在正确的配置下运行。最简单的方法是使用docker
- 安装
docker
和docker-compose
。- 在ubuntu上:
sudo apt install docker.io docker-compose
。
- 在ubuntu上:
- 确保您的用户有docker的权限。
- 在ubuntu上:
sudo usermod -aG docker $USER
- 在ubuntu上:
- 切换到
rust-postgres
仓库的顶级目录。 - 运行
docker-compose up -d
。 - 运行
cargo test
。 - 运行
docker-compose stop
。
依赖
~2.4–3.5MB
~86K SLoC