mirror of
https://github.com/getml/sqlgen.git
synced 2026-01-06 09:30:07 -06:00
24 lines
459 B
C++
24 lines
459 B
C++
#ifndef SQLGEN_POSTGRES_CREDENTIALS_HPP_
|
|
#define SQLGEN_POSTGRES_CREDENTIALS_HPP_
|
|
|
|
#include <string>
|
|
|
|
namespace sqlgen::postgres {
|
|
|
|
struct Credentials {
|
|
std::string user;
|
|
std::string password;
|
|
std::string host;
|
|
std::string dbname;
|
|
int port = 5432;
|
|
|
|
std::string to_str() const {
|
|
return "postgresql://" + user + ":" + password + "@" + host + ":" +
|
|
std::to_string(port) + "/" + dbname;
|
|
}
|
|
};
|
|
|
|
} // namespace sqlgen::postgres
|
|
|
|
#endif
|