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

Function LoadPropertiesFromDSN

cpp/src/arrow/flight/sql/odbc/odbc_api.cc:819–830  ·  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

817// Load properties from the given DSN. The properties loaded do _not_ overwrite existing
818// entries in the properties.
819void 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
832SQLRETURN SQLDriverConnect(SQLHDBC conn, SQLHWND window_handle,
833 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