Version: 1.0.0
wxDatabase Class Referenceabstract

#include <database.h>

+ Inheritance diagram for wxDatabase:

Detailed Description

Definition at line 10 of file database.h.

Public Member Functions

 wxDatabase ()
 Constructor. More...
 
virtual ~wxDatabase ()
 Destructor. More...
 
virtual bool Open (const wxString &strDatabase)=0
 
virtual bool ChangeDatabase (const wxString &database)
 
virtual bool Close ()=0
 close database More...
 
virtual bool IsOpen ()=0
 Is the connection to the database open? More...
 
virtual void BeginTransaction ()=0
 Begin a transaction. More...
 
virtual void Commit ()=0
 Commit the current transaction. More...
 
virtual void RollBack ()=0
 Rollback the current transaction. More...
 
virtual int RunQuery (const wxString &strQuery)
 Run an insert, update, or delete query on the database. More...
 
virtual int RunQuery (const wxString &strQuery, bool bParseQueries)=0
 Run an insert, update, or delete query on the database. More...
 
virtual wxDatabaseResultSetRunQueryWithResults (const wxString &strQuery)=0
 Run a select query on the database. More...
 
virtual bool CloseResultSet (wxDatabaseResultSet *pResultSet)
 Close a result set returned by the database or a prepared statement previously. More...
 
virtual wxPreparedStatementPrepareStatement (const wxString &strQuery)=0
 Prepare a SQL statement which can be reused with different parameters. More...
 
virtual bool CloseStatement (wxPreparedStatement *pStatement)
 Close a prepared statement previously prepared by the database. More...
 
int ExecuteUpdate (const wxString &strQuery)
 See RunQuery. More...
 
wxDatabaseResultSetExecuteQuery (const wxString &strQuery)
 See RunQueryWithResults. More...
 
virtual bool TableExists (const wxString &table)=0
 Check for the existence of a table by name. More...
 
virtual bool ViewExists (const wxString &view)=0
 Check for the existence of a view by name. More...
 
virtual wxArrayString GetTables ()=0
 Retrieve all table names. More...
 
virtual wxArrayString GetViews ()=0
 Retrieve all view names. More...
 
virtual wxArrayString GetColumns (const wxString &table)=0
 Retrieve all column names for a table. More...
 
virtual wxArrayString GetPKColumns (const wxString &table)=0
 get Primary keys column names More...
 
virtual int GetSingleResultInt (const wxString &strSQL, int nField, bool bRequireUniqueResult=true)
 With the GetSingleResultX API, two additional exception types are thrown: wxDATABASE_NO_ROWS_FOUND - No database rows were returned wxDATABASE_NON_UNIQUE_RESULTSET - More than one database row was returned. More...
 
virtual int GetSingleResultInt (const wxString &strSQL, const wxString &strField, bool bRequireUniqueResult=true)
 
virtual wxString GetSingleResultString (const wxString &strSQL, int nField, bool bRequireUniqueResult=true)
 Retrieve a single string value from a query If multiple records are returned from the query, a wxDATABASE_NON_UNIQUE_RESULTSET exception is thrown unless bRequireUniqueResult is false. More...
 
virtual wxString GetSingleResultString (const wxString &strSQL, const wxString &strField, bool bRequireUniqueResult=true)
 
virtual long GetSingleResultLong (const wxString &strSQL, int nField, bool bRequireUniqueResult=true)
 Retrieve a single long value from a query If multiple records are returned from the query, a wxDATABASE_NON_UNIQUE_RESULTSET exception is thrown unless bRequireUniqueResult is false. More...
 
virtual long GetSingleResultLong (const wxString &strSQL, const wxString &strField, bool bRequireUniqueResult=true)
 
virtual bool GetSingleResultBool (const wxString &strSQL, int nField, bool bRequireUniqueResult=true)
 Retrieve a single bool value from a query If multiple records are returned from the query, a wxDATABASE_NON_UNIQUE_RESULTSET exception is thrown unless bRequireUniqueResult is false. More...
 
virtual bool GetSingleResultBool (const wxString &strSQL, const wxString &strField, bool bRequireUniqueResult=true)
 
virtual wxDateTime GetSingleResultDate (const wxString &strSQL, int nField, bool bRequireUniqueResult=true)
 Retrieve a single date/time value from a query If multiple records are returned from the query, a wxDATABASE_NON_UNIQUE_RESULTSET exception is thrown unless bRequireUniqueResult is false. More...
 
virtual wxDateTime GetSingleResultDate (const wxString &strSQL, const wxString &strField, bool bRequireUniqueResult=true)
 
virtual void * GetSingleResultBlob (const wxString &strSQL, int nField, wxMemoryBuffer &Buffer, bool bRequireUniqueResult=true)
 Retrieve a single Blob value from a query If multiple records are returned from the query, a wxDATABASE_NON_UNIQUE_RESULTSET exception is thrown unless bRequireUniqueResult is false. More...
 
virtual void * GetSingleResultBlob (const wxString &strSQL, const wxString &strField, wxMemoryBuffer &Buffer, bool bRequireUniqueResult=true)
 
virtual double GetSingleResultDouble (const wxString &strSQL, int nField, bool bRequireUniqueResult=true)
 Retrieve a single double value from a query If multiple records are returned from the query, a wxDATABASE_NON_UNIQUE_RESULTSET exception is thrown unless bRequireUniqueResult is false. More...
 
virtual double GetSingleResultDouble (const wxString &strSQL, const wxString &strField, bool bRequireUniqueResult=true)
 
virtual wxArrayInt GetResultsArrayInt (const wxString &strSQL, int nField)
 Retrieve all the values of one field in a result set. More...
 
virtual wxArrayInt GetResultsArrayInt (const wxString &strSQL, const wxString &Field)
 
virtual wxArrayString GetResultsArrayString (const wxString &strSQL, int nField)
 
virtual wxArrayString GetResultsArrayString (const wxString &strSQL, const wxString &Field)
 
virtual wxArrayLong GetResultsArrayLong (const wxString &strSQL, int nField)
 
virtual wxArrayLong GetResultsArrayLong (const wxString &strSQL, const wxString &Field)
 
virtual wxArrayDouble GetResultsArrayDouble (const wxString &strSQL, int nField)
 
virtual wxArrayDouble GetResultsArrayDouble (const wxString &strSQL, const wxString &Field)
 
void CloseResultSets ()
 Close all result set objects that have been generated but not yet closed. More...
 
void CloseStatements ()
 Close all prepared statement objects that have been generated but not yet closed. More...
 
const wxString & GetTypeName ()
 Get a descriptive name for the type of database. More...
 
bool IsViaODBC ()
 Is the connection via ODBC. More...
 
const wxString & GetLibraryPath ()
 Get the library path required by the database. More...
 
- Public Member Functions inherited from wxDatabaseErrorReporter
 wxDatabaseErrorReporter ()
 
virtual ~wxDatabaseErrorReporter ()
 
const wxString & GetErrorMessage ()
 
int GetErrorCode ()
 
void ResetErrorCodes ()
 
- Public Member Functions inherited from wxDatabaseStringConverter
 wxDatabaseStringConverter ()
 
 wxDatabaseStringConverter (const wxChar *charset)
 
virtual ~wxDatabaseStringConverter ()
 
void SetEncoding (wxFontEncoding encoding)
 
void SetEncoding (const wxCSConv *conv)
 
const wxCSConv * GetEncoding ()
 
virtual const wxCharBuffer ConvertToUnicodeStream (const wxString &inputString)
 
virtual size_t GetEncodedStreamLength (const wxString &inputString)
 
virtual wxString ConvertFromUnicodeStream (const char *inputBuffer)
 
virtual wxString ConvertFromUnicodeStream (const wxChar *inputBuffer)
 

Static Public Member Functions

static wxDatabaseGetDatabase (wxConfigBase &config, wxString *err=NULL, const wxString &path="/")
 Get an instance of the first valid database specified in config. More...
 
- Static Public Member Functions inherited from wxDatabaseStringConverter
static const wxCharBuffer ConvertToUnicodeStream (const wxString &inputString, const char *encoding)
 
static wxString ConvertFromUnicodeStream (const char *inputBuffer, const char *encoding)
 
static size_t GetEncodedStreamLength (const wxString &inputString, const char *encoding)
 
static wxString ConvertFromUnicodeStream (const wxChar *inputBuffer, const char *encoding)
 

Protected Member Functions

void LogResultSetForCleanup (wxDatabaseResultSet *pResultSet)
 Add result set object pointer to the list for "garbage collection". More...
 
void LogStatementForCleanup (wxPreparedStatement *pStatement)
 Add prepared statement object pointer to the list for "garbage collection". More...
 
- Protected Member Functions inherited from wxDatabaseErrorReporter
void SetErrorMessage (const wxString &strErrorMessage)
 
void SetErrorCode (int nErrorCode)
 
void ThrowDatabaseException ()
 

Private Member Functions

int GetSingleResultInt (const wxString &strSQL, const wxVariant *field, bool bRequireUniqueResult=true)
 
wxString GetSingleResultString (const wxString &strSQL, const wxVariant *field, bool bRequireUniqueResult=true)
 
long GetSingleResultLong (const wxString &strSQL, const wxVariant *field, bool bRequireUniqueResult=true)
 
bool GetSingleResultBool (const wxString &strSQL, const wxVariant *field, bool bRequireUniqueResult=true)
 
wxDateTime GetSingleResultDate (const wxString &strSQL, const wxVariant *field, bool bRequireUniqueResult=true)
 
void * GetSingleResultBlob (const wxString &strSQL, const wxVariant *field, wxMemoryBuffer &Buffer, bool bRequireUniqueResult=true)
 
double GetSingleResultDouble (const wxString &strSQL, const wxVariant *field, bool bRequireUniqueResult=true)
 
wxArrayInt GetResultsArrayInt (const wxString &strSQL, const wxVariant *field)
 
wxArrayString GetResultsArrayString (const wxString &strSQL, const wxVariant *field)
 
wxArrayLong GetResultsArrayLong (const wxString &strSQL, const wxVariant *field)
 

Private Attributes

wxDatabaseResultSetHashSet m_ResultSets
 
wxDatabaseStatementHashSet m_Statements
 
wxString m_typeName
 
bool m_isViaODBC
 
wxString m_libraryPath
 

Constructor & Destructor Documentation

◆ wxDatabase()

wxDatabase::wxDatabase ( )

Constructor.

Definition at line 4 of file database.cpp.

◆ ~wxDatabase()

wxDatabase::~wxDatabase ( )
virtual

Destructor.

Definition at line 13 of file database.cpp.

References CloseResultSets(), and CloseStatements().

Member Function Documentation

◆ BeginTransaction()

virtual void wxDatabase::BeginTransaction ( )
pure virtual

Begin a transaction.

Implemented in wxMysqlDatabase, wxPostgresDatabase, wxOdbcDatabase, wxTdsDatabase, and wxSqliteDatabase.

◆ ChangeDatabase()

virtual bool wxDatabase::ChangeDatabase ( const wxString &  database)
inlinevirtual

Reimplemented in wxMysqlDatabase.

Definition at line 26 of file database.h.

◆ Close()

virtual bool wxDatabase::Close ( )
pure virtual

◆ CloseResultSet()

bool wxDatabase::CloseResultSet ( wxDatabaseResultSet pResultSet)
virtual

◆ CloseResultSets()

void wxDatabase::CloseResultSets ( )

Close all result set objects that have been generated but not yet closed.

Definition at line 24 of file database.cpp.

References m_ResultSets.

Referenced by ~wxDatabase().

◆ CloseStatement()

bool wxDatabase::CloseStatement ( wxPreparedStatement pStatement)
virtual

Close a prepared statement previously prepared by the database.

Definition at line 95 of file database.cpp.

References m_Statements.

◆ CloseStatements()

void wxDatabase::CloseStatements ( )

Close all prepared statement objects that have been generated but not yet closed.

Definition at line 38 of file database.cpp.

References m_Statements.

Referenced by ~wxDatabase().

◆ Commit()

virtual void wxDatabase::Commit ( )
pure virtual

Commit the current transaction.

Implemented in wxMysqlDatabase, wxPostgresDatabase, wxOdbcDatabase, wxTdsDatabase, and wxSqliteDatabase.

◆ ExecuteQuery()

◆ ExecuteUpdate()

int wxDatabase::ExecuteUpdate ( const wxString &  strQuery)
inline

See RunQuery.

Definition at line 62 of file database.h.

◆ GetColumns()

virtual wxArrayString wxDatabase::GetColumns ( const wxString &  table)
pure virtual

Retrieve all column names for a table.

Implemented in wxTdsDatabase, wxMysqlDatabase, wxPostgresDatabase, wxOdbcDatabase, and wxSqliteDatabase.

◆ GetDatabase()

wxDatabase * wxDatabase::GetDatabase ( wxConfigBase &  config,
wxString *  err = NULL,
const wxString &  path = "/" 
)
static

Get an instance of the first valid database specified in config.

Definition at line 922 of file database.cpp.

References m_isViaODBC, and m_typeName.

◆ GetLibraryPath()

const wxString& wxDatabase::GetLibraryPath ( )
inline

Get the library path required by the database.

Definition at line 157 of file database.h.

◆ GetPKColumns()

virtual wxArrayString wxDatabase::GetPKColumns ( const wxString &  table)
pure virtual

get Primary keys column names

Implemented in wxTdsDatabase, wxMysqlDatabase, wxPostgresDatabase, wxOdbcDatabase, and wxSqliteDatabase.

◆ GetResultsArrayDouble() [1/2]

wxArrayDouble wxDatabase::GetResultsArrayDouble ( const wxString &  strSQL,
int  nField 
)
virtual

Definition at line 867 of file database.cpp.

Referenced by GetResultsArrayDouble().

◆ GetResultsArrayDouble() [2/2]

wxArrayDouble wxDatabase::GetResultsArrayDouble ( const wxString &  strSQL,
const wxString &  Field 
)
virtual

Definition at line 873 of file database.cpp.

References GetResultsArrayDouble().

◆ GetResultsArrayInt() [1/3]

wxArrayInt wxDatabase::GetResultsArrayInt ( const wxString &  strSQL,
int  nField 
)
virtual

Retrieve all the values of one field in a result set.

Definition at line 708 of file database.cpp.

Referenced by GetResultsArrayInt().

◆ GetResultsArrayInt() [2/3]

wxArrayInt wxDatabase::GetResultsArrayInt ( const wxString &  strSQL,
const wxString &  Field 
)
virtual

Definition at line 714 of file database.cpp.

References GetResultsArrayInt().

◆ GetResultsArrayInt() [3/3]

wxArrayInt wxDatabase::GetResultsArrayInt ( const wxString &  strSQL,
const wxVariant *  field 
)
private

◆ GetResultsArrayLong() [1/3]

wxArrayLong wxDatabase::GetResultsArrayLong ( const wxString &  strSQL,
int  nField 
)
virtual

Definition at line 814 of file database.cpp.

Referenced by GetResultsArrayLong().

◆ GetResultsArrayLong() [2/3]

wxArrayLong wxDatabase::GetResultsArrayLong ( const wxString &  strSQL,
const wxString &  Field 
)
virtual

Definition at line 820 of file database.cpp.

References GetResultsArrayLong().

◆ GetResultsArrayLong() [3/3]

wxArrayLong wxDatabase::GetResultsArrayLong ( const wxString &  strSQL,
const wxVariant *  field 
)
private

◆ GetResultsArrayString() [1/3]

wxArrayString wxDatabase::GetResultsArrayString ( const wxString &  strSQL,
int  nField 
)
virtual

Definition at line 761 of file database.cpp.

Referenced by GetResultsArrayString().

◆ GetResultsArrayString() [2/3]

