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:
|
||||
|
||||
Connection(
|
||||
db_credentials_t credentials,
|
||||
db_credentials_t& credentials,
|
||||
std::function<void(pqxx::connection *c)> setup_function
|
||||
);
|
||||
|
||||
Connection(
|
||||
db_credentials_t credentials
|
||||
db_credentials_t& credentials
|
||||
);
|
||||
|
||||
~Connection();
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@ bool connected = false;
|
|||
|
||||
|
||||
Connection::Connection(
|
||||
db_credentials_t credentials,
|
||||
db_credentials_t& credentials,
|
||||
std::function<void(pqxx::connection *c)> setup
|
||||
) : setup_function(move(setup)) {
|
||||
this->db_credentials = credentials;
|
||||
}
|
||||
|
||||
Connection::Connection(db_credentials_t credentials) {
|
||||
Connection::Connection(db_credentials_t& credentials) {
|
||||
this->db_credentials = credentials;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue