Crates.io | postgresql_commands |
lib.rs | postgresql_commands |
version | 0.17.3 |
source | src |
created_at | 2024-04-03 04:14:50.49313 |
updated_at | 2024-11-12 20:20:08.837305 |
description | PostgreSQL commands for interacting with a PostgreSQL server. |
homepage | |
repository | https://github.com/theseus-rs/postgresql-embedded |
max_upload_size | |
id | 1194740 |
size | 403,213 |
A library for executing PostgreSQL command line utilities.
use postgresql_commands::Result;
use postgresql_commands::psql::PsqlBuilder;
fn main() -> Result<()> {
let psql = PsqlBuilder::new()
.command("CREATE DATABASE \"test\"")
.host("127.0.0.1")
.port(5432)
.username("postgresql")
.pg_password("password")
.build();
let (stdout, stderr) = psql.execute()?;
Ok(())
}
The following features are available:
Name | Description | Default? |
---|---|---|
tokio |
Enables the use of tokio commands | No |
This crate uses #![forbid(unsafe_code)]
to ensure everything is implemented in 100% safe Rust.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.