wxSQLite3Authorizer Class Referenceabstract

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

`#include <wxsqlite3.h>`

## Public Types

enum

wxAuthorizationCode {
SQLITE_COPY = 0 , SQLITE_CREATE_INDEX = 1 , SQLITE_CREATE_TABLE = 2 , SQLITE_CREATE_TEMP_INDEX = 3 ,
SQLITE_CREATE_TEMP_TABLE = 4 , SQLITE_CREATE_TEMP_TRIGGER = 5 , SQLITE_CREATE_TEMP_VIEW = 6 , SQLITE_CREATE_TRIGGER = 7 ,
SQLITE_CREATE_VIEW = 8 , SQLITE_DELETE = 9 , SQLITE_DROP_INDEX = 10 , SQLITE_DROP_TABLE = 11 ,
SQLITE_DROP_TEMP_INDEX = 12 , SQLITE_DROP_TEMP_TABLE = 13 , SQLITE_DROP_TEMP_TRIGGER = 14 , SQLITE_DROP_TEMP_VIEW = 15 ,
SQLITE_DROP_TRIGGER = 16 , SQLITE_DROP_VIEW = 17 , SQLITE_INSERT = 18 , SQLITE_PRAGMA = 19 ,
SQLITE_READ = 20 , SQLITE_SELECT = 21 , SQLITE_TRANSACTION = 22 , SQLITE_UPDATE = 23 ,
SQLITE_ATTACH = 24 , SQLITE_DETACH = 25 , SQLITE_ALTER_TABLE = 26 , SQLITE_REINDEX = 27 ,
SQLITE_ANALYZE = 28 , SQLITE_CREATE_VTABLE = 29 , SQLITE_DROP_VTABLE = 30 , SQLITE_FUNCTION = 31 ,
SQLITE_SAVEPOINT = 32 , SQLITE_RECURSIVE = 33 , SQLITE_MAX_CODE = SQLITE_RECURSIVE
}

| Codes identifying the command for which authorization is requested. More...
enum | wxAuthorizationResult { SQLITE_OK = 0 , SQLITE_DENY = 1 , SQLITE_IGNORE = 2 }
| Return codes of the authorizer. More...

## Public Member Functions

virtual | ~wxSQLite3Authorizer ()
| Virtual destructor.
virtual wxAuthorizationResult | Authorize (wxAuthorizationCode type, const wxString &arg1, const wxString &arg2, const wxString &arg3, const wxString &arg4, const wxString &arg5)=0
| Execute the authorizer function.

## Static Public Member Functions

static wxString | AuthorizationCodeToString (wxSQLite3Authorizer::wxAuthorizationCode type)
| Convert authorization code to string.

## Detailed Description

Interface for a user defined authorizer function.

## Member Enumeration Documentation

## wxAuthorizationCode

enum wxSQLite3Authorizer::wxAuthorizationCode

Codes identifying the command for which authorization is requested.

Enumerator
SQLITE_COPY |
SQLITE_CREATE_INDEX |
SQLITE_CREATE_TABLE |
SQLITE_CREATE_TEMP_INDEX |
SQLITE_CREATE_TEMP_TABLE |
SQLITE_CREATE_TEMP_TRIGGER |
SQLITE_CREATE_TEMP_VIEW |
SQLITE_CREATE_TRIGGER |
SQLITE_CREATE_VIEW |
SQLITE_DELETE |
SQLITE_DROP_INDEX |
SQLITE_DROP_TABLE |
SQLITE_DROP_TEMP_INDEX |
SQLITE_DROP_TEMP_TABLE |
SQLITE_DROP_TEMP_TRIGGER |
SQLITE_DROP_TEMP_VIEW |
SQLITE_DROP_TRIGGER |
SQLITE_DROP_VIEW |
SQLITE_INSERT |
SQLITE_PRAGMA |
SQLITE_READ |
SQLITE_SELECT |
SQLITE_TRANSACTION |
SQLITE_UPDATE |
SQLITE_ATTACH |
SQLITE_DETACH |
SQLITE_ALTER_TABLE |
SQLITE_REINDEX |
SQLITE_ANALYZE |
SQLITE_CREATE_VTABLE |
SQLITE_DROP_VTABLE |
SQLITE_FUNCTION |
SQLITE_SAVEPOINT |
SQLITE_RECURSIVE |
SQLITE_MAX_CODE |

## wxAuthorizationResult

enum wxSQLite3Authorizer::wxAuthorizationResult

Return codes of the authorizer.

Enumerator
SQLITE_OK |
SQLITE_DENY |
SQLITE_IGNORE |

## Constructor & Destructor Documentation

## ~wxSQLite3Authorizer()

virtual wxSQLite3Authorizer::~wxSQLite3Authorizer | ( |  | ) |

inline virtual

Virtual destructor.

## Member Function Documentation

## AuthorizationCodeToString()

wxString wxSQLite3Authorizer::AuthorizationCodeToString | ( | wxSQLite3Authorizer::wxAuthorizationCode | type | ) |

static

Convert authorization code to string.

Parameters

  type | wxAuthorizationCode. The value signifies what kind of operation is to be authorized.

## Authorize()

virtual wxAuthorizationResult wxSQLite3Authorizer::Authorize | ( | wxAuthorizationCode | type,
|  | const wxString & | arg1,
|  | const wxString & | arg2,
|  | const wxString & | arg3,
|  | const wxString & | arg4,
|  | const wxString & | arg5
| ) |  |

pure virtual

Execute the authorizer function.

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

Parameters

  type | wxAuthorizationCode. The value signifies what kind of operation is to be authorized.
  arg1 | first argument (value depends on "type")
  arg2 | second argument (value depends on "type")
  arg3 | third argument (name of database if applicable)
  arg4 | fourth argument (name of trigger or view if applicable)
  arg5 | fifth argument (name of authorized user or empty if user authentication is not activated)

Returns
  a wxAuthorizationResult, i.e. SQLITE_OK, SQLITE_DENY or SQLITE_IGNORE

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

- wxsqlite3.h
- wxsqlite3.cpp