wxArrayString wxDatabase::GetResultsArrayString ( const wxString &  strSQL,
const wxString &  Field 
)
virtual

Definition at line 767 of file database.cpp.

References GetResultsArrayString().

◆ GetResultsArrayString() [3/3]

wxArrayString wxDatabase::GetResultsArrayString ( const wxString &  strSQL,
const wxVariant *  field 
)
private

◆ GetSingleResultBlob() [1/3]

void * wxDatabase::GetSingleResultBlob ( const wxString &  strSQL,
int  nField,
wxMemoryBuffer &  Buffer,
bool  bRequireUniqueResult = true 
)
virtual

Retrieve a single Blob value from a query If multiple records are returned from the query, a wxDATABASE_NON_UNIQUE_RESULTSET exception is thrown unless bRequireUniqueResult is false.

Definition at line 540 of file database.cpp.

Referenced by GetSingleResultBlob().

◆ GetSingleResultBlob() [2/3]

void * wxDatabase::GetSingleResultBlob ( const wxString &  strSQL,
const wxString &  strField,
wxMemoryBuffer &  Buffer,
bool  bRequireUniqueResult = true 
)
virtual

Definition at line 546 of file database.cpp.

References GetSingleResultBlob().

◆ GetSingleResultBlob() [3/3]

void * wxDatabase::GetSingleResultBlob ( const wxString &  strSQL,
const wxVariant *  field,
wxMemoryBuffer &  Buffer,
bool  bRequireUniqueResult = true 
)
private

◆ GetSingleResultBool() [1/3]

bool wxDatabase::GetSingleResultBool ( const wxString &  strSQL,
int  nField,
bool  bRequireUniqueResult = true 
)
virtual

Retrieve a single bool value from a query If multiple records are returned from the query, a wxDATABASE_NON_UNIQUE_RESULTSET exception is thrown unless bRequireUniqueResult is false.

Definition at line 372 of file database.cpp.

Referenced by GetSingleResultBool().

◆ GetSingleResultBool() [2/3]

bool wxDatabase::GetSingleResultBool ( const wxString &  strSQL,
const wxString &  strField,
bool  bRequireUniqueResult = true 
)
virtual

Definition at line 378 of file database.cpp.

References GetSingleResultBool().

◆ GetSingleResultBool() [3/3]

bool wxDatabase::GetSingleResultBool ( const wxString &  strSQL,
const wxVariant *  field,
bool  bRequireUniqueResult = true 
)
private

◆ GetSingleResultDate() [1/3]

wxDateTime wxDatabase::GetSingleResultDate ( const wxString &  strSQL,
int  nField,
bool  bRequireUniqueResult = true 
)
virtual

Retrieve a single date/time value from a query If multiple records are returned from the query, a wxDATABASE_NON_UNIQUE_RESULTSET exception is thrown unless bRequireUniqueResult is false.

Definition at line 456 of file database.cpp.

Referenced by GetSingleResultDate().

◆ GetSingleResultDate() [2/3]

wxDateTime wxDatabase::GetSingleResultDate ( const wxString &  strSQL,
const wxString &  strField,
bool  bRequireUniqueResult = true 
)
virtual

Definition at line 462 of file database.cpp.

References GetSingleResultDate().

◆ GetSingleResultDate() [3/3]

wxDateTime wxDatabase::GetSingleResultDate ( const wxString &  strSQL,
const wxVariant *  field,
bool  bRequireUniqueResult = true 
)
private

◆ GetSingleResultDouble() [1/3]

double wxDatabase::GetSingleResultDouble ( const wxString &  strSQL,
int  nField,
bool  bRequireUniqueResult = true 
)
virtual

Retrieve a single double value from a query If multiple records are returned from the query, a wxDATABASE_NON_UNIQUE_RESULTSET exception is thrown unless bRequireUniqueResult is false.

Definition at line 624 of file database.cpp.

Referenced by GetSingleResultDouble().

◆ GetSingleResultDouble() [2/3]

double wxDatabase::GetSingleResultDouble ( const wxString &  strSQL,
const wxString &  strField,
bool  bRequireUniqueResult = true 
)
virtual

