wxSQLite3 4.9.12
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
wxsqlite3.cpp File Reference

Implementation of the wxSQLite3 class. More...

#include "wx/wxprec.h"
#include "wx/wx.h"
#include "wx/dynarray.h"
#include "wx/regex.h"
#include "wx/thread.h"
#include "wx/wxsqlite3.h"
#include "wx/wxsqlite3opt.h"
#include "sqlite3mc_config.h"
#include "sqlite3mc_amalgamation.h"

Classes

class  wxSQLite3DatabaseReference
 Reference counted database object (internal) More...
 
class  wxSQLite3StatementReference
 Reference counted statement object (internal) More...
 
class  wxSQLite3BlobReference
 Reference counted blob object (internal) More...
 

Typedefs

typedef int(* sqlite3_xauth) (void *, int, const char *, const char *, const char *, const char *)
 
typedef wxChar err_char_t
 

Functions

static int wxSQLite3FunctionContextExecAuthorizer (void *func, int type, const char *arg1, const char *arg2, const char *arg3, const char *arg4)
 
static const char * LocalMakePointerTypeCopy (wxArrayPtrVoid &ptrTypes, const wxString &pointerType)
 
wxLongLong ConvertStringToLongLong (const wxString &str, wxLongLong defValue)
 
static double wxSQLite3AtoF (const char *z)
 
static bool BackupRestoreCallback (int total, int remaining, wxSQLite3BackupProgress *progressCallback)
 

Variables

const err_char_twxERRMSG_NODB = wxTRANSLATE("No Database opened")
 
const err_char_twxERRMSG_NOSTMT = wxTRANSLATE("Statement not accessible")
 
const err_char_twxERRMSG_NOMEM = wxTRANSLATE("Out of memory")
 
const err_char_twxERRMSG_DECODE = wxTRANSLATE("Cannot decode binary")
 
const err_char_twxERRMSG_INVALID_INDEX = wxTRANSLATE("Invalid field index")
 
const err_char_twxERRMSG_INVALID_NAME = wxTRANSLATE("Invalid field name")
 
const err_char_twxERRMSG_INVALID_ROW = wxTRANSLATE("Invalid row index")
 
const err_char_twxERRMSG_INVALID_QUERY = wxTRANSLATE("Invalid scalar query")
 
const err_char_twxERRMSG_INVALID_BLOB = wxTRANSLATE("Invalid BLOB handle")
 
const err_char_twxERRMSG_NORESULT = wxTRANSLATE("Null Results pointer")
 
const err_char_twxERRMSG_BIND_STR = wxTRANSLATE("Error binding string param")
 
const err_char_twxERRMSG_BIND_INT = wxTRANSLATE("Error binding int param")
 
const err_char_twxERRMSG_BIND_INT64 = wxTRANSLATE("Error binding int64 param")
 
const err_char_twxERRMSG_BIND_DBL = wxTRANSLATE("Error binding double param")
 
const err_char_twxERRMSG_BIND_BLOB = wxTRANSLATE("Error binding blob param")
 
const err_char_twxERRMSG_BIND_DATETIME = wxTRANSLATE("Error binding date/time param")
 
const err_char_twxERRMSG_BIND_NULL = wxTRANSLATE("Error binding NULL param")
 
const err_char_twxERRMSG_BIND_ZEROBLOB = wxTRANSLATE("Error binding zero blob param")
 
const err_char_twxERRMSG_BIND_POINTER = wxTRANSLATE("Error binding pointer param")
 
const err_char_twxERRMSG_BIND_CLEAR = wxTRANSLATE("Error clearing bindings")
 
const err_char_twxERRMSG_NOMETADATA = wxTRANSLATE("Meta data support not available")
 
const err_char_twxERRMSG_NOCODEC = wxTRANSLATE("Encryption support not available")
 
const err_char_twxERRMSG_NOLOADEXT = wxTRANSLATE("Loadable extension support not available")
 
const err_char_twxERRMSG_NOINCBLOB = wxTRANSLATE("Incremental BLOB support not available")
 
const err_char_twxERRMSG_NOBLOBREBIND = wxTRANSLATE("Rebind BLOB support not available")
 
const err_char_twxERRMSG_NOPOINTER = wxTRANSLATE("Pointer parameter support not available")
 
const err_char_twxERRMSG_NOSAVEPOINT = wxTRANSLATE("Savepoint support not available")
 
const err_char_twxERRMSG_NOBACKUP = wxTRANSLATE("Backup/restore support not available")
 
const err_char_twxERRMSG_NOWAL = wxTRANSLATE("Write Ahead Log support not available")
 
const err_char_twxERRMSG_NOCOLLECTIONS = wxTRANSLATE("Named collection support not available")
 
const err_char_twxERRMSG_SHARED_CACHE = wxTRANSLATE("Setting SQLite shared cache mode failed")
 
const err_char_twxERRMSG_INITIALIZE = wxTRANSLATE("Initialization of SQLite failed")
 
const err_char_twxERRMSG_SHUTDOWN = wxTRANSLATE("Shutdown of SQLite failed")
 
const err_char_twxERRMSG_TEMPDIR = wxTRANSLATE("Setting temporary directory failed")
 
const err_char_twxERRMSG_SOURCEDB_BUSY = wxTRANSLATE("Source database is busy")
 
const err_char_twxERRMSG_DBOPEN_FAILED = wxTRANSLATE("Database open failed")
 
const err_char_twxERRMSG_DBCLOSE_FAILED = wxTRANSLATE("Database close failed")
 
const err_char_twxERRMSG_DBASSIGN_FAILED = wxTRANSLATE("Database assignment failed")
 
const err_char_twxERRMSG_FINALIZE_FAILED = wxTRANSLATE("Finalize failed")
 
const err_char_twxERRMSG_CIPHER_APPLY_FAILED = wxTRANSLATE("Application of cipher failed")
 
const err_char_twxERRMSG_CIPHER_NOT_SUPPORTED = wxTRANSLATE("Cipher not supported")
 
const err_char_twxERRMSG_INVALID_COLLECTION = wxTRANSLATE("Collection instance not properly initialized")
 
const err_char_twxERRMSG_SCHEMANAME_UNKNOWN = wxTRANSLATE("Schema name unknown")
 
static const wxChar * limitCodeString []
 
static const wxChar * authCodeString []
 

Detailed Description

Implementation of the wxSQLite3 class.

Typedef Documentation

◆ err_char_t

typedef wxChar err_char_t

◆ sqlite3_xauth

typedef int(* sqlite3_xauth) (void *, int, const char *, const char *, const char *, const char *)

Function Documentation

◆ BackupRestoreCallback()

static bool BackupRestoreCallback ( int total,
int remaining,
wxSQLite3BackupProgress * progressCallback )
static

◆ ConvertStringToLongLong()

wxLongLong ConvertStringToLongLong ( const wxString & str,
wxLongLong defValue )
inline

◆ LocalMakePointerTypeCopy()

static const char * LocalMakePointerTypeCopy ( wxArrayPtrVoid & ptrTypes,
const wxString & pointerType )
static

◆ wxSQLite3AtoF()

static double wxSQLite3AtoF ( const char * z)
static

◆ wxSQLite3FunctionContextExecAuthorizer()

static int wxSQLite3FunctionContextExecAuthorizer ( void * func,
int type,
const char * arg1,
const char * arg2,
const char * arg3,
const char * arg4 )
static

Variable Documentation

◆ authCodeString

const wxChar* authCodeString[]
static
Initial value:
=
{ wxS("SQLITE_COPY"), wxS("SQLITE_CREATE_INDEX"), wxS("SQLITE_CREATE_TABLE"),
wxS("SQLITE_CREATE_TEMP_INDEX"), wxS("SQLITE_CREATE_TEMP_TABLE"), wxS("SQLITE_CREATE_TEMP_TRIGGER"),
wxS("SQLITE_CREATE_TEMP_VIEW"), wxS("SQLITE_CREATE_TRIGGER"), wxS("SQLITE_CREATE_VIEW"),
wxS("SQLITE_DELETE"), wxS("SQLITE_DROP_INDEX"), wxS("SQLITE_DROP_TABLE"),
wxS("SQLITE_DROP_TEMP_INDEX"), wxS("SQLITE_DROP_TEMP_TABLE"), wxS("SQLITE_DROP_TEMP_TRIGGER"),
wxS("SQLITE_DROP_TEMP_VIEW"), wxS("SQLITE_DROP_TRIGGER"), wxS("SQLITE_DROP_VIEW"),
wxS("SQLITE_INSERT"), wxS("SQLITE_PRAGMA"), wxS("SQLITE_READ"),
wxS("SQLITE_SELECT"), wxS("SQLITE_TRANSACTION"), wxS("SQLITE_UPDATE"),
wxS("SQLITE_ATTACH"), wxS("SQLITE_DETACH"), wxS("SQLITE_ALTER_TABLE"),
wxS("SQLITE_REINDEX"), wxS("SQLITE_ANALYZE"), wxS("SQLITE_CREATE_VTABLE"),
wxS("SQLITE_DROP_VTABLE"), wxS("SQLITE_FUNCTION"), wxS("SQLITE_SAVEPOINT"),
wxS("SQLITE_RECURSIVE")
}

◆ limitCodeString

const wxChar* limitCodeString[]
static
Initial value:
=
{ wxS("SQLITE_LIMIT_LENGTH"), wxS("SQLITE_LIMIT_SQL_LENGTH"),
wxS("SQLITE_LIMIT_COLUMN"), wxS("SQLITE_LIMIT_EXPR_DEPTH"),
wxS("SQLITE_LIMIT_COMPOUND_SELECT"), wxS("SQLITE_LIMIT_VDBE_OP"),
wxS("SQLITE_LIMIT_FUNCTION_ARG"), wxS("SQLITE_LIMIT_ATTACHED"),
wxS("SQLITE_LIMIT_LIKE_PATTERN_LENGTH"), wxS("SQLITE_LIMIT_VARIABLE_NUMBER"),
wxS("SQLITE_LIMIT_TRIGGER_DEPTH"), wxS("SQLITE_LIMIT_WORKER_THREADS")
}

◆ wxERRMSG_BIND_BLOB

const err_char_t* wxERRMSG_BIND_BLOB = wxTRANSLATE("Error binding blob param")

◆ wxERRMSG_BIND_CLEAR

const err_char_t* wxERRMSG_BIND_CLEAR = wxTRANSLATE("Error clearing bindings")

◆ wxERRMSG_BIND_DATETIME

const err_char_t* wxERRMSG_BIND_DATETIME = wxTRANSLATE("Error binding date/time param")

◆ wxERRMSG_BIND_DBL

const err_char_t* wxERRMSG_BIND_DBL = wxTRANSLATE("Error binding double param")

◆ wxERRMSG_BIND_INT

const err_char_t* wxERRMSG_BIND_INT = wxTRANSLATE("Error binding int param")

◆ wxERRMSG_BIND_INT64

const err_char_t* wxERRMSG_BIND_INT64 = wxTRANSLATE("Error binding int64 param")

◆ wxERRMSG_BIND_NULL

const err_char_t* wxERRMSG_BIND_NULL = wxTRANSLATE("Error binding NULL param")

◆ wxERRMSG_BIND_POINTER

const err_char_t* wxERRMSG_BIND_POINTER = wxTRANSLATE("Error binding pointer param")

◆ wxERRMSG_BIND_STR

const err_char_t* wxERRMSG_BIND_STR = wxTRANSLATE("Error binding string param")

◆ wxERRMSG_BIND_ZEROBLOB

const err_char_t* wxERRMSG_BIND_ZEROBLOB = wxTRANSLATE("Error binding zero blob param")

◆ wxERRMSG_CIPHER_APPLY_FAILED

const err_char_t* wxERRMSG_CIPHER_APPLY_FAILED = wxTRANSLATE("Application of cipher failed")

◆ wxERRMSG_CIPHER_NOT_SUPPORTED

const err_char_t* wxERRMSG_CIPHER_NOT_SUPPORTED = wxTRANSLATE("Cipher not supported")

◆ wxERRMSG_DBASSIGN_FAILED

const err_char_t* wxERRMSG_DBASSIGN_FAILED = wxTRANSLATE("Database assignment failed")

◆ wxERRMSG_DBCLOSE_FAILED

const err_char_t* wxERRMSG_DBCLOSE_FAILED = wxTRANSLATE("Database close failed")

◆ wxERRMSG_DBOPEN_FAILED

const err_char_t* wxERRMSG_DBOPEN_FAILED = wxTRANSLATE("Database open failed")

◆ wxERRMSG_DECODE

const err_char_t* wxERRMSG_DECODE = wxTRANSLATE("Cannot decode binary")

◆ wxERRMSG_FINALIZE_FAILED

const err_char_t* wxERRMSG_FINALIZE_FAILED = wxTRANSLATE("Finalize failed")

◆ wxERRMSG_INITIALIZE

const err_char_t* wxERRMSG_INITIALIZE = wxTRANSLATE("Initialization of SQLite failed")

◆ wxERRMSG_INVALID_BLOB

const err_char_t* wxERRMSG_INVALID_BLOB = wxTRANSLATE("Invalid BLOB handle")

◆ wxERRMSG_INVALID_COLLECTION

const err_char_t* wxERRMSG_INVALID_COLLECTION = wxTRANSLATE("Collection instance not properly initialized")

◆ wxERRMSG_INVALID_INDEX

const err_char_t* wxERRMSG_INVALID_INDEX = wxTRANSLATE("Invalid field index")

◆ wxERRMSG_INVALID_NAME

const err_char_t* wxERRMSG_INVALID_NAME = wxTRANSLATE("Invalid field name")

◆ wxERRMSG_INVALID_QUERY

const err_char_t* wxERRMSG_INVALID_QUERY = wxTRANSLATE("Invalid scalar query")

◆ wxERRMSG_INVALID_ROW

const err_char_t* wxERRMSG_INVALID_ROW = wxTRANSLATE("Invalid row index")

◆ wxERRMSG_NOBACKUP

const err_char_t* wxERRMSG_NOBACKUP = wxTRANSLATE("Backup/restore support not available")

◆ wxERRMSG_NOBLOBREBIND

const err_char_t* wxERRMSG_NOBLOBREBIND = wxTRANSLATE("Rebind BLOB support not available")

◆ wxERRMSG_NOCODEC

const err_char_t* wxERRMSG_NOCODEC = wxTRANSLATE("Encryption support not available")

◆ wxERRMSG_NOCOLLECTIONS

const err_char_t* wxERRMSG_NOCOLLECTIONS = wxTRANSLATE("Named collection support not available")

◆ wxERRMSG_NODB

const err_char_t* wxERRMSG_NODB = wxTRANSLATE("No Database opened")

◆ wxERRMSG_NOINCBLOB

const err_char_t* wxERRMSG_NOINCBLOB = wxTRANSLATE("Incremental BLOB support not available")

◆ wxERRMSG_NOLOADEXT

const err_char_t* wxERRMSG_NOLOADEXT = wxTRANSLATE("Loadable extension support not available")

◆ wxERRMSG_NOMEM

const err_char_t* wxERRMSG_NOMEM = wxTRANSLATE("Out of memory")

◆ wxERRMSG_NOMETADATA

const err_char_t* wxERRMSG_NOMETADATA = wxTRANSLATE("Meta data support not available")

◆ wxERRMSG_NOPOINTER

const err_char_t* wxERRMSG_NOPOINTER = wxTRANSLATE("Pointer parameter support not available")

◆ wxERRMSG_NORESULT

const err_char_t* wxERRMSG_NORESULT = wxTRANSLATE("Null Results pointer")

◆ wxERRMSG_NOSAVEPOINT

const err_char_t* wxERRMSG_NOSAVEPOINT = wxTRANSLATE("Savepoint support not available")

◆ wxERRMSG_NOSTMT

const err_char_t* wxERRMSG_NOSTMT = wxTRANSLATE("Statement not accessible")

◆ wxERRMSG_NOWAL

const err_char_t* wxERRMSG_NOWAL = wxTRANSLATE("Write Ahead Log support not available")

◆ wxERRMSG_SCHEMANAME_UNKNOWN

const err_char_t* wxERRMSG_SCHEMANAME_UNKNOWN = wxTRANSLATE("Schema name unknown")

◆ wxERRMSG_SHARED_CACHE

const err_char_t* wxERRMSG_SHARED_CACHE = wxTRANSLATE("Setting SQLite shared cache mode failed")

◆ wxERRMSG_SHUTDOWN

const err_char_t* wxERRMSG_SHUTDOWN = wxTRANSLATE("Shutdown of SQLite failed")

◆ wxERRMSG_SOURCEDB_BUSY

const err_char_t* wxERRMSG_SOURCEDB_BUSY = wxTRANSLATE("Source database is busy")

◆ wxERRMSG_TEMPDIR

const err_char_t* wxERRMSG_TEMPDIR = wxTRANSLATE("Setting temporary directory failed")