MCPcopy Create free account
hub / github.com/SOCI/soci / parseConnectString

Function parseConnectString

src/core/connection-parameters.cpp:22–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20{
21
22void parseConnectString(std::string const & connectString,
23 std::string & backendName,
24 std::string & connectionParameters)
25{
26 std::string const protocolSeparator = "://";
27
28 std::string::size_type const p = connectString.find(protocolSeparator);
29 if (p == std::string::npos)
30 {
31 throw soci::soci_error("No backend name found in " + connectString);
32 }
33
34 backendName = connectString.substr(0, p);
35 connectionParameters = connectString.substr(p + protocolSeparator.size());
36}
37
38} // namespace anonymous
39

Callers 2

connection_parametersMethod · 0.85
db2_session_backendMethod · 0.85

Calls 3

findMethod · 0.80
substrMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected