MCPcopy Create free account
hub / github.com/apache/arrow / LoadPropertiesFromDSN

Function LoadPropertiesFromDSN

cpp/src/arrow/flight/sql/odbc/odbc_api.cc:818–829  ·  view source on GitHub ↗

Load properties from the given DSN. The properties loaded do _not_ overwrite existing entries in the properties.

Source from the content-addressed store, hash-verified

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

Callers 1

SQLDriverConnectFunction · 0.85

Calls 4

LoadDsnMethod · 0.80
GetPropertiesMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected