Set password for pqxx
This commit is contained in:
parent
7cd30707da
commit
5f1e77d0d1
1 changed files with 3 additions and 0 deletions
|
@ -57,6 +57,9 @@ bool PQXXBackend::connect() {
|
|||
str += CONFIG_STRING(m_config, "database.database") + " ";
|
||||
|
||||
str += "user=" + CONFIG_STRING(m_config, "database.user") + " ";
|
||||
if (!CONFIG_STRING(m_config, "database.password").empty()) {
|
||||
str += "password=" + CONFIG_STRING(m_config, "database.password") + " ";
|
||||
}
|
||||
|
||||
try {
|
||||
m_conn = new pqxx::connection(str);
|
||||
|
|
Loading…
Add table
Reference in a new issue