Skip to content

Commit 753bcb1

Browse files
committed
Add useful configuration comments
1 parent dc9cff6 commit 753bcb1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

crates/configuration/src/version5/connection_settings.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,27 @@ impl DatabaseConnectionSettings {
4545
pub enum DynamicConnectionSettings {
4646
Named {
4747
connection_uris: ConnectionUris,
48+
/// When set to true, fallback to using the connectionUri if the connectionName request argument is missing
49+
/// If this is not set, the connectionUri is not used at runtime, but will still be used by cli utilities
50+
#[serde(default)]
4851
fallback_to_static: bool,
52+
/// When set to true, eagerly create connection pools for all connection names at startup
53+
/// If this is not set, connection pools are created lazily when a request is made for a connection name
54+
#[serde(default)]
4955
eager_connections: bool,
5056
},
5157
Dynamic {
5258
fallback_to_static: bool,
5359
},
5460
}
5561

62+
type ConnectionName = String;
63+
5664
#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize, JsonSchema)]
5765
#[serde(rename_all = "camelCase")]
5866
pub enum ConnectionUris {
67+
/// The value of the variable is a JSON object mapping connection names to connection uris
5968
Variable(Variable),
60-
Map(BTreeMap<String, ConnectionUri>),
69+
/// A map of connection names to connection uris or the environment variables these are stored in
70+
Map(BTreeMap<ConnectionName, ConnectionUri>),
6171
}

0 commit comments

Comments
 (0)