1#ifndef DATABASE_MANAGER_H
2#define DATABASE_MANAGER_H
bool IsConnected() const
Checks if the connection to the database was successfully established.
Definition database_manager.h:31
bool is_connected_
Flag indicating whether the database connection is currently established.
Definition database_manager.h:64
~DatabaseManager() override=default
Private destructor. The unique_ptr automatically manages the pqxx::connection lifetime.
static DatabaseManager * GetInstance()
Gets the singleton instance of the DatabaseManager.
Definition database_manager.h:22
std::unique_ptr< pqxx::connection > connection_
Unique pointer managing the pqxx database connection object.
Definition database_manager.h:62
DatabaseManager & operator=(const DatabaseManager &)=delete
Deleted assignment operator to prevent assignment.
DatabaseManager(QObject *parent=nullptr)
Private constructor to enforce the singleton pattern. Attempts to establish the connection to the Pos...
Definition database_manager.cpp:5
DatabaseManager(const DatabaseManager &)=delete
Deleted copy constructor to prevent copying.