Load properties from the given DSN. The properties loaded do _not_ overwrite existing entries in the properties.
| 817 | // Load properties from the given DSN. The properties loaded do _not_ overwrite existing |
| 818 | // entries in the properties. |
| 819 | void LoadPropertiesFromDSN(const std::string& dsn, |
| 820 | Connection::ConnPropertyMap& properties) { |
| 821 | config::Configuration config; |
| 822 | config.LoadDsn(dsn); |
| 823 | Connection::ConnPropertyMap dsn_properties = config.GetProperties(); |
| 824 | for (auto& [key, value] : dsn_properties) { |
| 825 | auto prop_iter = properties.find(key); |
| 826 | if (prop_iter == properties.end()) { |
| 827 | properties.emplace(std::make_pair(std::move(key), std::move(value))); |
| 828 | } |
| 829 | } |
| 830 | } |
| 831 | |
| 832 | SQLRETURN SQLDriverConnect(SQLHDBC conn, SQLHWND window_handle, |
| 833 | SQLWCHAR* in_connection_string, |
no test coverage detected