Crates.io | connection_string_generator |
lib.rs | connection_string_generator |
version | 0.2.0 |
source | src |
created_at | 2024-08-19 18:45:38.594524 |
updated_at | 2024-08-20 14:19:03.011297 |
description | A VERY simple crate to generate database connection strings programmatically. |
homepage | |
repository | https://github.com/twihno/connection-string-generator |
max_upload_size | |
id | 1344333 |
size | 34,087 |
A VERY simple crate to generate database connection strings programmatically.
let conn_string = PostgresConnectionString::new()
.set_username_and_password("user", "password")
.set_host_with_port("localhost", 5432)
.set_database_name("db_name")
.set_connect_timeout(30);
println!("{conn_string}");
let conn_string = SqlServerConnectionString::new()
.set_username_and_password("user", "password")
.set_host_with_default_port("sql.test.com")
.set_database_name("db_name")
.set_connect_timeout(30)
.enable_encryption_and_trust_server_certificate();
println!("{conn_string}");