#include <userver/storages/postgres/options.hpp>
PostgreSQL connection options
Dynamic option POSTGRES_CONNECTION_SETTINGS
Definition at line 229 of file options.hpp.
Public Types | |
| enum | PreparedStatementOptions { kCachePreparedStatements , kNoPreparedStatements } |
| enum | UserTypesOptions { kUserTypesEnabled , kUserTypesEnforced , kPredefinedTypesOnly } |
| enum | CheckQueryParamsOptions { kIgnoreUnused , kCheckUnused } |
| enum | DiscardOnConnectOptions { kDiscardNone , kDiscardAll } |
| enum | StatementLogMode { kLogSkip , kLog } |
| using | SettingsVersion = std::size_t |
Public Member Functions | |
| bool | operator== (const ConnectionSettings &rhs) const |
| bool | operator!= (const ConnectionSettings &rhs) const |
| bool | RequiresConnectionReset (const ConnectionSettings &rhs) const |
Public Attributes | |
| PreparedStatementOptions | prepared_statements = kCachePreparedStatements |
| Cache prepared statements or not. | |
| UserTypesOptions | user_types = kUserTypesEnabled |
| Enables the usage of user-defined types. | |
| CheckQueryParamsOptions | ignore_unused_query_params = kCheckUnused |
| Checks for not-NULL query params that are not used in query. | |
| std::size_t | max_prepared_cache_size = kDefaultMaxPreparedCacheSize |
| Limits the size or prepared statements cache. | |
| PipelineMode | pipeline_mode = PipelineMode::kDisabled |
| Turns on connection pipeline mode. | |
| OmitDescribeInExecuteMode | omit_describe_mode = OmitDescribeInExecuteMode::kDisabled |
| Enables protocol-level optimization when executing prepared statements. | |
| std::size_t | recent_errors_threshold = 2 |
| This many connection errors in 15 seconds block new connections opening. | |
| std::optional< std::chrono::seconds > | max_ttl {} |
| The maximum lifetime of the connection after which it will be closed. | |
| DiscardOnConnectOptions | discard_on_connect = kDiscardAll |
| Execute discard all after establishing a new connection. | |
| StatementLogMode | statement_log_mode = kLog |
| Statement logging in span tags. | |
| bool | deadline_propagation_enabled = true |
| SettingsVersion | version {0U} |
| Helps keep track of the changes in settings. | |
| using storages::postgres::ConnectionSettings::SettingsVersion = std::size_t |
Definition at line 251 of file options.hpp.
| enum storages::postgres::ConnectionSettings::CheckQueryParamsOptions |
Definition at line 239 of file options.hpp.
| enum storages::postgres::ConnectionSettings::DiscardOnConnectOptions |
Definition at line 243 of file options.hpp.
| enum storages::postgres::ConnectionSettings::PreparedStatementOptions |
Definition at line 230 of file options.hpp.
| enum storages::postgres::ConnectionSettings::StatementLogMode |
Definition at line 247 of file options.hpp.
| enum storages::postgres::ConnectionSettings::UserTypesOptions |
Definition at line 234 of file options.hpp.
|
inline |
Definition at line 292 of file options.hpp.
|
inline |
Definition at line 288 of file options.hpp.
|
inline |
Definition at line 294 of file options.hpp.
| bool storages::postgres::ConnectionSettings::deadline_propagation_enabled = true |
Definition at line 283 of file options.hpp.
| DiscardOnConnectOptions storages::postgres::ConnectionSettings::discard_on_connect = kDiscardAll |
Execute discard all after establishing a new connection.
Definition at line 278 of file options.hpp.
| CheckQueryParamsOptions storages::postgres::ConnectionSettings::ignore_unused_query_params = kCheckUnused |
Checks for not-NULL query params that are not used in query.
Definition at line 260 of file options.hpp.
| std::size_t storages::postgres::ConnectionSettings::max_prepared_cache_size = kDefaultMaxPreparedCacheSize |
Limits the size or prepared statements cache.
Definition at line 263 of file options.hpp.
| std::optional<std::chrono::seconds> storages::postgres::ConnectionSettings::max_ttl {} |
The maximum lifetime of the connection after which it will be closed.
Definition at line 275 of file options.hpp.
| OmitDescribeInExecuteMode storages::postgres::ConnectionSettings::omit_describe_mode = OmitDescribeInExecuteMode::kDisabled |
Enables protocol-level optimization when executing prepared statements.
Definition at line 269 of file options.hpp.
| PipelineMode storages::postgres::ConnectionSettings::pipeline_mode = PipelineMode::kDisabled |
Turns on connection pipeline mode.
Definition at line 266 of file options.hpp.
| PreparedStatementOptions storages::postgres::ConnectionSettings::prepared_statements = kCachePreparedStatements |
Cache prepared statements or not.
Definition at line 254 of file options.hpp.
| std::size_t storages::postgres::ConnectionSettings::recent_errors_threshold = 2 |
This many connection errors in 15 seconds block new connections opening.
Definition at line 272 of file options.hpp.
| StatementLogMode storages::postgres::ConnectionSettings::statement_log_mode = kLog |
Statement logging in span tags.
Definition at line 281 of file options.hpp.
| UserTypesOptions storages::postgres::ConnectionSettings::user_types = kUserTypesEnabled |
Enables the usage of user-defined types.
Definition at line 257 of file options.hpp.
| SettingsVersion storages::postgres::ConnectionSettings::version {0U} |
Helps keep track of the changes in settings.
Definition at line 286 of file options.hpp.