Skip to content

Commit

Permalink
use all parameters to calculate connection id
Browse files Browse the repository at this point in the history
  • Loading branch information
artemp committed Jan 16, 2007
1 parent 085f832 commit 5549045
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions plugins/input/postgis/connection_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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>
Expand Down

0 comments on commit 5549045

Please sign in to comment.