![]() |
VR-Forces Developer's Guide
|
Implements a database connection which will connect to a MySQL server to record any database events logged by VR-Forces.

Public Member Functions | |
| virtual | ~DtVrfMySqlDatabaseConnection () override |
Public Member Functions inherited from DtVrfDatabaseConnection | |
| virtual | ~DtVrfDatabaseConnection () |
| virtual bool | initialize (const DtRwDatabaseLoggerConfig &config, DtVrfDatabaseLoggerInterface *dbLogger) |
| virtual void | run () |
Static Public Member Functions | |
| static DtVrfDatabaseConnection * | create () |
| static DtString | type () |
Protected Member Functions | |
| DtVrfMySqlDatabaseConnection () | |
| virtual bool | processConfiguration (const DtRwDatabaseLoggerConfig &config) override |
| virtual bool | connect () override |
| virtual bool | createDatabase () override |
| virtual bool | createTableForEvent (const DtVrfDatabaseEvent &event) override |
| virtual bool | insertOrIgnoreEntriesForEvents (const DtVrfDatabaseEventVector &events) override |
| virtual bool | insertOrUpdateEntriesForEvents (const DtVrfDatabaseEventVector &events) override |
| virtual bool | updateEntryForEvent (const DtVrfDatabaseEvent &event) override |
| virtual std::string | escapeString (std::string str) override |
Protected Member Functions inherited from DtVrfDatabaseConnection | |
| DtVrfDatabaseConnection () | |
| virtual bool | stop () |
Protected Attributes | |
| DtString | myHostIp |
| DtString | myUserName |
| DtString | myPassword |
| DtString | myDatabaseName |
| unsigned | myPort |
| MYSQL * | myConn |
Protected Attributes inherited from DtVrfDatabaseConnection | |
| DtVrfDatabaseLoggerInterface * | myDatabaseLogger |
| double | myLogPeriod |
| std::unique_ptr< std::thread > | myThread |
| std::vector< bool > | myCreatedTables |
| std::atomic< bool > | myTimeToStop |
| std::atomic< bool > | myStopped |
| LogToDatabaseTask * | myTask |
Private Member Functions | |
| DtVrfMySqlDatabaseConnection (const DtVrfMySqlDatabaseConnection &other) | |
| DtVrfMySqlDatabaseConnection & | operator= (const DtVrfMySqlDatabaseConnection &other) |
|
overridevirtual |
Destructor.
|
protected |
Constructor.
Referenced by create().
|
private |
Copy Constructor not implemented – Do Not copy.
|
inlinestatic |
Creator function for this class. Should not generally be called directly. Database Connection should be crated by the DtVrfDatabaseLoggerCreator.
References DtVrfMySqlDatabaseConnection().
|
inlinestatic |
Type of this connection.
|
overrideprotectedvirtual |
Processes the configuration for this connection.
Reimplemented from DtVrfDatabaseConnection.
|
overrideprotectedvirtual |
Connects to the configured MySQL server.
Implements DtVrfDatabaseConnection.
|
overrideprotectedvirtual |
Creates the database, if necessary.
Implements DtVrfDatabaseConnection.
|
overrideprotectedvirtual |
Creates a table a database table, if necessary.
Implements DtVrfDatabaseConnection.
|
overrideprotectedvirtual |
Logs the given events to the database, ignoring duplicates. NOTE: All events in the list must be of the same event type!
Implements DtVrfDatabaseConnection.
|
overrideprotectedvirtual |
Logs the given events to the database, updating duplicates. NOTE: All events in the list must be of the same event type!
Implements DtVrfDatabaseConnection.
|
overrideprotectedvirtual |
Updates the given event in the database.
Implements DtVrfDatabaseConnection.
|
overrideprotectedvirtual |
Escapes the given string for SQLite.
Reimplemented from DtVrfDatabaseConnection.
|
private |
Assignment Operator not implemented – Do Not copy.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |