5次发布
0.2.9 | 2023年8月17日 |
---|---|
0.2.8 | 2023年7月5日 |
0.2.7 | 2023年7月3日 |
0.2.6 | 2023年6月18日 |
0.2.5 | 2023年6月18日 |
#36 in #postgre-sql
129 每月下载量
在 10 个crate中使用 (通过 xxai-tokio-postgres)
135KB
3K 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.6–10MB
~115K SLoC