Skip to content

Commit

Permalink
Prepare release of wxSQLite3 4.4.4
Browse files Browse the repository at this point in the history
Added SQLite logging support
Updated documentation
  • Loading branch information
utelle committed Aug 7, 2019
1 parent 62cfb33 commit eee2509
Show file tree
Hide file tree
Showing 9 changed files with 401 additions and 286 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
dnl Process this script with autoconf to create configure for wxsqlite3 library
dnl
dnl Copyright (C) 2017-2018 Ulrich Telle <ulrich@telle-online.de>, Vadim Zeitlin <vadim@wxwidgets.org>
dnl Copyright (C) 2017-2019 Ulrich Telle <ulrich@telle-online.de>, Vadim Zeitlin <vadim@wxwidgets.org>
dnl
dnl This file is covered by the same licence as the entire wxSQLite3 package.

AC_INIT([wxsqlite3], [4.4.3], [ulrich@telle-online.de])
AC_INIT([wxsqlite3], [4.4.4], [ulrich@telle-online.de])

dnl This is the version tested with, might work with earlier ones.
AC_PREREQ([2.69])
Expand Down
267 changes: 160 additions & 107 deletions docs/Doxyfile

Large diffs are not rendered by default.

59 changes: 42 additions & 17 deletions include/wx/wxsqlite3.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
** Purpose: wxWidgets wrapper around the SQLite3 embedded database library.
** Author: Ulrich Telle
** Created: 2005-07-14
** Copyright: (c) 2005-2018 Ulrich Telle
** Copyright: (c) 2005-2019 Ulrich Telle
** License: LGPL-3.0+ WITH WxWindows-exception-3.1
*/

Expand Down Expand Up @@ -214,6 +214,33 @@ class WXDLLIMPEXP_SQLITE3 wxSQLite3StatementBuffer
char* m_buffer; ///< Internal buffer
};

/// SQLite logging hook
class WXDLLIMPEXP_SQLITE3 wxSQLite3Logger
{
public:
/// Constructor
wxSQLite3Logger();

/// Destructor
virtual ~wxSQLite3Logger();

void Activate(bool active = true) { m_isActive = active; }
void Deactivate() { m_isActive = false; }
bool IsActive() const { return m_isActive; }

virtual void HandleLogMessage(int errorCode, const wxString& errorMessage);

/// Execute the user defined commit hook (internal use only)
static void ExecLoggerHook(void* logger, int errorCode, const char* errorMsg);

private:
/// Copy constructor
wxSQLite3Logger(const wxSQLite3Logger& logger);

bool m_isActive;
};


/// Context for user defined scalar or aggregate functions
/**
* A function context gives user defined scalar or aggregate functions
Expand Down Expand Up @@ -2326,7 +2353,6 @@ class WXDLLIMPEXP_SQLITE3 wxSQLite3Blob
class WXDLLIMPEXP_SQLITE3 wxSQLite3NamedCollection
{
public:

/// Copy constructor
wxSQLite3NamedCollection(const wxSQLite3NamedCollection& collection);

Expand All @@ -2342,42 +2368,41 @@ class WXDLLIMPEXP_SQLITE3 wxSQLite3NamedCollection
*/
const wxString& GetName() const { return m_name; }

/// Gets state of object
/// Gets state of the collection
/**
* \return state of object
* \return state of the collection
*/
bool IsOk() const { return (m_data != NULL); }

/// Gets state of object (same as IsOk() method)
/// Gets state of the collection (same as IsOk() method)
/**
* \return state of object
* \return state of the collection
*/
operator bool() const { return IsOk(); }

protected:
wxString m_name; ///< Name of the collection
void* m_data; ///< Reference to the actual array of values representing the collection

/// Constructor (internal use only)
wxSQLite3NamedCollection(const wxString& collectionName, void* collectionData);

/// Default constructor
/**
Creates fully empty object that must be set by assignment, be careful
Creates completely empty collection instance that must be set by assignment, be careful
*/
wxSQLite3NamedCollection() : m_name(wxEmptyString), m_data(NULL) {}

wxString m_name; ///< Name of the collection
void* m_data; ///< Reference to the actual array of values representing the collection

friend class wxSQLite3Database;
};

