8 #include <vlutil/vlString.h>
33 return "mysql-database-connection";
45 virtual bool connect()
override;
65 virtual std::string
escapeString(std::string str)
override;
Implements a database connection which will connect to a MySQL server to record any database events l...
Definition: vrfMySqlDatabaseConnection.h:16
unsigned myPort
Definition: vrfMySqlDatabaseConnection.h:81
MYSQL * myConn
Definition: vrfMySqlDatabaseConnection.h:83
DtVrfMySqlDatabaseConnection()
Constructor.
virtual ~DtVrfMySqlDatabaseConnection() override
Destructor.
DtString myDatabaseName
Definition: vrfMySqlDatabaseConnection.h:80
virtual bool connect() override
Connects to the configured MySQL server.
virtual bool createDatabase() override
Creates the database, if necessary.
virtual std::string escapeString(std::string str) override
Escapes the given string for SQLite.
virtual bool insertOrUpdateEntriesForEvents(const DtVrfDatabaseEventVector &events) override
Logs the given events to the database, updating duplicates. NOTE: All events in the list must be of t...
std::vector< DtVrfDatabaseEventUniquePtr > DtVrfDatabaseEventVector
Definition: vrfDatabaseEvent.h:194
static DtVrfDatabaseConnection * create()
Creator function for this class. Should not generally be called directly. Database Connection should ...
Definition: vrfMySqlDatabaseConnection.h:25
Contains the configuration options for the database logger.
Definition: rwDatabaseLoggerConfig.h:22
virtual bool updateEntryForEvent(const DtVrfDatabaseEvent &event) override
Updates the given event in the database.
static DtString type()
Type of this connection.
Definition: vrfMySqlDatabaseConnection.h:31
virtual bool createTableForEvent(const DtVrfDatabaseEvent &event) override
Creates a table a database table, if necessary.
DtVrfMySqlDatabaseConnection & operator=(const DtVrfMySqlDatabaseConnection &other)
Assignment Operator not implemented – Do Not copy.
DtString myPassword
Definition: vrfMySqlDatabaseConnection.h:79
virtual bool insertOrIgnoreEntriesForEvents(const DtVrfDatabaseEventVector &events) override
Logs the given events to the database, ignoring duplicates. NOTE: All events in the list must be of t...
The base class for all database connections. The database connection is responsible for reading queue...
Definition: vrfDatabaseConnection.h:26
DtString myUserName
Definition: vrfMySqlDatabaseConnection.h:78
Represents a single event to be recorded in the database. Anytime something occurs that requires data...
Definition: vrfDatabaseEvent.h:22
virtual bool processConfiguration(const DtRwDatabaseLoggerConfig &config) override
Processes the configuration for this connection.
DtString myHostIp
Definition: vrfMySqlDatabaseConnection.h:77