[SCM] guayadeque/master: Refresh

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Sat May 14 10:58:17 UTC 2011


The following commit has been merged in the master branch:
commit 76f7ab6d2204d5a48de450f2efa3c6cebee1b3a8
Author: Alessio Treglia <alessio at debian.org>
Date:   Sat May 14 12:58:28 2011 +0200

    Refresh

diff --git a/debian/patches/02-wxsqlite3_linking.patch b/debian/patches/02-wxsqlite3_linking.patch
index 5967ed3..570fc3b 100644
--- a/debian/patches/02-wxsqlite3_linking.patch
+++ b/debian/patches/02-wxsqlite3_linking.patch
@@ -2,16 +2,11 @@ Description: Link binaries against the system-wide copy of wxsqlite3.
 Author: Alessio Treglia <alessio at debian.org>
 Forwarded: no
 ---
- CMakeLists.txt              |    6 
- src/CMakeLists.txt          |    9 
- src/Db.h                    |    2 
- src/DbLibrary.h             |    2 
- src/wx/wxsqlite3.h          | 2132 -----------------------------
- src/wx/wxsqlite3def.h       |  314 ----
- src/wx/wxsqlite3dyn.h       |  170 --
- src/wx/wxsqlite3opt.h       |   44 
- src/wxsqlite3/wxsqlite3.cpp | 3128 --------------------------------------------
- 9 files changed, 10 insertions(+), 5797 deletions(-)
+ CMakeLists.txt     |    6 ++++++
+ src/CMakeLists.txt |    9 ++-------
+ src/Db.h           |    2 +-
+ src/DbLibrary.h    |    2 +-
+ 4 files changed, 10 insertions(+), 9 deletions(-)
 
 --- guayadeque.orig/CMakeLists.txt
 +++ guayadeque/CMakeLists.txt
@@ -103,5806 +98,3 @@ Forwarded: no
  
  // -------------------------------------------------------------------------------- //
  void inline escape_query_str( wxString * Str )
---- guayadeque.orig/src/wx/wxsqlite3.h
-+++ /dev/null
-@@ -1,2132 +0,0 @@
--///////////////////////////////////////////////////////////////////////////////
--// Name:        wxsqlite3.h
--// Purpose:     wxWidgets wrapper around the SQLite3 embedded database library.
--// Author:      Ulrich Telle
--// Modified by:
--// Created:     2005-07-14
--// Copyright:   (c) Ulrich Telle
--// Licence:     wxWindows licence
--///////////////////////////////////////////////////////////////////////////////
--
--/// \file wxsqlite3.h Interface of the wxSQLite3 class
--
--#ifndef _WX_SQLITE3_H_
--#define _WX_SQLITE3_H_
--
--#if defined(__GNUG__) && !defined(__APPLE__)
--    #pragma interface "wxsqlite3.h"
--#endif
--
--#include <wx/buffer.h>
--#include <wx/datetime.h>
--
--#include "wx/wxsqlite3def.h"
--
--#define WXSQLITE_ERROR 1000
--
--#define WXSQLITE_INTEGER  1
--#define WXSQLITE_FLOAT    2
--#define WXSQLITE_TEXT     3
--#define WXSQLITE_BLOB     4
--#define WXSQLITE_NULL     5
--
--#if defined(_MSC_VER) || defined(__BORLANDC__)
--  typedef __int64 wxsqlite_int64;
--#else
--  typedef long long int wxsqlite_int64;
--#endif
--
--enum wxSQLite3TransactionType
--{
--  WXSQLITE_TRANSACTION_DEFAULT,
--  WXSQLITE_TRANSACTION_DEFERRED,
--  WXSQLITE_TRANSACTION_IMMEDIATE,
--  WXSQLITE_TRANSACTION_EXCLUSIVE
--};
--
--enum wxSQLite3LimitType
--{
--  WXSQLITE_LIMIT_LENGTH              = 0,
--  WXSQLITE_LIMIT_SQL_LENGTH          = 1,
--  WXSQLITE_LIMIT_COLUMN              = 2,
--  WXSQLITE_LIMIT_EXPR_DEPTH          = 3,
--  WXSQLITE_LIMIT_COMPOUND_SELECT     = 4,
--  WXSQLITE_LIMIT_VDBE_OP             = 5,
--  WXSQLITE_LIMIT_FUNCTION_ARG        = 6,
--  WXSQLITE_LIMIT_ATTACHED            = 7,
--  WXSQLITE_LIMIT_LIKE_PATTERN_LENGTH = 8,
--  WXSQLITE_LIMIT_VARIABLE_NUMBER     = 9
--};
--
--inline void operator++(wxSQLite3LimitType& value)
--{
--  value = wxSQLite3LimitType(value+1);
--}
--
--/// SQL exception
--class WXDLLIMPEXP_SQLITE3 wxSQLite3Exception
--{
--public:
--  /// Constructor
--  wxSQLite3Exception(int errorCode, const wxString& errMsg);
--
--  /// Copy constructor
--  wxSQLite3Exception(const wxSQLite3Exception&  e);
--
--  /// Destructor
--  virtual ~wxSQLite3Exception();
--
--  /// Get error code associated with the exception
--  int GetErrorCode() const { return (m_errorCode & 0xff); }
--
--  /// Get extended error code associated with the exception
--  int GetExtendedErrorCode() const { return m_errorCode; }
--
--  /// Get error message associated with the exception
--  const wxString GetMessage() const { return m_errorMessage; }
--
--  /// Convert error code to error message
--  static const wxString ErrorCodeAsString(int errorCode);
--
--private:
--  int      m_errorCode;     ///< SQLite3 error code associated with this exception
--  wxString m_errorMessage;  ///< SQLite3 error message associated with this exception
--};
--
--/// SQL statment buffer for use with SQLite3's printf method
--class WXDLLIMPEXP_SQLITE3 wxSQLite3StatementBuffer
--{
--public:
--  /// Constructor
--  wxSQLite3StatementBuffer();
--
--  /// Destructor
--  ~wxSQLite3StatementBuffer();
--
--  /// Format a SQL statement using SQLite3's printf method
--  /**
--  * This method is a variant of the "sprintf()" from the standard C library.
--  * All of the usual printf formatting options apply. In addition,
--  * there is a "%q" option. %q works like %s in that it substitutes
--  * a null-terminated string from the argument list. But %q also
--  * doubles every '\'' character. %q is designed for use inside a
--  * string literal. By doubling each '\'' character it escapes that
--  * character and allows it to be inserted into the string.
--  *
--  * For example, so some string variable contains text as follows:
--  *
--  * char *zText = "It's a happy day!";
--  *
--  * One can use this text in an SQL statement as follows:
--  *
--  * wxSQLite3StatementBuffer stmtBuffer;
--  * stmtBuffer.Format("INSERT INTO table VALUES('%q')", zText);
--  *
--  * Because the %q format string is used, the '\'' character in
--  * zText is escaped and the SQL generated is as follows:
--  *
--  * INSERT INTO table1 VALUES('It''s a happy day!')
--  *
--  * \param format SQL statement string with formatting options
--  * \param ... list of statement parameters
--  * \return const char pointer to the resulting statement buffer
--  */
--  const char* Format(const char* format, ...);
--
--  /// Dereference the internal buffer
--  /**
--  * \return const char pointer to the resulting statement buffer
--  */
--  operator const char*() const { return m_buffer; }
--
--  /// Clear the internal buffer
--  void Clear();
--
--private:
--  char* m_buffer;  ///< Internal buffer
--};
--
--/// Context for user defined scalar or aggregate functions
--/**
--* A function context gives user defined scalar or aggregate functions
--* access to function arguments and function results. The "Execute" method
--* resp. the "Aggregate" and "Finalize" methods receive the current 
--* function context as an argument.
--*/
--class WXDLLIMPEXP_SQLITE3 wxSQLite3FunctionContext
--{
--public:
--  /// Get the number of function arguments
--  /**
--  * \return the number of arguments the function was called with
--  */
--  int GetArgCount();
--
--  /// Get the type of a function argument
--  /**
--  * \param argIndex index of the function argument. Indices start with 0.
--  * \return argument type as one of the values WXSQLITE_INTEGER, WXSQLITE_FLOAT, WXSQLITE_TEXT, WXSQLITE_BLOB, or WXSQLITE_NULL
--  */
--  int GetArgType(int argIndex);
--
--  /// Check whether a function argument is a NULL value
--  /**
--  * \param argIndex index of the function argument. Indices start with 0.
--  * \return TRUE if the argument is NULL or the argIndex is out of bounds, FALSE otherwise
--  */
--  bool IsNull(int argIndex);
--
--  /// Get a function argument as an integer value
--  /**
--  * \param argIndex index of the function argument. Indices start with 0.
--  * \param nullValue value to be returned in case the argument is NULL
--  * \return argument value
--  */
--  int GetInt(int argIndex, int nullValue = 0);
--
--  /// Get a function argument as an 64-bit integer value
--  /**
--  * \param argIndex index of the function argument. Indices start with 0.
--  * \param nullValue value to be returned in case the argument is NULL
--  * \return argument value
--  */
--  wxLongLong GetInt64(int argIndex, wxLongLong nullValue = 0);
--
--  /// Get a function argument as a double value
--  /**
--  * \param argIndex index of the function argument. Indices start with 0.
--  * \param nullValue value to be returned in case the argument is NULL
--  * \return argument value
--  */
--  double GetDouble(int argIndex, double nullValue = 0);
--
--  /// Get a function argument as a string value
--  /**
--  * \param argIndex index of the function argument. Indices start with 0.
--  * \param nullValue value to be returned in case the argument is NULL
--  * \return argument value
--  */
--  wxString GetString(int argIndex, const wxString& nullValue = wxEmptyString);
--
--  /// Get a function argument as a BLOB value
--  /**
--  * \param argIndex index of the function argument. Indices start with 0.
--  * \param[out] len length of the blob argument in bytes
--  * \return argument value
--  */
--  const unsigned char* GetBlob(int argIndex, int& len);
--
--  /// Get a function argument as a BLOB value
--  /**
--  * \param argIndex index of the function argument. Indices start with 0.
--  * \param[out] buffer to which the blob argument value is appended
--  * \return reference to argument value
--  */
--  wxMemoryBuffer& GetBlob(int argIndex, wxMemoryBuffer& buffer);
--
--  /// Set the function result as an integer value
--  /**
--  * \param value function result value
--  */
--  void SetResult(int value);
--
--  /// Set the function result as an 64-bit integer value
--  /**
--  * \param value function result value
--  */
--  void SetResult(wxLongLong value);
--
--  /// Set the function result as a double value
--  /**
--  * \param value function result value
--  */
--  void SetResult(double value);
--
--  /// Set the function result as a string value
--  /**
--  * \param value function result value
--  */
--  void SetResult(const wxString& value);
--
--  /// Set the function result as a BLOB value
--  /**
--  * \param value function result value
--  * \param len length of the result blob in bytes
--  */
--  void SetResult(unsigned char* value, int len);
--
--  /// Set the function result as a BLOB value
--  /**
--  * \param buffer containing the function result value
--  */
--  void SetResult(const wxMemoryBuffer& buffer);
--
--  /// Set the function result as a NULL value
--  void SetResultNull();
--
--  /// Set the function result as a zero BLOB value
--  /**
--  * \param blobSize size of the zero filled BLOB value
--  */
--  void SetResultZeroBlob(int blobSize);
--
--  /// Set the function result as a exact copy of a function argument
--  /**
--  * \param argIndex index of the argument which should be copied as the result value
--  */
--  void SetResultArg(int argIndex);
--
--  /// Set an error message as the function result
--  /**
--  * \param errmsg string containing an error message
--  */
--  void SetResultError(const wxString& errmsg);
--
--  /// Get the number of aggregate steps
--  /**
--  * \return the number of aggregation steps. The current aggregation step counts so at least 1 is returned.
--  */
--  int GetAggregateCount();
--
--  /// Get a pointer to an aggregate structure of specified length
--  /**
--  * Usually an aggregation functions needs temporary memory to collect
--  * the information gathered from each invocation of the "Aggregate" method.
--  * On the first invocation of this method the returned memory contains
--  * binary zeros.
--  * If this memory is used to store pointers to allocated objects,
--  * it is important to free all allocated objects in the "Finalize" method.
--  * 
--  * \param len amount of memory needed in bytes
--  * \return pointer to the allocated memory
--  */
--  void* GetAggregateStruct(int len);
--
--  /// Execute a user defined scalar function (internal use only)
--  static void ExecScalarFunction(void* ctx, int argc, void** argv);
--
--  /// Execute an aggregate step of a user defined aggregate function (internal use only)
--  static void ExecAggregateStep(void* ctx, int argc, void** argv);
--
--  /// Execute the final step of a user defined aggregate function (internal use only)
--  static void ExecAggregateFinalize(void* ctx);
--
--  /// Execute the user defined authorizer function (internal use only)
--  static int  ExecAuthorizer(void*, int type,
--                             const char* arg1, const char* arg2,
--                             const char* arg3, const char* arg4);
--
--  /// Execute the user defined commit hook (internal use only)
--  static int ExecCommitHook(void* hook);
--
--  /// Execute the user defined rollback hook (internal use only)
--  static void ExecRollbackHook(void* hook);
--
--  /// Execute the user defined update hook (internal use only)
--  static void ExecUpdateHook(void* hook, int type, 
--                             const char* database, const char* table, 
--                             wxsqlite_int64 rowid);
--
--private:
--  /// Constructor
--  wxSQLite3FunctionContext(void* ctx, bool isAggregate, int argc = 0, void** argv = NULL);
--
--  /// Copy constructor
--  wxSQLite3FunctionContext(wxSQLite3FunctionContext& ctx);
--
--  void*  m_ctx;          ///< SQLite3 context
--  bool   m_isAggregate;  ///< Flag whether this is the context of an aggregate function
--  int    m_count;        ///< Aggregate count
--  int    m_argc;         ///< Number of arguments
--  void** m_argv;         ///< Array of SQLite3 arguments
--};
--
--
--/// Interface for user defined scalar functions
--/**
--*/
--class WXDLLIMPEXP_SQLITE3 wxSQLite3ScalarFunction
--{
--public:
--  /// Virtual destructor
--  virtual ~wxSQLite3ScalarFunction() {}
--  /// Execute the scalar function
--  /**
--  * This method is invoked for each appearance of the scalar function in the SQL query.
--  * \param ctx function context which can be used to access arguments and result value
--  */
--  virtual void Execute(wxSQLite3FunctionContext& ctx) = 0;
--};
--
--
--/// Interface for user defined aggregate functions
--/**
--*/
--class WXDLLIMPEXP_SQLITE3 wxSQLite3AggregateFunction
--{
--public:
--  /// Virtual destructor
--  wxSQLite3AggregateFunction() { m_count = 0; }
--
--  /// Virtual destructor
--  virtual ~wxSQLite3AggregateFunction() {}
--  /// Execute the aggregate of the function
--  /**
--  * This method is invoked for each row of the result set of the query using the aggregate function.
--  * \param ctx function context which can be used to access arguments and result value
--  */
--  virtual void Aggregate(wxSQLite3FunctionContext& ctx) = 0;
--
--  /// Prepare the result of the aggregate function
--  /**
--  * This method is invoked after all rows of the result set of the query
--  * using the aggregate function have been processed. Usually the final result
--  * is calculated and returned in this method.
--  * \param ctx function context which can be used to access arguments and result value
--  */
--  virtual void Finalize(wxSQLite3FunctionContext& ctx) = 0;
--
--private:
--  int    m_count;        ///< Aggregate count
--  friend class wxSQLite3FunctionContext;
--};
--
--
--/// Interface for a user defined authorizer function
--/**
--*/
--class WXDLLIMPEXP_SQLITE3 wxSQLite3Authorizer
--{
--public:
--  /// Codes identifying the command for which authorization is requested
--  enum wxAuthorizationCode
--  {                                    // arg1 =          arg2 =
--    SQLITE_COPY                =  0,   // Table Name      File Name
--    SQLITE_CREATE_INDEX        =  1,   // Index Name      Table Name
--    SQLITE_CREATE_TABLE        =  2,   // Table Name      NULL
--    SQLITE_CREATE_TEMP_INDEX   =  3,   // Index Name      Table Name
--    SQLITE_CREATE_TEMP_TABLE   =  4,   // Table Name      NULL
--    SQLITE_CREATE_TEMP_TRIGGER =  5,   // Trigger Name    Table Name
--    SQLITE_CREATE_TEMP_VIEW    =  6,   // View Name       NULL
--    SQLITE_CREATE_TRIGGER      =  7,   // Trigger Name    Table Name
--    SQLITE_CREATE_VIEW         =  8,   // View Name       NULL
--    SQLITE_DELETE              =  9,   // Table Name      NULL
--    SQLITE_DROP_INDEX          = 10,   // Index Name      Table Name
--    SQLITE_DROP_TABLE          = 11,   // Table Name      NULL
--    SQLITE_DROP_TEMP_INDEX     = 12,   // Index Name      Table Name
--    SQLITE_DROP_TEMP_TABLE     = 13,   // Table Name      NULL
--    SQLITE_DROP_TEMP_TRIGGER   = 14,   // Trigger Name    Table Name
--    SQLITE_DROP_TEMP_VIEW      = 15,   // View Name       NULL
--    SQLITE_DROP_TRIGGER        = 16,   // Trigger Name    Table Name
--    SQLITE_DROP_VIEW           = 17,   // View Name       NULL
--    SQLITE_INSERT              = 18,   // Table Name      NULL
--    SQLITE_PRAGMA              = 19,   // Pragma Name     1st arg or NULL
--    SQLITE_READ                = 20,   // Table Name      Column Name
--    SQLITE_SELECT              = 21,   // NULL            NULL
--    SQLITE_TRANSACTION         = 22,   // Operation       NULL
--    SQLITE_UPDATE              = 23,   // Table Name      Column Name
--    SQLITE_ATTACH              = 24,   // Filename        NULL
--    SQLITE_DETACH              = 25,   // Database Name   NULL
--    SQLITE_ALTER_TABLE         = 26,   // Database Name   Table Name
--    SQLITE_REINDEX             = 27,   // Index Name      NULL
--    SQLITE_ANALYZE             = 28,   // Table Name      NULL
--    SQLITE_CREATE_VTABLE       = 29,   // Table Name      Module Name
--    SQLITE_DROP_VTABLE         = 30,   // Table Name      Module Name
--    SQLITE_FUNCTION            = 31,   // NULL            Function Name
--    SQLITE_SAVEPOINT           = 32,   // Operation       Savepoint Name
--    SQLITE_MAX_CODE            = SQLITE_SAVEPOINT
--  };
--
--   /// Return codes of the authorizer
--  enum wxAuthorizationResult
--  {
--    SQLITE_OK     = 0,   // Allow access
--    SQLITE_DENY   = 1,   // Abort the SQL statement with an error
--    SQLITE_IGNORE = 2    // Don't allow access, but don't generate an error
--  };
--  /// Virtual destructor
--  virtual ~wxSQLite3Authorizer() {}
--  /// Execute the authorizer function
--  /**
--  * Please refer to the SQLite documentation for further information about the
--  * meaning of the parameters.
--  *
--  * \param type wxAuthorizationCode. The value signifies what kind of operation is to be authorized.
--  * \param arg1 first argument (value depends on "type")
--  * \param arg2 second argument (value depends on "type")
--  * \param arg3 third argument (name of database if applicable)
--  * \param arg4 fourth argument (name of trigger or view if applicable)
--  * \return a wxAuthorizationResult, i.e. SQLITE_OK, SQLITE_DENY or SQLITE_IGNORE
--  */
--  virtual wxAuthorizationResult Authorize(wxAuthorizationCode type,
--                                          const wxString& arg1, const wxString& arg2,
--                                          const wxString& arg3, const wxString& arg4) = 0;
--  /// Convert authorization code to string
--  /**
--  * \param type wxAuthorizationCode. The value signifies what kind of operation is to be authorized.
--  */
--  static wxString AuthorizationCodeToString(wxSQLite3Authorizer::wxAuthorizationCode type);
--};
--
--/// Interface for a user defined hook function
--/**
--*/
--class WXDLLIMPEXP_SQLITE3 wxSQLite3Hook
--{
--public:
--  /// Codes identifying the command for which the hook is called
--  enum wxUpdateType
--  {
--    SQLITE_DELETE              =  9,
--    SQLITE_INSERT              = 18,
--    SQLITE_UPDATE              = 23
--  };
--  /// Virtual destructor
--  virtual ~wxSQLite3Hook() {}
--
--  /// Execute the commit hook callback function
--  /**
--  * Please refer to the SQLite documentation for further information.
--  * \return true to request rollback of the transaction, false to continue with commit
--  */
--  virtual bool CommitCallback() { return false; }
--
--  /// Execute the rollback hook callback function
--  /**
--  * Please refer to the SQLite documentation for further information.
--  */
--  virtual void RollbackCallback() {}
--
--  /// Execute the hook callback function
--  /**
--  * Please refer to the SQLite documentation for further information about the
--  * meaning of the parameters.
--  *
--  * \param type wxHookType. The value signifies what kind of operation is to be authorized.
--  * \param database Name of the database
--  * \param table Name of the table
--  * \param rowid The rowid of the affected row
--  */
--  virtual void UpdateCallback(wxUpdateType WXUNUSED(type),
--                              const wxString& WXUNUSED(database), const wxString& WXUNUSED(table),
--                              wxLongLong WXUNUSED(rowid)) {}
--};
--
--/// Interface for a user defined collation sequence
--/**
--*/
--class WXDLLIMPEXP_SQLITE3 wxSQLite3Collation
--{
--public:
--  /// Virtual destructor
--  virtual ~wxSQLite3Collation() {}
--
--  /// Execute a comparison using a user-defined collation sequence
--  /**
--  * Please refer to the SQLite documentation for further information.
--  * \param text1 first text string
--  * \param text2 second text string
--  * \return an integer < 0, = 0, or > 0 depending on whether text1 is less than, equal to, or greater than text2.
--  */
--  virtual int Compare(const wxString& text1, const wxString& text2) { return text1.Cmp(text2); }
--};
--
--/// Result set of a SQL query
--class WXDLLIMPEXP_SQLITE3 wxSQLite3ResultSet
--{
--public:
--  /// Constructor
--  wxSQLite3ResultSet();
--
--  /// Copy constructor
--  wxSQLite3ResultSet(const wxSQLite3ResultSet& resultSet);
--
--  /// Constructor for internal use
--  wxSQLite3ResultSet(void* db, void* stmt,
--                     bool eof, bool first = true, bool ownStmt = true);
--
--  /// Assignment constructor
--  wxSQLite3ResultSet& operator=(const wxSQLite3ResultSet& resultSet);
--
--  /// Destructor
--  /**
--  */
--  virtual ~wxSQLite3ResultSet();
--
--  /// Get the number of columns in the result set
--  /**
--  * \return number of columns in result set
--  */
--  int GetColumnCount();
--
--  /// Find the index of a column by name
--  /**
--  * \param columnName name of the column
--  * \return index of the column. Indices start with 0.
--  */
--  int FindColumnIndex(const wxString& columnName);
--
--  /// Get the name of a column
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return column name as string
--  */
--  wxString GetColumnName(int columnIndex);
--
--  /// Get the declared type of a column
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return type string as specified in the table definition
--  */
--  wxString GetDeclaredColumnType(int columnIndex);
--
--  /// Get the actual type of a column
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return column type as one of the values WXSQLITE_INTEGER, WXSQLITE_FLOAT, WXSQLITE_TEXT, WXSQLITE_BLOB, or WXSQLITE_NULL
--  */
--  int GetColumnType(int columnIndex);
--
--  /// Get the database name of a column
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return database name the column belongs to or empty string
--  *
--  * This method is only available if WXSQLITE3_HAVE_METADATA is defined and SQLite has been compiled with SQLITE_ENABLE_COLUMN_METADATA defined.
--  */
--  wxString GetDatabaseName(int columnIndex);
--
--  /// Get the table name of a column
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return table name the column belongs to or empty string
--  *
--  * This method is only available if WXSQLITE3_HAVE_METADATA is defined and SQLite has been compiled with SQLITE_ENABLE_COLUMN_METADATA defined.
--  */
--  wxString GetTableName(int columnIndex);
--
--  /// Get the origin name of a column
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return origin name the column belongs to or empty string
--  *
--  * This method is only available if WXSQLITE3_HAVE_METADATA is defined and SQLite has been compiled with SQLITE_ENABLE_COLUMN_METADATA defined.
--  */
--  wxString GetOriginName(int columnIndex);
--
--  /// Get a column as a string using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return value of the column as string
--  */
--  wxString GetAsString(int columnIndex);
--
--  /// Get a column as a string using the column name
--  /**
--  * \param columnName name of the column
--  * \return value of the column
--  */
--  wxString GetAsString(const wxString& columnName);
--
--  /// Get a column as an integer using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  int GetInt(int columnIndex, int nullValue = 0);
--
--  /// Get a column as an integer using the column name
--  /**
--  * \param columnName name of the column
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  int GetInt(const wxString& columnName, int nullValue = 0);
--
--  /// Get a column as a 64-bit integer using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  wxLongLong GetInt64(int columnIndex, wxLongLong nullValue = 0);
--
--  /// Get a column as a 64-bit integer using the column name
--  /**
--  * \param columnName name of the column
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  wxLongLong GetInt64(const wxString& columnName, wxLongLong nullValue = 0);
--
--  /// Get a column as a double using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  double GetDouble(int columnIndex, double nullValue = 0.0);
--
--  /// Get a column as a double using the column name
--  /**
--  * \param columnName name of the column
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  double GetDouble(const wxString& columnName, double nullValue = 0.0);
--
--  /// Get a column as a string using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  wxString GetString(int columnIndex, const wxString& nullValue = wxEmptyString);
--
--  /// Get a column as a string using the column name
--  /**
--  * \param columnName name of the column
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  wxString GetString(const wxString& columnName, const wxString& nullValue = wxEmptyString);
--
--  /// Get a column as a BLOB using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \param[out] len length of the blob in bytes
--  * \return value of the column
--  */
--  const unsigned char* GetBlob(int columnIndex, int& len);
--
--  /// Get a column as a BLOB using the column name
--  /**
--  * \param columnName name of the column
--  * \param[out] len length of the blob in bytes
--  * \return value of the column
--  */
--  const unsigned char* GetBlob(const wxString& columnName, int& len);
--
--  /// Get a column as a BLOB using the column index and append to memory buffer
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \param[out] buffer the memory buffer to which the BLOB value is appended
--  * \return reference to the memory buffer
--  */
--  wxMemoryBuffer& GetBlob(int columnIndex, wxMemoryBuffer& buffer);
--
--  /// Get a column as a BLOB using the column index and append to memory buffer
--  /**
--  * \param columnName name of the column
--  * \param[out] buffer the memory buffer to which the BLOB value is appended
--  * \return reference to the memory buffer
--  */
--  wxMemoryBuffer& GetBlob(const wxString& columnName, wxMemoryBuffer& buffer);
--
--  /// Get a column as a date value using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return value of the column
--  */
--  wxDateTime GetDate(int columnIndex);
--
--  /// Get a column as a date value using the column name
--  /**
--  * \param columnName name of the column
--  * \return value of the column
--  */
--  wxDateTime GetDate(const wxString& columnName);
--
--  /// Get a column as a time value using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return value of the column
--  */
--  wxDateTime GetTime(int columnIndex);
--
--  /// Get a column as a time value using the column name
--  /**
--  * \param columnName name of the column
--  * \return value of the column
--  */
--  wxDateTime GetTime(const wxString& columnName);
--
--  /// Get a column as a date and time value using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return value of the column
--  */
--  wxDateTime GetDateTime(int columnIndex);
--
--  /// Get a column as a date and time value using the column name
--  /**
--  * \param columnName name of the column
--  * \return value of the column
--  */
--  wxDateTime GetDateTime(const wxString& columnName);
--
--  /// Get a column as a timestamp value using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return value of the column
--  */
--  wxDateTime GetTimestamp(int columnIndex);
--
--  /// Get a column as a timestamp value using the column name
--  /**
--  * \param columnName name of the column
--  * \return value of the column
--  */
--  wxDateTime GetTimestamp(const wxString& columnName);
--
--  /// Get a column as a date and time value using the column index
--  /**
--  * The date/time value is expected to be stored in the database as a numeric value (i.e. int64).
--  *
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return value of the column
--  */
--  wxDateTime GetNumericDateTime(int columnIndex);
--
--  /// Get a column as a date and time value using the column name
--  /**
--  * The date/time value is expected to be stored in the database as a numeric value (i.e. int64).
--  *
--  * \param columnName name of the column
--  * \return value of the column
--  */
--  wxDateTime GetNumericDateTime(const wxString& columnName);
--
--  /// Get a column as a date and time value using the column index
--  /**
--  * The date/time value is expected to be stored in the database as a Julian Day Number (i.e. double).
--  *
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return value of the column
--  */
--  wxDateTime GetJulianDayNumber(int columnIndex);
--
--  /// Get a column as a date and time value using the column name
--  /**
--  * The date/time value is expected to be stored in the database as a Julian Day Number (i.e. double).
--  *
--  * \param columnName name of the column
--  * \return value of the column
--  */
--  wxDateTime GetJulianDayNumber(const wxString& columnName);
--
--  /// Get a column as a boolean value using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return value of the column
--  */
--  bool GetBool(int columnIndex);
--
--  /// Get a column as a boolean value using the column name
--  /**
--  * \param columnName name of the column
--  * \return value of the column
--  */
--  bool GetBool(const wxString& columnName);
--
--  /// Check whether a column has a NULL value using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return TRUE if the value is NULL, FALSE otherwise
--  */
--  bool IsNull(int columnIndex);
--
--  /// Check whether a column has a NULL value using the column name
--  /**
--  * \param columnName name of the column
--  * \return TRUE if the value is NULL, FALSE otherwise
--  */
--  bool IsNull(const wxString& columnName);
--
--  /// Check whether all rows of the result set have been processed
--  /**
--  * \return TRUE if all rows of the result have been processed, FALSE otherwise
--  */
--  bool Eof();
--
--  /// Retrieve next row of the result set
--  /**
--  * Advances the cursor to the next row.
--  * On creation of the result set the cursor is positioned BEFORE the first row, i.e.
--  * the first call to this method makes the first row available for processing.
--  * \return TRUE while there are still rows to process, FALSE otherwise
--  */
--  bool NextRow();
--
--  /// Finalize the result set
--  /**
--  */
--  void Finalize();
--
--  /// Get the original SQL string for preparing the query statement
--  /**
--  * \return the original SQL string used to prepare the query statement
--  */
--  wxString GetSQL();
--
--  /// Validate associated SQLite database and statement
--  /**
--  * \return TRUE if both, a SQLite database and a SQLite statement, are associated, FALSE otherwise
--  */
--  bool IsOk();
--
--private:
--  /// Check the validity of the associated statement
--  void CheckStmt();
--
--  void* m_db;       ///< associated database
--  void* m_stmt;     ///< associated statement
--  bool  m_eof;      ///< Flag for end of result set
--  bool  m_first;    ///< Flag for first row of the result set
--  int   m_cols;     ///< Numver of columns in row set
--  bool  m_ownStmt;  ///< Flag for ownership of the associated statement
--};
--
--
--/// Holds the complete result set of a SQL query
--class WXDLLIMPEXP_SQLITE3 wxSQLite3Table
--{
--public:
--  /// Constructor
--  wxSQLite3Table();
--
--  wxSQLite3Table(const wxSQLite3Table& table);
--
--  wxSQLite3Table(char** results, int rows, int cols);
--
--  virtual ~wxSQLite3Table();
--
--  wxSQLite3Table& operator=(const wxSQLite3Table& table);
--
--  /// Get the number of columns in the result set
--  /**
--  * \return the number of columns
--  */
--  int GetColumnCount();
--
--  /// Get the number of rows in the result set
--  /**
--  * \return the number of rows
--  */
--  int GetRowCount();
--
--  /// Find the index of a column by name
--  /**
--  * \param columnName name of the column
--  * \return the index of the column
--  */
--  int FindColumnIndex(const wxString& columnName);
--
--  /// Get the name of a column
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return name of the column
--  */
--  wxString GetColumnName(int columnIndex);
--
--  /// Get a column as a string using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return value of the column as a string
--  *
--  * \note This method returns values of type <code>double</code>
--  * always using the point character as the decimal separator.
--  * This is SQLite default behaviour. Use method wxSQLite3Table::GetDouble
--  * to apply correct conversion from <code>string</code> to <code>double</code>.
--  */
--  wxString GetAsString(int columnIndex);
--
--  /// Get a column as a string using the column name
--  /**
--  * \param columnName name of the column
--  * \return value of the column as a string
--  *
--  * \note This method returns values of type <code>double</code>
--  * always using the point character as the decimal separator.
--  * This is SQLite default behaviour. Use method wxSQLite3Table::GetDouble
--  * to apply correct conversion from <code>string</code> to <code>double</code>.
--  */
--  wxString GetAsString(const wxString& columnName);
--
--  /// Get a column as an integer using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  int GetInt(int columnIndex, int nullValue = 0);
--
--  /// Get a column as an integer using the column name
--  /**
--  * \param columnName name of the column
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  int GetInt(const wxString& columnName, int nullValue = 0);
--
--  /// Get a column as a 64-bit integer using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  wxLongLong GetInt64(int columnIndex, wxLongLong nullValue = 0);
--
--  /// Get a column as an integer using the column name
--  /**
--  * \param columnName name of the column
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  wxLongLong GetInt64(const wxString& columnName, wxLongLong nullValue = 0);
--
--  /// Get a column as a double using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  double GetDouble(int columnIndex, double nullValue = 0.0);
--
--  /// Get a column as a double using the column name
--  /**
--  * \param columnName name of the column
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  double GetDouble(const wxString& columnName, double nullValue = 0.0);
--
--  /// Get a column as a string using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  wxString GetString(int columnIndex, const wxString& nullValue = wxEmptyString);
--
--  /// Get a column as a string using the column name
--  /**
--  * \param columnName name of the column
--  * \param nullValue value to be returned in case the column is NULL
--  * \return value of the column
--  */
--  wxString GetString(const wxString& columnName, const wxString& nullValue = wxEmptyString);
--
--  /// Get a column as a date value using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return value of the column
--  */
--  wxDateTime GetDate(int columnIndex);
--
--  /// Get a column as a date value using the column name
--  /**
--  * \param columnName name of the column
--  * \return value of the column
--  */
--  wxDateTime GetDate(const wxString& columnName);
--
--  /// Get a column as a time value using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return value of the column
--  */
--  wxDateTime GetTime(int columnIndex);
--
--  /// Get a column as a time value using the column name
--  /**
--  * \param columnName name of the column
--  * \return value of the column
--  */
--  wxDateTime GetTime(const wxString& columnName);
--
--  /// Get a column as a date/time value using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return value of the column
--  */
--  wxDateTime GetDateTime(int columnIndex);
--
--  /// Get a column as a date/time value using the column name
--  /**
--  * \param columnName name of the column
--  * \return value of the column
--  */
--  wxDateTime GetDateTime(const wxString& columnName);
--
--  /// Get a column as a boolean using the column index
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return value of the column
--  */
--  bool GetBool(int columnIndex);
--
--  /// Get a column as a boolean using the column name
--  /**
--  * \param columnName name of the column
--  * \return value of the column
--  */
--  bool GetBool(const wxString& columnName);
--
--  /// Check whether the column selected by index is a NULL value
--  /**
--  * \param columnIndex index of the column. Indices start with 0.
--  * \return TRUE if the value is NULL, FALSE otherwise
--  */
--  bool IsNull(int columnIndex);
--
--  /// Check whether the column selected by name is a NULL value
--  /**
--  * \param columnName name of the column
--  * \return TRUE if the value is NULL, FALSE otherwise
--  */
--  bool IsNull(const wxString& columnName);
--
--  /// Set the current row
--  /**
--  * \param row index of the requested row. Indices start with 0.
--  */
--  void SetRow(int row);
--
--  /// Finalize the result set
--  /**
--  */
--  void Finalize();
--
--  /// Validate associated SQLite resultset
--  /**
--  * \return TRUE if SQLite resultset is associated, FALSE otherwise
--  */
--  bool IsOk();
--
--private:
--    /// Check for valid results
--    void CheckResults();
--
--    int m_cols;        ///< Number of columns
--    int m_rows;        ///< Number of rows
--    int m_currentRow;  ///< Index of the current row
--    char** m_results;  ///< SQLite3 result buffer
--};
--
--
--/// Represents a prepared SQL statement
--class WXDLLIMPEXP_SQLITE3 wxSQLite3Statement
--{
--public:
--  /// Constructor
--  /**
--  */
--  wxSQLite3Statement();
--
--  /// Copy constructor
--  /**
--  */
--  wxSQLite3Statement(const wxSQLite3Statement& statement);
--
--  /// Assignement constructor
--  /**
--  */
--  wxSQLite3Statement& operator=(const wxSQLite3Statement& statement);
--
--  /// Constructor (internal use only)
--  /**
--  */
--  wxSQLite3Statement(void* db, void* stmt);
--
--  /// Destructor
--  /**
--  */
--  virtual ~wxSQLite3Statement();
--
--  /// Execute the database update represented by this statement
--  /**
--  * \return the number of database rows that were changed (or inserted or deleted)
--  */
--  int ExecuteUpdate();
--
--  /// Execute the query represented by this statement
--  /**
--  * \return result set instance
--  */
--  wxSQLite3ResultSet ExecuteQuery();
--
--  /// Get the number of statement parameters
--  /**
--  * \return the number of parameters in the prepared statement
--  */
--  int GetParamCount();
--
--  /// Get the index of a parameter with a given name
--  /**
--  * \param paramName 
--  * \return the index of the parameter with the given name. The name must match exactly.
--  * If there is no parameter with the given name, return 0.
--  */
--  int GetParamIndex(const wxString& paramName);
--
--  /// Get the name of a paramater at the given position
--  /**
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \return the name of the paramIndex-th parameter in the precompiled statement.
--  * Parameters of the form ":AAA" or "$VVV" have a name which is the string ":AAA" or "$VVV".
--  * Parameters of the form "?" have no name.
--  */
--  wxString GetParamName(int paramIndex);
--
--  /// Bind parameter to a string value
--  /**
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param stringValue value of the parameter
--  */
--  void Bind(int paramIndex, const wxString& stringValue);
--
--  /// Bind parameter to a integer value
--  /**
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param intValue value of the parameter
--  */
--  void Bind(int paramIndex, int intValue);
--
--  /// Bind parameter to a 64-bit integer value
--  /**
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param int64Value value of the parameter
--  */
--  void Bind(int paramIndex, wxLongLong int64Value);
--
--  /// Bind parameter to a double value
--  /**
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param doubleValue value of the parameter
--  */
--  void Bind(int paramIndex, double doubleValue);
--
--  /// Bind parameter to a utf-8 character string value
--  /**
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param charValue value of the parameter
--  */
--  void Bind(int paramIndex, const char* charValue);
--
--  /// Bind parameter to a BLOB value
--  /**
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param blobValue value of the parameter
--  * \param blobLen length of the blob in bytes
--  */
--  void Bind(int paramIndex, const unsigned char* blobValue, int blobLen);
--
--  /// Bind parameter to a BLOB value
--  /**
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param blobValue value of the parameter
--  */
--  void Bind(int paramIndex, const wxMemoryBuffer& blobValue);
--
--  /// Bind parameter to a date value
--  /**
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param date value of the parameter
--  */
--  void BindDate(int paramIndex, const wxDateTime& date);
--
--  /// Bind parameter to a time value
--  /**
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param time value of the parameter
--  */
--  void BindTime(int paramIndex, const wxDateTime& time);
--
--  /// Bind parameter to a date and time value
--  /**
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param datetime value of the parameter
--  */
--  void BindDateTime(int paramIndex, const wxDateTime& datetime);
--
--  /// Bind parameter to a timestamp value
--  /**
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param timestamp value of the parameter
--  */
--  void BindTimestamp(int paramIndex, const wxDateTime& timestamp);
--
--  /// Bind parameter to a date and time value
--  /**
--  * The date/time value is transferred to the database as a numeric value (i.e. int64).
--  *
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param datetime value of the parameter
--  */
--  void BindNumericDateTime(int paramIndex, const wxDateTime& datetime);
--
--  /// Bind parameter to a date and time value
--  /**
--  * The date/time value is transferred to the database as a Julian Day Number value (i.e. double).
--  *
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param datetime value of the parameter
--  */
--  void BindJulianDayNumber(int paramIndex, const wxDateTime& datetime);
--
--  /// Bind parameter to a boolean value
--  /**
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param value value of the parameter
--  */
--  void BindBool(int paramIndex, bool value);
--
--  /// Bind parameter to a NULL value
--  /**
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  */
--  void BindNull(int paramIndex);
--
--  /// Bind parameter to a Zero BLOB value
--  /**
--  * Space for a BLOB is reserved and filled with binary zeros for later reference 
--  * through a BLOB handle.
--  *
--  * \param paramIndex index of the parameter. The first parameter has an index of 1.
--  * \param blobSize size of the BLOB
--  */
--  void BindZeroBlob(int paramIndex, int blobSize);
--
--  /// Clear all parameter bindings
--  /**
--  * Sets all the parameters in the prepared SQL statement back to NULL. 
--  */
--  void ClearBindings();
--
--  /// Get the original SQL string for the prepared statement
--  /**
--  * \return the original SQL string used to prepare the statement
--  */
--  wxString GetSQL();
--
--  /// Reset the prepared statement
--  /**
--  * Resets the statement back to it's initial state, ready to be re-executed.
--  * Any SQL statement variables that had values bound to them retain their values.
--  */
--  void Reset();
--
--  /// Finalize the prepared staement
--  /**
--  */
--  void Finalize();
--
--  /// Validate associated SQLite database and statement
--  /**
--  * \return TRUE if both, a SQLite database and a SQLite statement, are associated, FALSE otherwise
--  */
--  bool IsOk();
--
--private:
--  /// Check for valid database connection
--  void CheckDatabase();
--
--  /// Check for valid statement
--  void CheckStmt();
--
--  void* m_db;    ///< associated SQLite3 database
--  void* m_stmt;  ///< associated SQLite3 statement
--};
--
--
--/// Represents a SQLite BLOB handle
--class WXDLLIMPEXP_SQLITE3 wxSQLite3Blob
--{
--public:
--  /// Constructor
--  /**
--  */
--  wxSQLite3Blob();
--
--  /// Copy constructor
--  /**
--  */
--  wxSQLite3Blob(const wxSQLite3Blob& blob);
--
--  /// Assignement constructor
--  /**
--  */
--  wxSQLite3Blob& operator=(const wxSQLite3Blob& blob);
--
--  /// Constructor (internal use only)
--  /**
--  */
--  wxSQLite3Blob(void* m_db, void* blobHandle, bool writable);
--
--  /// Destructor
--  /**
--  */
--  virtual ~wxSQLite3Blob();
--
--  /// Read partial BLOB value
--  /**
--   * \param blobValue memory buffer receiving the partial content of the BLOB
--   * \param length length of BLOB content to be read
--   * \param offset offset within BLOB where the read starts
--   * \return the address of the memory buffer
--  */
--  wxMemoryBuffer& Read(wxMemoryBuffer& blobValue, int length, int offset);
--
--  /// Write partial BLOB value
--  /**
--   * \param blobValue memory buffer receiving the partial content of the BLOB
--   * \param offset offset within BLOB where the read starts
--  */
--  void Write(const wxMemoryBuffer& blobValue, int offset);
--
--  /// Check whether the BLOB handle is correctly initialized
--  /**
--   * \return TRUE if the BLOB handle is correctly initialized, FALSE otherweis
--  */
--  bool IsOk();
--
--  /// Check whether the BLOB handle is read only
--  /**
--   * \return TRUE if the BLOB handle is readonly, FALSE otherweis
--  */
--  bool IsReadOnly();
--
--  /// Get the size of the associated BLOB
--  /**
--   * \return the BLOB size
--  */
--  int GetSize();
--
--  /// Finalize the BLOB
--  /**
--  */
--  void Finalize();
--
--private:
--  /// Check for valid BLOB
--  void CheckBlob();
--
--  void* m_db;       ///< associated SQLite3 database handle
--  void* m_blob;     ///< associated SQLite3 BLOB handle
--  bool  m_ok;       ///< flag whether the BLOB handle is correctly initialized
--  bool  m_writable; ///< flag whether the BLOB is writable or read only
--};
--
--
--/// Represents a SQLite3 database object
--class WXDLLIMPEXP_SQLITE3 wxSQLite3Database
--{
--public:
--  /// Default constructor
--  /**
--  * Initializes a SQLite database object.
--  * The SQLite database object can only be used in the same thread in which it was created.
--  */
--  wxSQLite3Database();
--
--  /// Destructor
--  /**
--  * Destructs a SQLite database object.
--  * The database will be closed implicitly if it is still open.
--  */
--  virtual ~wxSQLite3Database();
--
--  /// Open a SQLite3 database
--  /**
--  * Opens the sqlite database file "filename". The "filename" is UTF-8 encoded.
--  * If the database could not be opened (or created) successfully, then an exception is thrown.
--  * If the database file does not exist, then a new database will be created as needed.
--  * \param[in] fileName Name of the database file.
--  * \param[in] key Database encryption key.
--  */
--  void Open(const wxString& fileName, const wxString& key = wxEmptyString);
--
--  /// Open a SQLite3 database using a binary key
--  /**
--  * Opens the sqlite database file "filename". The "filename" is UTF-8 encoded.
--  * If the database could not be opened (or created) successfully, then an exception is thrown.
--  * If the database file does not exist, then a new database will be created as needed.
--  * \param[in] fileName Name of the database file.
--  * \param[in] key Database encryption key.
--  */
--  void Open(const wxString& fileName, const wxMemoryBuffer& key);
--
--  /// Check whether the database has been opened
--  /**
--  * \return TRUE if database has been opened, FALSE otherwise
--  */
--  bool IsOpen() const;
--
--  /// Close a SQLite3 database
--  /**
--  * Take care that all prepared statements have been finalized!
--  * Starting with version 3.6.0 SQLite has support to finialize all unfinalized
--  * prepared statements. The Close method has been changed to take advantage of
--  * this feature. Nevertheless it is recommended to explicitly finalize all
--  * wxSQLite3Statement instances before closing a database.
--  *
--  * NOTE: Finalizing all wxSQLite3Blob instances before closing a database is still required!
--  * 
--  */
--  void Close();
--
--  /// Begin transaction
--  /**
--  * In SQLite transactions can be deferred, immediate, or exclusive.
--  * Deferred means that no locks are acquired on the database until the database is first accessed.
--  * Thus with a deferred transaction, the BEGIN statement itself does nothing. Locks are not
--  * acquired until the first read or write operation. The first read operation against a database
--  * creates a SHARED lock and the first write operation creates a RESERVED lock. Because the
--  * acquisition of locks is deferred until they are needed, it is possible that another thread or
--  * process could create a separate transaction and write to the database after the BEGIN on the
--  * current thread has executed. If the transaction is immediate, then RESERVED locks are acquired
--  * on all databases as soon as the BEGIN command is executed, without waiting for the database to
--  * be used. After a BEGIN IMMEDIATE, it is guaranteed that no other thread or process will be able
--  * to write to the database or do a BEGIN IMMEDIATE or BEGIN EXCLUSIVE. Other processes can continue
--  * to read from the database, however. An exclusive transaction causes EXCLUSIVE locks to be acquired
--  * on all databases. After a BEGIN EXCLUSIVE, it is guaranteed that no other thread or process will
--  * be able to read or write the database until the transaction is complete. 
--  *
--  * \param[in] transactionType type of transaction (default: DEFERRED).
--  */
--  void Begin(wxSQLite3TransactionType transactionType = WXSQLITE_TRANSACTION_DEFAULT);
--
--  /// Commit transaction
--  /**
--  */
--  void Commit();
--
--  /// Rollback transaction
--  /**
--  * Rolls back a transaction or optionally to a previously set savepoint
--  *
--  * \param savepointName optional name of a previously set savepoint
--  */
--  void Rollback(const wxString& savepointName = wxEmptyString);
--  
--  /// Get the auto commit state
--  /**
--  * Test to see whether or not the database connection is in autocommit mode.
--  * \return TRUE if it is and FALSE if not.
--  * Autocommit mode is on by default. Autocommit is disabled by a BEGIN statement
--  * and reenabled by the next COMMIT or ROLLBACK. 
--  */
--  bool GetAutoCommit();
--
--  /// Set savepoint
--  /*
--  * Sets a savepoint with a given name
--  *
--  * \param savepointName the name of the savepoint
--  */
--  void Savepoint(const wxString& savepointName);
--
--  /// Release savepoint
--  /*
--  * Releases a savepoint with a given name
--  *
--  * \param savepointName the name of the savepoint
--  */
--  void ReleaseSavepoint(const wxString& savepointName);
--
--  /// Check whether a table with the given name exists
--  /**
--  * Checks the main database or a specific attached database for existence of a table
--  * with a given name.
--  *
--  * \param tableName name of the table
--  * \param databaseName optional name of an attached database
--  * \return TRUE if the table exists, FALSE otherwise
--  */
--  bool TableExists(const wxString& tableName, const wxString& databaseName = wxEmptyString);
--
--  /// Check whether a table with the given name exists in the main database or any attached database
--  /**
--  * \param tableName name of the table
--  * \param databaseNames list of the names of those databases in which the table exists
--  * \return TRUE if the table exists at least in one database, FALSE otherwise
--  */
--  bool TableExists(const wxString& tableName, wxArrayString& databaseNames);
--
--  /// Get a list containing the names of all attached databases including the main database
--  /**
--  * \param databaseNames contains on return the list of the database names
--  */
--  void GetDatabaseList(wxArrayString& databaseNames);
--
--  /// Get a list containing the names of all attached databases including the main database
--  /**
--  * \param databaseNames contains on return the list of the database names
--  * \param databaseFiles contains on return the list of the database file names
--  */
--  void GetDatabaseList(wxArrayString& databaseNames, wxArrayString& databaseFiles);
--
--  /// Check the syntax of an SQL statement given as a wxString
--  /**
--  * \param sql query string
--  * \return TRUE if the syntax is correct, FALSE otherwise
--  */
--  bool CheckSyntax(const wxString& sql);
--
--  /// Check the syntax of an SQL statement given as a statement buffer
--  /**
--  * \param sql query string
--  * \return TRUE if the syntax is correct, FALSE otherwise
--  */
--  bool CheckSyntax(const wxSQLite3StatementBuffer& sql);
--
--  /// Check the syntax of an SQL statement given as a utf-8 character string
--  /**
--  * \param sql query string
--  * \return TRUE if the syntax is correct, FALSE otherwise
--  */
--  bool CheckSyntax(const char* sql);
--
--  /// Execute a insert, update or delete SQL statement given as a wxString
--  /**
--  * \param sql query string
--  * \return the number of database rows that were changed (or inserted or deleted)
--  */
--  int ExecuteUpdate(const wxString& sql);
--
--  /// Execute a insert, update or delete SQL statement given as a statement buffer
--  /**
--  * \param sql query string
--  * \return the number of database rows that were changed (or inserted or deleted)
--  */
--  int ExecuteUpdate(const wxSQLite3StatementBuffer& sql);
--
--  /// Execute a insert, update or delete SQL statement given as a utf-8 character string
--  /**
--  * \param sql query string
--  * \return the number of database rows that were changed (or inserted or deleted)
--  */
--  int ExecuteUpdate(const char* sql);
--
--  /// Execute a SQL query statement given as a wxString
--  /**
--  * \param sql query string
--  * \return result set instance
--  */
--  wxSQLite3ResultSet ExecuteQuery(const wxString& sql);
--
--  /// Execute a SQL query statement given as a statement buffer
--  /**
--  * \param sql query string
--  * \return result set instance
--  */
--  wxSQLite3ResultSet ExecuteQuery(const wxSQLite3StatementBuffer& sql);
--
--  /// Execute a SQL query statement given as a utf-8 character string
--  /**
--  * \param sql query string
--  * \return result set instance
--  */
--  wxSQLite3ResultSet ExecuteQuery(const char* sql);
--
--  /// Execute a scalar SQL query statement given as a wxString
--  /**
--  * Allows to easily retrieve the result of queries returning a single integer result
--  * like SELECT COUNT(*) FROM table WHERE condition.
--  * \param sql query string
--  * \return first column of first row as an int
--  */
--  int ExecuteScalar(const wxString& sql);
--
--  /// Execute a scalar SQL query statement given as a statement buffer
--  /**
--  * Allows to easily retrieve the result of queries returning a single integer result
--  * like SELECT COUNT(*) FROM table WHERE condition.
--  * \param sql query string
--  * \return first column of first row as an int
--  */
--  int ExecuteScalar(const wxSQLite3StatementBuffer& sql);
--
--  /// Execute a scalar SQL query statement given as a utf-8 character string
--  /**
--  * Allows to easily retrieve the result of queries returning a single integer result
--  * like SELECT COUNT(*) FROM table WHERE condition.
--  * \param sql query string
--  * \return first column of first row as an int
--  */
--  int ExecuteScalar(const char* sql);
--
--  /// Get the result table for a SQL query statement given as a wxString
--  /**
--  * Returns all resulting rows of the query for later processing.
--  * \param sql query string
--  * \return table instance
--  */
--  wxSQLite3Table GetTable(const wxString& sql);
--
--  /// Get the result table for a SQL query statement given as a statement buffer
--  /**
--  * Returns all resulting rows of the query for later processing.
--  * \param sql query string
--  * \return table instance
--  */
--  wxSQLite3Table GetTable(const wxSQLite3StatementBuffer& sql);
--
--  /// Get the result table for a SQL query statement given as a utf-8 character string
--  /**
--  * Returns all resulting rows of the query for later processing.
--  * \param sql query string
--  * \return table instance
--  */
--  wxSQLite3Table GetTable(const char* sql);
--
--  /// Prepare a SQL query statement given as a wxString for parameter binding
--  /**
--  * \param sql query string
--  * \return statement instance
--  */
--  wxSQLite3Statement PrepareStatement(const wxString& sql);
--
--  /// Prepare a SQL query statement given as a statement buffer for parameter binding
--  /**
--  * \param sql query string
--  * \return statement instance
--  */
--  wxSQLite3Statement PrepareStatement(const wxSQLite3StatementBuffer& sql);
--
--  /// Prepare a SQL query statement given as a utf-8 character string for parameter binding
--  /**
--  * \param sql query string
--  * \return statement instance
--  */
--  wxSQLite3Statement PrepareStatement(const char* sql);
--
--  /// Get the row id of last inserted row
--  /**
--  * Each entry in an SQLite table has a unique integer key.
--  * (The key is the value of the INTEGER PRIMARY KEY column if there is such a column,
--  * otherwise the key is generated at random. The unique key is always available as the
--  * ROWID, OID, or _ROWID_ column.)
--  * \return the integer key of the most recent insert in the database.
--  */
--  wxLongLong GetLastRowId();
--
--  /// Get handle to a read only BLOB
--  /**
--  */
--  wxSQLite3Blob GetReadOnlyBlob(wxLongLong rowId, 
--                                const wxString& columnName, 
--                                const wxString& tableName, 
--                                const wxString& dbName = wxEmptyString);
--
--  /// Get handle to a writable BLOB
--  /**
--  */
--  wxSQLite3Blob GetWritableBlob(wxLongLong rowId, 
--                                const wxString& columnName, 
--                                const wxString& tableName, 
--                                const wxString& dbName = wxEmptyString);
--
--  /// Get handle to a BLOB
--  /**
--  */
--  wxSQLite3Blob GetBlob(wxLongLong rowId, 
--                        const wxString& columnName, 
--                        const wxString& tableName, 
--                        const wxString& dbName = wxEmptyString,
--                        bool writable = true);
--
--  /// Interrupt a long running query
--  /**
--  * Causes any pending database operation to abort and return at its earliest opportunity.
--  * This method is typically called in response to a user action such as pressing "Cancel"
--  * or Ctrl-C where the user wants a long query operation to halt immediately.
--  */
--  void Interrupt();
--
--  /// Set the busy timeout
--  /**
--  * This method sets a busy handler that sleeps for a while when a table is locked.
--  * The handler will sleep multiple times until at least "ms" milliseconds of sleeping
--  * have been done.
--  * Calling this routine with an argument less than or equal to zero turns off all busy handlers.
--  * \param milliSeconds timeout in milliseconds
--  */
--  void SetBusyTimeout(int milliSeconds);
--
--  /// Create a user-defined scalar function
--  /**
--  * Registers a SQL scalar function with the database.
--  * \param name
--  * \param argCount number of arguments the scalar function takes.
--  *                 If this argument is -1 then the scalar function may take any number of arguments.
--  * \param function instance of an scalar function
--  * \return TRUE on successful registration, FALSE otherwise
--  */
--  bool CreateFunction(const wxString& name, int argCount, wxSQLite3ScalarFunction& function);
--
--  /// Create a user-defined aggregate function
--  /**
--  * Registers a SQL aggregate function with the database.
--  * \param name
--  * \param argCount number of arguments the aggregate function takes.
--  *                 If this argument is -1 then the aggregate function may take any number of arguments.
--  * \param function instance of an aggregate function
--  * \return TRUE on successful registration, FALSE otherwise
--  */
--  bool CreateFunction(const wxString& name, int argCount, wxSQLite3AggregateFunction& function);
--
--  /// Create a user-defined authorizer function
--  /**
--  * Registers an authorizer object with the SQLite library. The authorizer is invoked
--  * (at compile-time, not at run-time) for each attempt to access a column of a table in the database.
--  * The authorizer should return SQLITE_OK if access is allowed, SQLITE_DENY if the entire SQL statement
--  * should be aborted with an error and SQLITE_IGNORE if the column should be treated as a NULL value.
--  * \param authorizer instance of an authorizer function
--  * \return TRUE on successful registration, FALSE otherwise
--  */
--  bool SetAuthorizer(wxSQLite3Authorizer& authorizer);
--
--  /// Create a user-defined commit callback function
--  /**
--  * Registers a callback function object to be invoked whenever a new transaction is committed.
--  * If the callback function returns non-zero, then the commit is converted into a rollback.
--  * Registering a NULL function object disables the callback. Only a single commit hook callback
--  * can be registered at a time.
--  * \param commitHook address of an instance of a commit callback function
--  */
--  void SetCommitHook(wxSQLite3Hook* commitHook);
--  
--  /// Create a user-defined rollback callback function
--  /**
--  * Registers a callback function object to be invoked whenever a transaction is rolled back. 
--  * Registering a NULL function object disables the callback. Only a single rollback hook callback
--  * can be registered at a time.
--  *
--  * For the purposes of this API, a transaction is said to have been rolled back if an explicit
--  * "ROLLBACK" statement is executed, or an error or constraint causes an implicit rollback to occur.
--  * The callback is not invoked if a transaction is automatically rolled back because the database
--  * connection is closed.
--  * \param rollbackHook address of an instance of a rollback callback function
--  */
--  void SetRollbackHook(wxSQLite3Hook* rollbackHook);
--
--  /// Create a user-defined update callback function
--  /**
--  * Registers a callback function object to be invoked whenever a row is updated, inserted or deleted.
--  * Registering a NULL function object disables the callback. Only a single commit hook callback
--  * can be registered at a time.
--  * The update hook is not invoked when internal system tables are modified (i.e. sqlite_master and sqlite_sequence).
--  * \param updateHook address of an instance of an update callback function
--  */
--  void SetUpdateHook(wxSQLite3Hook* updateHook);
--
--  /// Create a user-defined collation sequence
--  /**
--  * Registers a callback function object to be invoked whenever this collation is needed
--  * in comparing strings.
--  * Registering a NULL function object disables the specified collation sequence.
--  * \param name name of a user-defined collation sequence
--  * \param collation address of an instance of a user-defined collation sequence
--  */
--  void SetCollation(const wxString& name, wxSQLite3Collation* collation);
--
--  /// Return meta information about a specific column of a specific database table
--  /**
--  * \param dbName is either the name of the database (i.e. "main", "temp" or an attached database) or an empty string. If it is an empty string all attached databases are searched for the table.
--  * \param tableName name of the database table
--  * \param columnName name of the database column
--  * \param dataType declared data type of the column. Pass NULL if information not needed.
--  * \param collation name of the collation sequence. Pass NULL if information is not needed.
--  * \param notNull output flag whether the column has a not null constraint. Pass NULL if information not needed.
--  * \param primaryKey output flag whether the column is part of the primary key. Pass NULL if information not needed.
--  * \param autoIncrement output flag whether the column is an auto increment column. Pass NULL if information not needed.
--  *
--  * This method is only available if WXSQLITE3_HAVE_METADATA is defined and SQLite has been compiled with SQLITE_ENABLE_COLUMN_METADATA defined.
--  */
--  void GetMetaData(const wxString& dbName, const wxString& tableName, const wxString& columnName,
--                   wxString* dataType = NULL, wxString* collation = NULL,
--                   bool* notNull = NULL, bool* primaryKey = NULL, bool* autoIncrement = NULL);
--
--  /// Load a database extension
--  /**
--  * \param fileName Name of the shared library containing extension.
--  * \param entryPoint Name of the entry point.
--  */
--  void LoadExtension(const wxString& fileName, const wxString& entryPoint = _T("sqlite3_extension_init"));
--
--  /// Enable or disable loading of database extensions
--  /**
--  * \param enable Flag whether to enable (TRUE) or disable (FALSE) loadable extensions
--  */
--  void EnableLoadExtension(bool enable);
--
--  /// Change the encryption key of the database
--  /**
--  * If the database is currently not encrypted, this method will encrypt it.
--  * If an empty key (with key length == 0) is given, the database is decrypted.
--  *
--  * \param newKey The new encryption key (will be converted to UTF-8)
--  */
--  void ReKey(const wxString& newKey);
--
--  /// Change the encryption key of the database
--  /**
--  * If the database is currently not encrypted, this method will encrypt it.
--  * If an empty key (with key length == 0) is given, the database is decrypted.
--  *
--  * \param newKey The new encryption key
--  */
--  void ReKey(const wxMemoryBuffer& newKey);
--
--  /// Check whether the database is encrypted
--  /**
--  * Check whether the database has been opened using an encryption key.
--  *
--  * \return TRUE if database is encrypted, FALSE otherwise
--  */
--  bool IsEncrypted() const { return m_isEncrypted; }
--
--  /// Query the value of a database limit
--  /**
--  * This method allows to query several database limits. Consult the SQLite
--  * documentation for further explanation.
--  *
--  * \param id The identifier of the limit to be queried
--  * \return the current value of the queried limit
--  */
--  int GetLimit(wxSQLite3LimitType id);
--
--  /// Change a database limit to a new value
--  /**
--  * This method allows to change several database limits. Consult the SQLite
--  * documentation for further explanation.
--  *
--  * \param id The identifier of the limit to be queried
--  * \param newValue The new value of the limit to be set
--  * \return the previous value of the specified limit
--  */
--  int SetLimit(wxSQLite3LimitType id, int newValue);
--
--  /// Convert database limit type to string
--  /**
--  * \param type The database limit type to be converted to string representation.
--  */
--  static wxString LimitTypeToString(wxSQLite3LimitType type);
--
--  /// Initialize the SQLite library
--  /**
--  * Starting with SQLite version 3.6.0 there is a new method to initialize
--  * the SQLite library. Currently an explicit call to this method is not
--  * required, but this behaviour might change in the future of SQLite.
--  * Therefore it is recommended to call this method once before accessing
--  * any SQLite databases.
--  */
--  static void InitializeSQLite();
--
--  /// Shutdown the SQLite library
--  /**
--  * Starting with SQLite version 3.6.0 there is a new method to shutdown
--  * the SQLite library. Currently an explicit call to this method is not
--  * required, but this behaviour might change in the future of SQLite.
--  * Therefore it is recommended to call this method once when no further
--  * access to any SQLite databases is required.
--  */
--  static void ShutdownSQLite();
--
--  /// Get random bytes
--  /**
--  * SQLite contains a high-quality pseudo-random number generator.
--  * This method allows to access it for application specofoc purposes.
--  *
--  * \param n The amount of random bytes to be created
--  * \param random A memory buffer containing the random bytes on return
--  */
--  static bool Randomness(int n, wxMemoryBuffer& random);
--
--  /// Enable or disable SQLite shared cache
--  /**
--  * The cache sharing mode set effects all subsequent database connections.
--  * Existing database connections continue use the sharing mode that was in effect
--  * at the time they were opened.
--  *
--  * Virtual tables cannot be used with a shared cache.
--  */
--  static void SetSharedCache(bool enable);
--
--  /// Check whether SQLite shared cache is enabled
--  /**
--  * \return TRUE if the SQLite shared cache is enabled, FALSE otherwise
--  */
--  static bool IsSharedCacheEnabled() { return ms_sharedCacheEnabled; }
--
--  /// Get the version of the underlying SQLite3 library
--  /**
--  * \return a string which contains the version number of the library
--  */
--  static wxString GetVersion();
--
--  /// Check whether wxSQLite3 has been compiled with encryption support
--  /**
--  * \return TRUE if encryption support is enabled, FALSE otherwise
--  */
--  static bool HasEncryptionSupport();
--
--  /// Check whether wxSQLite3 has been compiled with meta data support
--  /**
--  * \return TRUE if meta data support is enabled, FALSE otherwise
--  */
--  static bool HasMetaDataSupport();
--
--  /// Check whether wxSQLite3 has been compiled with loadable extension support
--  /**
--  * \return TRUE if loadable extension support is enabled, FALSE otherwise
--  */
--  static bool HasLoadExtSupport();
--
--  /// Check whether wxSQLite3 has support for incremental BLOBs
--  /**
--  * \return TRUE if incremental BLOB support is available, FALSE otherwise
--  */
--  static bool HasIncrementalBlobSupport();
--
--  /// Check whether wxSQLite3 has support for SQLite savepoints
--  /**
--  * \return TRUE if SQLite savepoints are supported, FALSE otherwise
--  */
--  static bool HasSavepointSupport();
--
--protected:
--  /// Access SQLite's internal database handle
--  void* GetDatabaseHandle() { return m_db; }
--
--  /// Activate the callback for needed collations for this database
--  /**
--  * To avoid having to register all collation sequences before a database can be used,
--  * a single callback function may be registered with the database handle to be called
--  * whenever an undefined collation sequence is required.
--  */
--  void SetCollationNeededCallback();
--
--  /// Request the instantiation of a user defined collation sequence
--  /**
--  * This method is called for every undefined collation sequence.
--  * In a derived database class this method should call SetCollation registering an 
--  * appropriate collation class instance.
--  * \param collationName name of the collation which is needed for string comparison
--  */
--  virtual void SetNeededCollation(const wxString& WXUNUSED(collationName)) {}
--
--  /// Execute a comparison using a user-defined collation
--  static int ExecComparisonWithCollation(void* collation, int len1, const void* txt1, int len2, const void* txt2);
--
--  /// Execute callback for needed collation sequences
--  static void ExecCollationNeeded(void* db, void* internalDb, int eTextRep, const char* name);
--
--private:
--  /// Private copy constructor
--  wxSQLite3Database(const wxSQLite3Database& db);
--
--  /// Private assignment constructor
--  wxSQLite3Database& operator=(const wxSQLite3Database& db);
--
--  /// Prepare a SQL statement (internal use only)
--  void* Prepare(const char* sql);
--
--  /// Check for valid database connection
--  void CheckDatabase();
--
--  void* m_db;             ///< associated SQLite3 database
--  int   m_busyTimeoutMs;  ///< Timeout in milli seconds
--  bool  m_isEncrypted;    ///< Flag whether the database is encrypted or not
--
--  static bool  ms_sharedCacheEnabled;        ///< Flag whether SQLite shared cache is enabled
--  static bool  ms_hasEncryptionSupport;      ///< Flag whether wxSQLite3 has been compiled with encryption support
--  static bool  ms_hasMetaDataSupport;        ///< Flag whether wxSQLite3 has been compiled with meta data support
--  static bool  ms_hasLoadExtSupport;         ///< Flag whether wxSQLite3 has been compiled with loadable extension support
--  static bool  ms_hasIncrementalBlobSupport; ///<  Flag whether wxSQLite3 has support for incremental BLOBs
--  static bool  ms_hasSavepointSupport;       ///<  Flag whether wxSQLite3 has support for SQLite savepoints
--};
--
--/// RAII class for managing transactions
--/***
--* This object allows easy managment of transaction. It con only be
--* created on the stack. This guarantees that the destructor is called
--* at the moment it goes out of scope. Usage:
--* \code
--* void doDB(wxSQLite3Database *db)
--* {
--* 	wxSQLite3Transaction t(db);
--* 	doDatabaseOperations();
--* 	t.Commit();
--* }
--* \endcode
--* In case doDatabseOperations() fails by throwing an exception,
--* the transaction is automatically rolled back. If it succedes,
--* Commit() commits the changes to the db and the destructor
--* of Transaction does nothing.
--*/
--class WXDLLIMPEXP_SQLITE3 wxSQLite3Transaction
--{
--public:
--  /// Constructor. Start the Transaction.
--  /**
--    * The constructor starts the transaction. 
--    * \param db Pointer to the open Database. The pointer to the database
--    * is NOT freed on destruction!
--    * \param transactionType Type of the transaction to be opened.
--    */
--  explicit wxSQLite3Transaction(wxSQLite3Database* db, wxSQLite3TransactionType transactionType = WXSQLITE_TRANSACTION_DEFAULT);
--
--  /// Destructor.
--  /**
--    * The destructor does nothing if the changes were already commited (see commit()).
--    * In case the changes were not commited, a call to the destructor rolls back the
--    * transaction.
--    */
--  ~wxSQLite3Transaction();
--
--  /// Commits the transaction
--  /**
--    * Commits the transaction if active. If not, it does nothing.
--    * After the commit, the transaction is not active.
--    */
--  void Commit();
--
--  /// Rolls back the transaction
--  /**
--    * Rolls back the transaction if active. If not, it does nothing.
--    * After the rollback, the transaction is not active.
--    */
--  void Rollback();
--
--  /// Determins wether the transaction is open or not
--  /**
--    * \return TRUE if the constructor successfully opend the transaction, false otherwise.
--    * After committing the transaction, active returns false.
--    */
--  inline bool IsActive()
--  {
--    return m_database != NULL;
--  }
--
--private:
--  /// New operator (May only be created on the stack)
--	static void *operator new(size_t size);
--
--  /// Delete operator (May not be deleted (for symmetry))
--	static void operator delete(void *ptr);
--
--  /// Copy constructor (Must not be copied)
--	wxSQLite3Transaction(const wxSQLite3Transaction&);
--
--  /// Assignment operator (Must not be assigned)
--	wxSQLite3Transaction& operator=(const wxSQLite3Transaction&);
--
--  wxSQLite3Database* m_database; ///< Pointer to the associated database (no ownership)
--};
--
--#endif
--
---- guayadeque.orig/src/wx/wxsqlite3def.h
-+++ /dev/null
-@@ -1,314 +0,0 @@
--///////////////////////////////////////////////////////////////////////////////
--// Name:        wxsqlite3def.h
--// Purpose:     wxWidgets wrapper around the SQLite3 embedded database library.
--// Author:      Ulrich Telle
--// Modified by:
--// Created:     2005-07-14
--// Changes:     2005-10-03  - Upgrade to SQLite3 version 3.2.7
--//              2005-10-09  - Corrected error in wxSQLite3Table::FindColumnIndex
--//              2005-10-30  - Added wxGTK build support
--//              2005-11-01  - Corrected wxSQLite3ResultSet::GetInt64.
--//                            Added wxSQLite3Table::GetInt64
--//              2005-11-09  - Optionally load SQLite library dynamically
--//              2006-02-01  - Upgrade to SQLite3 version 3.3.3
--//              2006-02-12  - Upgrade to SQLite3 version 3.3.4 (wxMSW only)
--//              2006-03-15  - Fixed a bug in wxSQLite3Database::Prepare
--//                            Added wxSQLite3Database::IsOpen for convenience
--//              2006-06-11  - Upgrade to SQLite3 version 3.3.6
--//                            Added support for optional SQLite meta data methods
--//              2007-01-11  - Upgrade to SQLite3 version 3.3.10
--//                            Added support for BLOBs as wxMemoryBuffer objects
--//                            Added support for loadable extensions
--//                            Optional support for key based database encryption
--//              2007-02-12  - Upgrade to SQLite3 version 3.3.12
--//              2007-05-01  - Upgrade to SQLite3 version 3.3.17
--//              2007-10-28  - Upgrade to SQLite3 version 3.5.2
--//              2007-11-17  - Fixed a bug in wxSQLite3Database::Close
--//                            Eliminated several compile time warnings
--//              2007-12-19  - Upgrade to SQLite3 version 3.5.4
--//                            Fixed a bug in wxSQLite3Database::Begin
--//              2008-01-05  - Added support for shared cache mode
--//                            Added support for access to original SQL statement
--//                            for prepared statements (requires SQLite 3.5.3 or above)
--//              2008-04-27  - Upgrade to SQLite3 version 3.5.8
--//                            Fixed several minor issues in the build files
--//              2008-06-28  - Upgrade to SQLite3 version 3.5.9
--//              2008-07-19  - Upgrade to SQLite3 version 3.6.0
--//              2008-09-04  - Upgrade to SQLite3 version 3.6.2
--//              2008-11-22  - Upgrade to SQLite3 version 3.6.6
--//              2008-12-18  - Upgrade to SQLite3 version 3.6.7
--//                            Fixed a bug in method wxSQLite3Table::GetDouble
--//              2009-01-14  - Upgrade to SQLite3 version 3.6.10
--//                            Added savepoint support
--//                            Added IsOk methods to some classes
--//                            
--// Copyright:   (c) Ulrich Telle
--// Licence:     wxWindows licence
--///////////////////////////////////////////////////////////////////////////////
--
--/// \file wxsqlite3def.h Compile time switches for the wxSQLite3 class
--
--/** \mainpage wxSQLite3
--
--\section intro What is wxSQLite3?
--
--  \b wxSQLite3 is a C++ wrapper around the public domain <a href="http://www.sqlite.org">SQLite 3.x</a> database
--  and is specifically designed for use in programs based on the \b wxWidgets library.
--
--  Several solutions already exist to access SQLite databases. To name just a few:
--
--  - <a href="http://sourceforge.net/projects/wxsqlite">wxSQLite</a> :
--    This is a wxWidgets wrapper for version 2.8.x of SQLite. 
--    SQLite version 3.x has a lot more features - which are not supported by this wrapper.
--
--  - <a href="http://www.codeproject.com/database/CppSQLite.asp">CppSQLite</a> : 
--    Not wxWidgets specific, but with (partial) support for the newer version 3.x of SQLite.
--
--  - <a href="http://wxcode.sf.net">DatabaseLayer</a> :
--    This is a database abstraction providing a JDBC-like interface to database I/O.
--    In the current version SQLite3, PostgreSQL, MySQL, Firebird, and ODBC database backends
--    are supported.
--
--  The component \b wxSQLite3 was inspired by all three mentioned SQLite wrappers.
--  \b wxSQLite3 does not try to hide the underlying database, in contrary almost all special features
--  of the SQLite3 version 3.x are supported, like for example the creation of user defined
--  scalar or aggregate functions.
--
--  Since SQLite stores strings in UTF-8 encoding, the wxSQLite3 methods provide automatic conversion
--  between wxStrings and UTF-8 strings. This works best for the \b Unicode builds of \b wxWidgets.
--  In \b ANSI builds the current locale conversion object \b wxConvCurrent is used for conversion
--  to/from UTF-8. Special care has to be taken if external administration tools are used to modify
--  the database contents, since not all of these tools operate in Unicode or UTF-8 mode.
--
--\section version Version history
--
--<dl>
-- 
--<dt><b>1.9.4</b> - <i>January 2009</i></dt>
--<dd>
--Upgrade to SQLite version 3.6.10<br>
--Added support for savepoints, introduced with SQLite 3.6.8<br>
--Added method IsOk to the classes wxSQLite3Statement, wxSQLite3Table and wxSQLite3ResultSet,
--thus instances of these classes can be checked whether the associated SQLite database or
--statement are valid without throwing an exception.<br>
--
--</dd>
--<dt><b>1.9.3</b> - <i>December 2008</i></dt>
--<dd>
--Upgrade to SQLite version 3.6.7<br>
--Fixed a bug in method wxSQLite3Table::GetDouble
--(conversion from string to double failed in non-US locales)<br>
--Build system upgraded using Bakefile 0.2.5<br>
--
--</dd>
--<dt><b>1.9.2</b> - <i>November 2008</i></dt>
--<dd>
--Upgrade to SQLite version 3.6.6<br>
--Added RAII transaction class (see docs for details)<br>
--
--</dd>
--<dt><b>1.9.1</b> - <i>September 2008</i></dt>
--<dd>
--Upgrade to SQLite version 3.6.2<br>
--Introduced own step counting for aggregate user functions
--since the sqlite3_aggregate_count function is now deprecated<br>
--Enhanced wxSQLite3Database::TableExists method to query an attached database
--for existence of a table or to query the main database and all attached databases<br>
--
--</dd>
--<dt><b>1.9.0</b> - <i>July 2008</i></dt>
--<dd>
--Upgrade to SQLite version 3.6.0<br>
--The optional key based encryption support has been adapted to
--support SQLite version 3.6.0.<br>
--Added static methods to initialize and shutdown the SQLite library.<br>
--Changed build system to support static library build against shared
--wxWidgets build on Linux.<br>
--Changed behaviour of wxSQLite3Database::Close method to finalize
--all unfinalized prepared statements.
--
--</dd>
--<dt><b>1.8.5</b> - <i>June 2008</i></dt>
--<dd>
--Upgrade to SQLite version 3.5.9<br>
--Integration of the optional key based encryption support into SQLite
--has been made easier. Changes to original SQLite source files
--are no longer necessary.
--
--</dd>
--<dt><b>1.8.4</b> - <i>April 2008</i></dt>
--<dd>
--Upgrade to SQLite version 3.5.8<br>
--Added support for accessing database limits<br>
--Changed method TableExists to check a table name case insensitive<br>
--Fixed several minor issues in the build files.
--
--</dd>
--<dt><b>1.8.3</b> - <i>January 2008</i></dt>
--<dd>
--Added support for shared cache mode<br>
--Added support for access to original SQL statement
--for prepared statements (requires SQLite 3.5.3 or above)
--
--</dd>
--<dt><b>1.8.2</b> - <i>December 2007</i></dt>
--<dd>
--Upgrade to SQLite version 3.5.4<br>
--Fixed a bug in wxSQLite3Database::Begin (wrong transaction type)
--
--</dd>
--<dt><b>1.8.1</b> - <i>November 2007</i></dt>
--<dd>
--Fixed a bug in in wxSQLite3Database::Close (resetting flag m_isEncrypted)<br>
--Eliminated several compile time warnings (regarding unused parameters)<br>
--Fixed a compile time bug in wxSQLite3Database::GetBlob (missing explicit type cast)
--
--</dd>
--<dt><b>1.8.0</b> - <i>November 2007</i></dt>
--<dd>
--Upgrade to SQLite version 3.5.2<br>
--Support for SQLite incremental BLOBs<br>
-- Changed source code in the SQLite3 encryption extension to eliminate several warnings<br>
--Changed default wxWidgets version to 2.8.x<br>
--Adjusted sources for SQLite encryption support are included for all SQLite version from 3.3.1 up to 3.5.2<br>
--SQLite link libraries for MinGW on Windows are included<br>
--Added <code>WXMAKINGLIB_WXSQLITE3</code> compile time option
--to support building wxSQLite3 as a static library while
--using the shared libraries of wxWidgets.
--
--</dd>
--<dt><b>1.7.3</b> - <i>May 2007</i></dt>
--<dd>
--Upgrade to SQLite version 3.3.17<br>
--
--Fixed a bug in the SQLite3 encryption extension
--(MD5 algorithm was not aware of endianess on
--big-endian platforms, resulting in non-portable
--database files)
--
--</dd>
--<dt><b>1.7.2</b> - <i>February 2007</i></dt>
--<dd>
--Upgrade to SQLite version 3.3.12<br>
--Support for loadable extensions is now optional
--Check for optional wxSQLite3 features at runtime
--wxSQLite3 API independent of optional features
--
--</dd>
--<dt><b>1.7.1</b> - <i>January 2007</i></dt>
--<dd>
--Fixed a bug in the key based database encryption feature
--(The call to <b>sqlite3_rekey</b> in wxSQLite3Database::ReKey
--could cause a program crash, when used to encrypt a previously
--unencrypted database.)<br>
--
--</dd>
--<dt><b>1.7.0</b> - <i>January 2007</i></dt>
--<dd>
--Upgrade to SQLite version 3.3.10 (<b>Attention</b>: at least SQLite version 3.3.9 is required)<br>
--Added support for BLOBs as wxMemoryBuffer objects<br>
--Added support for loadable extensions<br>
--Optional support for key based database encryption
--
--</dd>
--<dt><b>1.6.0</b> - <i>July 2006</i></dt>
--<dd>
--Added support for user defined collation sequences
--
--</dd>
--<dt><b>1.5.3</b> - <i>June 2006</i></dt>
--<dd>
--Upgrade to SQLite version 3.3.6<br>
--Added support for optional SQLite meta data methods
--
--</dd>
--<dt><b>1.5.2</b> - <i>March 2006</i></dt>
--<dd>
--Fixed a bug in wxSQLite3Database::Prepare<br>
--Added wxSQLite3Database::IsOpen for convenience
--
--</dd>
--<dt><b>1.5.1</b> - <i>February 2006</i></dt>
--<dd>
--Upgrade to SQLite version 3.3.4 (wxMSW only)
--
--</dd>
--<dt><b>1.5</b> - <i>February 2006</i></dt>
--<dd>
--Upgrade to SQLite version 3.3.3<br>
--Added support for commit, rollback and update callbacks
--
--</dd>
--<dt><b>1.4.2</b> - <i>November 2005</i></dt>
--<dd>
--Optimized code for wxString arguments
--
--</dd>
--<dt><b>1.4.1</b> - <i>November 2005</i></dt>
--<dd>
--Fixed a bug in wxSQLite3Database::TableExists,<br>
--Changed the handling of Unicode string conversion,<br>
--Added support for different transaction types
--
--</dd>
--<dt><b>1.4</b> - <i>November 2005</i></dt>
--<dd>
--Optionally load the SQLite library dynamically at run time.
--
--</dd>
--<dt><b>1.3.1</b> - <i>November 2005</i></dt>
--<dd>
--Corrected wxSQLite3ResultSet::GetInt64.<br>
--Added wxSQLite3Table::GetInt64
--
--</dd>
--<dt><b>1.3</b> - <i>October 2005</i></dt>
--<dd>
--Added wxGTK build support<br>
--
--</dd>
--<dt><b>1.2</b> - <i>October 2005</i></dt>
--<dd>
--Corrected error in wxSQLite3Table::FindColumnIndex<br>
--
--</dd>
--<dt><b>1.1</b> - <i>October 2005</i></dt>
--<dd>
--Upgrade to SQLite version 3.2.7 <br>
--
--</dd>
--
--<dt><b>1.0</b> - <i>July 2005</i></dt>
--<dd>
--First public release
--</dd>
--</dl>
--
--\author Ulrich Telle (<a href="&#109;&#97;&#105;&#108;&#116;&#111;:&#117;&#108;&#114;&#105;&#99;&#104;&#46;&#116;&#101;&#108;&#108;&#101;&#64;&#103;&#109;&#120;&#46;&#100;&#101;">ulrich DOT telle AT gmx DOT de</a>)
--
--\section ackn Acknowledgements
--
--The following people have contributed to wxSQLite3:
--
--<ul>
--<li>Francesco Montorsi (enhancement of the build system)</li>
--<li>Neville Dastur (enhancement of the method TableExists)</li>
--<li>Tobias Langner (RAII class for managing transactions)</li>
--</ul>
--
-- */
--
--#ifndef _WX_SQLITE3_DEF_H_
--#define _WX_SQLITE3_DEF_H_
--
--#if defined(WXMAKINGLIB_WXSQLITE3)
--  #define WXDLLIMPEXP_SQLITE3
--#elif defined(WXMAKINGDLL_WXSQLITE3)
--  #define WXDLLIMPEXP_SQLITE3 WXEXPORT
--#elif defined(WXUSINGDLL_WXSQLITE3)
--  #define WXDLLIMPEXP_SQLITE3 WXIMPORT
--#else // not making nor using DLL
--  #define WXDLLIMPEXP_SQLITE3
--#endif
--
--#endif // _WX_SQLITE3_DEF_H_
---- guayadeque.orig/src/wx/wxsqlite3dyn.h
-+++ /dev/null
-@@ -1,170 +0,0 @@
--///////////////////////////////////////////////////////////////////////////////
--// Name:        wxsqlite3dyn.h
--// Purpose:     wxWidgets wrapper around the SQLite3 embedded database library.
--// Author:      Ulrich Telle
--// Modified by:
--// Created:     2005-11-12
--// Copyright:   (c) Ulrich Telle
--// Licence:     wxWindows licence
--///////////////////////////////////////////////////////////////////////////////
--
--/// \file wxsqlite3dyn.h Definition of the SQLite3 API functions
--
--#ifdef DYNFUNC
--
--DYNFUNC(return, void *,                sqlite3_aggregate_context,     (sqlite3_context *p, int nBytes), (p, nBytes));
--#if SQLITE_VERSION_NUMBER <= 3006000
--DYNFUNC(return, int,                   sqlite3_aggregate_count,       (sqlite3_context *p), (p));
--#endif
--DYNFUNC(return, int,                   sqlite3_bind_blob,             (sqlite3_stmt *pStmt, int i, const void *zData, int nData, void (*xDel)(void*)), (pStmt, i, zData, nData, xDel));
--DYNFUNC(return, int,                   sqlite3_bind_double,           (sqlite3_stmt *pStmt, int i, double rValue), (pStmt, i, rValue));
--DYNFUNC(return, int,                   sqlite3_bind_int,              (sqlite3_stmt *pStmt, int i, int iValue), (pStmt, i, iValue));
--DYNFUNC(return, int,                   sqlite3_bind_int64,            (sqlite3_stmt *pStmt, int i, sqlite_int64 iValue), (pStmt, i, iValue));
--DYNFUNC(return, int,                   sqlite3_bind_null,             (sqlite3_stmt *pStmt, int i), (pStmt, i));
--DYNFUNC(return, int,                   sqlite3_bind_parameter_count,  (sqlite3_stmt *pStmt), (pStmt));
--DYNFUNC(return, int,                   sqlite3_bind_parameter_index,  (sqlite3_stmt *pStmt, const char *zName), (pStmt, zName));
--DYNFUNC(return, const char *,          sqlite3_bind_parameter_name,   (sqlite3_stmt *pStmt, int i), (pStmt, i));
--DYNFUNC(return, int,                   sqlite3_bind_text,             (sqlite3_stmt *pStmt, int i, const char *zData, int nData, void (*xDel)(void*)), (pStmt, i, zData, nData, xDel));
--// DYNFUNC(return, int,                   sqlite3_bind_text16,           (sqlite3_stmt *pStmt, int i, const void *zData, int nData, void (*xDel)(void*)), (pStmt, i, zData, nData, xDel));
--// DYNFUNC(return, int,                   sqlite3_bind_value,            (sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue), (pStmt, i, pValue));
--#if SQLITE_VERSION_NUMBER >= 3004000
--DYNFUNC(return, int,                   sqlite3_bind_zeroblob,         (sqlite3_stmt *pStmt, int i, int n), (pStmt, i, n));
--DYNFUNC(return, int,                   sqlite3_blob_open,             (sqlite3 *db, const char *zDb, const char *zTable, const char *zColumn, sqlite3_int64 iRow, int flags, sqlite3_blob **ppBlob), (db, zDb, zTable, zColumn, iRow, flags, ppBlob));
--DYNFUNC(return, int,                   sqlite3_blob_close,            (sqlite3_blob *pBlob), (pBlob));
--DYNFUNC(return, int,                   sqlite3_blob_bytes,            (sqlite3_blob *pBlob), (pBlob));
--DYNFUNC(return, int,                   sqlite3_blob_read,             (sqlite3_blob *pBlob, void *z, int n, int iOffset), (pBlob, z, n, iOffset));
--DYNFUNC(return, int,                   sqlite3_blob_write,            (sqlite3_blob *pBlob, const void *z, int n, int iOffset), (pBlob, z, n, iOffset));
--#endif
--// DYNFUNC(return, int,                   sqlite3_busy_handler,          (sqlite3 *db, int (*xBusy)(void*,int), void *pArg), (db, xBusy, pArg));
--DYNFUNC(return, int,                   sqlite3_busy_timeout,          (sqlite3 *db, int ms), (db, ms));
--DYNFUNC(return, int,                   sqlite3_changes,               (sqlite3 *db), (db));
--DYNFUNC(return, int,                   sqlite3_clear_bindings,        (sqlite3_stmt *pStmt), (pStmt));
--DYNFUNC(return, int,                   sqlite3_close,                 (sqlite3 *db), (db));
--DYNFUNC(return, int,                   sqlite3_collation_needed,      (sqlite3 *db, void *pCollNeededArg, void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)), (db, pCollNeededArg, xCollNeeded));
--// DYNFUNC(return, int,                   sqlite3_collation_needed16,    (sqlite3 *db, void *pCollNeededArg, void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)), (db, pCollNeededArg, xCollNeeded16));
--DYNFUNC(return, const void *,          sqlite3_column_blob,           (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--DYNFUNC(return, int,                   sqlite3_column_bytes,          (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--// DYNFUNC(return, int,                   sqlite3_column_bytes16,        (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--DYNFUNC(return, int,                   sqlite3_column_count,          (sqlite3_stmt *pStmt), (pStmt));
--DYNFUNC(return, const char *,          sqlite3_column_decltype,       (sqlite3_stmt *pStmt, int i), (pStmt, i));
--// DYNFUNC(return, const void *,          sqlite3_column_decltype16,     (sqlite3_stmt *pStmt, int i), (pStmt, i));
--DYNFUNC(return, double,                sqlite3_column_double,         (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--DYNFUNC(return, int,                   sqlite3_column_int,            (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--DYNFUNC(return, sqlite_int64,          sqlite3_column_int64,          (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--DYNFUNC(return, const char *,          sqlite3_column_name,           (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--// DYNFUNC(return, const void *,          sqlite3_column_name16,         (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--DYNFUNC(return, const unsigned char *, sqlite3_column_text,           (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--// DYNFUNC(return, const void *,          sqlite3_column_text16,         (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--DYNFUNC(return, int,                   sqlite3_column_type,           (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--DYNFUNC(return, void *,                sqlite3_commit_hook,           (sqlite3 *db, int (*xCallback)(void*), void *pArg), (db, xCallback, pArg));
--DYNFUNC(return, int,                   sqlite3_complete,              (const char *sql), (sql));
--// DYNFUNC(return, int,                   sqlite3_complete16,            (const void *sql), (sql));
--//DYNFUNC(return, sqlite3 *,             sqlite3_context_db_handle,     (sqlite3_context* ctx) (ctx));
--DYNFUNC(return, int,                   sqlite3_create_collation,      (sqlite3 *db, const char *zName, int eTextRep, void*v, int(*xCompare)(void*,int,const void*,int,const void*)), (db, zName, eTextRep, v, xCompare));
--// DYNFUNC(return, int,                   sqlite3_create_collation16,    (sqlite3 *db, const char *zName, int eTextRep, void*v, int(*xCompare)(void*,int,const void*,int,const void*)), (db, zName, eTextRep, v, xCompare));
--DYNFUNC(return, int,                   sqlite3_create_function,       (sqlite3 *db, const char *zFunctionName, int nArg, int eTextRep, void*v, void (*xFunc)(sqlite3_context*,int,sqlite3_value**), void (*xStep)(sqlite3_context*,int,sqlite3_value**), void (*xFinal)(sqlite3_context*)), (db, zFunctionName, nArg, eTextRep, v, xFunc, xStep, xFinal));
--// DYNFUNC(return, int,                   sqlite3_create_function16,     (sqlite3 *db, const void *zFunctionName, int nArg, int eTextRep, void*v, void (*xFunc)(sqlite3_context*,int,sqlite3_value**), void (*xStep)(sqlite3_context*,int,sqlite3_value**), void (*xFinal)(sqlite3_context*)), (db, zFunctionName, nArg, eTextRep, v, xFunc, xStep, xFinal));
--// DYNFUNC(return, int,                   sqlite3_data_count,            (sqlite3_stmt *pStmt), (pStmt));
--// DYNFUNC(return, sqlite3 *,             sqlite3_db_handle,             (sqlite3_stmt *pStmt), (pStmt));
--DYNFUNC(return, int,                   sqlite3_enable_load_extension, (sqlite3 *db, int onoff), (db, onoff));
--DYNFUNC(return, int,                   sqlite3_enable_shared_cache,   (int enable), (enable));
--// DYNFUNC(return, int,                   sqlite3_errcode,               (sqlite3 *db), (db));
--DYNFUNC(return, const char *,          sqlite3_errmsg,                (sqlite3 *db), (db));
--// DYNFUNC(return, const void *,          sqlite3_errmsg16,              (sqlite3 *db), (db));
--DYNFUNC(return, int,                   sqlite3_exec,                  (sqlite3 *db, const char *sql, sqlite3_callback c, void *v, char **errmsg), (db, sql, c, v, errmsg));
--// DYNFUNC(return, int,                   sqlite3_expired,               (sqlite3_stmt *pStmt), (pStmt));
--DYNFUNC(return, int,                   sqlite3_extended_result_codes, (sqlite3 *db, int onoff), (db, onoff));
--DYNFUNC(return, int,                   sqlite3_finalize,              (sqlite3_stmt *pStmt), (pStmt));
--DYNFUNC(;, void,                       sqlite3_free,                  (char *z), (z));
--DYNFUNC(;, void,                       sqlite3_free_table,            (char **result), (result));
--DYNFUNC(return, int,                   sqlite3_get_autocommit,        (sqlite3 *db), (db));
--// DYNFUNC(return, void *,                sqlite3_get_auxdata,           (sqlite3_context *pCtx, int iArg), (pCtx, iArg));
--DYNFUNC(return, int,                   sqlite3_get_table,             (sqlite3 *db, const char *sql, char ***resultp, int *nrow, int *ncolumn, char **errmsg), (db, sql, resultp, nrow, ncolumn, errmsg));
--// DYNFUNC(return, int,                   sqlite3_global_recover,        (), ());
--#if SQLITE_VERSION_NUMBER >= 3006000
--DYNFUNC(return, int,                   sqlite3_initialize,            (void), ());
--#endif
--DYNFUNC(;, void,                       sqlite3_interrupt,             (sqlite3 *db), (db));
--DYNFUNC(return, sqlite_int64,          sqlite3_last_insert_rowid,     (sqlite3 *db), (db));
--DYNFUNC(return, const char *,          sqlite3_libversion,            (void), ());
--// DYNFUNC(return, int,                   sqlite3_libversion_number,     (void), ());
--DYNFUNC(return, int,                   sqlite3_limit,                 (sqlite3 *db, int id, int newVal), (db, id, newVal));
--DYNFUNC(return, int,                   sqlite3_load_extension,        (sqlite3 *db, const char *zFile, const char *zProc, char **pzErrMsg), (db, zFile, zProc, pzErrMsg));
--// DYNFUNC(return, char *,                sqlite3_mprintf,               (const char *zFormat,...), (zFormat,...));
--#if SQLITE_VERSION_NUMBER >= 3006000
--DYNFUNC(return, sqlite3_stmt *,        sqlite3_next_stmt,             (sqlite3 *pDb, sqlite3_stmt *pStmt), (pDb, pStmt));
--#endif
--DYNFUNC(return, int,                   sqlite3_open,                  (const char *filename, sqlite3 **ppDb), (filename, ppDb));
--// DYNFUNC(return, int,                   sqlite3_open16,                (const void *filename, sqlite3 **ppDb), (filename, ppDb));
--DYNFUNC(return, int,                   sqlite3_open_v2,               (const char *filename, sqlite3 **ppDb, int flags, const char *zVfs), (filename, ppDb, flags, zVfs));
--DYNFUNC(return, int,                   sqlite3_prepare_v2,            (sqlite3 *db, const char *zSql, int nBytes, sqlite3_stmt **ppStmt, const char **pzTail), (db, zSql, nBytes, ppStmt, pzTail));
--// DYNFUNC(return, int,                   sqlite3_prepare16_v2,          (sqlite3 *db, const void *zSql, int nBytes, sqlite3_stmt **ppStmt, const void **pzTail), (db, zSql, nBytes, ppStmt, pzTail));
--// DYNFUNC(;, void,                       sqlite3_progress_handler,      (sqlite3 *db, int nOps, int (*xProgress)(void*), void *pArg), (db, nOps, xProgress, pArg));
--DYNFUNC(;, void,                       sqlite3_randomness,            (int N, void *P) (N, P));
--DYNFUNC(return, int,                   sqlite3_reset,                 (sqlite3_stmt *pStmt), (pStmt));
--DYNFUNC(;, void,                       sqlite3_result_blob,           (sqlite3_context *pCtx, const void *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
--DYNFUNC(;, void,                       sqlite3_result_double,         (sqlite3_context *pCtx, double rVal), (pCtx, rVal));
--DYNFUNC(;, void,                       sqlite3_result_error,          (sqlite3_context *pCtx, const char *z, int n), (pCtx, z, n));
--// DYNFUNC(;, void,                       sqlite3_result_error16,        (sqlite3_context *pCtx, const void *z, int n), (pCtx, z, n));
--DYNFUNC(;, void,                       sqlite3_result_int,            (sqlite3_context *pCtx, int iVal), (pCtx, iVal));
--DYNFUNC(;, void,                       sqlite3_result_int64,          (sqlite3_context *pCtx, sqlite_int64 iVal), (pCtx, iVal));
--DYNFUNC(;, void,                       sqlite3_result_null,           (sqlite3_context *pCtx), (pCtx));
--DYNFUNC(;, void,                       sqlite3_result_text,           (sqlite3_context *pCtx, const char *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
--// DYNFUNC(;, void,                       sqlite3_result_text16,         (sqlite3_context *pCtx, const void *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
--// DYNFUNC(;, void,                       sqlite3_result_text16be,       (sqlite3_context *pCtx, const void *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
--// DYNFUNC(;, void,                       sqlite3_result_text16le,       (sqlite3_context *pCtx, const void *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
--DYNFUNC(;, void,                       sqlite3_result_value,          (sqlite3_context *pCtx, sqlite3_value *pValue), (pCtx, pValue));
--#if SQLITE_VERSION_NUMBER >= 3004000
--DYNFUNC(;, void,                       sqlite3_result_zeroblob,       (sqlite3_context *pCtx, int n), (pCtx, n));
--#endif
--DYNFUNC(return, void *,                sqlite3_rollback_hook,         (sqlite3 *db, void (*xCallback)(void*), void *pArg), (db, xCallback, pArg));
--DYNFUNC(return, int,                   sqlite3_set_authorizer,        (sqlite3 *db, int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), void *pArg), (db, xAuth, pArg));
--// DYNFUNC(;, void,                       sqlite3_set_auxdata,           (sqlite3_context *pCtx, int iArg, void *pAux, void (*xDelete)(void*)), (pCtx, iArg, pAux, xDelete));
--#if SQLITE_VERSION_NUMBER >= 3006000
--DYNFUNC(return, int,                   sqlite3_shutdown,              (void), ());
--#endif
--// DYNFUNC(return, char *,                sqlite3_snprintf,              (int n, char *zBuf, const char *zFormat, ...), (n, zBuf, zFormat, ...));
--#if SQLITE_VERSION_NUMBER >= 3005003
--DYNFUNC(return, const char *,          sqlite3_sql,                   (sqlite3_stmt *pStmt), (pStmt));
--#endif
--DYNFUNC(return, int,                   sqlite3_step,                  (sqlite3_stmt *pStmt), (pStmt));
--DYNFUNC(return, int,                   sqlite3_threadsafe,            (void), ());
--// DYNFUNC(return, int,                   sqlite3_total_changes,         (sqlite3 *db), (db));
--// DYNFUNC(return, void *,                sqlite3_trace,                 (sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg), (db, xTrace, pArg));
--// DYNFUNC(return, int,                   sqlite3_transfer_bindings,     (sqlite3_stmt *pStmt, sqlite3_stmt *pStmt), (pStmt, pStmt));
--DYNFUNC(return, void *,                sqlite3_update_hook,           (sqlite3 *db, void (*xCallback)(void *, int, char const *, char const *, wxsqlite_int64), void *pArg), (db, xCallback, pArg));
--DYNFUNC(return, void *,                sqlite3_user_data,             (sqlite3_context *pCtx), (pCtx));
--DYNFUNC(return, const void *,          sqlite3_value_blob,            (sqlite3_value *pVal), (pVal));
--DYNFUNC(return, int,                   sqlite3_value_bytes,           (sqlite3_value *pVal), (pVal));
--// DYNFUNC(return, int,                   sqlite3_value_bytes16,         (sqlite3_value *pVal), (pVal));
--DYNFUNC(return, double,                sqlite3_value_double,          (sqlite3_value *pVal), (pVal));
--DYNFUNC(return, int,                   sqlite3_value_int,             (sqlite3_value *pVal), (pVal));
--DYNFUNC(return, sqlite_int64,          sqlite3_value_int64,           (sqlite3_value *pVal), (pVal));
--DYNFUNC(return, const unsigned char *, sqlite3_value_text,            (sqlite3_value *pVal), (pVal));
--// DYNFUNC(return, const void *,          sqlite3_value_text16,          (sqlite3_value *pVal), (pVal));
--// DYNFUNC(return, const void *,          sqlite3_value_text16be,        (sqlite3_value *pVal), (pVal));
--// DYNFUNC(return, const void *,          sqlite3_value_text16le,        (sqlite3_value *pVal), (pVal));
--DYNFUNC(return, int,                   sqlite3_value_type,            (sqlite3_value *pVal), (pVal));
--DYNFUNC(return, char *,                sqlite3_vmprintf,              (const char* p, va_list ap), (p, ap));
--
--#if WXSQLITE3_HAVE_METADATA
--DYNFUNC(return, const char *,          sqlite3_column_database_name,  (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--// DYNFUNC(return, const void *,          sqlite3_column_database_name16, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--DYNFUNC(return, const char *,          sqlite3_column_table_name,     (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--// DYNFUNC(return, const void *,          sqlite3_column_table_name16,   (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--DYNFUNC(return, const char *,          sqlite3_column_origin_name,    (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--// DYNFUNC(return, const void *,          sqlite3_column_origin_name16,  (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
--DYNFUNC(return, int,                   sqlite3_table_column_metadata, (sqlite3 *db, const char *zDbName, const char *zTableName, const char *zColumnName, char const **pzDataType, char const **pzCollSeq, int *pNotNull, int *pPrimaryKey, int *pAutoinc), (db, zDbName, zTableName, zColumnName, pzDataType, pzCollSeq, pNotNull, pPrimaryKey, pAutoinc));
--#endif
--
--// SQLcrypt API
--// Additional error codes: SQLCRYPT3_TOOSHORT, SQLCRYPT3_TOOLONG, SQLCRYPT3_BADLIC
--// DYNFUNC(return, int,                  sqlcrypt3_passphrase,           (sqlite3 *db, const char *key, int codec, char **errmsg), (db, key, codec, errmsg));
--// DYNFUNC(return, int,                  sqlcrypt3_license_key,          (const char *lic), (lic));
--
--// SQLite-Crypt API
--// ATTN: different open call
--// DYNFUNC(return, int,                   sqlite3_open,                  (const char *filename, const char *strPass, sqlite3 **ppDb), (filename, strPass, ppDb));
--// DYNFUNC(;, void,                       sqlite3_changepassword,        (sqlite3* db,const char* strNewPass), (db, strNewPass));
--
--#endif
---- guayadeque.orig/src/wx/wxsqlite3opt.h
-+++ /dev/null
-@@ -1,44 +0,0 @@
--///////////////////////////////////////////////////////////////////////////////
--// Name:        wxsqlite3opt.h
--// Purpose:     wxSQLite3 optional feature selection
--// Author:      Ulrich Telle
--// Modified by:
--// Created:     2007-02-01
--//                            
--// Copyright:   (c) Ulrich Telle
--// Licence:     wxWindows licence
--///////////////////////////////////////////////////////////////////////////////
--
--/// \file wxsqlite3opt.h Compile time switches for the wxSQLite3 class
--
--#ifndef _WX_SQLITE3_OPT_H_
--#define _WX_SQLITE3_OPT_H_
--
--// Conditional compilation
--// -----------------------
--
--//! If this define is set to 1, then the SQLite library will be loaded dynamically
--//! otherwise a link library is required to build wxSQLite3.
--#ifndef wxUSE_DYNAMIC_SQLITE3_LOAD
--#define wxUSE_DYNAMIC_SQLITE3_LOAD   0
--#endif
--
--//! To enable SQLite's meta data methods define WXSQLITE3_HAVE_METADATA as 1 here.
--//! Attention: SQLite needs to be compiled with SQLITE_ENABLE_COLUMN_METADATA for this to work
--#ifndef WXSQLITE3_HAVE_METADATA
--#define WXSQLITE3_HAVE_METADATA 0
--#endif
--
--//! To enable SQLite's database encryption support define WXSQLITE3_HAVE_CODEC as 1 here.
--//! Attention: SQLite needs to be compiled with SQLITE_HAS_CODEC for this to work
--#ifndef WXSQLITE3_HAVE_CODEC
--#define WXSQLITE3_HAVE_CODEC 0
--#endif
--
--//! To enable SQLite's loadable extension feature define WXSQLITE3_HAVE_LOAD_EXTENSION as 1 here.
--//! Attention: SQLite needs to be compiled without SQLITE_OMIT_LOAD_EXTENSION for this to work
--#ifndef WXSQLITE3_HAVE_LOAD_EXTENSION
--#define WXSQLITE3_HAVE_LOAD_EXTENSION 0
--#endif
--
--#endif // _WX_SQLITE3_OPT_H_
---- guayadeque.orig/src/wxsqlite3/wxsqlite3.cpp
-+++ /dev/null
-@@ -1,3128 +0,0 @@
--///////////////////////////////////////////////////////////////////////////////
--// Name:        wxsqlite3.cpp
--// Purpose:     Implementation of wxSQLite3 classes
--// Author:      Ulrich Telle
--// Modified by:
--// Created:     2005-07-06
--// Copyright:   (c) Ulrich Telle
--// Licence:     wxWindows licence
--///////////////////////////////////////////////////////////////////////////////
--
--/// \file wxsqlite3.cpp Implementation of the wxSQLite3 class
--
--#if defined(__GNUG__) && !defined(__APPLE__)
--#pragma implementation "wxsqlite3.h"
--#endif
--
--// For compilers that support precompilation, includes "wx/wx.h".
--#include "wx/wxprec.h"
--
--#ifdef __BORLANDC__
--#pragma hdrstop
--#endif
--
--#ifndef WX_PRECOMP
--#include "wx/wx.h"
--#endif
--
--#include "wx/wxsqlite3.h"
--#include "wx/wxsqlite3opt.h"
--
--// Suppress some Visual C++ warnings regarding the default constructor
--// for a C struct used only in SQLite modules
--#ifdef __VISUALC__
--#pragma warning (disable:4510)
--#pragma warning (disable:4610)
--#endif
--
--#include "sqlite3.h"
--
--// Dynamic loading of the SQLite library
--
--#if wxUSE_DYNAMIC_SQLITE3_LOAD
--
--#include "wx/dynlib.h"
--
--#define DYNFUNC(rcode, rtype, fname, farg, farguse) \
--  typedef rtype (*p##fname) farg ; \
--  static p##fname s_##fname = NULL;
--#include "wx/wxsqlite3dyn.h"
--#undef DYNFUNC
--
--static wxDynamicLibrary s_dll;
--
--static void InitSQLite3DLL()
--{
--  if (s_dll.IsLoaded())
--  {
--    return;
--  }
--
--#ifdef __WIN32__
--  if (! s_dll.Load(wxT("sqlite3")))
--#else
--  if (! s_dll.Load(wxT("libsqlite3")))
--#endif
--  {
--    throw wxSQLite3Exception(-1, wxT("error loading dynamic library"));
--  }
--
--#define DYNFUNC(rcode, rtype, fname, farg, farguse) \
--  s_##fname = (p##fname) s_dll.GetSymbol(wxT(#fname));\
--  if (! s_##fname)\
--  {\
--    s_dll.Unload();\
--    throw wxSQLite3Exception(-1, wxT("error getting symbol <") wxT(#fname) wxT(">"));\
--  }
--#include "wx/wxsqlite3dyn.h"
--#undef DYNFUNC
--
--};
--
--#define DYNFUNC(rcode, rtype, fname, farg, farguse) \
--  rtype fname farg \
--  {\
--    InitSQLite3DLL();\
--    rcode s_##fname farguse;\
--  };
--#include "wx/wxsqlite3dyn.h"
--#undef DYNFUNC
--
--#endif // wxUSE_DYNAMIC_SQLITE3_LOAD
--
--// Error messages
--
--const wxChar* wxERRMSG_NODB          = wxTRANSLATE("No Database opened");
--const wxChar* wxERRMSG_NOSTMT        = wxTRANSLATE("Statement not accessible");
--const wxChar* wxERRMSG_NOMEM         = wxTRANSLATE("Out of memory");
--const wxChar* wxERRMSG_DECODE        = wxTRANSLATE("Cannot decode binary");
--const wxChar* wxERRMSG_INVALID_INDEX = wxTRANSLATE("Invalid field index");
--const wxChar* wxERRMSG_INVALID_NAME  = wxTRANSLATE("Invalid field name");
--const wxChar* wxERRMSG_INVALID_ROW   = wxTRANSLATE("Invalid row index");
--const wxChar* wxERRMSG_INVALID_QUERY = wxTRANSLATE("Invalid scalar query");
--const wxChar* wxERRMSG_INVALID_BLOB  = wxTRANSLATE("Invalid BLOB handle");
--
--const wxChar* wxERRMSG_NORESULT      = wxTRANSLATE("Null Results pointer");
--const wxChar* wxERRMSG_BIND_STR      = wxTRANSLATE("Error binding string param");
--const wxChar* wxERRMSG_BIND_INT      = wxTRANSLATE("Error binding int param");
--const wxChar* wxERRMSG_BIND_INT64    = wxTRANSLATE("Error binding int64 param");
--const wxChar* wxERRMSG_BIND_DBL      = wxTRANSLATE("Error binding double param");
--const wxChar* wxERRMSG_BIND_BLOB     = wxTRANSLATE("Error binding blob param");
--const wxChar* wxERRMSG_BIND_DATETIME = wxTRANSLATE("Error binding date/time param");
--const wxChar* wxERRMSG_BIND_NULL     = wxTRANSLATE("Error binding NULL param");
--const wxChar* wxERRMSG_BIND_ZEROBLOB = wxTRANSLATE("Error binding zero blob param");
--const wxChar* wxERRMSG_BIND_CLEAR    = wxTRANSLATE("Error clearing bindings");
--
--const wxChar* wxERRMSG_NOMETADATA    = wxTRANSLATE("Meta data support not available");
--const wxChar* wxERRMSG_NOCODEC       = wxTRANSLATE("Encryption support not available");
--const wxChar* wxERRMSG_NOLOADEXT     = wxTRANSLATE("Loadable extension support not available");
--const wxChar* wxERRMSG_NOINCBLOB     = wxTRANSLATE("Incremental BLOB support not available");
--const wxChar* wxERRMSG_NOSAVEPOINT   = wxTRANSLATE("Savepoint support not available");
--
--const wxChar* wxERRMSG_SHARED_CACHE  = wxTRANSLATE("Setting SQLite shared cache mode failed");
--
--const wxChar* wxERRMSG_INITIALIZE    = wxTRANSLATE("Initialization of SQLite failed");
--const wxChar* wxERRMSG_SHUTDOWN      = wxTRANSLATE("Shutdown of SQLite failed");
--
--// ----------------------------------------------------------------------------
--// inline conversion from UTF8 strings to wxStringe
--// ----------------------------------------------------------------------------
--
--inline wxString UTF8toWxString(const char* localValue)
--{
--#if wxUSE_UNICODE
--  return wxString(localValue, wxConvUTF8);
--#else
--  return wxString(wxConvUTF8.cMB2WC(localValue), *wxConvCurrent);
--#endif
--}
--
--// ----------------------------------------------------------------------------
--// inline conversion from wxString to wxLongLong
--// ----------------------------------------------------------------------------
--
--inline wxLongLong ConvertStringToLongLong(const wxString& str, wxLongLong defValue /*=0*/)
--{
--  size_t n = str.Length();
--  size_t j = 0;
--  wxLongLong value = 0;
--  bool negative = false;
--
--  if (str[j] == '-')
--  {
--    negative = true;
--    j++;
--  }
--
--  while (j < n)
--  {
--    if (str[j] < '0' || str[j] > '9')
--    {
--      return defValue;
--    }
--    value *= 10;
--    value += (str[j] - '0');
--    j++;
--  }
--
--  return negative ? -value : value;
--}
--
--// ----------------------------------------------------------------------------
--// wxSQLite3Exception: class
--// ----------------------------------------------------------------------------
--
--wxSQLite3Exception::wxSQLite3Exception(int errorCode, const wxString& errorMsg)
--  : m_errorCode(errorCode)
--{
--  m_errorMessage = ErrorCodeAsString(errorCode) + _T("[") +
--                   wxString::Format(_T("%d"), errorCode) + _T("]: ") +
--                   wxGetTranslation(errorMsg);
--}
--
--wxSQLite3Exception::wxSQLite3Exception(const wxSQLite3Exception&  e)
--  : m_errorCode(e.m_errorCode), m_errorMessage(e.m_errorMessage)
--{
--}
--
--const wxString wxSQLite3Exception::ErrorCodeAsString(int errorCode)
--{
--  switch (errorCode)
--  {
--    case SQLITE_OK          : return _T("SQLITE_OK");
--    case SQLITE_ERROR       : return _T("SQLITE_ERROR");
--    case SQLITE_INTERNAL    : return _T("SQLITE_INTERNAL");
--    case SQLITE_PERM        : return _T("SQLITE_PERM");
--    case SQLITE_ABORT       : return _T("SQLITE_ABORT");
--    case SQLITE_BUSY        : return _T("SQLITE_BUSY");
--    case SQLITE_LOCKED      : return _T("SQLITE_LOCKED");
--    case SQLITE_NOMEM       : return _T("SQLITE_NOMEM");
--    case SQLITE_READONLY    : return _T("SQLITE_READONLY");
--    case SQLITE_INTERRUPT   : return _T("SQLITE_INTERRUPT");
--    case SQLITE_IOERR       : return _T("SQLITE_IOERR");
--    case SQLITE_CORRUPT     : return _T("SQLITE_CORRUPT");
--    case SQLITE_NOTFOUND    : return _T("SQLITE_NOTFOUND");
--    case SQLITE_FULL        : return _T("SQLITE_FULL");
--    case SQLITE_CANTOPEN    : return _T("SQLITE_CANTOPEN");
--    case SQLITE_PROTOCOL    : return _T("SQLITE_PROTOCOL");
--    case SQLITE_EMPTY       : return _T("SQLITE_EMPTY");
--    case SQLITE_SCHEMA      : return _T("SQLITE_SCHEMA");
--    case SQLITE_TOOBIG      : return _T("SQLITE_TOOBIG");
--    case SQLITE_CONSTRAINT  : return _T("SQLITE_CONSTRAINT");
--    case SQLITE_MISMATCH    : return _T("SQLITE_MISMATCH");
--    case SQLITE_MISUSE      : return _T("SQLITE_MISUSE");
--    case SQLITE_NOLFS       : return _T("SQLITE_NOLFS");
--    case SQLITE_AUTH        : return _T("SQLITE_AUTH");
--    case SQLITE_FORMAT      : return _T("SQLITE_FORMAT");
--    case SQLITE_RANGE       : return _T("SQLITE_RANGE");
--    case SQLITE_NOTADB      : return _T("SQLITE_NOTADB");
--    case SQLITE_ROW         : return _T("SQLITE_ROW");
--    case SQLITE_DONE        : return _T("SQLITE_DONE");
--    // Extended error codes
--    case SQLITE_IOERR_READ       : return _T("SQLITE_IOERR_READ");
--    case SQLITE_IOERR_SHORT_READ : return _T("SQLITE_IOERR_SHORT_READ");
--    case SQLITE_IOERR_WRITE      : return _T("SQLITE_IOERR_WRITE");
--    case SQLITE_IOERR_FSYNC      : return _T("SQLITE_IOERR_FSYNC");
--    case SQLITE_IOERR_DIR_FSYNC  : return _T("SQLITE_IOERR_DIR_FSYNC");
--    case SQLITE_IOERR_TRUNCATE   : return _T("SQLITE_IOERR_TRUNCATE");
--    case SQLITE_IOERR_FSTAT      : return _T("SQLITE_IOERR_FSTAT");
--    case SQLITE_IOERR_UNLOCK     : return _T("SQLITE_IOERR_UNLOCK");
--    case SQLITE_IOERR_RDLOCK     : return _T("SQLITE_IOERR_RDLOCK");
--    case SQLITE_IOERR_DELETE     : return _T("SQLITE_IOERR_DELETE");
--#if SQLITE_VERSION_NUMBER >= 3004000
--    case SQLITE_IOERR_BLOCKED    : return _T("SQLITE_IOERR_BLOCKED");
--#endif
--#if SQLITE_VERSION_NUMBER >= 3005001
--    case SQLITE_IOERR_NOMEM      : return _T("SQLITE_IOERR_NOMEM");
--#endif
--#if SQLITE_VERSION_NUMBER >= 3006000
--    case SQLITE_IOERR_ACCESS     : return _T("SQLITE_IOERR_ACCESS");
--    case SQLITE_IOERR_CHECKRESERVEDLOCK : return _T("SQLITE_IOERR_CHECKRESERVEDLOCK");
--#endif
--#if SQLITE_VERSION_NUMBER >= 3006002
--    case SQLITE_IOERR_LOCK     : return _T("SQLITE_IOERR_LOCK");
--#endif
--
--    case WXSQLITE_ERROR     : return _T("WXSQLITE_ERROR");
--    default                 : return _T("UNKNOWN_ERROR");
--  }
--}
--
--wxSQLite3Exception::~wxSQLite3Exception()
--{
--}
--
--// ----------------------------------------------------------------------------
--// wxSQLite3StatementBuffer: class providing a statement buffer
--//                           for use with the SQLite3 vmprintf function
--// ----------------------------------------------------------------------------
--
--wxSQLite3StatementBuffer::wxSQLite3StatementBuffer()
--{
--  m_buffer = 0;
--}
--
--wxSQLite3StatementBuffer::~wxSQLite3StatementBuffer()
--{
--  Clear();
--}
--
--void wxSQLite3StatementBuffer::Clear()
--{
--  if (m_buffer)
--  {
--    sqlite3_free(m_buffer);
--    m_buffer = 0;
--  }
--
--}
--
--const char* wxSQLite3StatementBuffer::Format(const char* format, ...)
--{
--  Clear();
--  va_list va;
--  va_start(va, format);
--  m_buffer = sqlite3_vmprintf(format, va);
--  va_end(va);
--  return m_buffer;
--}
--
--// ----------------------------------------------------------------------------
--// wxSQLite3ResultSet: class providing access to the result set of a query
--// ----------------------------------------------------------------------------
--
--wxSQLite3ResultSet::wxSQLite3ResultSet()
--{
--  m_stmt = 0;
--  m_eof = true;
--  m_first = true;
--  m_cols = 0;
--  m_ownStmt = false;
--}
--
--wxSQLite3ResultSet::wxSQLite3ResultSet(const wxSQLite3ResultSet& resultSet)
--{
--  m_stmt = resultSet.m_stmt;
--  // Only one object can own the statement
--  const_cast<wxSQLite3ResultSet&>(resultSet).m_stmt = 0;
--  m_eof = resultSet.m_eof;
--  m_first = resultSet.m_first;
--  m_cols = resultSet.m_cols;
--  m_ownStmt = resultSet.m_ownStmt;
--}
--
--wxSQLite3ResultSet::wxSQLite3ResultSet(void* db,
--                                       void* stmt,
--                                       bool eof,
--                                       bool first,
--                                       bool ownStmt /*=true*/)
--{
--  m_db = db;
--  m_stmt = stmt;
--  m_eof = eof;
--  m_first = first;
--  m_cols = sqlite3_column_count((sqlite3_stmt*) m_stmt);
--  m_ownStmt = ownStmt;
--}
--
--wxSQLite3ResultSet::~wxSQLite3ResultSet()
--{
--  try
--  {
--    Finalize();
--  }
--  catch (...)
--  {
--  }
--}
--
--wxSQLite3ResultSet& wxSQLite3ResultSet::operator=(const wxSQLite3ResultSet& resultSet)
--{
--  try
--  {
--    Finalize();
--  }
--  catch (...)
--  {
--  }
--  m_stmt = resultSet.m_stmt;
--  // Only one object can own the statement
--  const_cast<wxSQLite3ResultSet&>(resultSet).m_stmt = 0;
--  m_eof = resultSet.m_eof;
--  m_first = resultSet.m_first;
--  m_cols = resultSet.m_cols;
--  m_ownStmt = resultSet.m_ownStmt;
--  return *this;
--}
--
--int wxSQLite3ResultSet::GetColumnCount()
--{
--  CheckStmt();
--  return m_cols;
--}
--
--wxString wxSQLite3ResultSet::GetAsString(int columnIndex)
--{
--  CheckStmt();
--
--  if (columnIndex < 0 || columnIndex > m_cols-1)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
--  }
--
--  const char* localValue = (const char*) sqlite3_column_text((sqlite3_stmt*) m_stmt, columnIndex);
--  return UTF8toWxString(localValue);
--}
--
--wxString wxSQLite3ResultSet::GetAsString(const wxString& columnName)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  const char* localValue = (const char*) sqlite3_column_text((sqlite3_stmt*) m_stmt, columnIndex);
--  return UTF8toWxString(localValue);
--}
--
--int wxSQLite3ResultSet::GetInt(int columnIndex, int nullValue /* = 0 */)
--{
--  if (GetColumnType(columnIndex) == SQLITE_NULL)
--  {
--    return nullValue;
--  }
--  else
--  {
--    return sqlite3_column_int((sqlite3_stmt*) m_stmt, columnIndex);
--  }
--}
--
--
--int wxSQLite3ResultSet::GetInt(const wxString& columnName, int nullValue /* = 0 */)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetInt(columnIndex, nullValue);
--}
--
--wxLongLong wxSQLite3ResultSet::GetInt64(int columnIndex, wxLongLong nullValue /* = 0 */)
--{
--  if (GetColumnType(columnIndex) == SQLITE_NULL)
--  {
--    return nullValue;
--  }
--  else
--  {
--    return wxLongLong(sqlite3_column_int64((sqlite3_stmt*) m_stmt, columnIndex));
--  }
--}
--
--wxLongLong wxSQLite3ResultSet::GetInt64(const wxString& columnName, wxLongLong nullValue /* = 0 */)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetInt64(columnIndex, nullValue);
--}
--
--double wxSQLite3ResultSet::GetDouble(int columnIndex, double nullValue /* = 0.0 */)
--{
--  if (GetColumnType(columnIndex) == SQLITE_NULL)
--  {
--    return nullValue;
--  }
--  else
--  {
--    return sqlite3_column_double((sqlite3_stmt*) m_stmt, columnIndex);
--  }
--}
--
--double wxSQLite3ResultSet::GetDouble(const wxString& columnName, double nullValue /* = 0.0 */)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetDouble(columnIndex, nullValue);
--}
--
--wxString wxSQLite3ResultSet::GetString(int columnIndex, const wxString& nullValue /* = wxEmptyString */)
--{
--  if (GetColumnType(columnIndex) == SQLITE_NULL)
--  {
--    return nullValue;
--  }
--  else
--  {
--    const char* localValue = (const char*) sqlite3_column_text((sqlite3_stmt*) m_stmt, columnIndex);
--    return UTF8toWxString(localValue);
--  }
--}
--
--wxString wxSQLite3ResultSet::GetString(const wxString& columnName, const wxString& nullValue /* = wxEmptyString */)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetString(columnIndex, nullValue);
--}
--
--const unsigned char* wxSQLite3ResultSet::GetBlob(int columnIndex, int& len)
--{
--  CheckStmt();
--
--  if (columnIndex < 0 || columnIndex > m_cols-1)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
--  }
--
--  len = sqlite3_column_bytes((sqlite3_stmt*) m_stmt, columnIndex);
--  return (const unsigned char*) sqlite3_column_blob((sqlite3_stmt*) m_stmt, columnIndex);
--}
--
--const unsigned char* wxSQLite3ResultSet::GetBlob(const wxString& columnName, int& len)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetBlob(columnIndex, len);
--}
--
--wxMemoryBuffer& wxSQLite3ResultSet::GetBlob(int columnIndex, wxMemoryBuffer& buffer)
--{
--  CheckStmt();
--
--  if (columnIndex < 0 || columnIndex > m_cols-1)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
--  }
--
--  int len = sqlite3_column_bytes((sqlite3_stmt*) m_stmt, columnIndex);
--  const void* blob = sqlite3_column_blob((sqlite3_stmt*) m_stmt, columnIndex);
--  buffer.AppendData((void*) blob, (size_t) len);
--  return buffer;
--}
--
--wxMemoryBuffer& wxSQLite3ResultSet::GetBlob(const wxString& columnName, wxMemoryBuffer& buffer)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetBlob(columnIndex, buffer);
--}
--
--wxDateTime wxSQLite3ResultSet::GetDate(int columnIndex)
--{
--  if (GetColumnType(columnIndex) == SQLITE_NULL)
--  {
--    return wxInvalidDateTime;
--  }
--  else
--  {
--    wxDateTime date;
--    if (date.ParseDate(GetString(columnIndex)) != NULL)
--    {
--      return date;
--    }
--    else
--    {
--      return wxInvalidDateTime;
--    }
--  }
--}
--
--wxDateTime wxSQLite3ResultSet::GetDate(const wxString& columnName)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetDate(columnIndex);
--}
--
--
--wxDateTime wxSQLite3ResultSet::GetTime(int columnIndex)
--{
--  if (GetColumnType(columnIndex) == SQLITE_NULL)
--  {
--    return wxInvalidDateTime;
--  }
--  else
--  {
--    wxDateTime date;
--    if (date.ParseTime(GetString(columnIndex)) != NULL)
--    {
--      return date;
--    }
--    else
--    {
--      return wxInvalidDateTime;
--    }
--  }
--}
--
--wxDateTime wxSQLite3ResultSet::GetTime(const wxString& columnName)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetTime(columnIndex);
--}
--
--wxDateTime wxSQLite3ResultSet::GetDateTime(int columnIndex)
--{
--  if (GetColumnType(columnIndex) == SQLITE_NULL)
--  {
--    return wxInvalidDateTime;
--  }
--  else
--  {
--    wxDateTime date;
--    if (date.ParseDateTime(GetString(columnIndex)) != NULL)
--    {
--      date.SetMillisecond(0);
--      return date;
--    }
--    else
--    {
--      return wxInvalidDateTime;
--    }
--  }
--}
--
--wxDateTime wxSQLite3ResultSet::GetDateTime(const wxString& columnName)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetDateTime(columnIndex);
--}
--
--wxDateTime wxSQLite3ResultSet::GetTimestamp(int columnIndex)
--{
--  if (GetColumnType(columnIndex) == SQLITE_NULL)
--  {
--    return wxInvalidDateTime;
--  }
--  else
--  {
--    wxDateTime date;
--    if (date.ParseDateTime(GetString(columnIndex)) != NULL)
--    {
--      return date;
--    }
--    else
--    {
--      return wxInvalidDateTime;
--    }
--  }
--}
--
--wxDateTime wxSQLite3ResultSet::GetTimestamp(const wxString& columnName)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetTimestamp(columnIndex);
--}
--
--wxDateTime wxSQLite3ResultSet::GetNumericDateTime(int columnIndex)
--{
--  if (GetColumnType(columnIndex) == SQLITE_NULL)
--  {
--    return wxInvalidDateTime;
--  }
--  else
--  {
--    wxLongLong value = GetInt64(columnIndex);
--    return wxDateTime(value);
--  }
--}
--
--wxDateTime wxSQLite3ResultSet::GetNumericDateTime(const wxString& columnName)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetNumericDateTime(columnIndex);
--}
--
--wxDateTime wxSQLite3ResultSet::GetJulianDayNumber(int columnIndex)
--{
--  if (GetColumnType(columnIndex) == SQLITE_NULL)
--  {
--    return wxInvalidDateTime;
--  }
--  else
--  {
--    double value = GetDouble(columnIndex);
--    return wxDateTime(value);
--  }
--}
--
--wxDateTime wxSQLite3ResultSet::GetJulianDayNumber(const wxString& columnName)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetJulianDayNumber(columnIndex);
--}
--
--bool wxSQLite3ResultSet::GetBool(int columnIndex)
--{
--  return GetInt(columnIndex) != 0;
--}
--
--bool wxSQLite3ResultSet::GetBool(const wxString& columnName)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetBool(columnIndex);
--}
--
--bool wxSQLite3ResultSet::IsNull(int columnIndex)
--{
--  return (GetColumnType(columnIndex) == SQLITE_NULL);
--}
--
--bool wxSQLite3ResultSet::IsNull(const wxString& columnName)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return (GetColumnType(columnIndex) == SQLITE_NULL);
--}
--
--int wxSQLite3ResultSet::FindColumnIndex(const wxString& columnName)
--{
--  CheckStmt();
--
--  wxCharBuffer strColumnName = wxConvUTF8.cWC2MB(columnName.wc_str(*wxConvCurrent));
--  const char* localColumnName = strColumnName;
--
--  if (columnName.Len() > 0)
--  {
--    for (int columnIndex = 0; columnIndex < m_cols; columnIndex++)
--    {
--      const char* temp = sqlite3_column_name((sqlite3_stmt*) m_stmt, columnIndex);
--
--      if (strcmp(localColumnName, temp) == 0)
--      {
--        return columnIndex;
--      }
--    }
--  }
--
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
--}
--
--wxString wxSQLite3ResultSet::GetColumnName(int columnIndex)
--{
--  CheckStmt();
--
--  if (columnIndex < 0 || columnIndex > m_cols-1)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
--  }
--
--  const char* localValue = sqlite3_column_name((sqlite3_stmt*) m_stmt, columnIndex);
--  return UTF8toWxString(localValue);
--}
--
--wxString wxSQLite3ResultSet::GetDeclaredColumnType(int columnIndex)
--{
--  CheckStmt();
--
--  if (columnIndex < 0 || columnIndex > m_cols-1)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
--  }
--
--  const char* localValue = sqlite3_column_decltype((sqlite3_stmt*) m_stmt, columnIndex);
--  return UTF8toWxString(localValue);
--}
--
--int wxSQLite3ResultSet::GetColumnType(int columnIndex)
--{
--  CheckStmt();
--
--  if (columnIndex < 0 || columnIndex > m_cols-1)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
--  }
--
--  return sqlite3_column_type((sqlite3_stmt*) m_stmt, columnIndex);
--}
--
--bool wxSQLite3ResultSet::Eof()
--{
--  CheckStmt();
--  return m_eof;
--}
--
--bool wxSQLite3ResultSet::NextRow()
--{
--  CheckStmt();
--
--  int rc;
--  if (m_first)
--  {
--    m_first = false;
--    rc = (m_eof) ? SQLITE_DONE : SQLITE_ROW;
--  }
--  else
--  {
--    rc = sqlite3_step((sqlite3_stmt*) m_stmt);
--  }
--
--  if (rc == SQLITE_DONE) // no more rows
--  {
--    m_eof = true;
--    return false;
--  }
--  else if (rc == SQLITE_ROW) // more rows
--  {
--    return true;
--  }
--  else
--  {
--    rc = sqlite3_finalize((sqlite3_stmt*) m_stmt);
--    m_stmt = 0;
--    const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--}
--
--void wxSQLite3ResultSet::Finalize()
--{
--  if (m_stmt && m_ownStmt)
--  {
--    int rc = sqlite3_finalize((sqlite3_stmt*) m_stmt);
--    m_stmt = 0;
--    if (rc != SQLITE_OK)
--    {
--      const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--      throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--    }
--  }
--}
--
--wxString wxSQLite3ResultSet::GetSQL()
--{
--  wxString sqlString = wxEmptyString;
--#if SQLITE_VERSION_NUMBER >= 3005003
--  CheckStmt();
--  const char* sqlLocal = sqlite3_sql((sqlite3_stmt*) m_stmt);
--  if (sqlLocal != NULL) sqlString = UTF8toWxString(sqlLocal);
--#endif
--  return sqlString;
--}
--
--bool wxSQLite3ResultSet::IsOk()
--{
--  return (m_db != 0) && (m_stmt != 0);
--}
--
--void wxSQLite3ResultSet::CheckStmt()
--{
--  if (m_stmt == 0)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOSTMT);
--  }
--}
--
--wxString wxSQLite3ResultSet::GetDatabaseName(int columnIndex)
--{
--#if WXSQLITE3_HAVE_METADATA
--  CheckStmt();
--  if (columnIndex < 0 || columnIndex > m_cols-1)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
--  }
--
--  const char* localValue = sqlite3_column_database_name((sqlite3_stmt*) m_stmt, columnIndex);
--  if (localValue != NULL)
--    return UTF8toWxString(localValue);
--  else
--    return wxEmptyString;
--#else
--  wxUnusedVar(columnIndex);
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOMETADATA);
--#endif
--}
--
--wxString wxSQLite3ResultSet::GetTableName(int columnIndex)
--{
--#if WXSQLITE3_HAVE_METADATA
--  CheckStmt();
--  if (columnIndex < 0 || columnIndex > m_cols-1)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
--  }
--
--  const char* localValue = sqlite3_column_table_name((sqlite3_stmt*) m_stmt, columnIndex);
--  if (localValue != NULL)
--    return UTF8toWxString(localValue);
--  else
--    return wxEmptyString;
--#else
--  wxUnusedVar(columnIndex);
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOMETADATA);
--#endif
--}
--
--wxString wxSQLite3ResultSet::GetOriginName(int columnIndex)
--{
--#if WXSQLITE3_HAVE_METADATA
--  CheckStmt();
--  if (columnIndex < 0 || columnIndex > m_cols-1)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
--  }
--
--  const char* localValue = sqlite3_column_origin_name((sqlite3_stmt*) m_stmt, columnIndex);
--  if (localValue != NULL)
--    return UTF8toWxString(localValue);
--  else
--    return wxEmptyString;
--#else
--  wxUnusedVar(columnIndex);
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOMETADATA);
--#endif
--}
--
--// ----------------------------------------------------------------------------
--// wxSQLite3Table: class holding the complete result set of a query
--// ----------------------------------------------------------------------------
--
--wxSQLite3Table::wxSQLite3Table()
--{
--  m_results = 0;
--  m_rows = 0;
--  m_cols = 0;
--  m_currentRow = 0;
--}
--
--wxSQLite3Table::wxSQLite3Table(const wxSQLite3Table& table)
--{
--  m_results = table.m_results;
--  // Only one object can own the results
--  const_cast<wxSQLite3Table&>(table).m_results = 0;
--  m_rows = table.m_rows;
--  m_cols = table.m_cols;
--  m_currentRow = table.m_currentRow;
--}
--
--wxSQLite3Table::wxSQLite3Table(char** results, int rows, int cols)
--{
--  m_results = results;
--  m_rows = rows;
--  m_cols = cols;
--  m_currentRow = 0;
--}
--
--wxSQLite3Table::~wxSQLite3Table()
--{
--  try
--  {
--    Finalize();
--  }
--  catch (...)
--  {
--  }
--}
--
--wxSQLite3Table& wxSQLite3Table::operator=(const wxSQLite3Table& table)
--{
--  try
--  {
--    Finalize();
--  }
--  catch (...)
--  {
--  }
--  m_results = table.m_results;
--  // Only one object can own the results
--  const_cast<wxSQLite3Table&>(table).m_results = 0;
--  m_rows = table.m_rows;
--  m_cols = table.m_cols;
--  m_currentRow = table.m_currentRow;
--  return *this;
--}
--
--void wxSQLite3Table::Finalize()
--{
--  if (m_results)
--  {
--    sqlite3_free_table(m_results);
--    m_results = 0;
--  }
--}
--
--int wxSQLite3Table::GetColumnCount()
--{
--  CheckResults();
--  return m_cols;
--}
--
--int wxSQLite3Table::GetRowCount()
--{
--  CheckResults();
--  return m_rows;
--}
--
--int wxSQLite3Table::FindColumnIndex(const wxString& columnName)
--{
--  CheckResults();
--
--  wxCharBuffer strColumnName = wxConvUTF8.cWC2MB(columnName.wc_str(*wxConvCurrent));
--  const char* localColumnName = strColumnName;
--
--  if (columnName.Len() > 0)
--  {
--    for (int columnIndex = 0; columnIndex < m_cols; columnIndex++)
--    {
--      if (strcmp(localColumnName, m_results[columnIndex]) == 0)
--      {
--        return columnIndex;
--      }
--    }
--  }
--
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_NAME);
--}
--
--wxString wxSQLite3Table::GetAsString(int columnIndex)
--{
--  if (columnIndex < 0 || columnIndex > m_cols-1)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
--  }
--
--  int nIndex = (m_currentRow*m_cols) + m_cols + columnIndex;
--  const char* localValue = m_results[nIndex];
--  return UTF8toWxString(localValue);
--}
--
--wxString wxSQLite3Table::GetAsString(const wxString& columnName)
--{
--  int index = FindColumnIndex(columnName);
--  return GetAsString(index);
--}
--
--int wxSQLite3Table::GetInt(int columnIndex, int nullValue /* = 0 */)
--{
--  if (IsNull(columnIndex))
--  {
--    return nullValue;
--  }
--  else
--  {
--    long value = nullValue;
--    GetAsString(columnIndex).ToLong(&value);
--    return (int) value;
--  }
--}
--
--int wxSQLite3Table::GetInt(const wxString& columnName, int nullValue /* = 0 */)
--{
--  if (IsNull(columnName))
--  {
--    return nullValue;
--  }
--  else
--  {
--    long value = nullValue;
--    GetAsString(columnName).ToLong(&value);
--    return (int) value;
--  }
--}
--
--wxLongLong wxSQLite3Table::GetInt64(int columnIndex, wxLongLong nullValue /* = 0 */)
--{
--  if (IsNull(columnIndex))
--  {
--    return nullValue;
--  }
--  else
--  {
--    return ConvertStringToLongLong(GetAsString(columnIndex), nullValue);
--  }
--}
--
--wxLongLong wxSQLite3Table::GetInt64(const wxString& columnName, wxLongLong nullValue /* = 0 */)
--{
--  if (IsNull(columnName))
--  {
--    return nullValue;
--  }
--  else
--  {
--    return ConvertStringToLongLong(GetAsString(columnName), nullValue);
--  }
--}
--
--// Since SQLite uses internally a locale independent string representation
--// of double values, we need to provide our own conversion procedure using
--// always a point as the decimal separator.
--// The following code duplicates a SQLite utility function with minor modifications.
--
--static double wxSQLite3AtoF(const char *z)
--{
--  int sign = 1;
--  long double v1 = 0.0;
--  int nSignificant = 0;
--  while (isspace(*(unsigned char*)z))
--  {
--    ++z;
--  }
--  if (*z == '-')
--  {
--    sign = -1;
--    ++z;
--  }
--  else if (*z == '+')
--  {
--    ++z;
--  }
--  while (*z == '0')
--  {
--    ++z;
--  }
--  while (isdigit(*(unsigned char*)z))
--  {
--    v1 = v1*10.0 + (*z - '0');
--    ++z;
--    ++nSignificant;
--  }
--  if (*z == '.')
--  {
--    long double divisor = 1.0;
--    ++z;
--    if (nSignificant == 0)
--    {
--      while (*z == '0')
--      {
--        divisor *= 10.0;
--        ++z;
--      }
--    }
--    while (isdigit(*(unsigned char*)z))
--    {
--      if (nSignificant < 18)
--      {
--        v1 = v1*10.0 + (*z - '0');
--        divisor *= 10.0;
--        ++nSignificant;
--      }
--      ++z;
--    }
--    v1 /= divisor;
--  }
--  if (*z=='e' || *z=='E')
--  {
--    int esign = 1;
--    int eval = 0;
--    long double scale = 1.0;
--    ++z;
--    if (*z == '-')
--    {
--      esign = -1;
--      ++z;
--    }
--    else if (*z == '+')
--    {
--      ++z;
--    }
--    while (isdigit(*(unsigned char*)z))
--    {
--      eval = eval*10 + *z - '0';
--      ++z;
--    }
--    while (eval >= 64) { scale *= 1.0e+64; eval -= 64; }
--    while (eval >= 16) { scale *= 1.0e+16; eval -= 16; }
--    while (eval >=  4) { scale *= 1.0e+4;  eval -= 4; }
--    while (eval >=  1) { scale *= 1.0e+1;  eval -= 1; }
--    if (esign < 0)
--    {
--      v1 /= scale;
--    }
--    else
--    {
--      v1 *= scale;
--    }
--  }
--  return (double) ((sign < 0) ? -v1 : v1);
--}
--
--double wxSQLite3Table::GetDouble(int columnIndex, double nullValue /* = 0.0 */)
--{
--  if (IsNull(columnIndex))
--  {
--    return nullValue;
--  }
--  else
--  {
--    if (columnIndex < 0 || columnIndex > m_cols-1)
--    {
--      throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
--    }
--    int nIndex = (m_currentRow*m_cols) + m_cols + columnIndex;
--    return wxSQLite3AtoF(m_results[nIndex]);
--  }
--}
--
--double wxSQLite3Table::GetDouble(const wxString& columnName, double nullValue /* = 0.0 */)
--{
--  int index = FindColumnIndex(columnName);
--  return GetDouble(index, nullValue);
--}
--
--wxString wxSQLite3Table::GetString(int columnIndex, const wxString& nullValue /* = wxEmptyString */)
--{
--  if (IsNull(columnIndex))
--  {
--    return nullValue;
--  }
--  else
--  {
--    return GetAsString(columnIndex);
--  }
--}
--
--wxString wxSQLite3Table::GetString(const wxString& columnName, const wxString& nullValue /* = wxEmptyString */)
--{
--  if (IsNull(columnName))
--  {
--    return nullValue;
--  }
--  else
--  {
--    return GetAsString(columnName);
--  }
--}
--
--wxDateTime wxSQLite3Table::GetDate(int columnIndex)
--{
--  wxDateTime date;
--  if (date.ParseDate(GetString(columnIndex)) != NULL)
--  {
--    return date;
--  }
--  else
--  {
--    return wxInvalidDateTime;
--  }
--}
--
--wxDateTime wxSQLite3Table::GetDate(const wxString& columnName)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetDate(columnIndex);
--}
--
--wxDateTime wxSQLite3Table::GetTime(int columnIndex)
--{
--  wxDateTime date;
--  if (date.ParseTime(GetString(columnIndex)) != NULL)
--  {
--    return date;
--  }
--  else
--  {
--    return wxInvalidDateTime;
--  }
--}
--
--wxDateTime wxSQLite3Table::GetTime(const wxString& columnName)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetTime(columnIndex);
--}
--
--wxDateTime wxSQLite3Table::GetDateTime(int columnIndex)
--{
--  wxDateTime date;
--  if (date.ParseDateTime(GetString(columnIndex)) != NULL)
--  {
--    return date;
--  }
--  else
--  {
--    return wxInvalidDateTime;
--  }
--}
--
--wxDateTime wxSQLite3Table::GetDateTime(const wxString& columnName)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetDateTime(columnIndex);
--}
--
--bool wxSQLite3Table::GetBool(int columnIndex)
--{
--  return GetInt(columnIndex) != 0;
--}
--
--bool wxSQLite3Table::GetBool(const wxString& columnName)
--{
--  int columnIndex = FindColumnIndex(columnName);
--  return GetBool(columnIndex);
--}
--
--bool wxSQLite3Table::IsNull(int columnIndex)
--{
--  CheckResults();
--
--  if (columnIndex < 0 || columnIndex > m_cols-1)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
--  }
--
--  int index = (m_currentRow*m_cols) + m_cols + columnIndex;
--  const char* localValue = m_results[index];
--  return (localValue == 0);
--}
--
--bool wxSQLite3Table::IsNull(const wxString& columnName)
--{
--  int index = FindColumnIndex(columnName);
--  return IsNull(index);
--}
--
--wxString wxSQLite3Table::GetColumnName(int columnIndex)
--{
--  CheckResults();
--
--  if (columnIndex < 0 || columnIndex > m_cols-1)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
--  }
--
--  const char* localValue = m_results[columnIndex];
--  return UTF8toWxString(localValue);
--}
--
--void wxSQLite3Table::SetRow(int row)
--{
--  CheckResults();
--
--  if (row < 0 || row > m_rows-1)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_ROW);
--  }
--
--  m_currentRow = row;
--}
--
--bool wxSQLite3Table::IsOk()
--{
--  return (m_results != 0);
--}
--
--void wxSQLite3Table::CheckResults()
--{
--  if (m_results == 0)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NORESULT);
--  }
--}
--
--// ----------------------------------------------------------------------------
--// wxSQLite3Statement: class holding a prepared statement
--// ----------------------------------------------------------------------------
--
--wxSQLite3Statement::wxSQLite3Statement()
--{
--  m_db = 0;
--  m_stmt = 0;
--}
--
--wxSQLite3Statement::wxSQLite3Statement(const wxSQLite3Statement& statement)
--{
--  m_db = statement.m_db;
--  m_stmt = statement.m_stmt;
--  // Only one object can own prepared statement
--  const_cast<wxSQLite3Statement&>(statement).m_stmt = 0;
--}
--
--wxSQLite3Statement::wxSQLite3Statement(void* db, void* stmt)
--{
--  m_db = db;
--  m_stmt = stmt;
--}
--
--wxSQLite3Statement::~wxSQLite3Statement()
--{
--  try
--  {
--    Finalize();
--  }
--  catch (...)
--  {
--  }
--}
--
--wxSQLite3Statement& wxSQLite3Statement::operator=(const wxSQLite3Statement& statement)
--{
--  m_db = statement.m_db;
--  m_stmt = statement.m_stmt;
--  // Only one object can own prepared statement
--  const_cast<wxSQLite3Statement&>(statement).m_stmt = 0;
--  return *this;
--}
--
--int wxSQLite3Statement::ExecuteUpdate()
--{
--  CheckDatabase();
--  CheckStmt();
--
--  const char* localError=0;
--
--  int rc = sqlite3_step((sqlite3_stmt*) m_stmt);
--
--  if (rc == SQLITE_DONE)
--  {
--    int rowsChanged = sqlite3_changes((sqlite3*) m_db);
--
--    rc = sqlite3_reset((sqlite3_stmt*) m_stmt);
--
--    if (rc != SQLITE_OK)
--    {
--      localError = sqlite3_errmsg((sqlite3*) m_db);
--      throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--    }
--
--    return rowsChanged;
--  }
--  else
--  {
--    rc = sqlite3_reset((sqlite3_stmt*) m_stmt);
--    localError = sqlite3_errmsg((sqlite3*) m_db);
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--}
--
--wxSQLite3ResultSet wxSQLite3Statement::ExecuteQuery()
--{
--  CheckDatabase();
--  CheckStmt();
--
--  int rc = sqlite3_step((sqlite3_stmt*) m_stmt);
--
--  if (rc == SQLITE_DONE)  // no more rows
--  {
--    return wxSQLite3ResultSet(m_db, m_stmt, true/*eof*/, true/*first*/, false);
--  }
--  else if (rc == SQLITE_ROW)  // one or more rows
--  {
--    return wxSQLite3ResultSet(m_db, m_stmt, false/*eof*/, true/*first*/, false);
--  }
--  else
--  {
--    rc = sqlite3_reset((sqlite3_stmt*) m_stmt);
--    const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--}
--
--int wxSQLite3Statement::GetParamCount()
--{
--  CheckStmt();
--  return sqlite3_bind_parameter_count((sqlite3_stmt*) m_stmt);
--}
--
--int wxSQLite3Statement::GetParamIndex(const wxString& paramName)
--{
--  CheckStmt();
--
--  wxCharBuffer strParamName = wxConvUTF8.cWC2MB(paramName.wc_str(*wxConvCurrent));
--  const char* localParamName = strParamName;
--
--  return sqlite3_bind_parameter_index((sqlite3_stmt*) m_stmt, localParamName);
--}
--
--wxString wxSQLite3Statement::GetParamName(int paramIndex)
--{
--  CheckStmt();
--  const char* localParamName = sqlite3_bind_parameter_name((sqlite3_stmt*) m_stmt, paramIndex);
--  return UTF8toWxString(localParamName);
--}
--
--void wxSQLite3Statement::Bind(int paramIndex, const wxString& stringValue)
--{
--  CheckStmt();
--
--  wxCharBuffer strStringValue = wxConvUTF8.cWC2MB(stringValue.wc_str(*wxConvCurrent));
--  const char* localStringValue = strStringValue;
--
--  int rc = sqlite3_bind_text((sqlite3_stmt*) m_stmt, paramIndex, localStringValue, -1, SQLITE_TRANSIENT);
--
--  if (rc != SQLITE_OK)
--  {
--    throw wxSQLite3Exception(rc, wxERRMSG_BIND_STR);
--  }
--}
--
--void wxSQLite3Statement::Bind(int paramIndex, int intValue)
--{
--  CheckStmt();
--  int rc = sqlite3_bind_int((sqlite3_stmt*) m_stmt, paramIndex, intValue);
--
--  if (rc != SQLITE_OK)
--  {
--    throw wxSQLite3Exception(rc, wxERRMSG_BIND_INT);
--  }
--}
--
--void wxSQLite3Statement::Bind(int paramIndex, wxLongLong int64Value)
--{
--  CheckStmt();
--  int rc = sqlite3_bind_int64((sqlite3_stmt*) m_stmt, paramIndex, int64Value.GetValue());
--
--  if (rc != SQLITE_OK)
--  {
--    throw wxSQLite3Exception(rc, wxERRMSG_BIND_INT64);
--  }
--}
--
--void wxSQLite3Statement::Bind(int paramIndex, double doubleValue)
--{
--  CheckStmt();
--  int rc = sqlite3_bind_double((sqlite3_stmt*) m_stmt, paramIndex, doubleValue);
--
--  if (rc != SQLITE_OK)
--  {
--    throw wxSQLite3Exception(rc, wxERRMSG_BIND_DBL);
--  }
--}
--
--void wxSQLite3Statement::Bind(int paramIndex, const char* charValue)
--{
--  CheckStmt();
--  int rc = sqlite3_bind_text((sqlite3_stmt*) m_stmt, paramIndex, charValue, -1, SQLITE_TRANSIENT);
--
--  if (rc != SQLITE_OK)
--  {
--    throw wxSQLite3Exception(rc, wxERRMSG_BIND_STR);
--  }
--}
--
--void wxSQLite3Statement::Bind(int paramIndex, const unsigned char* blobValue, int blobLen)
--{
--  CheckStmt();
--  int rc = sqlite3_bind_blob((sqlite3_stmt*) m_stmt, paramIndex,
--                (const void*)blobValue, blobLen, SQLITE_TRANSIENT);
--
--  if (rc != SQLITE_OK)
--  {
--    throw wxSQLite3Exception(rc, wxERRMSG_BIND_BLOB);
--  }
--}
--
--void wxSQLite3Statement::Bind(int paramIndex, const wxMemoryBuffer& blobValue)
--{
--  CheckStmt();
--  int blobLen = (int) blobValue.GetDataLen();
--  int rc = sqlite3_bind_blob((sqlite3_stmt*) m_stmt, paramIndex,
--                (const void*)blobValue.GetData(), blobLen, SQLITE_TRANSIENT);
--
--  if (rc != SQLITE_OK)
--  {
--    throw wxSQLite3Exception(rc, wxERRMSG_BIND_BLOB);
--  }
--}
--
--void wxSQLite3Statement::BindDate(int paramIndex, const wxDateTime& date)
--{
--  if (date.IsValid())
--  {
--    Bind(paramIndex,date.FormatISODate());
--  }
--  else
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_BIND_DATETIME);
--  }
--}
--
--void wxSQLite3Statement::BindTime(int paramIndex, const wxDateTime& time)
--{
--  if (time.IsValid())
--  {
--    Bind(paramIndex,time.FormatISOTime());
--  }
--  else
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_BIND_DATETIME);
--  }
--}
--
--void wxSQLite3Statement::BindDateTime(int paramIndex, const wxDateTime& datetime)
--{
--  if (datetime.IsValid())
--  {
--    Bind(paramIndex,datetime.Format(_T("%Y-%m-%d %H:%M:%S")));
--  }
--  else
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_BIND_DATETIME);
--  }
--}
--
--void wxSQLite3Statement::BindTimestamp(int paramIndex, const wxDateTime& timestamp)
--{
--  if (timestamp.IsValid())
--  {
--    Bind(paramIndex,timestamp.Format(_T("%Y-%m-%d %H:%M:%S.%l")));
--  }
--  else
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_BIND_DATETIME);
--  }
--}
--
--void wxSQLite3Statement::BindNumericDateTime(int paramIndex, const wxDateTime& datetime)
--{
--  if (datetime.IsValid())
--  {
--    Bind(paramIndex, datetime.GetValue());
--  }
--  else
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_BIND_DATETIME);
--  }
--}
--
--void wxSQLite3Statement::BindJulianDayNumber(int paramIndex, const wxDateTime& datetime)
--{
--  if (datetime.IsValid())
--  {
--    Bind(paramIndex, datetime.GetJulianDayNumber());
--  }
--  else
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_BIND_DATETIME);
--  }
--}
--
--void wxSQLite3Statement::BindBool(int paramIndex, bool value)
--{
--  Bind(paramIndex, value ? 1 : 0);
--}
--
--void wxSQLite3Statement::BindNull(int paramIndex)
--{
--  CheckStmt();
--  int rc = sqlite3_bind_null((sqlite3_stmt*) m_stmt, paramIndex);
--
--  if (rc != SQLITE_OK)
--  {
--    throw wxSQLite3Exception(rc, wxERRMSG_BIND_NULL);
--  }
--}
--
--void wxSQLite3Statement::BindZeroBlob(int paramIndex, int blobSize)
--{
--#if SQLITE_VERSION_NUMBER >= 3004000
--  CheckStmt();
--  int rc = sqlite3_bind_zeroblob((sqlite3_stmt*) m_stmt, paramIndex, blobSize);
--  if (rc != SQLITE_OK)
--  {
--    throw wxSQLite3Exception(rc, wxERRMSG_BIND_ZEROBLOB);
--  }
--#else
--  wxUnusedVar(paramIndex);
--  wxUnusedVar(blobSize);
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOINCBLOB);
--#endif
--}
--
--void wxSQLite3Statement::ClearBindings()
--{
--  CheckStmt();
--#if 0 // missing in SQLite DLL
--  int rc = sqlite3_clear_bindings((sqlite3_stmt*) m_stmt);
--
--  if (rc != SQLITE_OK)
--  {
--    throw wxSQLite3Exception(rc, wxERRMSG_BIND_CLEAR);
--  }
--#else
--  for (int paramIndex = 1; paramIndex <= GetParamCount(); paramIndex++)
--  {
--    BindNull(paramIndex);
--  }
--#endif
--}
--
--wxString wxSQLite3Statement::GetSQL()
--{
--  wxString sqlString = wxEmptyString;
--#if SQLITE_VERSION_NUMBER >= 3005003
--  CheckStmt();
--  const char* sqlLocal = sqlite3_sql((sqlite3_stmt*) m_stmt);
--  if (sqlLocal != NULL) sqlString = UTF8toWxString(sqlLocal);
--#endif
--  return sqlString;
--}
--
--void wxSQLite3Statement::Reset()
--{
--  if (m_stmt)
--  {
--    int rc = sqlite3_reset((sqlite3_stmt*) m_stmt);
--
--    if (rc != SQLITE_OK)
--    {
--      const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--      throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--    }
--  }
--}
--
--void wxSQLite3Statement::Finalize()
--{
--  if (m_stmt)
--  {
--    int rc = sqlite3_finalize((sqlite3_stmt*) m_stmt);
--    m_stmt = 0;
--
--    if (rc != SQLITE_OK)
--    {
--      const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--      throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--    }
--  }
--}
--
--bool wxSQLite3Statement::IsOk()
--{
--  return (m_db != 0) && (m_stmt != 0);
--}
--
--void wxSQLite3Statement::CheckDatabase()
--{
--  if (m_db == 0)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NODB);
--  }
--}
--
--void wxSQLite3Statement::CheckStmt()
--{
--  if (m_stmt == 0)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOSTMT);
--  }
--}
--
--//
--
--wxSQLite3Blob::wxSQLite3Blob()
--{
--  m_db   = NULL;
--  m_blob = NULL;
--  m_ok   = false;
--  m_writable = false;
--}
--
--wxSQLite3Blob::wxSQLite3Blob(const wxSQLite3Blob& blob)
--{
--  m_db   = blob.m_db;
--  m_blob = blob.m_blob;
--  m_ok   = blob.m_ok;
--  m_writable = blob.m_writable;
--}
--
--wxSQLite3Blob& wxSQLite3Blob::operator=(const wxSQLite3Blob& blob)
--{
--  try
--  {
--    Finalize();
--  }
--  catch (...)
--  {
--  }
--  m_db   = blob.m_db;
--  m_blob = blob.m_blob;
--  m_ok   = blob.m_ok;
--  m_writable = blob.m_writable;
--  // only one blob can own the blob handle
--  const_cast<wxSQLite3Blob&>(blob).m_ok = false;
--
--  return *this;
--}
--
--wxSQLite3Blob::wxSQLite3Blob(void* db, void* blobHandle, bool writable)
--{
--  m_db   = db;
--  m_blob = blobHandle;
--  m_ok   = true;
--  m_writable = writable;
--#if 0
--int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
--
--void sqlite3_result_zeroblob(sqlite3_context*, int n);
--
--#endif
--}
--
--wxSQLite3Blob::~wxSQLite3Blob()
--{
--  try
--  {
--    Finalize();
--  }
--  catch (...)
--  {
--  }
--}
--
--wxMemoryBuffer& wxSQLite3Blob::Read(wxMemoryBuffer& blobValue, int length, int offset)
--{
--#if SQLITE_VERSION_NUMBER >= 3004000
--  CheckBlob();
--  char* localBuffer = new char[length];
--  int rc = sqlite3_blob_read((sqlite3_blob*) m_blob, localBuffer, length, offset);
--
--  if (rc != SQLITE_OK)
--  {
--    const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--
--  blobValue.AppendData((void*) localBuffer, (size_t) length);
--  delete [] localBuffer;
--#else
--  wxUnusedVar(blobValue);
--  wxUnusedVar(length);
--  wxUnusedVar(offset);
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOINCBLOB);
--#endif
--  return blobValue;
--}
--
--void wxSQLite3Blob::Write(const wxMemoryBuffer& blobValue, int offset)
--{
--#if SQLITE_VERSION_NUMBER >= 3004000
--  CheckBlob();
--  if (m_writable)
--  {
--    int blobLen = (int) blobValue.GetDataLen();
--    int rc = sqlite3_blob_write((sqlite3_blob*) m_blob,
--                                (const void*) blobValue.GetData(), blobLen, offset);
--
--    if (rc != SQLITE_OK)
--    {
--      const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--      throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--    }
--  }
--  else
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_BLOB);
--  }
--#else
--  wxUnusedVar(blobValue);
--  wxUnusedVar(offset);
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOINCBLOB);
--#endif
--}
--
--bool wxSQLite3Blob::IsOk()
--{
--  return m_ok;
--}
--
--bool wxSQLite3Blob::IsReadOnly()
--{
--  return !m_writable;
--}
--
--int wxSQLite3Blob::GetSize()
--{
--#if SQLITE_VERSION_NUMBER >= 3004000
--  CheckBlob();
--  return sqlite3_blob_bytes((sqlite3_blob*) m_blob);
--#else
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOINCBLOB);
--  return 0;
--#endif
--}
--
--void wxSQLite3Blob::Finalize()
--{
--#if SQLITE_VERSION_NUMBER >= 3004000
--  if (m_ok)
--  {
--    int rc = sqlite3_blob_close((sqlite3_blob*) m_blob);
--    m_blob = NULL;
--    m_ok = false;
--    if (rc != SQLITE_OK)
--    {
--      const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--      throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--    }
--  }
--#else
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOINCBLOB);
--#endif
--}
--
--void wxSQLite3Blob::CheckBlob()
--{
--  if (!m_ok)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_BLOB);
--  }
--}
--
--// ----------------------------------------------------------------------------
--// wxSQLite3Database: class holding a SQLite3 database object
--// ----------------------------------------------------------------------------
--
--bool wxSQLite3Database::ms_sharedCacheEnabled = false;
--
--void
--wxSQLite3Database::SetSharedCache(bool enable)
--{
--  int flag = (enable) ? 1 : 0;
--  int rc = sqlite3_enable_shared_cache(flag);
--  if (rc != SQLITE_OK)
--  {
--    throw wxSQLite3Exception(rc, wxERRMSG_SHARED_CACHE);
--  }
--  ms_sharedCacheEnabled = enable;
--}
--
--#if WXSQLITE3_HAVE_CODEC
--bool wxSQLite3Database::ms_hasEncryptionSupport = true;
--#else
--bool wxSQLite3Database::ms_hasEncryptionSupport = false;
--#endif
--
--#if WXSQLITE3_HAVE_METADATA
--bool wxSQLite3Database::ms_hasMetaDataSupport = true;
--#else
--bool wxSQLite3Database::ms_hasMetaDataSupport = false;
--#endif
--
--#if WXSQLITE3_HAVE_LOAD_EXTENSION
--bool wxSQLite3Database::ms_hasLoadExtSupport = true;
--#else
--bool wxSQLite3Database::ms_hasLoadExtSupport = false;
--#endif
--
--#if SQLITE_VERSION_NUMBER >= 3004000
--bool wxSQLite3Database::ms_hasIncrementalBlobSupport = true;
--#else
--bool wxSQLite3Database::ms_hasIncrementalBlobSupport = false;
--#endif
--
--#if SQLITE_VERSION_NUMBER >= 3006008
--bool wxSQLite3Database::ms_hasSavepointSupport = true;
--#else
--bool wxSQLite3Database::ms_hasSavepointSupport = false;
--#endif
--
--bool
--wxSQLite3Database::HasEncryptionSupport()
--{
--  return ms_hasEncryptionSupport;
--}
--
--bool
--wxSQLite3Database::HasMetaDataSupport()
--{
--  return ms_hasMetaDataSupport;
--}
--
--bool
--wxSQLite3Database::HasLoadExtSupport()
--{
--  return ms_hasLoadExtSupport;
--}
--
--bool
--wxSQLite3Database::HasIncrementalBlobSupport()
--{
--  return ms_hasIncrementalBlobSupport;
--}
--
--bool
--wxSQLite3Database::HasSavepointSupport()
--{
--  return ms_hasSavepointSupport;
--}
--
--wxSQLite3Database::wxSQLite3Database()
--{
--  m_db = 0;
--  m_busyTimeoutMs = 60000; // 60 seconds
--  m_isEncrypted = false;
--}
--
--wxSQLite3Database::wxSQLite3Database(const wxSQLite3Database& db)
--{
--  m_db = db.m_db;
--  m_busyTimeoutMs = 60000; // 60 seconds
--  m_isEncrypted = false;
--}
--
--wxSQLite3Database::~wxSQLite3Database()
--{
--  Close();
--}
--
--wxSQLite3Database& wxSQLite3Database::operator=(const wxSQLite3Database& db)
--{
--  m_db = db.m_db;
--  m_busyTimeoutMs = 60000; // 60 seconds
--  m_isEncrypted = db.m_isEncrypted;
--  return *this;
--}
--
--void wxSQLite3Database::Open(const wxString& fileName, const wxString& key)
--{
--  wxCharBuffer strLocalKey = wxConvUTF8.cWC2MB(key.wc_str(*wxConvCurrent));
--  const char* localKey = strLocalKey;
--  wxMemoryBuffer binaryKey;
--  if (key.Length() > 0)
--  {
--    binaryKey.AppendData((void*) localKey, strlen(localKey));
--  }
--  Open(fileName, binaryKey);
--}
--
--void wxSQLite3Database::Open(const wxString& fileName, const wxMemoryBuffer& key)
--{
--  wxCharBuffer strFileName = wxConvUTF8.cWC2MB(fileName.wc_str(*wxConvCurrent));
--  const char* localFileName = strFileName;
--
--  int rc = sqlite3_open((const char*) localFileName, (sqlite3**) &m_db);
--
--  if (rc != SQLITE_OK)
--  {
--    Close();
--    const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--
--  rc = sqlite3_extended_result_codes((sqlite3*) m_db, 1);
--  if (rc != SQLITE_OK)
--  {
--    Close();
--    const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--
--#if WXSQLITE3_HAVE_CODEC
--  if (key.GetDataLen() > 0)
--  {
--    rc = sqlite3_key((sqlite3*) m_db, key.GetData(), (int) key.GetDataLen());
--    if (rc != SQLITE_OK)
--    {
--      Close();
--      const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--      throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--    }
--    m_isEncrypted = true;
--  }
--#else
--  wxUnusedVar(key);
--#endif
--
--  SetBusyTimeout(m_busyTimeoutMs);
--}
--
--bool wxSQLite3Database::IsOpen() const
--{
--  return (m_db != NULL);
--}
--
--void wxSQLite3Database::Close()
--{
--  if (m_db)
--  {
--#if SQLITE_VERSION_NUMBER >= 3006000
--// Unfortunately the following code leads to a crash if the RTree module is used
--// therefore it is disabled for now
--#if 0
--    // Finalize all unfinalized prepared statements
--    sqlite3_stmt *pStmt;
--    while( (pStmt = sqlite3_next_stmt((sqlite3*) m_db, 0))!=0 )
--    {
--      sqlite3_finalize(pStmt);
--    }
--#endif
--#endif
--    sqlite3_close((sqlite3*) m_db);
--    m_db = 0;
--    m_isEncrypted = false;
--  }
--}
--
--void wxSQLite3Database::Begin(wxSQLite3TransactionType transactionType)
--{
--  wxString sql;
--  switch (transactionType)
--  {
--    case WXSQLITE_TRANSACTION_DEFERRED:
--      sql << _T("begin deferred transaction");
--      break;
--    case WXSQLITE_TRANSACTION_IMMEDIATE:
--      sql << _T("begin immediate transaction");
--      break;
--    case WXSQLITE_TRANSACTION_EXCLUSIVE:
--      sql << _T("begin exclusive transaction");
--      break;
--    default:
--      sql << _T("begin transaction");
--      break;
--  }
--  ExecuteUpdate(sql);
--}
--
--void wxSQLite3Database::Commit()
--{
--  ExecuteUpdate("commit transaction");
--}
--
--void wxSQLite3Database::Rollback(const wxString& savepointName)
--{
--#if SQLITE_VERSION_NUMBER >= 3006008
--  if (savepointName.IsEmpty())
--  {
--#endif
--    ExecuteUpdate("rollback transaction");
--#if SQLITE_VERSION_NUMBER >= 3006008
--  }
--  else
--  {
--    ExecuteUpdate(wxString(_T("rollback transaction to savepoint "))+savepointName);
--  }
--#endif
--}
--
--bool wxSQLite3Database::GetAutoCommit()
--{
--  CheckDatabase();
--  return sqlite3_get_autocommit((sqlite3*) m_db) != 0;
--}
--
--void wxSQLite3Database::Savepoint(const wxString& savepointName)
--{
--#if SQLITE_VERSION_NUMBER >= 3006008
--  ExecuteUpdate(wxString(_T("savepoint "))+savepointName);
--#else
--  wxUnusedVar(savepointName);
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOSAVEPOINT);
--#endif
--}
--
--void wxSQLite3Database::ReleaseSavepoint(const wxString& savepointName)
--{
--#if SQLITE_VERSION_NUMBER >= 3006008
--  ExecuteUpdate(wxString(_T("release savepoint "))+savepointName);
--#else
--  wxUnusedVar(savepointName);
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOSAVEPOINT);
--#endif
--}
--
--wxSQLite3Statement wxSQLite3Database::PrepareStatement(const wxString& sql)
--{
--  wxCharBuffer strSql = wxConvUTF8.cWC2MB(sql.wc_str(*wxConvCurrent));
--  const char* localSql = strSql;
--  return PrepareStatement(localSql);
--}
--
--wxSQLite3Statement wxSQLite3Database::PrepareStatement(const wxSQLite3StatementBuffer& sql)
--{
--  return PrepareStatement((const char*) sql);
--}
--
--wxSQLite3Statement wxSQLite3Database::PrepareStatement(const char* sql)
--{
--  CheckDatabase();
--  sqlite3_stmt* stmt = (sqlite3_stmt*) Prepare(sql);
--  return wxSQLite3Statement(m_db, stmt);
--}
--
--bool wxSQLite3Database::TableExists(const wxString& tableName, const wxString& databaseName)
--{
--  wxString sql;
--  if (databaseName.IsEmpty())
--  {
--    sql = _T("select count(*) from sqlite_master where type='table' and name like ?");
--  }
--  else
--  {
--    sql = wxString(_T("select count(*) from ")) + databaseName + wxString(_T(".sqlite_master where type='table' and name like ?"));
--  }
--  wxSQLite3Statement stmt = PrepareStatement(sql);
--  stmt.Bind(1, tableName);
--  wxSQLite3ResultSet resultSet = stmt.ExecuteQuery();
--  long value = 0;
--  resultSet.GetAsString(0).ToLong(&value);
--  return (value > 0);
--}
--
--bool wxSQLite3Database::TableExists(const wxString& tableName, wxArrayString& databaseNames)
--{
--  wxArrayString databaseList;
--  GetDatabaseList(databaseList);
--
--  bool found = false;
--  size_t count = databaseList.GetCount();
--  if (count > 0)
--  {
--    size_t j;
--    for (j = 0; j < count; j++)
--    {
--      if (TableExists(tableName, databaseList.Item(j)))
--      {
--        found = true;
--        databaseNames.Add(databaseList.Item(j));
--      }
--    }
--  }
--  return found;
--}
--
--void wxSQLite3Database::GetDatabaseList(wxArrayString& databaseNames)
--{
--  databaseNames.Empty();
--  wxSQLite3ResultSet resultSet = ExecuteQuery("PRAGMA database_list;");
--  while (resultSet.NextRow())
--  {
--    databaseNames.Add(resultSet.GetString(1));
--  }
--}
--
--void wxSQLite3Database::GetDatabaseList(wxArrayString& databaseNames, wxArrayString& databaseFiles)
--{
--  databaseNames.Empty();
--  databaseFiles.Empty();
--  wxSQLite3ResultSet resultSet = ExecuteQuery("PRAGMA database_list;");
--  while (resultSet.NextRow())
--  {
--    databaseNames.Add(resultSet.GetString(1));
--    databaseFiles.Add(resultSet.GetString(2));
--  }
--}
--
--bool wxSQLite3Database::CheckSyntax(const wxString& sql)
--{
--  wxCharBuffer strSql = wxConvUTF8.cWC2MB(sql.wc_str(*wxConvCurrent));
--  const char* localSql = strSql;
--  return CheckSyntax(localSql);
--}
--
--bool wxSQLite3Database::CheckSyntax(const wxSQLite3StatementBuffer& sql)
--{
--  return CheckSyntax((const char*) sql);
--}
--
--bool wxSQLite3Database::CheckSyntax(const char* sql)
--{
--  return sqlite3_complete(sql) != 0;
--}
--
--int wxSQLite3Database::ExecuteUpdate(const wxString& sql)
--{
--  wxCharBuffer strSql = wxConvUTF8.cWC2MB(sql.wc_str(*wxConvCurrent));
--  const char* localSql = strSql;
--  return ExecuteUpdate(localSql);
--}
--
--int wxSQLite3Database::ExecuteUpdate(const wxSQLite3StatementBuffer& sql)
--{
--  return ExecuteUpdate((const char*) sql);
--}
--
--int wxSQLite3Database::ExecuteUpdate(const char* sql)
--{
--  CheckDatabase();
--
--  char* localError=0;
--
--  int rc = sqlite3_exec((sqlite3*) m_db, sql, 0, 0, &localError);
--
--  if (rc == SQLITE_OK)
--  {
--    return sqlite3_changes((sqlite3*) m_db);
--  }
--  else
--  {
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--}
--
--wxSQLite3ResultSet wxSQLite3Database::ExecuteQuery(const wxString& sql)
--{
--  wxCharBuffer strSql = wxConvUTF8.cWC2MB(sql.wc_str(*wxConvCurrent));
--  const char* localSql = strSql;
--  return ExecuteQuery(localSql);
--}
--
--wxSQLite3ResultSet wxSQLite3Database::ExecuteQuery(const wxSQLite3StatementBuffer& sql)
--{
--  return ExecuteQuery((const char*) sql);
--}
--
--wxSQLite3ResultSet wxSQLite3Database::ExecuteQuery(const char* sql)
--{
--  CheckDatabase();
--
--  sqlite3_stmt* stmt = (sqlite3_stmt*) Prepare(sql);
--
--  int rc = sqlite3_step(stmt);
--
--  if (rc == SQLITE_DONE) // no rows
--  {
--    return wxSQLite3ResultSet(m_db, stmt, true /* eof */);
--  }
--  else if (rc == SQLITE_ROW) // one or more rows
--  {
--    return wxSQLite3ResultSet(m_db, stmt, false /* eof */);
--  }
--  else
--  {
--    rc = sqlite3_finalize(stmt);
--    const char* localError= sqlite3_errmsg((sqlite3*) m_db);
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--}
--
--int wxSQLite3Database::ExecuteScalar(const wxString& sql)
--{
--  wxCharBuffer strSql = wxConvUTF8.cWC2MB(sql.wc_str(*wxConvCurrent));
--  const char* localSql = strSql;
--  return ExecuteScalar(localSql);
--}
--
--int wxSQLite3Database::ExecuteScalar(const wxSQLite3StatementBuffer& sql)
--{
--  return ExecuteScalar((const char*) sql);
--}
--
--int wxSQLite3Database::ExecuteScalar(const char* sql)
--{
--  wxSQLite3ResultSet resultSet = ExecuteQuery(sql);
--
--  if (resultSet.Eof() || resultSet.GetColumnCount() < 1)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_QUERY);
--  }
--
--  long value = 0;
--  resultSet.GetAsString(0).ToLong(&value);
--  return (int) value;
--}
--
--wxSQLite3Table wxSQLite3Database::GetTable(const wxString& sql)
--{
--  wxCharBuffer strSql = wxConvUTF8.cWC2MB(sql.wc_str(*wxConvCurrent));
--  const char* localSql = strSql;
--  return GetTable(localSql);
--}
--
--wxSQLite3Table wxSQLite3Database::GetTable(const wxSQLite3StatementBuffer& sql)
--{
--  return GetTable((const char*) sql);
--}
--
--wxSQLite3Table wxSQLite3Database::GetTable(const char* sql)
--{
--  CheckDatabase();
--
--  char* localError=0;
--  char** results=0;
--  int rc;
--  int rows(0);
--  int cols(0);
--
--  rc = sqlite3_get_table((sqlite3*) m_db, sql, &results, &rows, &cols, &localError);
--
--  if (rc == SQLITE_OK)
--  {
--    return wxSQLite3Table(results, rows, cols);
--  }
--  else
--  {
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--}
--
--wxLongLong wxSQLite3Database::GetLastRowId()
--{
--  CheckDatabase();
--  return wxLongLong(sqlite3_last_insert_rowid((sqlite3*) m_db));
--}
--
--wxSQLite3Blob wxSQLite3Database::GetReadOnlyBlob(wxLongLong rowId,
--                                                 const wxString& columnName,
--                                                 const wxString& tableName,
--                                                 const wxString& dbName)
--{
--  return GetBlob(rowId, columnName, tableName, dbName, false);
--}
--
--wxSQLite3Blob wxSQLite3Database::GetWritableBlob(wxLongLong rowId,
--                                                 const wxString& columnName,
--                                                 const wxString& tableName,
--                                                 const wxString& dbName)
--{
--  return GetBlob(rowId, columnName, tableName, dbName, true);
--}
--
--wxSQLite3Blob wxSQLite3Database::GetBlob(wxLongLong rowId,
--                                         const wxString& columnName,
--                                         const wxString& tableName,
--                                         const wxString& dbName,
--                                         bool writable)
--{
--#if SQLITE_VERSION_NUMBER >= 3004000
--  wxCharBuffer strColumnName = wxConvUTF8.cWC2MB(columnName.wc_str(*wxConvCurrent));
--  const char* localColumnName = strColumnName;
--  wxCharBuffer strTableName = wxConvUTF8.cWC2MB(tableName.wc_str(*wxConvCurrent));
--  const char* localTableName = strTableName;
--  wxCharBuffer strDbName = wxConvUTF8.cWC2MB(dbName.wc_str(*wxConvCurrent));
--  const char* localDbName = (!dbName.IsEmpty()) ? (const char*) strDbName : (const char*) NULL;
--  int flags = (writable) ? 1 : 0;
--  sqlite3_blob* blobHandle;
--  CheckDatabase();
--  int rc = sqlite3_blob_open((sqlite3*) m_db, localDbName, localTableName, localColumnName, rowId.GetValue(), flags, &blobHandle);
--  if (rc != SQLITE_OK)
--  {
--    const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--  return wxSQLite3Blob(m_db, (void*) blobHandle, writable);
--#else
--  wxUnusedVar(rowId);
--  wxUnusedVar(columnName);
--  wxUnusedVar(tableName);
--  wxUnusedVar(dbName);
--  wxUnusedVar(writable);
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOINCBLOB);
--  return NULL;
--#endif
--}
--
--void wxSQLite3Database::Interrupt()
--{
--  CheckDatabase();
--  sqlite3_interrupt((sqlite3*) m_db);
--}
--
--void wxSQLite3Database::SetBusyTimeout(int nMillisecs)
--{
--  CheckDatabase();
--  m_busyTimeoutMs = nMillisecs;
--  sqlite3_busy_timeout((sqlite3*) m_db, m_busyTimeoutMs);
--}
--
--wxString wxSQLite3Database::GetVersion()
--{
--  return UTF8toWxString(sqlite3_libversion());
--}
--
--bool wxSQLite3Database::CreateFunction(const wxString& funcName, int argCount, wxSQLite3ScalarFunction& function)
--{
--  CheckDatabase();
--  wxCharBuffer strFuncName = wxConvUTF8.cWC2MB(funcName.wc_str(*wxConvCurrent));
--  const char* localFuncName = strFuncName;
--  int rc = sqlite3_create_function((sqlite3*) m_db, localFuncName, argCount,
--                                   SQLITE_UTF8, &function,
--                                   (void (*)(sqlite3_context*,int,sqlite3_value**)) wxSQLite3FunctionContext::ExecScalarFunction, NULL, NULL);
--  return rc == SQLITE_OK;
--}
--
--bool wxSQLite3Database::CreateFunction(const wxString& funcName, int argCount, wxSQLite3AggregateFunction& function)
--{
--  CheckDatabase();
--  wxCharBuffer strFuncName = wxConvUTF8.cWC2MB(funcName.wc_str(*wxConvCurrent));
--  const char* localFuncName = strFuncName;
--  int rc = sqlite3_create_function((sqlite3*) m_db, localFuncName, argCount,
--                                   SQLITE_UTF8, &function,
--                                   NULL,
--                                   (void (*)(sqlite3_context*,int,sqlite3_value**)) wxSQLite3FunctionContext::ExecAggregateStep,
--                                   (void (*)(sqlite3_context*)) wxSQLite3FunctionContext::ExecAggregateFinalize);
--  return rc == SQLITE_OK;
--}
--
--bool wxSQLite3Database::SetAuthorizer(wxSQLite3Authorizer& authorizer)
--{
--  CheckDatabase();
--  int rc = sqlite3_set_authorizer((sqlite3*) m_db, wxSQLite3FunctionContext::ExecAuthorizer, &authorizer);
--  return rc == SQLITE_OK;
--}
--
--void wxSQLite3Database::SetCommitHook(wxSQLite3Hook* commitHook)
--{
--  CheckDatabase();
--  if (commitHook)
--  {
--    sqlite3_commit_hook((sqlite3*) m_db, (int(*)(void*)) wxSQLite3FunctionContext::ExecCommitHook, commitHook);
--  }
--  else
--  {
--    sqlite3_commit_hook((sqlite3*) m_db, (int(*)(void*)) NULL, NULL);
--  }
--}
--
--void wxSQLite3Database::SetRollbackHook(wxSQLite3Hook* rollbackHook)
--{
--  CheckDatabase();
--  if (rollbackHook)
--  {
--    sqlite3_rollback_hook((sqlite3*) m_db, (void(*)(void*)) wxSQLite3FunctionContext::ExecRollbackHook, rollbackHook);
--  }
--  else
--  {
--    sqlite3_rollback_hook((sqlite3*) m_db, (void(*)(void*)) NULL, NULL);
--  }
--}
--
--void wxSQLite3Database::SetUpdateHook(wxSQLite3Hook* updateHook)
--{
--  CheckDatabase();
--  if (updateHook)
--  {
--    sqlite3_update_hook((sqlite3*) m_db, (void(*)(void*,int,const char*,const char*, wxsqlite_int64)) wxSQLite3FunctionContext::ExecUpdateHook, updateHook);
--  }
--  else
--  {
--    sqlite3_update_hook((sqlite3*) m_db, (void(*)(void*,int,const char*,const char*, wxsqlite_int64)) NULL, NULL);
--  }
--}
--
--void wxSQLite3Database::SetCollation(const wxString& collationName, wxSQLite3Collation* collation)
--{
--  CheckDatabase();
--  wxCharBuffer strCollationName = wxConvUTF8.cWC2MB(collationName.wc_str(*wxConvCurrent));
--  const char* localCollationName = strCollationName;
--  int rc;
--  if (collation)
--  {
--    rc = sqlite3_create_collation((sqlite3*) m_db, localCollationName, SQLITE_UTF8, collation, (int(*)(void*,int,const void*,int,const void*)) wxSQLite3Database::ExecComparisonWithCollation);
--  }
--  else
--  {
--    rc = sqlite3_create_collation((sqlite3*) m_db, localCollationName, SQLITE_UTF8, NULL, (int(*)(void*,int,const void*,int,const void*)) NULL);
--  }
--}
--
--void wxSQLite3Database::SetCollationNeededCallback()
--{
--  CheckDatabase();
--  int rc = sqlite3_collation_needed((sqlite3*) m_db, this, (void(*)(void*,sqlite3*,int,const char*)) wxSQLite3Database::ExecCollationNeeded);
--  if (rc != SQLITE_OK)
--  {
--    const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--}
--
--void wxSQLite3Database::CheckDatabase()
--{
--  if (!m_db)
--  {
--    throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NODB);
--  }
--}
--
--void* wxSQLite3Database::Prepare(const char* sql)
--{
--  CheckDatabase();
--
--  const char* tail=0;
--  sqlite3_stmt* stmt;
--
--  int rc = sqlite3_prepare_v2((sqlite3*) m_db, sql, -1, &stmt, &tail);
--
--  if (rc != SQLITE_OK)
--  {
--    const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--
--  return stmt;
--}
--
--/* static */
--int wxSQLite3Database::ExecComparisonWithCollation(void* collation,
--                                                   int len1, const void* text1,
--                                                   int len2, const void* text2)
--{
--#if wxUSE_UNICODE
--  wxString locText1((const char*) text1, wxConvUTF8, (size_t) len1);
--  wxString locText2((const char*) text2, wxConvUTF8, (size_t) len2);
--#else
--  size_t len = (len1 > len2) ? len1 : len2;
--  char* buffer = new char[len+1];
--  memcpy(buffer, text1, len1);
--  buffer[len1] = '\0';
--  wxString locText1(wxConvUTF8.cMB2WC((const char*) buffer), *wxConvCurrent);
--  memcpy(buffer, text2, len2);
--  buffer[len2] = '\0';
--  wxString locText2(wxConvUTF8.cMB2WC((const char*) buffer), *wxConvCurrent);
--  delete [] buffer;
--#endif
--  return ((wxSQLite3Collation*) collation)->Compare(locText1, locText2);
--}
--
--void wxSQLite3Database::ExecCollationNeeded(void* db, void*, int, const char* collationName)
--{
--#if wxUSE_UNICODE
--  wxString locCollation((const char*) collationName, wxConvUTF8);
--#else
--  wxString locCollation(wxConvUTF8.cMB2WC((const char*) collationName), *wxConvCurrent);
--#endif
--  ((wxSQLite3Database*) db)->SetNeededCollation(locCollation);
--}
--
--void wxSQLite3Database::GetMetaData(const wxString& databaseName, const wxString& tableName, const wxString& columnName,
--                                    wxString* dataType, wxString* collation, bool* notNull, bool* primaryKey, bool* autoIncrement)
--{
--#if WXSQLITE3_HAVE_METADATA
--  wxCharBuffer strDatabaseName = wxConvUTF8.cWC2MB(databaseName.wc_str(*wxConvCurrent));
--  const char* localDatabaseName = strDatabaseName;
--  if (databaseName == wxEmptyString) localDatabaseName = NULL;
--  wxCharBuffer strTableName = wxConvUTF8.cWC2MB(tableName.wc_str(*wxConvCurrent));
--  const char* localTableName = strTableName;
--  wxCharBuffer strColumnName = wxConvUTF8.cWC2MB(columnName.wc_str(*wxConvCurrent));
--  const char* localColumnName = strColumnName;
--  const char* localDataType;
--  const char* localCollation;
--  int localNotNull;
--  int localPrimaryKey;
--  int localAutoIncrement;
--  int rc = sqlite3_table_column_metadata((sqlite3*) m_db, localDatabaseName, localTableName, localColumnName,
--                                         &localDataType, &localCollation, &localNotNull, &localPrimaryKey, &localAutoIncrement);
--
--  if (rc != SQLITE_OK)
--  {
--    const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--
--  if (dataType      != NULL) *dataType      = UTF8toWxString(localDataType);
--  if (collation     != NULL) *collation     = UTF8toWxString(localCollation);
--
--  if (notNull       != NULL) *notNull       = (localNotNull       != 0);
--  if (primaryKey    != NULL) *primaryKey    = (localPrimaryKey    != 0);
--  if (autoIncrement != NULL) *autoIncrement = (localAutoIncrement != 0);
--#else
--  wxUnusedVar(databaseName);
--  wxUnusedVar(tableName);
--  wxUnusedVar(columnName);
--  wxUnusedVar(dataType);
--  wxUnusedVar(collation);
--  wxUnusedVar(notNull);
--  wxUnusedVar(primaryKey);
--  wxUnusedVar(autoIncrement);
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOMETADATA);
--#endif
--}
--
--void wxSQLite3Database::LoadExtension(const wxString& fileName, const wxString& entryPoint)
--{
--#if WXSQLITE3_HAVE_LOAD_EXTENSION
--  wxCharBuffer strFileName = wxConvUTF8.cWC2MB(fileName.wc_str(*wxConvCurrent));
--  const char* localFileName = strFileName;
--  wxCharBuffer strEntryPoint = wxConvUTF8.cWC2MB(entryPoint.wc_str(*wxConvCurrent));
--  const char* localEntryPoint = strEntryPoint;
--
--  int rc = sqlite3_load_extension((sqlite3 *) m_db, localFileName, localEntryPoint, NULL);
--  if (rc != SQLITE_OK)
--  {
--    const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--#else
--  wxUnusedVar(fileName);
--  wxUnusedVar(entryPoint);
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOLOADEXT);
--#endif
--}
--
--void wxSQLite3Database::EnableLoadExtension(bool enable)
--{
--#if WXSQLITE3_HAVE_LOAD_EXTENSION
--  int onoff = (enable) ? 1 : 0;
--  int rc = sqlite3_enable_load_extension((sqlite3 *) m_db, onoff);
--  if (rc != SQLITE_OK)
--  {
--    const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--#else
--  wxUnusedVar(enable);
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOLOADEXT);
--#endif
--}
--
--void wxSQLite3Database::ReKey(const wxString& newKey)
--{
--#if WXSQLITE3_HAVE_CODEC
--  wxCharBuffer strLocalNewKey = wxConvUTF8.cWC2MB(newKey.wc_str(*wxConvCurrent));
--  const char* localNewKey = strLocalNewKey;
--  wxMemoryBuffer binaryNewKey;
--  if (newKey.Length() > 0)
--  {
--    binaryNewKey.AppendData((void*) localNewKey, strlen(localNewKey));
--  }
--  ReKey(binaryNewKey);
--#else
--  wxUnusedVar(newKey);
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOCODEC);
--#endif
--}
--
--void wxSQLite3Database::ReKey(const wxMemoryBuffer& newKey)
--{
--#if WXSQLITE3_HAVE_CODEC
--  int rc = sqlite3_rekey((sqlite3*) m_db, newKey.GetData(), (int) newKey.GetDataLen());
--  if (rc != SQLITE_OK)
--  {
--    const char* localError = sqlite3_errmsg((sqlite3*) m_db);
--    throw wxSQLite3Exception(rc, UTF8toWxString(localError));
--  }
--#else
--  wxUnusedVar(newKey);
--  throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOCODEC);
--#endif
--}
--
--int wxSQLite3Database::GetLimit(wxSQLite3LimitType id)
--{
--  int value = -1;
--#if SQLITE_VERSION_NUMBER >= 3005008
--  CheckDatabase();
--  if (id >= WXSQLITE_LIMIT_LENGTH && id <= WXSQLITE_LIMIT_VARIABLE_NUMBER)
--  {
--    value = sqlite3_limit((sqlite3 *) m_db, id, -1);
--  }
--#else
--  wxUnusedVar(id);
--#endif
--  return value;
--}
--
--int wxSQLite3Database::SetLimit(wxSQLite3LimitType id, int newValue)
--{
--  int value = -1;
--#if SQLITE_VERSION_NUMBER >= 3005008
--  CheckDatabase();
--  if (id >= WXSQLITE_LIMIT_LENGTH && id <= WXSQLITE_LIMIT_VARIABLE_NUMBER)
--  {
--    value = sqlite3_limit((sqlite3 *) m_db, id, newValue);
--  }
--#else
--  wxUnusedVar(id);
--  wxUnusedVar(newValue);
--#endif
--  return value;
--}
--
--static const wxChar* limitCodeString[] =
--{ _T("SQLITE_LIMIT_LENGTH"),              _T("SQLITE_LIMIT_SQL_LENGTH"),
--  _T("SQLITE_LIMIT_COLUMN"),              _T("SQLITE_LIMIT_EXPR_DEPTH"),
--  _T("SQLITE_LIMIT_COMPOUND_SELECT"),     _T("SQLITE_LIMIT_VDBE_OP"),
--  _T("SQLITE_LIMIT_FUNCTION_ARG"),        _T("SQLITE_LIMIT_ATTACHED"),
--  _T("SQLITE_LIMIT_LIKE_PATTERN_LENGTH"), _T("SQLITE_LIMIT_VARIABLE_NUMBER")
--};
--
--
--/* static */
--wxString wxSQLite3Database::LimitTypeToString(wxSQLite3LimitType type)
--{
--  const wxChar* limitString = _T("Unknown");
--  if (type >= WXSQLITE_LIMIT_LENGTH && type <= WXSQLITE_LIMIT_VARIABLE_NUMBER)
--  {
--    limitString = limitCodeString[type];
--  }
--  return wxString(limitString);
--}
--
--/* static */
--void wxSQLite3Database::InitializeSQLite()
--{
--#if SQLITE_VERSION_NUMBER >= 3006000
--  int rc = sqlite3_initialize();
--  if (rc != SQLITE_OK)
--  {
--    throw wxSQLite3Exception(rc, wxERRMSG_INITIALIZE);
--  }
--#endif
--}
--
--/* static */
--void wxSQLite3Database::ShutdownSQLite()
--{
--#if SQLITE_VERSION_NUMBER >= 3006000
--  int rc = sqlite3_shutdown();
--  if (rc != SQLITE_OK)
--  {
--    throw wxSQLite3Exception(rc, wxERRMSG_SHUTDOWN);
--  }
--#endif
--}
--
--/* static */
--bool wxSQLite3Database::Randomness(int n, wxMemoryBuffer& random)
--{
--  bool ok = false;
--#if SQLITE_VERSION_NUMBER >= 3005008
--  if (n > 0)
--  {
--    void* buffer = random.GetWriteBuf(n);
--    sqlite3_randomness(n, buffer);
--    random.UngetWriteBuf(n);
--    ok = true;
--  }
--#else
--  wxUnusedVar(n);
--  wxUnusedVar(random);
--#endif
--  return ok;
--}
--
--// ----------------------------------------------------------------------------
--// wxSQLite3FunctionContext: class providing the function context
--//                           for user defined functions
--// ----------------------------------------------------------------------------
--
--int wxSQLite3FunctionContext::GetArgCount()
--{
--  return m_argc;
--}
--
--int wxSQLite3FunctionContext::GetArgType(int argIndex)
--{
--  if (argIndex >= 0 && argIndex < m_argc)
--  {
--    return sqlite3_value_type((sqlite3_value*) m_argv[argIndex]);
--  }
--  else
--  {
--    return SQLITE_NULL;
--  }
--}
--
--bool wxSQLite3FunctionContext::IsNull(int argIndex)
--{
--  if (argIndex >= 0 && argIndex < m_argc)
--  {
--    return sqlite3_value_type((sqlite3_value*) m_argv[argIndex]) == SQLITE_NULL;
--  }
--  else
--  {
--    return true;
--  }
--}
--
--int wxSQLite3FunctionContext::GetInt(int argIndex, int nullValue)
--{
--  if (argIndex >= 0 && argIndex < m_argc)
--  {
--    if (!IsNull(argIndex))
--    {
--      return sqlite3_value_int((sqlite3_value*) m_argv[argIndex]);
--    }
--    else
--    {
--      return nullValue;
--    }
--  }
--  else
--  {
--    return nullValue;
--  }
--}
--
--wxLongLong wxSQLite3FunctionContext::GetInt64(int argIndex, wxLongLong nullValue)
--{
--  if (argIndex >= 0 && argIndex < m_argc)
--  {
--    if (!IsNull(argIndex))
--    {
--      return wxLongLong(sqlite3_value_int64((sqlite3_value*) m_argv[argIndex]));
--    }
--    else
--    {
--      return nullValue;
--    }
--  }
--  else
--  {
--    return nullValue;
--  }
--}
--
--double wxSQLite3FunctionContext::GetDouble(int argIndex, double nullValue)
--{
--  if (argIndex >= 0 && argIndex < m_argc)
--  {
--    if (!IsNull(argIndex))
--    {
--      return sqlite3_value_double((sqlite3_value*) m_argv[argIndex]);
--    }
--    else
--    {
--      return nullValue;
--    }
--  }
--  else
--  {
--    return nullValue;
--  }
--}
--
--wxString wxSQLite3FunctionContext::GetString(int argIndex, const wxString& nullValue)
--{
--  if (argIndex >= 0 && argIndex < m_argc)
--  {
--    if (!IsNull(argIndex))
--    {
--      const char* localValue = (const char*) sqlite3_value_text((sqlite3_value*) m_argv[argIndex]);
--      return UTF8toWxString(localValue);
--    }
--    else
--    {
--      return nullValue;
--    }
--  }
--  else
--  {
--    return nullValue;
--  }
--}
--
--wxMemoryBuffer& wxSQLite3FunctionContext::GetBlob(int argIndex, wxMemoryBuffer& buffer)
--{
--  if (argIndex >= 0 && argIndex < m_argc)
--  {
--    if (!IsNull(argIndex))
--    {
--      int len = sqlite3_value_bytes((sqlite3_value*) m_argv[argIndex]);
--      const void* blob = sqlite3_value_blob((sqlite3_value*) m_argv[argIndex]);
--      buffer.AppendData((void*) blob, (size_t) len);
--    }
--  }
--  return buffer;
--}
--
--void wxSQLite3FunctionContext::SetResult(int value)
--{
--  sqlite3_result_int((sqlite3_context*) m_ctx, value);
--}
--
--void wxSQLite3FunctionContext::SetResult(wxLongLong value)
--{
--  sqlite3_result_int64((sqlite3_context*) m_ctx, value.GetValue());
--}
--
--void wxSQLite3FunctionContext::SetResult(double value)
--{
--  sqlite3_result_double((sqlite3_context*) m_ctx, value);
--}
--
--void wxSQLite3FunctionContext::SetResult(const wxString& value)
--{
--  wxCharBuffer strValue = wxConvUTF8.cWC2MB(value.wc_str(*wxConvCurrent));
--  const char* localValue = strValue;
--  sqlite3_result_text((sqlite3_context*) m_ctx, localValue, -1, SQLITE_TRANSIENT);
--}
--
--void wxSQLite3FunctionContext::SetResult(unsigned char* value, int len)
--{
--  sqlite3_result_blob((sqlite3_context*) m_ctx, value, len, SQLITE_TRANSIENT);
--}
--
--void wxSQLite3FunctionContext::SetResult(const wxMemoryBuffer& buffer)
--{
--  sqlite3_result_blob((sqlite3_context*) m_ctx, buffer.GetData(), (int) buffer.GetDataLen(), SQLITE_TRANSIENT);
--}
--
--void wxSQLite3FunctionContext::SetResultNull()
--{
--  sqlite3_result_null((sqlite3_context*) m_ctx);
--}
--
--void wxSQLite3FunctionContext::SetResultZeroBlob(int blobSize)
--{
--#if SQLITE_VERSION_NUMBER >= 3004000
--  sqlite3_result_zeroblob((sqlite3_context*) m_ctx, blobSize);
--#endif
--}
--
--void wxSQLite3FunctionContext::SetResultArg(int argIndex)
--{
--  if (argIndex >= 0 && argIndex < m_argc) {
--    sqlite3_result_value((sqlite3_context*) m_ctx, (sqlite3_value*) m_argv[argIndex]);
--  } else {
--    sqlite3_result_null((sqlite3_context*) m_ctx);
--  }
--}
--
--void wxSQLite3FunctionContext::SetResultError(const wxString& errmsg)
--{
--  wxCharBuffer strErrmsg = wxConvUTF8.cWC2MB(errmsg.wc_str(*wxConvCurrent));
--  const char* localErrmsg = strErrmsg;
--  sqlite3_result_error((sqlite3_context*) m_ctx, localErrmsg, -1);
--}
--
--int wxSQLite3FunctionContext::GetAggregateCount()
--{
--  if (m_isAggregate)
--  {
--    return m_count;
--  }
--  else
--  {
--    return 0;
--  }
--}
--
--void* wxSQLite3FunctionContext::GetAggregateStruct(int len)
--{
--  if (m_isAggregate)
--  {
--    return sqlite3_aggregate_context((sqlite3_context*) m_ctx, len);
--  }
--  else
--  {
--    return NULL;
--  }
--}
--
--/* static */
--void wxSQLite3FunctionContext::ExecScalarFunction(void* ctx, int argc, void** argv)
--{
--  wxSQLite3FunctionContext context(ctx, false, argc, argv);
--  wxSQLite3ScalarFunction* func = (wxSQLite3ScalarFunction*) sqlite3_user_data((sqlite3_context*) ctx);
--  func->Execute(context);
--}
--
--/* static */
--void wxSQLite3FunctionContext::ExecAggregateStep(void* ctx, int argc, void** argv)
--{
--  wxSQLite3FunctionContext context(ctx, true, argc, argv);
--  wxSQLite3AggregateFunction* func = (wxSQLite3AggregateFunction*) sqlite3_user_data((sqlite3_context*) ctx);
--  func->m_count++;
--  context.m_count = func->m_count;
--  func->Aggregate(context);
--}
--
--/* static */
--void wxSQLite3FunctionContext::ExecAggregateFinalize(void* ctx)
--{
--  wxSQLite3FunctionContext context(ctx, true, 0, NULL);
--  wxSQLite3AggregateFunction* func = (wxSQLite3AggregateFunction*) sqlite3_user_data((sqlite3_context*) ctx);
--  context.m_count = func->m_count;
--  func->Finalize(context);
--}
--
--/* static */
--int wxSQLite3FunctionContext::ExecAuthorizer(void* func, int type,
--                                             const char* arg1, const char* arg2,
--                                             const char* arg3, const char* arg4)
--{
--#if wxUSE_UNICODE
--  wxString locArg1(arg1, wxConvUTF8);
--  wxString locArg2(arg2, wxConvUTF8);
--  wxString locArg3(arg3, wxConvUTF8);
--  wxString locArg4(arg4, wxConvUTF8);
--#else
--  wxString locArg1(wxConvUTF8.cMB2WC(arg1), *wxConvCurrent);
--  wxString locArg2(wxConvUTF8.cMB2WC(arg2), *wxConvCurrent);
--  wxString locArg3(wxConvUTF8.cMB2WC(arg3), *wxConvCurrent);
--  wxString locArg4(wxConvUTF8.cMB2WC(arg4), *wxConvCurrent);
--#endif
--  wxSQLite3Authorizer::wxAuthorizationCode localType = (wxSQLite3Authorizer::wxAuthorizationCode) type;
--  return (int) ((wxSQLite3Authorizer*) func)->Authorize(localType, locArg1, locArg2, locArg3, locArg3);
--}
--
--/* static */
--int wxSQLite3FunctionContext::ExecCommitHook(void* hook)
--{
--  return (int) ((wxSQLite3Hook*) hook)->CommitCallback();
--}
--
--/* static */
--void wxSQLite3FunctionContext::ExecRollbackHook(void* hook)
--{
--  ((wxSQLite3Hook*) hook)->RollbackCallback();
--}
--
--/* static */
--void wxSQLite3FunctionContext::ExecUpdateHook(void* hook, int type,
--                                              const char* database, const char* table,
--                                              wxsqlite_int64 rowid)
--{
--#if wxUSE_UNICODE
--  wxString locDatabase(database, wxConvUTF8);
--  wxString locTable(table, wxConvUTF8);
--#else
--  wxString locDatabase(wxConvUTF8.cMB2WC(database), *wxConvCurrent);
--  wxString locTable(wxConvUTF8.cMB2WC(table), *wxConvCurrent);
--#endif
--  wxSQLite3Hook::wxUpdateType locType = (wxSQLite3Hook::wxUpdateType) type;
--  wxLongLong locRowid = rowid;
--  ((wxSQLite3Hook*) hook)->UpdateCallback(locType, locDatabase, locTable, locRowid);
--}
--
--wxSQLite3FunctionContext::wxSQLite3FunctionContext(void* ctx, bool isAggregate, int argc, void** argv)
--: m_ctx(ctx), m_isAggregate(isAggregate), m_count(0), m_argc(argc), m_argv(argv)
--{
--}
--
--static const wxChar* authCodeString[] =
--{ _T("SQLITE_COPY"),              _T("SQLITE_CREATE_INDEX"),      _T("SQLITE_CREATE_TABLE"),
--  _T("SQLITE_CREATE_TEMP_INDEX"), _T("SQLITE_CREATE_TEMP_TABLE"), _T("SQLITE_CREATE_TEMP_TRIGGER"),
--  _T("SQLITE_CREATE_TEMP_VIEW"),  _T("SQLITE_CREATE_TRIGGER"),    _T("SQLITE_CREATE_VIEW"),
--  _T("SQLITE_DELETE"),            _T("SQLITE_DROP_INDEX"),        _T("SQLITE_DROP_TABLE"),
--  _T("SQLITE_DROP_TEMP_INDEX"),   _T("SQLITE_DROP_TEMP_TABLE"),   _T("SQLITE_DROP_TEMP_TRIGGER"),
--  _T("SQLITE_DROP_TEMP_VIEW"),    _T("SQLITE_DROP_TRIGGER"),      _T("SQLITE_DROP_VIEW"),
--  _T("SQLITE_INSERT"),            _T("SQLITE_PRAGMA"),            _T("SQLITE_READ"),
--  _T("SQLITE_SELECT"),            _T("SQLITE_TRANSACTION"),       _T("SQLITE_UPDATE"),
--  _T("SQLITE_ATTACH"),            _T("SQLITE_DETACH"),            _T("SQLITE_ALTER_TABLE"),
--  _T("SQLITE_REINDEX"),           _T("SQLITE_ANALYZE"),           _T("SQLITE_CREATE_VTABLE"),
--  _T("SQLITE_DROP_VTABLE"),       _T("SQLITE_FUNCTION"),          _T("SQLITE_SAVEPOINT")
--};
--
--
--/* static */
--wxString wxSQLite3Authorizer::AuthorizationCodeToString(wxSQLite3Authorizer::wxAuthorizationCode type)
--{
--  const wxChar* authString = _T("Unknown");
--  if (type >= SQLITE_COPY && type <= SQLITE_MAX_CODE)
--  {
--    authString = authCodeString[type];
--  }
--  return wxString(authString);
--}
--
--// ----------------------------------------------------------------------------
--// wxSQLite3Transaction
--// ----------------------------------------------------------------------------
--
--wxSQLite3Transaction::wxSQLite3Transaction(wxSQLite3Database* db, wxSQLite3TransactionType transactionType)
--{
--  wxASSERT(db != NULL);
--  m_database = db;
--  try
--  {
--    m_database->Begin(transactionType);
--  }
--  catch (...)
--  {
--    m_database = NULL; // Flag that transaction is not active
--  }
--}
--
--wxSQLite3Transaction::~wxSQLite3Transaction()
--{
--  if (m_database != NULL)
--  {
--    m_database->Rollback();
--  }
--}
--
--void wxSQLite3Transaction::Commit()
--{
--  try
--  {
--    m_database->Commit();
--  }
--  catch (...)
--  {
--    m_database->Rollback();
--  }
--  m_database = NULL;
--}
--
--void wxSQLite3Transaction::Rollback()
--{
--  try
--  {
--    m_database->Rollback();
--  }
--  catch (...)
--  {
--    m_database->Rollback();
--  }
--  m_database = NULL;
--}

-- 
guayadeque packaging



More information about the pkg-multimedia-commits mailing list