1
///////////////////////////////////////////////////////////////////////////////
2
// Name: wxsqlite3dyn.h
3
// Purpose: wxWidgets wrapper around the SQLite3 embedded database library.
4
// Author: Ulrich Telle
7
// Copyright: (c) Ulrich Telle
8
// Licence: wxWindows licence
9
///////////////////////////////////////////////////////////////////////////////
11
/// \file wxsqlite3dyn.h Definition of the SQLite3 API functions
15
DYNFUNC(return, void *, sqlite3_aggregate_context, (sqlite3_context *p, int nBytes), (p, nBytes));
16
#if SQLITE_VERSION_NUMBER <= 3006000
17
DYNFUNC(return, int, sqlite3_aggregate_count, (sqlite3_context *p), (p));
19
DYNFUNC(return, int, sqlite3_bind_blob, (sqlite3_stmt *pStmt, int i, const void *zData, int nData, void (*xDel)(void*)), (pStmt, i, zData, nData, xDel));
20
DYNFUNC(return, int, sqlite3_bind_double, (sqlite3_stmt *pStmt, int i, double rValue), (pStmt, i, rValue));
21
DYNFUNC(return, int, sqlite3_bind_int, (sqlite3_stmt *pStmt, int i, int iValue), (pStmt, i, iValue));
22
DYNFUNC(return, int, sqlite3_bind_int64, (sqlite3_stmt *pStmt, int i, sqlite_int64 iValue), (pStmt, i, iValue));
23
DYNFUNC(return, int, sqlite3_bind_null, (sqlite3_stmt *pStmt, int i), (pStmt, i));
24
DYNFUNC(return, int, sqlite3_bind_parameter_count, (sqlite3_stmt *pStmt), (pStmt));
25
DYNFUNC(return, int, sqlite3_bind_parameter_index, (sqlite3_stmt *pStmt, const char *zName), (pStmt, zName));
26
DYNFUNC(return, const char *, sqlite3_bind_parameter_name, (sqlite3_stmt *pStmt, int i), (pStmt, i));
27
DYNFUNC(return, int, sqlite3_bind_text, (sqlite3_stmt *pStmt, int i, const char *zData, int nData, void (*xDel)(void*)), (pStmt, i, zData, nData, xDel));
28
// DYNFUNC(return, int, sqlite3_bind_text16, (sqlite3_stmt *pStmt, int i, const void *zData, int nData, void (*xDel)(void*)), (pStmt, i, zData, nData, xDel));
29
// DYNFUNC(return, int, sqlite3_bind_value, (sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue), (pStmt, i, pValue));
30
#if SQLITE_VERSION_NUMBER >= 3004000
31
DYNFUNC(return, int, sqlite3_bind_zeroblob, (sqlite3_stmt *pStmt, int i, int n), (pStmt, i, n));
32
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));
33
DYNFUNC(return, int, sqlite3_blob_close, (sqlite3_blob *pBlob), (pBlob));
34
DYNFUNC(return, int, sqlite3_blob_bytes, (sqlite3_blob *pBlob), (pBlob));
35
DYNFUNC(return, int, sqlite3_blob_read, (sqlite3_blob *pBlob, void *z, int n, int iOffset), (pBlob, z, n, iOffset));
36
DYNFUNC(return, int, sqlite3_blob_write, (sqlite3_blob *pBlob, const void *z, int n, int iOffset), (pBlob, z, n, iOffset));
38
// DYNFUNC(return, int, sqlite3_busy_handler, (sqlite3 *db, int (*xBusy)(void*,int), void *pArg), (db, xBusy, pArg));
39
DYNFUNC(return, int, sqlite3_busy_timeout, (sqlite3 *db, int ms), (db, ms));
40
DYNFUNC(return, int, sqlite3_changes, (sqlite3 *db), (db));
41
DYNFUNC(return, int, sqlite3_clear_bindings, (sqlite3_stmt *pStmt), (pStmt));
42
DYNFUNC(return, int, sqlite3_close, (sqlite3 *db), (db));
43
DYNFUNC(return, int, sqlite3_collation_needed, (sqlite3 *db, void *pCollNeededArg, void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)), (db, pCollNeededArg, xCollNeeded));
44
// DYNFUNC(return, int, sqlite3_collation_needed16, (sqlite3 *db, void *pCollNeededArg, void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)), (db, pCollNeededArg, xCollNeeded16));
45
DYNFUNC(return, const void *, sqlite3_column_blob, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
46
DYNFUNC(return, int, sqlite3_column_bytes, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
47
// DYNFUNC(return, int, sqlite3_column_bytes16, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
48
DYNFUNC(return, int, sqlite3_column_count, (sqlite3_stmt *pStmt), (pStmt));
49
DYNFUNC(return, const char *, sqlite3_column_decltype, (sqlite3_stmt *pStmt, int i), (pStmt, i));
50
// DYNFUNC(return, const void *, sqlite3_column_decltype16, (sqlite3_stmt *pStmt, int i), (pStmt, i));
51
DYNFUNC(return, double, sqlite3_column_double, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
52
DYNFUNC(return, int, sqlite3_column_int, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
53
DYNFUNC(return, sqlite_int64, sqlite3_column_int64, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
54
DYNFUNC(return, const char *, sqlite3_column_name, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
55
// DYNFUNC(return, const void *, sqlite3_column_name16, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
56
DYNFUNC(return, const unsigned char *, sqlite3_column_text, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
57
// DYNFUNC(return, const void *, sqlite3_column_text16, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
58
DYNFUNC(return, int, sqlite3_column_type, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
59
DYNFUNC(return, void *, sqlite3_commit_hook, (sqlite3 *db, int (*xCallback)(void*), void *pArg), (db, xCallback, pArg));
60
DYNFUNC(return, int, sqlite3_complete, (const char *sql), (sql));
61
// DYNFUNC(return, int, sqlite3_complete16, (const void *sql), (sql));
62
//DYNFUNC(return, sqlite3 *, sqlite3_context_db_handle, (sqlite3_context* ctx) (ctx));
63
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));
64
// 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));
65
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));
66
// 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));
67
// DYNFUNC(return, int, sqlite3_data_count, (sqlite3_stmt *pStmt), (pStmt));
68
// DYNFUNC(return, sqlite3 *, sqlite3_db_handle, (sqlite3_stmt *pStmt), (pStmt));
69
DYNFUNC(return, int, sqlite3_enable_load_extension, (sqlite3 *db, int onoff), (db, onoff));
70
DYNFUNC(return, int, sqlite3_enable_shared_cache, (int enable), (enable));
71
// DYNFUNC(return, int, sqlite3_errcode, (sqlite3 *db), (db));
72
DYNFUNC(return, const char *, sqlite3_errmsg, (sqlite3 *db), (db));
73
// DYNFUNC(return, const void *, sqlite3_errmsg16, (sqlite3 *db), (db));
74
DYNFUNC(return, int, sqlite3_exec, (sqlite3 *db, const char *sql, sqlite3_callback c, void *v, char **errmsg), (db, sql, c, v, errmsg));
75
// DYNFUNC(return, int, sqlite3_expired, (sqlite3_stmt *pStmt), (pStmt));
76
DYNFUNC(return, int, sqlite3_extended_result_codes, (sqlite3 *db, int onoff), (db, onoff));
77
DYNFUNC(return, int, sqlite3_finalize, (sqlite3_stmt *pStmt), (pStmt));
78
DYNFUNC(;, void, sqlite3_free, (char *z), (z));
79
DYNFUNC(;, void, sqlite3_free_table, (char **result), (result));
80
DYNFUNC(return, int, sqlite3_get_autocommit, (sqlite3 *db), (db));
81
// DYNFUNC(return, void *, sqlite3_get_auxdata, (sqlite3_context *pCtx, int iArg), (pCtx, iArg));
82
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));
83
// DYNFUNC(return, int, sqlite3_global_recover, (), ());
84
#if SQLITE_VERSION_NUMBER >= 3006000
85
DYNFUNC(return, int, sqlite3_initialize, (void), ());
87
DYNFUNC(;, void, sqlite3_interrupt, (sqlite3 *db), (db));
88
DYNFUNC(return, sqlite_int64, sqlite3_last_insert_rowid, (sqlite3 *db), (db));
89
DYNFUNC(return, const char *, sqlite3_libversion, (void), ());
90
// DYNFUNC(return, int, sqlite3_libversion_number, (void), ());
91
DYNFUNC(return, int, sqlite3_limit, (sqlite3 *db, int id, int newVal), (db, id, newVal));
92
DYNFUNC(return, int, sqlite3_load_extension, (sqlite3 *db, const char *zFile, const char *zProc, char **pzErrMsg), (db, zFile, zProc, pzErrMsg));
93
// DYNFUNC(return, char *, sqlite3_mprintf, (const char *zFormat,...), (zFormat,...));
94
#if SQLITE_VERSION_NUMBER >= 3006000
95
DYNFUNC(return, sqlite3_stmt *, sqlite3_next_stmt, (sqlite3 *pDb, sqlite3_stmt *pStmt), (pDb, pStmt));
97
DYNFUNC(return, int, sqlite3_open, (const char *filename, sqlite3 **ppDb), (filename, ppDb));
98
// DYNFUNC(return, int, sqlite3_open16, (const void *filename, sqlite3 **ppDb), (filename, ppDb));
99
DYNFUNC(return, int, sqlite3_open_v2, (const char *filename, sqlite3 **ppDb, int flags, const char *zVfs), (filename, ppDb, flags, zVfs));
100
DYNFUNC(return, int, sqlite3_prepare_v2, (sqlite3 *db, const char *zSql, int nBytes, sqlite3_stmt **ppStmt, const char **pzTail), (db, zSql, nBytes, ppStmt, pzTail));
101
// DYNFUNC(return, int, sqlite3_prepare16_v2, (sqlite3 *db, const void *zSql, int nBytes, sqlite3_stmt **ppStmt, const void **pzTail), (db, zSql, nBytes, ppStmt, pzTail));
102
// DYNFUNC(;, void, sqlite3_progress_handler, (sqlite3 *db, int nOps, int (*xProgress)(void*), void *pArg), (db, nOps, xProgress, pArg));
103
DYNFUNC(;, void, sqlite3_randomness, (int N, void *P) (N, P));
104
DYNFUNC(return, int, sqlite3_reset, (sqlite3_stmt *pStmt), (pStmt));
105
DYNFUNC(;, void, sqlite3_result_blob, (sqlite3_context *pCtx, const void *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
106
DYNFUNC(;, void, sqlite3_result_double, (sqlite3_context *pCtx, double rVal), (pCtx, rVal));
107
DYNFUNC(;, void, sqlite3_result_error, (sqlite3_context *pCtx, const char *z, int n), (pCtx, z, n));
108
// DYNFUNC(;, void, sqlite3_result_error16, (sqlite3_context *pCtx, const void *z, int n), (pCtx, z, n));
109
DYNFUNC(;, void, sqlite3_result_int, (sqlite3_context *pCtx, int iVal), (pCtx, iVal));
110
DYNFUNC(;, void, sqlite3_result_int64, (sqlite3_context *pCtx, sqlite_int64 iVal), (pCtx, iVal));
111
DYNFUNC(;, void, sqlite3_result_null, (sqlite3_context *pCtx), (pCtx));
112
DYNFUNC(;, void, sqlite3_result_text, (sqlite3_context *pCtx, const char *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
113
// DYNFUNC(;, void, sqlite3_result_text16, (sqlite3_context *pCtx, const void *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
114
// DYNFUNC(;, void, sqlite3_result_text16be, (sqlite3_context *pCtx, const void *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
115
// DYNFUNC(;, void, sqlite3_result_text16le, (sqlite3_context *pCtx, const void *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
116
DYNFUNC(;, void, sqlite3_result_value, (sqlite3_context *pCtx, sqlite3_value *pValue), (pCtx, pValue));
117
#if SQLITE_VERSION_NUMBER >= 3004000
118
DYNFUNC(;, void, sqlite3_result_zeroblob, (sqlite3_context *pCtx, int n), (pCtx, n));
120
DYNFUNC(return, void *, sqlite3_rollback_hook, (sqlite3 *db, void (*xCallback)(void*), void *pArg), (db, xCallback, pArg));
121
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));
122
// DYNFUNC(;, void, sqlite3_set_auxdata, (sqlite3_context *pCtx, int iArg, void *pAux, void (*xDelete)(void*)), (pCtx, iArg, pAux, xDelete));
123
#if SQLITE_VERSION_NUMBER >= 3006000
124
DYNFUNC(return, int, sqlite3_shutdown, (void), ());
126
// DYNFUNC(return, char *, sqlite3_snprintf, (int n, char *zBuf, const char *zFormat, ...), (n, zBuf, zFormat, ...));
127
#if SQLITE_VERSION_NUMBER >= 3005003
128
DYNFUNC(return, const char *, sqlite3_sql, (sqlite3_stmt *pStmt), (pStmt));
130
DYNFUNC(return, int, sqlite3_step, (sqlite3_stmt *pStmt), (pStmt));
131
DYNFUNC(return, int, sqlite3_threadsafe, (void), ());
132
// DYNFUNC(return, int, sqlite3_total_changes, (sqlite3 *db), (db));
133
// DYNFUNC(return, void *, sqlite3_trace, (sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg), (db, xTrace, pArg));
134
// DYNFUNC(return, int, sqlite3_transfer_bindings, (sqlite3_stmt *pStmt, sqlite3_stmt *pStmt), (pStmt, pStmt));
135
DYNFUNC(return, void *, sqlite3_update_hook, (sqlite3 *db, void (*xCallback)(void *, int, char const *, char const *, wxsqlite_int64), void *pArg), (db, xCallback, pArg));
136
DYNFUNC(return, void *, sqlite3_user_data, (sqlite3_context *pCtx), (pCtx));
137
DYNFUNC(return, const void *, sqlite3_value_blob, (sqlite3_value *pVal), (pVal));
138
DYNFUNC(return, int, sqlite3_value_bytes, (sqlite3_value *pVal), (pVal));
139
// DYNFUNC(return, int, sqlite3_value_bytes16, (sqlite3_value *pVal), (pVal));
140
DYNFUNC(return, double, sqlite3_value_double, (sqlite3_value *pVal), (pVal));
141
DYNFUNC(return, int, sqlite3_value_int, (sqlite3_value *pVal), (pVal));
142
DYNFUNC(return, sqlite_int64, sqlite3_value_int64, (sqlite3_value *pVal), (pVal));
143
DYNFUNC(return, const unsigned char *, sqlite3_value_text, (sqlite3_value *pVal), (pVal));
144
// DYNFUNC(return, const void *, sqlite3_value_text16, (sqlite3_value *pVal), (pVal));
145
// DYNFUNC(return, const void *, sqlite3_value_text16be, (sqlite3_value *pVal), (pVal));
146
// DYNFUNC(return, const void *, sqlite3_value_text16le, (sqlite3_value *pVal), (pVal));
147
DYNFUNC(return, int, sqlite3_value_type, (sqlite3_value *pVal), (pVal));
148
DYNFUNC(return, char *, sqlite3_vmprintf, (const char* p, va_list ap), (p, ap));
150
#if WXSQLITE3_HAVE_METADATA
151
DYNFUNC(return, const char *, sqlite3_column_database_name, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
152
// DYNFUNC(return, const void *, sqlite3_column_database_name16, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
153
DYNFUNC(return, const char *, sqlite3_column_table_name, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
154
// DYNFUNC(return, const void *, sqlite3_column_table_name16, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
155
DYNFUNC(return, const char *, sqlite3_column_origin_name, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
156
// DYNFUNC(return, const void *, sqlite3_column_origin_name16, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
157
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));
161
// Additional error codes: SQLCRYPT3_TOOSHORT, SQLCRYPT3_TOOLONG, SQLCRYPT3_BADLIC
162
// DYNFUNC(return, int, sqlcrypt3_passphrase, (sqlite3 *db, const char *key, int codec, char **errmsg), (db, key, codec, errmsg));
163
// DYNFUNC(return, int, sqlcrypt3_license_key, (const char *lic), (lic));
166
// ATTN: different open call
167
// DYNFUNC(return, int, sqlite3_open, (const char *filename, const char *strPass, sqlite3 **ppDb), (filename, strPass, ppDb));
168
// DYNFUNC(;, void, sqlite3_changepassword, (sqlite3* db,const char* strNewPass), (db, strNewPass));