Extensible SQLite driver for Qt4

Submitted by mimec on 2012-04-26

This library is an alternative SQLite driver for Qt4 which includes its own copy of SQLite and allows extending it by implementing custom functions, collations, etc. It is very similar to the standard SQLITE driver which is part of the Qt framework.

The main difference is that upon opening a database, it registers custom collations for case-insenitive comparisions and a function implementing the REGEXP operator. These are the most important two feature missing from standard SQLite implementation.

Why create another driver and not just use the existing one? The reason is that it is currently not possible to call the sqlite_ functions from the SQLite API, because they are not exported when the SQLite library bundled with Qt is used. Unfortunately, this is the case for many platforms, including Windows. See QTBUG-18084 and my article about collation in SQLite for more information.

To workaround this limitation, the SQLITEX driver comes with it's own bundled SQLite library. However, it can also be configured to use the system sqlite library when it's possible.

The SQLITEX driver is used by WebIssues Client 1.0 in place of the RDB component used in previous version.


You can find the full documentation for this component at doc.mimec.org/articles/sqlitex/. It is also included in the source package.


1.1 (2012-04-26)

  • updated SQLite to 3.7.11
  • updated the SQLite driver to Qt 4.8
  • removed the usage of QString::fromUtf16()

1.0 (2011-12-19)

  • initial version


This code is licensed under the GNU Lesser General Public License, for compatibility with code from Qt which it incorporates, and to make it possible to use it in commercial applications.