You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
awaitReturnErrorAsync($"Connection name {endpoint.ConnectionName} could not be found in options ConnectionStrings dictionary.",true,context);
60
+
awaitReturnErrorAsync($"Connection name {endpoint.ConnectionName} could not be found in options DataSources or ConnectionStrings dictionaries.",true,context);
Copy file name to clipboardExpand all lines: NpgsqlRest/Options/NpgsqlRestOptions.cs
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,14 @@ public NpgsqlRestOptions(NpgsqlDataSource dataSource)
66
66
/// For example, some routines might use the primary database connection string, while others might use a read-only connection string from the replica servers.
/// The connection name in ConnectionStrings dictionary that will be used to execute the metadata query. If this value is null, the default connection string or data source will be used.
Copy file name to clipboardExpand all lines: NpgsqlRestClient/appsettings.json
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,21 @@
112
112
// This is needed when using non superuser connection roles with limited schema access and mapping the metadata function to a specific schema.
113
113
// If the connection string contains the same "Search Path=" it will be skipped.
114
114
//
115
-
"MetadataQuerySchema": null
115
+
"MetadataQuerySchema": null,
116
+
// Any: Any successful connection is acceptable.
117
+
// Primary: Server must not be in hot standby mode (pg_is_in_recovery() must return false).
118
+
// Standby: Server must be in hot standby mode (pg_is_in_recovery() must return true).
119
+
// PreferPrimary: First try to find a primary server, but if none of the listed hosts is a primary server, try again in Any mode.
120
+
// PreferStandby: First try to find a standby server, but if none of the listed hosts is a standby server, try again in Any mode.
121
+
// ReadWrite: Session must accept read-write transactions by default (that is, the server must not be in hot standby mode and the default_transaction_read_only parameter must be off).
122
+
// ReadOnly: Session must not accept read-write transactions by default (the converse).
123
+
// see https://www.npgsql.org/doc/failover-and-load-balancing.html
124
+
"MultiHostConnectionTargets": {
125
+
// all connections use the same target mode
126
+
"Default": "Any",
127
+
// per connection overrides { "name": "Primary|Standby|Any|PreferPrimary|PreferStandby|ReadWrite|ReadOnly" }
0 commit comments