Prima versione Sqlite3.
Sostituirà Sqlite git-svn-id: svn://10.65.10.50/branches/R_10_00@22956 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ef6e666e69
commit
f2e631a62f
5026
wxSqlite3/wxsqlite3.cpp
Normal file
5026
wxSqlite3/wxsqlite3.cpp
Normal file
File diff suppressed because it is too large
Load Diff
2949
wxSqlite3/wxsqlite3.h
Normal file
2949
wxSqlite3/wxsqlite3.h
Normal file
File diff suppressed because it is too large
Load Diff
522
wxSqlite3/wxsqlite3def.h
Normal file
522
wxSqlite3/wxsqlite3def.h
Normal file
@ -0,0 +1,522 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
// 2009-02-21 - Upgrade to SQLite3 version 3.6.11
|
||||
// Added user defined function class for REGEXP operator
|
||||
// Added support for SQLite backup/restore API
|
||||
// 2009-09-12 - Upgrade to SQLite3 version 3.6.18
|
||||
// Fixed a potential memory leak in wxSQLite3Statement class
|
||||
// 2009-11-07 - Upgrade to SQLite3 version 3.6.20
|
||||
// 2010-02-05 - Upgrade to SQLite3 version 3.6.22
|
||||
// 2010-03-11 - Upgrade to SQLite3 version 3.6.23
|
||||
// 2010-07-25 - Upgrade to SQLite3 version 3.7.0
|
||||
// 2010-10-10 - Upgrade to SQLite3 version 3.7.3
|
||||
// 2010-12-11 - Upgrade to SQLite3 version 3.7.4
|
||||
// 2011-02-09 - Upgrade to SQLite3 version 3.7.5
|
||||
// 2011-04-17 - Upgrade to SQLite3 version 3.7.6.1
|
||||
// 2011-06-30 - Upgrade to SQLite3 version 3.7.7.1
|
||||
// 2011-08-14 - Progress callback for Backup/Restore added
|
||||
// 2011-10-25 - Upgrade to SQLite3 version 3.7.8
|
||||
// 2012-01-17 - Upgrade to SQLite3 version 3.7.10
|
||||
// 2012-10-17 - Upgrade to SQLite3 version 3.7.14.1
|
||||
// 2013-03-19 - Upgrade to SQLite3 version 3.7.16
|
||||
// 2013-08-29 - Upgrade to SQLite3 version 3.8.0
|
||||
// 2013-09-07 - Upgrade to SQLite3 version 3.8.0.2
|
||||
// 2013-12-08 - Upgrade to SQLite3 version 3.8.2
|
||||
//
|
||||
// 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. The methods ToUTF8 and FromUTF8 of the wxString class (available
|
||||
since wxWidgets 2.8.4) are used for the conversion. 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>3.1.0</b> - <i>May 2014</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.8.4.3<br>
|
||||
Added flag <i>isDeterministic</i> to method wxSQLite3Database::CreateFunction<br>
|
||||
Added new GUI sample<br>
|
||||
Changed implementation of encryption extension (see Readme file in sqlite3 subfolder)<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>3.0.6</b> - <i>December 2013</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.8.2<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>3.0.5</b> - <i>September 2013</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.8.0.2<br>
|
||||
Added support for setting the temporary directory for SQLite on Windows<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>3.0.4</b> - <i>August 2013</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.8.0<br>
|
||||
Added support for querying performance characteristics of prepared statements<br>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt><b>3.0.3</b> - <i>March 2013</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.7.16<br>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt><b>3.0.2</b> - <i>December 2012</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.7.15.1<br>
|
||||
Corrected an internal SQLite data structure to avoid compile time warnings<br>
|
||||
Changed method wxSQLite3Exception::ErrorCodeAsString to return the error messages provided by SQLite<br>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt><b>3.0.1</b> - <i>November 2012</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.7.14.1<br>
|
||||
Cleaned up and optimized Finalize methods<br>
|
||||
Modified wxSQLite3Database::Close to avoid potential memory leaks<br>
|
||||
Added method wxSQLite3Database::GetWrapperVersion<br>
|
||||
Added method wxSQLite3Database::IsReadOnly<br>
|
||||
Added method wxSQLite3Statement::BindUnixDateTime<br>
|
||||
Added method wxSQLite3ResultSet::GetUnixDateTime<br>
|
||||
Added method wxSQLite3ResultSet::GetAutomaticDateTime<br>
|
||||
Fixed a potential memory leak in method wxSQLite3Database::ExecuteUpdate<br>
|
||||
Added a wxsqlite3.pc file on request of the Fedora Project developers<br>
|
||||
Replaced assert by wxASSERT in wxSQLite3Transaction constructor<br>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt><b>3.0.0</b> - <i>January 2012</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.7.10<br>
|
||||
Added method wxSQLite3Database::Vacuum<br>
|
||||
Added method wxSQLite3Database::GetDatabaseFilename<br>
|
||||
Added method wxSQLite3Database::ReleaseMemory<br>
|
||||
Added method wxSQLite3ResultSet::CursorMoved<br>
|
||||
Added method wxSQLite3Statement::IsBusy<br>
|
||||
Fixed a bug in method operator= of wxSQLite3StringCollection
|
||||
causing an endless recursion on assignment<br>
|
||||
Dropped the concept of SQLite3 pointer ownership in favor of reference
|
||||
counted pointers allowing much more flexible use of wxSQLite3 classes<br>
|
||||
Modified SQLite3 encryption extension (defining int64 datatype
|
||||
for SHA2 algorithm)<br>
|
||||
Dropped dbadmin sample from build files<br>
|
||||
Added Premake support for SQLite3 library with encryption support
|
||||
and for wxSQLite3 (experimental)<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>2.1.3</b> - <i>August 2011</i></dt>
|
||||
<dd>
|
||||
Corrected default behaviour for attached databases in case of
|
||||
an encrypted main database. (Now the attached database uses the same
|
||||
encryption key as the main database if no explicit key is given.
|
||||
Previously the attached database remained unencrypted.)<br>
|
||||
Added an optional progress callback for metheods Backup and Restore<br>
|
||||
Added method SetBackupRestorePageCount to set the number of pages
|
||||
to be copied in one cycle of the backup/restore process<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>2.1.2</b> - <i>July 2011</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.7.7.1<br>
|
||||
Modified wxSQLite3Transaction to make it exception safe<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>2.1.1</b> - <i>April 2011</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.7.6.1<br>
|
||||
Added convenience method wxSQLite3Statement::ExecuteScalar<br>
|
||||
Changed write-ahead log checkpoint method to new version (v2)<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>2.1.0</b> - <i>March 2011</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.7.5<br>
|
||||
Added wxSQLite+, a database administration application written by Fred Cailleau-Lepetit,
|
||||
as a GUI sample for wxSQLite3. Minor adjustments were applied to make wxSQLite+
|
||||
compatible with wxWidgets 2.9.x. Please note that wxSQLite+ is under GPL license.<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>2.0.2</b> - <i>December 2010</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.7.4<br>
|
||||
Added support for rebinding a BLOB object to a new row<br>
|
||||
Added support for determining if an SQL statement writes the database<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>2.0.1</b> - <i>October 2010</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.7.3<br>
|
||||
Added parameter transferStatementOwnership to method wxSQLite3Statement::ExecuteQuery
|
||||
to allow using the returned result set beyond the life time of the wxSQLite3Statement instance<br>
|
||||
Eliminated the use of sqlite3_mprintf which caused linker problems when loading SQLite dynamically<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>2.0.0</b> - <i>July 2010</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.7.0<br>
|
||||
Fixed a bug in class wxSQLite3ResultSet<br>
|
||||
Added support for SQLite's write-ahead log journal mode<br>
|
||||
Added support for named collections (see class wxSQLite3NamedCollection)<br>
|
||||
Changed UTF-8 string handling to use methods To/FromUTF8 of the wxString class (requires wxWidgets 2.8.4 or higher)<br>
|
||||
Compatible with wxWidgets 2.9.1<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>1.9.9</b> - <i>March 2010</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.6.23<br>
|
||||
Fixed a bug when compiling for dynamic loading of SQLite<br>
|
||||
Added static methods for accessing the run-time library compilation options diagnostics<br>
|
||||
Added mathod FormatV to class wxSQLite3StatementBuffer<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>1.9.8</b> - <i>February 2010</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.6.22<br>
|
||||
Fixed a bug when compiling without precompiled header support
|
||||
(by including wx/arrstr.h)<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>1.9.7</b> - <i>November 2009</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.6.20<br>
|
||||
Added methods to query, enable or disable foreign key support<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>1.9.6</b> - <i>September 2009</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.6.18<br>
|
||||
Added method to get the SQLite library source id<br>
|
||||
Added flags parameter to wxSQLite3Database::Open to allow additional control over the database
|
||||
connection (see http://www.sqlite.org/c3ref/open.html for further information)<br>
|
||||
Fixed a potential memory leak in wxSQLite3Statement class<br>
|
||||
Converted encryption extension from C++ to pure C to make it
|
||||
compatible with the SQLite amalgamation.<br>
|
||||
|
||||
</dd>
|
||||
<dt><b>1.9.5</b> - <i>February 2009</i></dt>
|
||||
<dd>
|
||||
Upgrade to SQLite version 3.6.11<br>
|
||||
Added user defined function class for REGEXP operator.<br>
|
||||
Added support for SQLite backup/restore API, introduced with SQLite 3.6.11<br>
|
||||
|
||||
</dd>
|
||||
<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 (ulrich DOT telle AT gmx DOT de)
|
||||
|
||||
\section ackn Acknowledgements
|
||||
|
||||
Kudos to <b>Fred Cailleau-Lepetit</b> for developing <b>wxSQLite+</b> as a sample demonstrating
|
||||
the wxWidgets components <b>wxAUI</b> and <b>wxSQLite3</b> and for allowing it to be included
|
||||
in the wxSQLite3 distribution.
|
||||
|
||||
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
|
||||
|
||||
/*
|
||||
GCC warns about using __declspec on forward declarations
|
||||
while MSVC complains about forward declarations without
|
||||
__declspec for the classes later declared with it. To hide this
|
||||
difference a separate macro for forward declarations is defined:
|
||||
*/
|
||||
#if defined(HAVE_VISIBILITY) || (defined(__WINDOWS__) && defined(__GNUC__))
|
||||
#define WXDLLIMPEXP_FWD_SQLITE3
|
||||
#else
|
||||
#define WXDLLIMPEXP_FWD_SQLITE3 WXDLLIMPEXP_SQLITE3
|
||||
#endif
|
||||
|
||||
#endif // _WX_SQLITE3_DEF_H_
|
242
wxSqlite3/wxsqlite3dyn.h
Normal file
242
wxSqlite3/wxsqlite3dyn.h
Normal file
@ -0,0 +1,242 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
#if SQLITE_VERSION_NUMBER >= 3006011
|
||||
DYNFUNC(return, sqlite3_backup*, sqlite3_backup_init, (sqlite3 *pDest, const char *zDestName, sqlite3 *pSource, const char *zSourceName), (pDest, zDestName, pSource, zSourceName));
|
||||
DYNFUNC(return, int, sqlite3_backup_step, (sqlite3_backup *p, int nPage), (p, nPage));
|
||||
DYNFUNC(return, int, sqlite3_backup_finish, (sqlite3_backup *p), (p));
|
||||
DYNFUNC(return, int, sqlite3_backup_remaining, (sqlite3_backup *p), (p));
|
||||
DYNFUNC(return, int, sqlite3_backup_pagecount, (sqlite3_backup *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));
|
||||
#if SQLITE_VERSION_NUMBER >= 3007004
|
||||
DYNFUNC(return, int, sqlite3_blob_reopen, (sqlite3_blob *pBlob, sqlite3_int64 rowid), (pBlob, rowid));
|
||||
#endif
|
||||
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));
|
||||
#if SQLITE_VERSION_NUMBER >= 3006023
|
||||
DYNFUNC(return, int, sqlite3_compileoption_used, (const char *zOptName), (zOptName));
|
||||
DYNFUNC(return, const char *, sqlite3_compileoption_get, (int N), (N));
|
||||
#endif
|
||||
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));
|
||||
#if SQLITE_VERSION_NUMBER >= 3007003
|
||||
DYNFUNC(return, int, sqlite3_create_function_v2, (sqlite3 *db, const char *zFunctionName, int nArg, int eTextRep, void *pApp, void (*xFunc)(sqlite3_context*,int,sqlite3_value**), void (*xStep)(sqlite3_context*,int,sqlite3_value**), void (*xFinal)(sqlite3_context*), void(*xDestroy)(void*)), (db, zFunctionName, nArg, eTextRep, pApp, xFunc, xStep, xFinal, xDestroy));
|
||||
#endif
|
||||
#if SQLITE_VERSION_NUMBER >= 3004001
|
||||
DYNFUNC(return, int, sqlite3_create_module, (sqlite3 *db, const char *zName, const sqlite3_module *p, void *pClientData), (db, zName, p, pClientData));
|
||||
DYNFUNC(return, int, sqlite3_create_module_v2, (sqlite3 *db, const char *zName, const sqlite3_module *p, void *pClientData, void(*xDestroy)(void*)), (db, zName, p, pClientData, xDestroy));
|
||||
#endif
|
||||
// DYNFUNC(return, int, sqlite3_data_count, (sqlite3_stmt *pStmt), (pStmt));
|
||||
#if SQLITE_VERSION_NUMBER >= 3007010
|
||||
DYNFUNC(return, const char *, sqlite3_db_filename, (sqlite3 *db, const char *zDbName), (db, zDbName));
|
||||
#endif
|
||||
// DYNFUNC(return, sqlite3 *, sqlite3_db_handle, (sqlite3_stmt *pStmt), (pStmt));
|
||||
#if SQLITE_VERSION_NUMBER >= 3007011
|
||||
DYNFUNC(return, int, sqlite3_db_readonly, (sqlite3 *db, const char *zDbName), (db, zDbName));
|
||||
#endif
|
||||
#if SQLITE_VERSION_NUMBER >= 3007010
|
||||
DYNFUNC(return, int, sqlite3_db_release_memory, (sqlite3 *db), (db));
|
||||
#endif
|
||||
DYNFUNC(return, int, sqlite3_declare_vtab, (sqlite3 *db, const char *zSQL), (db, zSQL));
|
||||
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));
|
||||
#if SQLITE_VERSION_NUMBER >= 3007015
|
||||
DYNFUNC(return, const char *, sqlite3_errstr, (int rc), (rc));
|
||||
#endif
|
||||
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, (void *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, void*, sqlite3_malloc, (int size), (size));
|
||||
// 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, void*, sqlite3_realloc, (void* ptr, int newSize), (ptr, newSize));
|
||||
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));
|
||||
#if SQLITE_VERSION_NUMBER >= 3007003
|
||||
DYNFUNC(return, int, sqlite3_rtree_geometry_callback, (sqlite3 *db, const char *zGeom, int (*xGeom)(sqlite3_rtree_geometry *, int nCoord, double *aCoord, int *pRes), void *pContext), (db, zGeom, xGeom, pContext));
|
||||
#endif
|
||||
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, int, sqlite3_sleep, (int ms), (ms));
|
||||
// DYNFUNC(return, char *, sqlite3_snprintf, (int n, char *zBuf, const char *zFormat, ...), (n, zBuf, zFormat, ...));
|
||||
#if SQLITE_VERSION_NUMBER >= 3006018
|
||||
DYNFUNC(return, const char *, sqlite3_sourceid, (void), ());
|
||||
#endif
|
||||
#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));
|
||||
#if SQLITE_VERSION_NUMBER >= 3007010
|
||||
DYNFUNC(return, int, sqlite3_stmt_busy, (sqlite3_stmt* pStmt), (pStmt));
|
||||
#endif
|
||||
#if SQLITE_VERSION_NUMBER >= 3007004
|
||||
DYNFUNC(return, int, sqlite3_stmt_readonly, (sqlite3_stmt *pStmt), (pStmt));
|
||||
#endif
|
||||
#if SQLITE_VERSION_NUMBER >= 3007000
|
||||
DYNFUNC(return, int, sqlite3_stmt_status, (sqlite3_stmt* pStmt, int op, int resetFlg), (pStmt, op, resetFlg));
|
||||
#endif
|
||||
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));
|
||||
#if SQLITE_VERSION_NUMBER >= 3007000
|
||||
// DYNFUNC(return, int, sqlite3_unlock_notify, (sqlite3 *pBlocked, void (*xNotify)(void **apArg, int nArg), void *pNotifyArg), (pBlocked, xNotify, pNotifyArg));
|
||||
#endif
|
||||
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 SQLITE_VERSION_NUMBER >= 3007000
|
||||
DYNFUNC(return, int, sqlite3_wal_autocheckpoint, (sqlite3 *db, int N), (db, N));
|
||||
DYNFUNC(return, int, sqlite3_wal_checkpoint, (sqlite3 *db, const char *zDb), (db, zDb));
|
||||
#if SQLITE_VERSION_NUMBER >= 3007006
|
||||
DYNFUNC(return, int, sqlite3_wal_checkpoint_v2, (sqlite3 *db, const char *zDb, int mode, int* logFrameCount, int* ckptFrameCount), (db, zDb, mode, logFrameCount, ckptFrameCount));
|
||||
#endif
|
||||
DYNFUNC(return, void *, sqlite3_wal_hook, (sqlite3 *db, int (*xCallback)(void *, sqlite3 *, const char*, int), void *pArg), (db, xCallback, pArg));
|
||||
#endif
|
||||
#if SQLITE_VERSION_NUMBER >= 3007014
|
||||
//#if defined(__WXMSW__)
|
||||
DYNFUNC(return, int, sqlite3_win32_set_directory, (DWORD type, LPCWSTR zValue), (type, zValue));
|
||||
//#endif
|
||||
#endif
|
||||
#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
|
||||
|
||||
#if WXSQLITE3_HAVE_CODEC
|
||||
DYNFUNC(return, int, sqlite3_key, (sqlite3 *db, const void *pKey, int nKey), (db, pKey, nKey));
|
||||
DYNFUNC(return, int, sqlite3_rekey, (sqlite3 *db, const void *pKey, int nKey), (db, pKey, nKey));
|
||||
#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
|
51
wxSqlite3/wxsqlite3opt.h
Normal file
51
wxSqlite3/wxsqlite3opt.h
Normal file
@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// 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 1
|
||||
#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
|
||||
|
||||
//! To disable support for named collections define WXSQLITE3_USE_NAMED_COLLECTIONS as 0 here.
|
||||
//! Attention: if WXSQLITE3_USE_NAMED_COLLECTIONS is defined as 1 (default) SQLite needs to be
|
||||
//! compiled without SQLITE_OMIT_VIRTUALTABLE for this to work
|
||||
#ifndef WXSQLITE3_USE_NAMED_COLLECTIONS
|
||||
#define WXSQLITE3_USE_NAMED_COLLECTIONS 1
|
||||
#endif
|
||||
|
||||
#endif // _WX_SQLITE3_OPT_H_
|
Loading…
x
Reference in New Issue
Block a user