1 #ifndef _WX_DATABASE_POSTGRESQL_DATABASE_H_ 2 #define _WX_DATABASE_POSTGRESQL_DATABASE_H_ 6 #ifndef DONT_USE_DYNAMIC_DATABASE_LINKING 24 wxPostgresDatabase(
const wxString& strDatabase,
const wxString& strUser,
const wxString& strPassword);
25 wxPostgresDatabase(
const wxString& strServer,
const wxString& strDatabase,
const wxString& strUser,
const wxString& strPassword);
26 wxPostgresDatabase(
const wxString& strServer,
int nPort,
const wxString& strDatabase,
const wxString& strUser,
const wxString& strPassword);
34 virtual bool Open(
const wxString& strDatabase);
35 virtual bool Open(
const wxString& strServer,
const wxString& strDatabase);
36 virtual bool Open(
const wxString& strDatabase,
const wxString& strUser,
const wxString& strPassword);
37 virtual bool Open(
const wxString& strServer,
const wxString& strDatabase,
const wxString& strUser,
const wxString& strPassword);
38 virtual bool Open(
const wxString& strServer,
int nPort,
const wxString& strDatabase,
const wxString& strUser,
const wxString& strPassword);
52 virtual int RunQuery(
const wxString& strQuery,
bool bParseQuery);
63 virtual wxArrayString
GetColumns(
const wxString& table);
64 virtual wxArrayString
GetPKColumns(
const wxString& table);
66 void SetPort(
int nPort);
68 static int TranslateErrorCode(
int nCode);
69 static bool IsAvailable();
72 #ifndef DONT_USE_DYNAMIC_DATABASE_LINKING 84 #endif//_WX_DATABASE_POSTGRESQL_DATABASE_H_ virtual wxArrayString GetPKColumns(const wxString &table)=0
get Primary keys column names
virtual wxArrayString GetViews()=0
Retrieve all view names.
wxPostgresDatabase(void *pDatabase)
virtual wxPreparedStatement * PrepareStatement(const wxString &strQuery)=0
Prepare a SQL statement which can be reused with different parameters.
virtual void RollBack()=0
Rollback the current transaction.
virtual bool IsOpen()=0
Is the connection to the database open?
virtual int RunQuery(const wxString &strQuery)
Run an insert, update, or delete query on the database.
virtual void BeginTransaction()=0
Begin a transaction.
virtual bool Open(const wxString &strDatabase)=0
virtual bool ViewExists(const wxString &view)=0
Check for the existence of a view by name.
wxDynamicPostgresInterface * m_pInterface
virtual void Commit()=0
Commit the current transaction.
virtual wxArrayString GetColumns(const wxString &table)=0
Retrieve all column names for a table.
virtual bool Close()=0
close database
virtual bool TableExists(const wxString &table)=0
Check for the existence of a table by name.
#define WXDLLIMPEXP_DATABASE
virtual wxArrayString GetTables()=0
Retrieve all table names.
virtual wxDatabaseResultSet * RunQueryWithResults(const wxString &strQuery)=0
Run a select query on the database.