15个版本
0.4.5 | 2023年8月20日 |
---|---|
0.4.4 | 2023年3月27日 |
0.4.3 | 2022年9月7日 |
0.4.2 | 2022年4月30日 |
0.2.2 | 2016年11月19日 |
#357 in #native
151,058 monthly downloads
用于43个crate (2直接)
33KB
807 行
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支持。
运行测试套件
测试套件需要PostgreSQL以正确的配置运行。最简单的方法是使用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
。
lib.rs
:
为postgres-types
的内部库。
依赖项
~0.3–0.8MB
~19K SLoC