initial commit
This commit is contained in:
15
bin/main.cpp
Normal file
15
bin/main.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <string>
|
||||
#include "pgxx/pgxx.hpp"
|
||||
|
||||
auto main(int argc, char* args[]) -> int
|
||||
{
|
||||
const std::string password = "zHpQW0JaULlR1PugM2SRGrszBdRYGLL4SdIxg3trl3rSeaLJLAlDnCNs33RES+CX";
|
||||
const std::string main_conn = "host=localhost port=5432 dbname=main_db user=chatlanin password=" + password;
|
||||
const std::string replica_conn = "host=localhost port=5433 dbname=main_db user=chatlanin password=" + password;
|
||||
|
||||
auto& db = pgxx::database::instance();
|
||||
db.init("main", main_conn, 20);
|
||||
db.init("replica", replica_conn, 10);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user