change db lib to take credential reference instead
This commit is contained in:
parent
4d6a723d0b
commit
8855664d65
2 changed files with 4 additions and 4 deletions
|
|
@ -44,12 +44,12 @@ class Connection {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Connection(
|
Connection(
|
||||||
db_credentials_t credentials,
|
db_credentials_t& credentials,
|
||||||
std::function<void(pqxx::connection *c)> setup_function
|
std::function<void(pqxx::connection *c)> setup_function
|
||||||
);
|
);
|
||||||
|
|
||||||
Connection(
|
Connection(
|
||||||
db_credentials_t credentials
|
db_credentials_t& credentials
|
||||||
);
|
);
|
||||||
|
|
||||||
~Connection();
|
~Connection();
|
||||||
|
|
|
||||||
|
|
@ -36,13 +36,13 @@ bool connected = false;
|
||||||
|
|
||||||
|
|
||||||
Connection::Connection(
|
Connection::Connection(
|
||||||
db_credentials_t credentials,
|
db_credentials_t& credentials,
|
||||||
std::function<void(pqxx::connection *c)> setup
|
std::function<void(pqxx::connection *c)> setup
|
||||||
) : setup_function(move(setup)) {
|
) : setup_function(move(setup)) {
|
||||||
this->db_credentials = credentials;
|
this->db_credentials = credentials;
|
||||||
}
|
}
|
||||||
|
|
||||||
Connection::Connection(db_credentials_t credentials) {
|
Connection::Connection(db_credentials_t& credentials) {
|
||||||
this->db_credentials = credentials;
|
this->db_credentials = credentials;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue