CppDB
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Types | Public Member Functions | Public Attributes
cppdb::connection_info Class Reference

Class that represents parsed connection string. More...

#include <cppdb/utils.h>

List of all members.

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

Detailed Description

Class that represents parsed connection string.


Member Typedef Documentation

typedef std::map<std::string,std::string> cppdb::connection_info::properties_type

Type that represent key, values set


Constructor & Destructor Documentation

Default constructor - empty info

cppdb::connection_info::connection_info ( std::string const &  cs) [inline, explicit]

Create connection_info from the connection string parsing it.


Member Function Documentation

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.


Member Data Documentation

The original connection string

The driver name

The std::map of key value properties.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator