Skip to content

Commit 39b2f67

Browse files
committed
Store custom passfile paths for PgConnectOptions
1 parent dc088b3 commit 39b2f67

File tree

1 file changed

+3
-1
lines changed
  • sqlx-postgres/src/options

1 file changed

+3
-1
lines changed

sqlx-postgres/src/options/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ pub struct PgConnectOptions {
2020
pub(crate) socket: Option<PathBuf>,
2121
pub(crate) username: String,
2222
pub(crate) password: Option<String>,
23+
pub(crate) passfile_paths: Vec<PathBuf>,
2324
pub(crate) database: Option<String>,
2425
pub(crate) ssl_mode: PgSslMode,
2526
pub(crate) ssl_root_cert: Option<CertificateInput>,
@@ -74,6 +75,7 @@ impl PgConnectOptions {
7475
socket: None,
7576
username,
7677
password: var("PGPASSWORD").ok(),
78+
passfile_paths: vec![],
7779
database,
7880
ssl_root_cert: var("PGSSLROOTCERT").ok().map(CertificateInput::from),
7981
ssl_client_cert: var("PGSSLCERT").ok().map(CertificateInput::from),
@@ -100,7 +102,7 @@ impl PgConnectOptions {
100102
self.port,
101103
&self.username,
102104
self.database.as_deref(),
103-
&[] as &[&Path],
105+
&self.passfile_paths,
104106
);
105107
}
106108

0 commit comments

Comments
 (0)