Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
37 lines (33 sloc)
828 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __EXTERNALDATABASE | |
#define __EXTERNALDATABASE | |
// wxWindows includes | |
#include <wx/wx.h> | |
#include <wx/string.h> | |
#include <mysql/mysql.h> | |
class ExternalDatabase | |
{ | |
public: | |
ExternalDatabase(); | |
virtual ~ExternalDatabase(); | |
void UpdateFromConfig(); | |
void TransferFromInternal(); | |
wxString EscapedString(wxString &escaped); | |
void SplitFieldNames(wxString &createSQL,wxArrayString &fieldNames); | |
void TransferTableData(wxString &tableName, | |
wxArrayString &fieldNames, | |
long *currentRowCount); | |
wxString hostname; | |
int port; | |
wxString username; | |
wxString password; | |
wxString databasename; | |
bool enabled; | |
bool createIndexes; | |
private: | |
bool Connect(); | |
bool CreateDatabaseInstance(); | |
bool ExecuteSQL(wxString &SQL); | |
long RowCount(wxString &tableName); | |
MYSQL *mySQLHandle; | |
}; | |
#endif |