wxSQLite3  5.0.1
Loading...
Searching...
No Matches
wxSQLite3::Hook Class Reference

Interface for a user defined hook function. More...

#include <wxsqlite3.h>

Public Member Functions

 Hook ()
 Default constructor.
virtual ~Hook ()
 Virtual destructor.
virtual bool CommitCallback ()
 Execute the commit hook callback function.
virtual void RollbackCallback ()
 Execute the rollback hook callback function.
virtual void UpdateCallback (AuthorizationCode WXUNUSED(type), const wxString &WXUNUSED(database), const wxString &WXUNUSED(table), wxLongLong WXUNUSED(rowid))
 Execute the hook callback function.
virtual int WriteAheadLogCallback (const wxString &WXUNUSED(database), int WXUNUSED(numPages))
 Execute the write-ahead log hook callback function.
void SetDatabase (Database *db)
 Set the associated database.
DatabaseGetDatabase () const
 Get the associated database.

Detailed Description

Interface for a user defined hook function.

Constructor & Destructor Documentation

◆ Hook()

wxSQLite3::Hook::Hook ( )
inline

Default constructor.

◆ ~Hook()

virtual wxSQLite3::Hook::~Hook ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ CommitCallback()

virtual bool wxSQLite3::Hook::CommitCallback ( )
inlinevirtual

Execute the commit hook callback function.

Please refer to the SQLite documentation for further information.

Returns
true to request rollback of the transaction, false to continue with commit

◆ GetDatabase()

Database * wxSQLite3::Hook::GetDatabase ( ) const
inline

Get the associated database.

For the write-ahead log hook the associated database can be accessed.

Returns
pointer to the associated database instance
Note
Access to the associated database is only provided for write-ahead log hooks.

◆ RollbackCallback()

virtual void wxSQLite3::Hook::RollbackCallback ( )
inlinevirtual

Execute the rollback hook callback function.

Please refer to the SQLite documentation for further information.

◆ SetDatabase()

void wxSQLite3::Hook::SetDatabase ( Database * db)
inline

Set the associated database.

For the write-ahead log hook the associated database is set internally.

Parameters
dbpointer to the associated database instance

◆ UpdateCallback()

virtual void wxSQLite3::Hook::UpdateCallback ( AuthorizationCode WXUNUSEDtype,
const wxString & WXUNUSEDdatabase,
const wxString & WXUNUSEDtable,
wxLongLong WXUNUSEDrowid )
inlinevirtual

Execute the hook callback function.

Please refer to the SQLite documentation for further information about the meaning of the parameters.

Parameters
typewxHookType. The value signifies what kind of operation is to be authorized.
databaseName of the database
tableName of the table
rowidThe rowid of the affected row

◆ WriteAheadLogCallback()

virtual int wxSQLite3::Hook::WriteAheadLogCallback ( const wxString & WXUNUSEDdatabase,
int WXUNUSEDnumPages )
inlinevirtual

Execute the write-ahead log hook callback function.

Please refer to the SQLite documentation for further information about the meaning of the parameters.

Parameters
databaseName of the database
numPagesthe number of pages

The documentation for this class was generated from the following file: