the ConnectionProvider namespace. All classes used in the ConnectionProvider module should be inside this namespace
More...
the ConnectionProvider namespace. All classes used in the ConnectionProvider module should be inside this namespace
the ConnectionProvider namespace contains all the objects in the ConnectionProvider module
◆ get_connection()
returns an AbstractConnection object if the identifier is known to a registered connection provider
- Example:
string connstr = get_connection(str);
- Parameters
-
conn | the connection identifier |
- Returns
- the connection object
- Exceptions
-
CONNECTION-ERROR | the connection string cannot be matched as an external url identifier by a connection provider module |
- Note
- connection provider modules are processed in the order they are declared with the
QORE_CONNECTION_PROVIDERS
environment variable; connection provider modules must be separated with PathSep characters
- See also
- Connection Provider Modules
◆ get_connection_hash()
returns a hash of connection information keyed by connection identifier; values are ConnectionInfo hashes as returned by AbstractConnection::getInfo() (with passwords included)
- Example:
*hash<string, hash<ConnectionInfo>> h = get_connection_hash();
- Parameters
-
verbose | display connection provider module errors on stdout (otherwise errors are silently ignored) |
- Returns
- a hash keyed by connection identifier; values are ConnectionInfo hashes as returned by AbstractConnection::getInfo() (with passwords included); NOTHING is returned if no connections are known
- Note
- connection provider modules are processed in the order they are declared with the
QORE_CONNECTION_PROVIDERS
environment variable; connection provider modules must be separated with PathSep characters
- See also
-
◆ get_connection_url()
returns a URL string for the given identifier if the identifier is known to a registered connection provider or returns the URL itself if the identifier is a valid URL
- Example:
string connstr = get_connection_url(str);
- Parameters
-
str | the connection identifier or a valid URL connection string (a URL string is considered valid for this function if it begins with a scheme and has at least one character after the scheme; ex: "scheme://x..." |
- Returns
- the URL string corresponding to the connection identifier, or, in case the argument is a valid URL string, returns the argument itself
- Exceptions
-
CONNECTION-ERROR | the connection string cannot be matched as an external url identifier by a connection provider module and there is no scheme (i.e. protocol) specification in the string followed by at least one character (ex: "scheme://x..." ) |
- Note
- connection provider modules are processed in the order they are declared with the
QORE_CONNECTION_PROVIDERS
environment variable; connection provider modules must be separated with PathSep characters
- See also
- Connection Provider Modules
◆ get_connections()
returns all known connections as a hash keyed by connection identifier; values are AbstractConnection objects; NOTHING is returned if no connections are known
- Example:
*hash<string, AbstractConnection> h = get_connections();
- Parameters
-
verbose | display connection provider module errors on stdout (otherwise errors are ignored) |
- Returns
- a hash keyed by connection identifier; values are AbstractConnection objects; NOTHING is returned if no connections are known
- Note
- connection provider modules are processed in the order they are declared with the
QORE_CONNECTION_PROVIDERS
environment variable; connection provider modules must be separated with PathSep characters
- See also
-