Skip to content

Commit 5d8b40b

Browse files
committed
add database to uri
1 parent 8ed8681 commit 5d8b40b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

sqlx-core/src/aurora/options/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,14 @@ impl AuroraConnectOptions {
6767
let resource_arn = var("AURORA_RESOURCE_ARN").ok();
6868
let secret_arn = var("AURORA_SECRET_ARN").ok();
6969

70+
let database = var("AURORA_DATABASE").ok();
71+
7072
AuroraConnectOptions {
7173
db_type,
7274
region,
7375
resource_arn,
7476
secret_arn,
75-
database: None,
77+
database,
7678
schema: None,
7779
statement_cache_capacity: 100,
7880
log_settings: Default::default(),

sqlx-core/src/aurora/options/parse.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ impl FromStr for AuroraConnectOptions {
2929
"secret-arn" => {
3030
options = options.secret_arn(&*value);
3131
}
32+
"database" => {
33+
options = options.database(&*value);
34+
}
3235
_ => log::warn!("ignoring unrecognized connect parameter: {}={}", key, value),
3336
}
3437
}

0 commit comments

Comments
 (0)