Definition at line 630 of file database.cpp.

References GetSingleResultDouble().

◆ GetSingleResultDouble() [3/3]

double wxDatabase::GetSingleResultDouble ( const wxString &  strSQL,
const wxVariant *  field,
bool  bRequireUniqueResult = true 
)
private

◆ GetSingleResultInt() [1/3]

int wxDatabase::GetSingleResultInt ( const wxString &  strSQL,
int  nField,
bool  bRequireUniqueResult = true 
)
virtual

With the GetSingleResultX API, two additional exception types are thrown: wxDATABASE_NO_ROWS_FOUND - No database rows were returned wxDATABASE_NON_UNIQUE_RESULTSET - More than one database row was returned.

Retrieve a single integer value from a query If multiple records are returned from the query, a wxDATABASE_NON_UNIQUE_RESULTSET exception is thrown unless bRequireUniqueResult is false

Definition at line 126 of file database.cpp.

Referenced by GetSingleResultInt().

◆ GetSingleResultInt() [2/3]

int wxDatabase::GetSingleResultInt ( const wxString &  strSQL,
const wxString &  strField,
bool  bRequireUniqueResult = true 
)
virtual

Definition at line 120 of file database.cpp.

References GetSingleResultInt().

◆ GetSingleResultInt() [3/3]

int wxDatabase::GetSingleResultInt ( const wxString &  strSQL,
const wxVariant *  field,
bool  bRequireUniqueResult = true 
)
private

◆ GetSingleResultLong() [1/3]

long wxDatabase::GetSingleResultLong ( const wxString &  strSQL,
int  nField,
bool  bRequireUniqueResult = true 
)
virtual

Retrieve a single long value from a query If multiple records are returned from the query, a wxDATABASE_NON_UNIQUE_RESULTSET exception is thrown unless bRequireUniqueResult is false.

Definition at line 288 of file database.cpp.

Referenced by GetSingleResultLong().

◆ GetSingleResultLong() [2/3]

long wxDatabase::GetSingleResultLong ( const wxString &  strSQL,
const wxString &  strField,
bool  bRequireUniqueResult = true 
)
virtual

Definition at line 294 of file database.cpp.

References GetSingleResultLong().

◆ GetSingleResultLong() [3/3]

long wxDatabase::GetSingleResultLong ( const wxString &  strSQL,
const wxVariant *  field,
bool  bRequireUniqueResult = true 
)
private

◆ GetSingleResultString() [1/3]

wxString wxDatabase::GetSingleResultString ( const wxString &  strSQL,
int  nField,
bool  bRequireUniqueResult = true 
)
virtual

Retrieve a single string value from a query If multiple records are returned from the query, a wxDATABASE_NON_UNIQUE_RESULTSET exception is thrown unless bRequireUniqueResult is false.

Definition at line 204 of file database.cpp.

Referenced by GetSingleResultString().

◆ GetSingleResultString() [2/3]

wxString wxDatabase::GetSingleResultString ( const wxString &  strSQL,
const wxString &  strField,
bool  bRequireUniqueResult = true 
)
virtual

Definition at line 210 of file database.cpp.

References GetSingleResultString().

◆ GetSingleResultString() [3/3]

wxString wxDatabase::GetSingleResultString ( const wxString &  strSQL,
const wxVariant *  field,
bool  bRequireUniqueResult = true 
)
private

◆ GetTables()

virtual wxArrayString wxDatabase::GetTables ( )
pure virtual

Retrieve all table names.

Implemented in wxTdsDatabase, wxMysqlDatabase, wxPostgresDatabase, wxOdbcDatabase, and wxSqliteDatabase.

◆ GetTypeName()

const wxString& wxDatabase::GetTypeName ( )
inline

Get a descriptive name for the type of database.

Definition at line 149 of file database.h.

◆ GetViews()

virtual wxArrayString wxDatabase::GetViews ( )
pure virtual

Retrieve all view names.

Implemented in wxTdsDatabase, wxMysqlDatabase, wxPostgresDatabase, wxOdbcDatabase, and wxSqliteDatabase.

