fix styling, refactor some variables, simplified some code
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
#include "DBHandler.hpp"
|
||||
|
||||
#include <iostream>
|
||||
//"host = localhost port = 5432 dbname = postgres user = postgres password = AlbertBridge1?"
|
||||
|
||||
|
||||
DBHandler::DBHandler(std::string connStr) : connectionObject(connStr.c_str()) {
|
||||
try {
|
||||
if (connectionObject.is_open()) {
|
||||
std::cout << "Databased connected" << std::endl;
|
||||
}
|
||||
else
|
||||
std::cout << "Failed to connect to Databased" << std::endl;
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
std::cerr << "Error: " << e.what() << std::endl;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user