allow to use db_hostaddr, db_port or db_conn_string config parameters to connect to PostgreSQL
This commit is contained in:
@@ -53,7 +53,8 @@ public:
|
||||
DbConn();
|
||||
~DbConn();
|
||||
|
||||
void SetConnParam(const std::wstring & database, const std::wstring & user, const std::wstring & pass);
|
||||
void SetConnParam(const std::wstring & conn_string);
|
||||
void SetConnParam(const std::wstring & host, const std::wstring & port, const std::wstring & database, const std::wstring & user, const std::wstring & pass);
|
||||
void Connect();
|
||||
void WaitForConnection();
|
||||
void Close();
|
||||
@@ -66,7 +67,8 @@ private:
|
||||
void LogConnectionSocket();
|
||||
|
||||
PGconn * pg_conn;
|
||||
std::wstring db_database, db_user, db_pass;
|
||||
std::wstring db_conn_string;
|
||||
std::wstring db_host, db_port, db_database, db_user, db_pass;
|
||||
DbTextStream conn_info;
|
||||
|
||||
// a helper method for escaping strings
|
||||
|
Reference in New Issue
Block a user