/// Represents a named integer value collection
class WXDLLIMPEXP_SQLITE3 wxSQLite3IntegerCollection : public wxSQLite3NamedCollection
{
public:

/// Default constructor
/**
Creates fully empty object that must be set by assignment, be careful
* Creates completely empty collection instance that must be set by assignment, be careful
*/
wxSQLite3IntegerCollection() {}

Expand Down Expand Up @@ -2410,9 +2435,8 @@ class WXDLLIMPEXP_SQLITE3 wxSQLite3IntegerCollection : public wxSQLite3NamedColl
void Bind(int n, int* integerCollection);

protected:

/// Constructor (internal use only)
wxSQLite3IntegerCollection(const wxString& collectionName, void* collectionData);
/// Constructor (internal use only)
wxSQLite3IntegerCollection(const wxString& collectionName, void* collectionData);

private:
friend class wxSQLite3Database;
Expand All @@ -2422,10 +2446,9 @@ class WXDLLIMPEXP_SQLITE3 wxSQLite3IntegerCollection : public wxSQLite3NamedColl
class WXDLLIMPEXP_SQLITE3 wxSQLite3StringCollection : public wxSQLite3NamedCollection
{
public:

/// Default constructor
/**
Creates fully empty object that must be set by assignment, be careful
* Creates completely empty collection instance that must be set by assignment, be careful
*/
wxSQLite3StringCollection() {}

Expand Down Expand Up @@ -3458,6 +3481,7 @@ class WXDLLIMPEXP_SQLITE3 wxSQLite3Database
* any SQLite databases.
*/
static void InitializeSQLite();
static void InitializeSQLite(const wxSQLite3Logger& logger);

/// Shutdown the SQLite library
/**
Expand Down Expand Up @@ -3771,6 +3795,7 @@ class WXDLLIMPEXP_SQLITE3 wxSQLite3Transaction
wxSQLite3Database* m_database; ///< Pointer to the associated database (no ownership)
};


#if wxUSE_REGEX

/// User defined function for REGEXP operator
Expand Down
4 changes: 2 additions & 2 deletions include/wx/wxsqlite3_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#define WXSQLITE3_MAJOR_VERSION 4
#define WXSQLITE3_MINOR_VERSION 4
#define WXSQLITE3_RELEASE_NUMBER 3
#define WXSQLITE3_RELEASE_NUMBER 4
#define WXSQLITE3_SUBRELEASE_NUMBER 0
#define WXSQLITE3_VERSION_STRING "wxSQLite3 4.4.3"
#define WXSQLITE3_VERSION_STRING "wxSQLite3 4.4.4"

#endif // _WXSQLITE3_VERSION_H_
14 changes: 14 additions & 0 deletions include/wx/wxsqlite3def.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@
<dl>
<dt><b>4.4.4</b> - <i>August 2019</i></dt>
<dd>
Upgrade to SQLite version 3.29.0<br>
Added SQLite logging support<br>
Added build support for VS2019<br>
Added CMake support (PR #63)<br>
Updated build files to overcome problems with static builds (issue #73)<br>
Eliminated duplication of error messages for different wxWidgets builds (PR #64)<br>
Fixed missing call to progress callback in wxSQLite3Database::Restore (PR #66)<br>
Fixed issue #58 with silently failing wxSQLite3Transaction::Commit method<br>
Fixed issue with named collections which could result in crashes (PR #59)<br>
</dd>
<dt><b>4.4.3</b> - <i>May 2019</i></dt>
<dd>
Upgrade to SQLite version 3.28.0<br>
Expand Down Expand Up @@ -609,6 +622,7 @@ The following people have contributed to wxSQLite3:
<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>
<li>Deamhan (CMake support and various bug fixes)</li>
</ul>
*/
Expand Down
10 changes: 10 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ Currently the following encryption schemes are supported:

## <a name="history"></a>Version history

* 4.4.4 - *August 2019*
- Upgrade to SQLite version 3.29.0
- Added SQLite logging support
- Added build support for VS2019
- Added CMake support (PR #63)
- Updated build files to overcome problems with static builds (issue #73)
- Eliminated duplication of error messages for different wxWidgets builds (PR #64)
- Fixed missing call to progress callback in wxSQLite3Database::Restore (PR #66)
- Fixed issue #58 with silently failing wxSQLite3Transaction::Commit method
- Fixed issue with named collections which could result in crashes (PR #59)
* 4.4.3 - *May 2019*
- Upgrade to SQLite version 3.28.0
* 4.4.2 - *February 2019*
Expand Down
11 changes: 6 additions & 5 deletions sqlite3secure/readme-precompiled.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Release notes

May 18, 2019
August 7, 2019

The SQLite3 shell applications are now compatible with the official
SQLite3 shell in respect to the compile time options
`SQLITE_ENABLE_DBSTAT_VTAB`, SQLITE_ENABLE_STMTVTAB`, and
`SQLITE_ENABLE_DBSTAT_VTAB`, `SQLITE_ENABLE_STMTVTAB`, and
`SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION`.

This archive with precompiled Windows DLLs for SQLite3 contains
Expand All @@ -14,15 +14,16 @@ versions without ICU support.
The required ICU DLLs are not included in this archive; they have
to be downloaded from

https://www.npcglib.org/~stathis/blog/precompiled-icu
https://github.com/unicode-org/icu/releases/latest

ICU support for SQLite3 is based on the pre-built ICU Libraries v59.1.
These are compiled for 32/64-bit Windows, using Visual Studio 2015.
ICU support for SQLite3 is based on the pre-built ICU Libraries v64.2.
These are compiled for 32/64-bit Windows, using Visual Studio 2017.

When using the ICU DLLs you may need to specify an environment variable
ICU_DATA pointing to the data folder, where the icudtXXl.dat file lives
(e.g. set ICU_DATA=F:\icu\data).


## Archive content

Archive name: `wxsqlite3-sqlite3-multicipher.zip`
Expand Down
2 changes: 1 addition & 1 deletion sqlite3secure/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This document describes the SQLite3 encryption extension provided by wxSQLite3.
## Table of contents

- [Installation](#installation)
- [General]{#general}
- [General](#general)
- [wxMSW](#wxmsw)
- [wxGTK](#wxgtk)
- [Supported ciphers](#ciphers)
Expand Down
Loading

0 comments on commit eee2509

Please sign in to comment.