8 个版本
0.7.15 | 2023 年 8 月 17 日 |
---|---|
0.7.14 | 2023 年 8 月 17 日 |
0.7.13 | 2023 年 7 月 23 日 |
0.7.10 | 2023 年 6 月 18 日 |
35 在 #postgre-sql
每月下载量 117 次
用于 9 个 crate(直接使用 2 个)
405KB
9K 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
。
依赖项
~6–18MB
~252K SLoC