◆ IsOpen()

virtual bool wxDatabase::IsOpen ( )
pure virtual

Is the connection to the database open?

Implemented in wxMysqlDatabase, wxPostgresDatabase, wxOdbcDatabase, wxTdsDatabase, and wxSqliteDatabase.

◆ IsViaODBC()

bool wxDatabase::IsViaODBC ( )
inline

Is the connection via ODBC.

Definition at line 153 of file database.h.

◆ LogResultSetForCleanup()

void wxDatabase::LogResultSetForCleanup ( wxDatabaseResultSet pResultSet)
inlineprotected

Add result set object pointer to the list for "garbage collection".

Definition at line 181 of file database.h.

◆ LogStatementForCleanup()

void wxDatabase::LogStatementForCleanup ( wxPreparedStatement pStatement)
inlineprotected

Add prepared statement object pointer to the list for "garbage collection".

Definition at line 183 of file database.h.

◆ Open()

virtual bool wxDatabase::Open ( const wxString &  strDatabase)
pure virtual

◆ PrepareStatement()

virtual wxPreparedStatement* wxDatabase::PrepareStatement ( const wxString &  strQuery)
pure virtual

Prepare a SQL statement which can be reused with different parameters.

Implemented in wxMysqlDatabase, wxPostgresDatabase, wxOdbcDatabase, wxTdsDatabase, and wxSqliteDatabase.

◆ RollBack()

virtual void wxDatabase::RollBack ( )
pure virtual

Rollback the current transaction.

Implemented in wxMysqlDatabase, wxPostgresDatabase, wxOdbcDatabase, wxTdsDatabase, and wxSqliteDatabase.

◆ RunQuery() [1/2]

int wxDatabase::RunQuery ( const wxString &  strQuery)
virtual

Run an insert, update, or delete query on the database.

Definition at line 19 of file database.cpp.

◆ RunQuery() [2/2]

virtual int wxDatabase::RunQuery ( const wxString &  strQuery,
bool  bParseQueries 
)
pure virtual

Run an insert, update, or delete query on the database.

Implemented in wxMysqlDatabase, wxPostgresDatabase, wxOdbcDatabase, wxTdsDatabase, and wxSqliteDatabase.

◆ RunQueryWithResults()

virtual wxDatabaseResultSet* wxDatabase::RunQueryWithResults ( const wxString &  strQuery)
pure virtual

Run a select query on the database.

Implemented in wxMysqlDatabase, wxPostgresDatabase, wxOdbcDatabase, wxTdsDatabase, and wxSqliteDatabase.

◆ TableExists()

virtual bool wxDatabase::TableExists ( const wxString &  table)
pure virtual

Check for the existence of a table by name.

Implemented in wxTdsDatabase, wxMysqlDatabase, wxPostgresDatabase, wxOdbcDatabase, and wxSqliteDatabase.

◆ ViewExists()

virtual bool wxDatabase::ViewExists ( const wxString &  view)
pure virtual

Check for the existence of a view by name.

Implemented in wxTdsDatabase, wxMysqlDatabase, wxPostgresDatabase, wxOdbcDatabase, and wxSqliteDatabase.

Member Data Documentation

◆ m_isViaODBC

bool wxDatabase::m_isViaODBC
private

Definition at line 204 of file database.h.

Referenced by GetDatabase().

◆ m_libraryPath

wxString wxDatabase::m_libraryPath
private

Definition at line 205 of file database.h.

◆ m_ResultSets

wxDatabaseResultSetHashSet wxDatabase::m_ResultSets
private

Definition at line 200 of file database.h.

Referenced by CloseResultSet(), and CloseResultSets().

◆ m_Statements

wxDatabaseStatementHashSet wxDatabase::m_Statements
private

Definition at line 201 of file database.h.

Referenced by CloseResultSet(), CloseStatement(), and CloseStatements().

◆ m_typeName

wxString wxDatabase::m_typeName
private

Definition at line 203 of file database.h.

Referenced by GetDatabase().