allow to use host database connection parameter
Add config option: db_host (default empty) - name of host to connect to
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010-2018, Tomasz Sowa
|
||||
* Copyright (c) 2010-2022, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -54,7 +54,8 @@ public:
|
||||
~DbConn();
|
||||
|
||||
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 SetConnParam(const std::wstring & host, const std::wstring & hostaddr, const std::wstring & port,
|
||||
const std::wstring & database, const std::wstring & user, const std::wstring & pass);
|
||||
void Connect();
|
||||
void WaitForConnection();
|
||||
void Close();
|
||||
@@ -68,7 +69,7 @@ private:
|
||||
|
||||
PGconn * pg_conn;
|
||||
std::wstring db_conn_string;
|
||||
std::wstring db_host, db_port, db_database, db_user, db_pass;
|
||||
std::wstring db_host, db_hostaddr, db_port, db_database, db_user, db_pass;
|
||||
DbTextStream conn_info;
|
||||
|
||||
// a helper method for escaping strings
|
||||
|
Reference in New Issue
Block a user