Permalink
Browse files

use all parameters to calculate connection id

  • Loading branch information...
1 parent 085f832 commit 5549045aaa33dd75e08c13d93d2b4445e6e9c4ec @artemp artemp committed Jan 16, 2007
Showing with 13 additions and 6 deletions.
  1. +13 −6 plugins/input/postgis/connection_manager.hpp
@@ -38,11 +38,7 @@ using std::string;
template <typename T>
class ConnectionCreator
{
- string url_;
- string port_;
- string dbname_;
- string user_;
- string pass_;
+
public:
ConnectionCreator(string const& url,
string const& port,
@@ -59,10 +55,21 @@ class ConnectionCreator
{
return new T(url_,port_,dbname_,user_,pass_);
}
+
std::string id() const
{
- return url_ + ":" + dbname_;
+ return url_ + ":"
+ + dbname_ + ":"
+ + port_ +":"
+ + user_ ;
}
+private:
+ string url_;
+ string port_;
+ string dbname_;
+ string user_;
+ string pass_;
+
};
class ConnectionManager : public singleton <ConnectionManager,CreateStatic>

0 comments on commit 5549045

Please sign in to comment.