Class that represents parsed connection string. More...
#include <cppdb/utils.h>
Public Types | |
| typedef std::map< std::string, std::string > | properties_type |
Public Member Functions | |
| bool | has (std::string const &prop) const |
| std::string | get (std::string const &prop, std::string const &default_value=std::string()) const |
| int | get (std::string const &prop, int default_value) const |
| connection_info () | |
| connection_info (std::string const &cs) | |
Public Attributes | |
| std::string | connection_string |
| std::string | driver |
| properties_type | properties |
Class that represents parsed connection string.
| typedef std::map<std::string,std::string> cppdb::connection_info::properties_type |
Type that represent key, values set
| cppdb::connection_info::connection_info | ( | ) | [inline] |
Default constructor - empty info
| cppdb::connection_info::connection_info | ( | std::string const & | cs | ) | [inline, explicit] |
Create connection_info from the connection string parsing it.
| std::string cppdb::connection_info::get | ( | std::string const & | prop, |
| std::string const & | default_value = std::string() |
||
| ) | const |
Get property prop, returning default_value if not defined.
| int cppdb::connection_info::get | ( | std::string const & | prop, |
| int | default_value | ||
| ) | const |
Get numeric value for property prop, returning default_value if not defined. If the value is not a number, throws cppdb_error.
| bool cppdb::connection_info::has | ( | std::string const & | prop | ) | const |
Cheks if property prop, has been given in connection string.
| std::string cppdb::connection_info::connection_string |
The original connection string
| std::string cppdb::connection_info::driver |
The driver name
The std::map of key value properties.
1.7.6.1