Fossil SCM

(cherry-pick): Update the makefiles so that the build-in SQLite compiles with SQLITE_OMIT_SHARED_CACHE. Update the build-in SQLite sources to 3.15.2.

jan.nijtmans 2016-09-13 14:15 UTC branch-1.35
Commit 0417467b72063283c132e596dd83e59edcd85b2f
--- src/main.mk
+++ src/main.mk
@@ -481,10 +481,11 @@
481481
$(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
482482
483483
# Setup the options used to compile the included SQLite library.
484484
SQLITE_OPTIONS = -DNDEBUG=1 \
485485
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
486
+ -DSQLITE_OMIT_SHARED_CACHE \
486487
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
487488
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
488489
-DSQLITE_THREADSAFE=0 \
489490
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
490491
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
491492
--- src/main.mk
+++ src/main.mk
@@ -481,10 +481,11 @@
481 $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
482
483 # Setup the options used to compile the included SQLite library.
484 SQLITE_OPTIONS = -DNDEBUG=1 \
485 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
486 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
487 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
488 -DSQLITE_THREADSAFE=0 \
489 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
490 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
491
--- src/main.mk
+++ src/main.mk
@@ -481,10 +481,11 @@
481 $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
482
483 # Setup the options used to compile the included SQLite library.
484 SQLITE_OPTIONS = -DNDEBUG=1 \
485 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
486 -DSQLITE_OMIT_SHARED_CACHE \
487 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
488 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
489 -DSQLITE_THREADSAFE=0 \
490 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
491 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
492
--- src/main.mk
+++ src/main.mk
@@ -481,10 +481,11 @@
481481
$(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
482482
483483
# Setup the options used to compile the included SQLite library.
484484
SQLITE_OPTIONS = -DNDEBUG=1 \
485485
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
486
+ -DSQLITE_OMIT_SHARED_CACHE \
486487
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
487488
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
488489
-DSQLITE_THREADSAFE=0 \
489490
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
490491
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
491492
--- src/main.mk
+++ src/main.mk
@@ -481,10 +481,11 @@
481 $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
482
483 # Setup the options used to compile the included SQLite library.
484 SQLITE_OPTIONS = -DNDEBUG=1 \
485 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
486 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
487 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
488 -DSQLITE_THREADSAFE=0 \
489 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
490 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
491
--- src/main.mk
+++ src/main.mk
@@ -481,10 +481,11 @@
481 $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
482
483 # Setup the options used to compile the included SQLite library.
484 SQLITE_OPTIONS = -DNDEBUG=1 \
485 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
486 -DSQLITE_OMIT_SHARED_CACHE \
487 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
488 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
489 -DSQLITE_THREADSAFE=0 \
490 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
491 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
492
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -153,10 +153,11 @@
153153
# Options used to compile the included SQLite library.
154154
#
155155
set SQLITE_OPTIONS {
156156
-DNDEBUG=1
157157
-DSQLITE_OMIT_LOAD_EXTENSION=1
158
+ -DSQLITE_OMIT_SHARED_CACHE
158159
-DSQLITE_ENABLE_LOCKING_STYLE=0
159160
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1
160161
-DSQLITE_THREADSAFE=0
161162
-DSQLITE_DEFAULT_FILE_FORMAT=4
162163
-DSQLITE_ENABLE_EXPLAIN_COMMENTS
163164
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -153,10 +153,11 @@
153 # Options used to compile the included SQLite library.
154 #
155 set SQLITE_OPTIONS {
156 -DNDEBUG=1
157 -DSQLITE_OMIT_LOAD_EXTENSION=1
 
158 -DSQLITE_ENABLE_LOCKING_STYLE=0
159 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1
160 -DSQLITE_THREADSAFE=0
161 -DSQLITE_DEFAULT_FILE_FORMAT=4
162 -DSQLITE_ENABLE_EXPLAIN_COMMENTS
163
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -153,10 +153,11 @@
153 # Options used to compile the included SQLite library.
154 #
155 set SQLITE_OPTIONS {
156 -DNDEBUG=1
157 -DSQLITE_OMIT_LOAD_EXTENSION=1
158 -DSQLITE_OMIT_SHARED_CACHE
159 -DSQLITE_ENABLE_LOCKING_STYLE=0
160 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1
161 -DSQLITE_THREADSAFE=0
162 -DSQLITE_DEFAULT_FILE_FORMAT=4
163 -DSQLITE_ENABLE_EXPLAIN_COMMENTS
164
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -153,10 +153,11 @@
153153
# Options used to compile the included SQLite library.
154154
#
155155
set SQLITE_OPTIONS {
156156
-DNDEBUG=1
157157
-DSQLITE_OMIT_LOAD_EXTENSION=1
158
+ -DSQLITE_OMIT_SHARED_CACHE
158159
-DSQLITE_ENABLE_LOCKING_STYLE=0
159160
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1
160161
-DSQLITE_THREADSAFE=0
161162
-DSQLITE_DEFAULT_FILE_FORMAT=4
162163
-DSQLITE_ENABLE_EXPLAIN_COMMENTS
163164
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -153,10 +153,11 @@
153 # Options used to compile the included SQLite library.
154 #
155 set SQLITE_OPTIONS {
156 -DNDEBUG=1
157 -DSQLITE_OMIT_LOAD_EXTENSION=1
 
158 -DSQLITE_ENABLE_LOCKING_STYLE=0
159 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1
160 -DSQLITE_THREADSAFE=0
161 -DSQLITE_DEFAULT_FILE_FORMAT=4
162 -DSQLITE_ENABLE_EXPLAIN_COMMENTS
163
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -153,10 +153,11 @@
153 # Options used to compile the included SQLite library.
154 #
155 set SQLITE_OPTIONS {
156 -DNDEBUG=1
157 -DSQLITE_OMIT_LOAD_EXTENSION=1
158 -DSQLITE_OMIT_SHARED_CACHE
159 -DSQLITE_ENABLE_LOCKING_STYLE=0
160 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1
161 -DSQLITE_THREADSAFE=0
162 -DSQLITE_DEFAULT_FILE_FORMAT=4
163 -DSQLITE_ENABLE_EXPLAIN_COMMENTS
164
+6 -4
--- src/shell.c
+++ src/shell.c
@@ -522,11 +522,11 @@
522522
}
523523
}
524524
#if defined(_WIN32) || defined(WIN32)
525525
/* For interactive input on Windows systems, translate the
526526
** multi-byte characterset characters into UTF-8. */
527
- if( stdin_is_interactive ){
527
+ if( stdin_is_interactive && in==stdin ){
528528
char *zTrans = sqlite3_win32_mbcs_to_utf8_v2(zLine, 0);
529529
if( zTrans ){
530530
int nTrans = strlen30(zTrans)+1;
531531
if( nTrans>nLine ){
532532
zLine = realloc(zLine, nTrans);
@@ -2944,14 +2944,14 @@
29442944
}
29452945
29462946
/*
29472947
** Convert a 2-byte or 4-byte big-endian integer into a native integer
29482948
*/
2949
-unsigned int get2byteInt(unsigned char *a){
2949
+static unsigned int get2byteInt(unsigned char *a){
29502950
return (a[0]<<8) + a[1];
29512951
}
2952
-unsigned int get4byteInt(unsigned char *a){
2952
+static unsigned int get4byteInt(unsigned char *a){
29532953
return (a[0]<<24) + (a[1]<<16) + (a[2]<<8) + a[3];
29542954
}
29552955
29562956
/*
29572957
** Implementation of the ".info" command.
@@ -4894,11 +4894,11 @@
48944894
while( errCnt==0 || !bail_on_error || (in==0 && stdin_is_interactive) ){
48954895
fflush(p->out);
48964896
zLine = one_input_line(in, zLine, nSql>0);
48974897
if( zLine==0 ){
48984898
/* End of input */
4899
- if( stdin_is_interactive ) printf("\n");
4899
+ if( in==0 && stdin_is_interactive ) printf("\n");
49004900
break;
49014901
}
49024902
if( seenInterrupt ){
49034903
if( in!=0 ) break;
49044904
seenInterrupt = 0;
@@ -5315,10 +5315,12 @@
53155315
53165316
zSize = cmdline_option_value(argc, argv, ++i);
53175317
szHeap = integerValue(zSize);
53185318
if( szHeap>0x7fff0000 ) szHeap = 0x7fff0000;
53195319
sqlite3_config(SQLITE_CONFIG_HEAP, malloc((int)szHeap), (int)szHeap, 64);
5320
+#else
5321
+ (void)cmdline_option_value(argc, argv, ++i);
53205322
#endif
53215323
}else if( strcmp(z,"-scratch")==0 ){
53225324
int n, sz;
53235325
sz = (int)integerValue(cmdline_option_value(argc,argv,++i));
53245326
if( sz>400000 ) sz = 400000;
53255327
--- src/shell.c
+++ src/shell.c
@@ -522,11 +522,11 @@
522 }
523 }
524 #if defined(_WIN32) || defined(WIN32)
525 /* For interactive input on Windows systems, translate the
526 ** multi-byte characterset characters into UTF-8. */
527 if( stdin_is_interactive ){
528 char *zTrans = sqlite3_win32_mbcs_to_utf8_v2(zLine, 0);
529 if( zTrans ){
530 int nTrans = strlen30(zTrans)+1;
531 if( nTrans>nLine ){
532 zLine = realloc(zLine, nTrans);
@@ -2944,14 +2944,14 @@
2944 }
2945
2946 /*
2947 ** Convert a 2-byte or 4-byte big-endian integer into a native integer
2948 */
2949 unsigned int get2byteInt(unsigned char *a){
2950 return (a[0]<<8) + a[1];
2951 }
2952 unsigned int get4byteInt(unsigned char *a){
2953 return (a[0]<<24) + (a[1]<<16) + (a[2]<<8) + a[3];
2954 }
2955
2956 /*
2957 ** Implementation of the ".info" command.
@@ -4894,11 +4894,11 @@
4894 while( errCnt==0 || !bail_on_error || (in==0 && stdin_is_interactive) ){
4895 fflush(p->out);
4896 zLine = one_input_line(in, zLine, nSql>0);
4897 if( zLine==0 ){
4898 /* End of input */
4899 if( stdin_is_interactive ) printf("\n");
4900 break;
4901 }
4902 if( seenInterrupt ){
4903 if( in!=0 ) break;
4904 seenInterrupt = 0;
@@ -5315,10 +5315,12 @@
5315
5316 zSize = cmdline_option_value(argc, argv, ++i);
5317 szHeap = integerValue(zSize);
5318 if( szHeap>0x7fff0000 ) szHeap = 0x7fff0000;
5319 sqlite3_config(SQLITE_CONFIG_HEAP, malloc((int)szHeap), (int)szHeap, 64);
 
 
5320 #endif
5321 }else if( strcmp(z,"-scratch")==0 ){
5322 int n, sz;
5323 sz = (int)integerValue(cmdline_option_value(argc,argv,++i));
5324 if( sz>400000 ) sz = 400000;
5325
--- src/shell.c
+++ src/shell.c
@@ -522,11 +522,11 @@
522 }
523 }
524 #if defined(_WIN32) || defined(WIN32)
525 /* For interactive input on Windows systems, translate the
526 ** multi-byte characterset characters into UTF-8. */
527 if( stdin_is_interactive && in==stdin ){
528 char *zTrans = sqlite3_win32_mbcs_to_utf8_v2(zLine, 0);
529 if( zTrans ){
530 int nTrans = strlen30(zTrans)+1;
531 if( nTrans>nLine ){
532 zLine = realloc(zLine, nTrans);
@@ -2944,14 +2944,14 @@
2944 }
2945
2946 /*
2947 ** Convert a 2-byte or 4-byte big-endian integer into a native integer
2948 */
2949 static unsigned int get2byteInt(unsigned char *a){
2950 return (a[0]<<8) + a[1];
2951 }
2952 static unsigned int get4byteInt(unsigned char *a){
2953 return (a[0]<<24) + (a[1]<<16) + (a[2]<<8) + a[3];
2954 }
2955
2956 /*
2957 ** Implementation of the ".info" command.
@@ -4894,11 +4894,11 @@
4894 while( errCnt==0 || !bail_on_error || (in==0 && stdin_is_interactive) ){
4895 fflush(p->out);
4896 zLine = one_input_line(in, zLine, nSql>0);
4897 if( zLine==0 ){
4898 /* End of input */
4899 if( in==0 && stdin_is_interactive ) printf("\n");
4900 break;
4901 }
4902 if( seenInterrupt ){
4903 if( in!=0 ) break;
4904 seenInterrupt = 0;
@@ -5315,10 +5315,12 @@
5315
5316 zSize = cmdline_option_value(argc, argv, ++i);
5317 szHeap = integerValue(zSize);
5318 if( szHeap>0x7fff0000 ) szHeap = 0x7fff0000;
5319 sqlite3_config(SQLITE_CONFIG_HEAP, malloc((int)szHeap), (int)szHeap, 64);
5320 #else
5321 (void)cmdline_option_value(argc, argv, ++i);
5322 #endif
5323 }else if( strcmp(z,"-scratch")==0 ){
5324 int n, sz;
5325 sz = (int)integerValue(cmdline_option_value(argc,argv,++i));
5326 if( sz>400000 ) sz = 400000;
5327
+6 -4
--- src/shell.c
+++ src/shell.c
@@ -522,11 +522,11 @@
522522
}
523523
}
524524
#if defined(_WIN32) || defined(WIN32)
525525
/* For interactive input on Windows systems, translate the
526526
** multi-byte characterset characters into UTF-8. */
527
- if( stdin_is_interactive ){
527
+ if( stdin_is_interactive && in==stdin ){
528528
char *zTrans = sqlite3_win32_mbcs_to_utf8_v2(zLine, 0);
529529
if( zTrans ){
530530
int nTrans = strlen30(zTrans)+1;
531531
if( nTrans>nLine ){
532532
zLine = realloc(zLine, nTrans);
@@ -2944,14 +2944,14 @@
29442944
}
29452945
29462946
/*
29472947
** Convert a 2-byte or 4-byte big-endian integer into a native integer
29482948
*/
2949
-unsigned int get2byteInt(unsigned char *a){
2949
+static unsigned int get2byteInt(unsigned char *a){
29502950
return (a[0]<<8) + a[1];
29512951
}
2952
-unsigned int get4byteInt(unsigned char *a){
2952
+static unsigned int get4byteInt(unsigned char *a){
29532953
return (a[0]<<24) + (a[1]<<16) + (a[2]<<8) + a[3];
29542954
}
29552955
29562956
/*
29572957
** Implementation of the ".info" command.
@@ -4894,11 +4894,11 @@
48944894
while( errCnt==0 || !bail_on_error || (in==0 && stdin_is_interactive) ){
48954895
fflush(p->out);
48964896
zLine = one_input_line(in, zLine, nSql>0);
48974897
if( zLine==0 ){
48984898
/* End of input */
4899
- if( stdin_is_interactive ) printf("\n");
4899
+ if( in==0 && stdin_is_interactive ) printf("\n");
49004900
break;
49014901
}
49024902
if( seenInterrupt ){
49034903
if( in!=0 ) break;
49044904
seenInterrupt = 0;
@@ -5315,10 +5315,12 @@
53155315
53165316
zSize = cmdline_option_value(argc, argv, ++i);
53175317
szHeap = integerValue(zSize);
53185318
if( szHeap>0x7fff0000 ) szHeap = 0x7fff0000;
53195319
sqlite3_config(SQLITE_CONFIG_HEAP, malloc((int)szHeap), (int)szHeap, 64);
5320
+#else
5321
+ (void)cmdline_option_value(argc, argv, ++i);
53205322
#endif
53215323
}else if( strcmp(z,"-scratch")==0 ){
53225324
int n, sz;
53235325
sz = (int)integerValue(cmdline_option_value(argc,argv,++i));
53245326
if( sz>400000 ) sz = 400000;
53255327
--- src/shell.c
+++ src/shell.c
@@ -522,11 +522,11 @@
522 }
523 }
524 #if defined(_WIN32) || defined(WIN32)
525 /* For interactive input on Windows systems, translate the
526 ** multi-byte characterset characters into UTF-8. */
527 if( stdin_is_interactive ){
528 char *zTrans = sqlite3_win32_mbcs_to_utf8_v2(zLine, 0);
529 if( zTrans ){
530 int nTrans = strlen30(zTrans)+1;
531 if( nTrans>nLine ){
532 zLine = realloc(zLine, nTrans);
@@ -2944,14 +2944,14 @@
2944 }
2945
2946 /*
2947 ** Convert a 2-byte or 4-byte big-endian integer into a native integer
2948 */
2949 unsigned int get2byteInt(unsigned char *a){
2950 return (a[0]<<8) + a[1];
2951 }
2952 unsigned int get4byteInt(unsigned char *a){
2953 return (a[0]<<24) + (a[1]<<16) + (a[2]<<8) + a[3];
2954 }
2955
2956 /*
2957 ** Implementation of the ".info" command.
@@ -4894,11 +4894,11 @@
4894 while( errCnt==0 || !bail_on_error || (in==0 && stdin_is_interactive) ){
4895 fflush(p->out);
4896 zLine = one_input_line(in, zLine, nSql>0);
4897 if( zLine==0 ){
4898 /* End of input */
4899 if( stdin_is_interactive ) printf("\n");
4900 break;
4901 }
4902 if( seenInterrupt ){
4903 if( in!=0 ) break;
4904 seenInterrupt = 0;
@@ -5315,10 +5315,12 @@
5315
5316 zSize = cmdline_option_value(argc, argv, ++i);
5317 szHeap = integerValue(zSize);
5318 if( szHeap>0x7fff0000 ) szHeap = 0x7fff0000;
5319 sqlite3_config(SQLITE_CONFIG_HEAP, malloc((int)szHeap), (int)szHeap, 64);
 
 
5320 #endif
5321 }else if( strcmp(z,"-scratch")==0 ){
5322 int n, sz;
5323 sz = (int)integerValue(cmdline_option_value(argc,argv,++i));
5324 if( sz>400000 ) sz = 400000;
5325
--- src/shell.c
+++ src/shell.c
@@ -522,11 +522,11 @@
522 }
523 }
524 #if defined(_WIN32) || defined(WIN32)
525 /* For interactive input on Windows systems, translate the
526 ** multi-byte characterset characters into UTF-8. */
527 if( stdin_is_interactive && in==stdin ){
528 char *zTrans = sqlite3_win32_mbcs_to_utf8_v2(zLine, 0);
529 if( zTrans ){
530 int nTrans = strlen30(zTrans)+1;
531 if( nTrans>nLine ){
532 zLine = realloc(zLine, nTrans);
@@ -2944,14 +2944,14 @@
2944 }
2945
2946 /*
2947 ** Convert a 2-byte or 4-byte big-endian integer into a native integer
2948 */
2949 static unsigned int get2byteInt(unsigned char *a){
2950 return (a[0]<<8) + a[1];
2951 }
2952 static unsigned int get4byteInt(unsigned char *a){
2953 return (a[0]<<24) + (a[1]<<16) + (a[2]<<8) + a[3];
2954 }
2955
2956 /*
2957 ** Implementation of the ".info" command.
@@ -4894,11 +4894,11 @@
4894 while( errCnt==0 || !bail_on_error || (in==0 && stdin_is_interactive) ){
4895 fflush(p->out);
4896 zLine = one_input_line(in, zLine, nSql>0);
4897 if( zLine==0 ){
4898 /* End of input */
4899 if( in==0 && stdin_is_interactive ) printf("\n");
4900 break;
4901 }
4902 if( seenInterrupt ){
4903 if( in!=0 ) break;
4904 seenInterrupt = 0;
@@ -5315,10 +5315,12 @@
5315
5316 zSize = cmdline_option_value(argc, argv, ++i);
5317 szHeap = integerValue(zSize);
5318 if( szHeap>0x7fff0000 ) szHeap = 0x7fff0000;
5319 sqlite3_config(SQLITE_CONFIG_HEAP, malloc((int)szHeap), (int)szHeap, 64);
5320 #else
5321 (void)cmdline_option_value(argc, argv, ++i);
5322 #endif
5323 }else if( strcmp(z,"-scratch")==0 ){
5324 int n, sz;
5325 sz = (int)integerValue(cmdline_option_value(argc,argv,++i));
5326 if( sz>400000 ) sz = 400000;
5327
+619 -594
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,17 +1,17 @@
11
/******************************************************************************
22
** This file is an amalgamation of many separate C source files from SQLite
3
-** version 3.14.1. By combining all the individual C code files into this
3
+** version 3.14.2. By combining all the individual C code files into this
44
** single large file, the entire code can be compiled as a single translation
55
** unit. This allows many compilers to do optimizations that would not be
66
** possible if the files were compiled separately. Performance improvements
77
** of 5% or more are commonly seen when SQLite is compiled as a single
88
** translation unit.
99
**
1010
** This file is all you need to compile SQLite. To use SQLite in other
1111
** programs, you need this file and the "sqlite3.h" header file that defines
12
-** the programming interface to the SQLite library. (If you do not have
12
+** the programming interface to the SQLite library. (If you do not have
1313
** the "sqlite3.h" header file at hand, you will find a copy embedded within
1414
** the text of this file. Search for "Begin file sqlite3.h" to find the start
1515
** of the embedded sqlite3.h header file.) Additional code files may be needed
1616
** if you want a wrapper to interface SQLite with your choice of programming
1717
** language. The code for the "sqlite3" command-line shell is also in a
@@ -378,13 +378,13 @@
378378
**
379379
** See also: [sqlite3_libversion()],
380380
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
381381
** [sqlite_version()] and [sqlite_source_id()].
382382
*/
383
-#define SQLITE_VERSION "3.14.1"
384
-#define SQLITE_VERSION_NUMBER 3014001
385
-#define SQLITE_SOURCE_ID "2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b"
383
+#define SQLITE_VERSION "3.14.2"
384
+#define SQLITE_VERSION_NUMBER 3014002
385
+#define SQLITE_SOURCE_ID "2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6"
386386
387387
/*
388388
** CAPI3REF: Run-Time Library Version Numbers
389389
** KEYWORDS: sqlite3_version, sqlite3_sourceid
390390
**
@@ -413,13 +413,13 @@
413413
** [SQLITE_SOURCE_ID] C preprocessor macro.
414414
**
415415
** See also: [sqlite_version()] and [sqlite_source_id()].
416416
*/
417417
SQLITE_API const char sqlite3_version[] = SQLITE_VERSION;
418
-SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void);
419
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void);
420
-SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void);
418
+SQLITE_API const char *sqlite3_libversion(void);
419
+SQLITE_API const char *sqlite3_sourceid(void);
420
+SQLITE_API int sqlite3_libversion_number(void);
421421
422422
/*
423423
** CAPI3REF: Run-Time Library Compilation Options Diagnostics
424424
**
425425
** ^The sqlite3_compileoption_used() function returns 0 or 1
@@ -440,12 +440,12 @@
440440
**
441441
** See also: SQL functions [sqlite_compileoption_used()] and
442442
** [sqlite_compileoption_get()] and the [compile_options pragma].
443443
*/
444444
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
445
-SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName);
446
-SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N);
445
+SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
446
+SQLITE_API const char *sqlite3_compileoption_get(int N);
447447
#endif
448448
449449
/*
450450
** CAPI3REF: Test To See If The Library Is Threadsafe
451451
**
@@ -480,11 +480,11 @@
480480
** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
481481
** is unchanged by calls to sqlite3_config().)^
482482
**
483483
** See the [threading mode] documentation for additional information.
484484
*/
485
-SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void);
485
+SQLITE_API int sqlite3_threadsafe(void);
486486
487487
/*
488488
** CAPI3REF: Database Connection Handle
489489
** KEYWORDS: {database connection} {database connections}
490490
**
@@ -577,12 +577,12 @@
577577
** from [sqlite3_open()], [sqlite3_open16()], or
578578
** [sqlite3_open_v2()], and not previously closed.
579579
** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
580580
** argument is a harmless no-op.
581581
*/
582
-SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*);
583
-SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*);
582
+SQLITE_API int sqlite3_close(sqlite3*);
583
+SQLITE_API int sqlite3_close_v2(sqlite3*);
584584
585585
/*
586586
** The type for a callback function.
587587
** This is legacy and deprecated. It is included for historical
588588
** compatibility and is not documented.
@@ -649,11 +649,11 @@
649649
** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
650650
** <li> The application must not modify the SQL statement text passed into
651651
** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
652652
** </ul>
653653
*/
654
-SQLITE_API int SQLITE_STDCALL sqlite3_exec(
654
+SQLITE_API int sqlite3_exec(
655655
sqlite3*, /* An open database */
656656
const char *sql, /* SQL to be evaluated */
657657
int (*callback)(void*,int,char**,char**), /* Callback function */
658658
void *, /* 1st argument to callback */
659659
char **errmsg /* Error msg written here */
@@ -1648,14 +1648,14 @@
16481648
** sqlite3_os_init() and sqlite3_os_end(). An application-supplied
16491649
** implementation of sqlite3_os_init() or sqlite3_os_end()
16501650
** must return [SQLITE_OK] on success and some other [error code] upon
16511651
** failure.
16521652
*/
1653
-SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void);
1654
-SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void);
1655
-SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void);
1656
-SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void);
1653
+SQLITE_API int sqlite3_initialize(void);
1654
+SQLITE_API int sqlite3_shutdown(void);
1655
+SQLITE_API int sqlite3_os_init(void);
1656
+SQLITE_API int sqlite3_os_end(void);
16571657
16581658
/*
16591659
** CAPI3REF: Configuring The SQLite Library
16601660
**
16611661
** The sqlite3_config() interface is used to make global configuration
@@ -1684,11 +1684,11 @@
16841684
**
16851685
** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
16861686
** ^If the option is unknown or SQLite is unable to set the option
16871687
** then this routine returns a non-zero [error code].
16881688
*/
1689
-SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...);
1689
+SQLITE_API int sqlite3_config(int, ...);
16901690
16911691
/*
16921692
** CAPI3REF: Configure database connections
16931693
** METHOD: sqlite3
16941694
**
@@ -1703,11 +1703,11 @@
17031703
** Subsequent arguments vary depending on the configuration verb.
17041704
**
17051705
** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
17061706
** the call is considered successful.
17071707
*/
1708
-SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...);
1708
+SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
17091709
17101710
/*
17111711
** CAPI3REF: Memory Allocation Routines
17121712
**
17131713
** An instance of this object defines the interface between SQLite
@@ -2244,11 +2244,11 @@
22442244
**
22452245
** ^The sqlite3_extended_result_codes() routine enables or disables the
22462246
** [extended result codes] feature of SQLite. ^The extended result
22472247
** codes are disabled by default for historical compatibility.
22482248
*/
2249
-SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff);
2249
+SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
22502250
22512251
/*
22522252
** CAPI3REF: Last Insert Rowid
22532253
** METHOD: sqlite3
22542254
**
@@ -2296,11 +2296,11 @@
22962296
** function is running and thus changes the last insert [rowid],
22972297
** then the value returned by [sqlite3_last_insert_rowid()] is
22982298
** unpredictable and might not equal either the old or the new
22992299
** last insert [rowid].
23002300
*/
2301
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*);
2301
+SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
23022302
23032303
/*
23042304
** CAPI3REF: Count The Number Of Rows Modified
23052305
** METHOD: sqlite3
23062306
**
@@ -2349,11 +2349,11 @@
23492349
**
23502350
** If a separate thread makes changes on the same database connection
23512351
** while [sqlite3_changes()] is running then the value returned
23522352
** is unpredictable and not meaningful.
23532353
*/
2354
-SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*);
2354
+SQLITE_API int sqlite3_changes(sqlite3*);
23552355
23562356
/*
23572357
** CAPI3REF: Total Number Of Rows Modified
23582358
** METHOD: sqlite3
23592359
**
@@ -2373,11 +2373,11 @@
23732373
**
23742374
** If a separate thread makes changes on the same database connection
23752375
** while [sqlite3_total_changes()] is running then the value
23762376
** returned is unpredictable and not meaningful.
23772377
*/
2378
-SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*);
2378
+SQLITE_API int sqlite3_total_changes(sqlite3*);
23792379
23802380
/*
23812381
** CAPI3REF: Interrupt A Long-Running Query
23822382
** METHOD: sqlite3
23832383
**
@@ -2413,11 +2413,11 @@
24132413
** that are started after the sqlite3_interrupt() call returns.
24142414
**
24152415
** If the database connection closes while [sqlite3_interrupt()]
24162416
** is running then bad things will likely happen.
24172417
*/
2418
-SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*);
2418
+SQLITE_API void sqlite3_interrupt(sqlite3*);
24192419
24202420
/*
24212421
** CAPI3REF: Determine If An SQL Statement Is Complete
24222422
**
24232423
** These routines are useful during command-line input to determine if the
@@ -2448,12 +2448,12 @@
24482448
** UTF-8 string.
24492449
**
24502450
** The input to [sqlite3_complete16()] must be a zero-terminated
24512451
** UTF-16 string in native byte order.
24522452
*/
2453
-SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql);
2454
-SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql);
2453
+SQLITE_API int sqlite3_complete(const char *sql);
2454
+SQLITE_API int sqlite3_complete16(const void *sql);
24552455
24562456
/*
24572457
** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
24582458
** KEYWORDS: {busy-handler callback} {busy handler}
24592459
** METHOD: sqlite3
@@ -2510,11 +2510,11 @@
25102510
** result in undefined behavior.
25112511
**
25122512
** A busy handler must not close the database connection
25132513
** or [prepared statement] that invoked the busy handler.
25142514
*/
2515
-SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2515
+SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
25162516
25172517
/*
25182518
** CAPI3REF: Set A Busy Timeout
25192519
** METHOD: sqlite3
25202520
**
@@ -2533,11 +2533,11 @@
25332533
** was defined (using [sqlite3_busy_handler()]) prior to calling
25342534
** this routine, that other busy handler is cleared.)^
25352535
**
25362536
** See also: [PRAGMA busy_timeout]
25372537
*/
2538
-SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms);
2538
+SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
25392539
25402540
/*
25412541
** CAPI3REF: Convenience Routines For Running Queries
25422542
** METHOD: sqlite3
25432543
**
@@ -2608,19 +2608,19 @@
26082608
** interface defined here. As a consequence, errors that occur in the
26092609
** wrapper layer outside of the internal [sqlite3_exec()] call are not
26102610
** reflected in subsequent calls to [sqlite3_errcode()] or
26112611
** [sqlite3_errmsg()].
26122612
*/
2613
-SQLITE_API int SQLITE_STDCALL sqlite3_get_table(
2613
+SQLITE_API int sqlite3_get_table(
26142614
sqlite3 *db, /* An open database */
26152615
const char *zSql, /* SQL to be evaluated */
26162616
char ***pazResult, /* Results of the query */
26172617
int *pnRow, /* Number of result rows written here */
26182618
int *pnColumn, /* Number of result columns written here */
26192619
char **pzErrmsg /* Error msg written here */
26202620
);
2621
-SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result);
2621
+SQLITE_API void sqlite3_free_table(char **result);
26222622
26232623
/*
26242624
** CAPI3REF: Formatted String Printing Functions
26252625
**
26262626
** These routines are work-alikes of the "printf()" family of functions
@@ -2722,14 +2722,14 @@
27222722
**
27232723
** ^(The "%z" formatting option works like "%s" but with the
27242724
** addition that after the string has been read and copied into
27252725
** the result, [sqlite3_free()] is called on the input string.)^
27262726
*/
2727
-SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...);
2728
-SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list);
2729
-SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...);
2730
-SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list);
2727
+SQLITE_API char *sqlite3_mprintf(const char*,...);
2728
+SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
2729
+SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
2730
+SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
27312731
27322732
/*
27332733
** CAPI3REF: Memory Allocation Subsystem
27342734
**
27352735
** The SQLite core uses these three routines for all of its own
@@ -2815,16 +2815,16 @@
28152815
**
28162816
** The application must not read or write any part of
28172817
** a block of memory after it has been released using
28182818
** [sqlite3_free()] or [sqlite3_realloc()].
28192819
*/
2820
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int);
2821
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64);
2822
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int);
2823
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64);
2824
-SQLITE_API void SQLITE_STDCALL sqlite3_free(void*);
2825
-SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*);
2820
+SQLITE_API void *sqlite3_malloc(int);
2821
+SQLITE_API void *sqlite3_malloc64(sqlite3_uint64);
2822
+SQLITE_API void *sqlite3_realloc(void*, int);
2823
+SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64);
2824
+SQLITE_API void sqlite3_free(void*);
2825
+SQLITE_API sqlite3_uint64 sqlite3_msize(void*);
28262826
28272827
/*
28282828
** CAPI3REF: Memory Allocator Statistics
28292829
**
28302830
** SQLite provides these two interfaces for reporting on the status
@@ -2845,12 +2845,12 @@
28452845
** [sqlite3_memory_used()] if and only if the parameter to
28462846
** [sqlite3_memory_highwater()] is true. ^The value returned
28472847
** by [sqlite3_memory_highwater(1)] is the high-water mark
28482848
** prior to the reset.
28492849
*/
2850
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void);
2851
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag);
2850
+SQLITE_API sqlite3_int64 sqlite3_memory_used(void);
2851
+SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
28522852
28532853
/*
28542854
** CAPI3REF: Pseudo-Random Number Generator
28552855
**
28562856
** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
@@ -2869,11 +2869,11 @@
28692869
** ^If the previous call to this routine had an N of 1 or more and a
28702870
** non-NULL P then the pseudo-randomness is generated
28712871
** internally and without recourse to the [sqlite3_vfs] xRandomness
28722872
** method.
28732873
*/
2874
-SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P);
2874
+SQLITE_API void sqlite3_randomness(int N, void *P);
28752875
28762876
/*
28772877
** CAPI3REF: Compile-Time Authorization Callbacks
28782878
** METHOD: sqlite3
28792879
**
@@ -2952,11 +2952,11 @@
29522952
** [sqlite3_prepare()] or its variants. Authorization is not
29532953
** performed during statement evaluation in [sqlite3_step()], unless
29542954
** as stated in the previous paragraph, sqlite3_step() invokes
29552955
** sqlite3_prepare_v2() to reprepare a statement after a schema change.
29562956
*/
2957
-SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
2957
+SQLITE_API int sqlite3_set_authorizer(
29582958
sqlite3*,
29592959
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
29602960
void *pUserData
29612961
);
29622962
@@ -3060,13 +3060,13 @@
30603060
** digits in the time are meaningless. Future versions of SQLite
30613061
** might provide greater resolution on the profiler callback. The
30623062
** sqlite3_profile() function is considered experimental and is
30633063
** subject to change in future versions of SQLite.
30643064
*/
3065
-SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*,
3065
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,
30663066
void(*xTrace)(void*,const char*), void*);
3067
-SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_profile(sqlite3*,
3067
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
30683068
void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
30693069
30703070
/*
30713071
** CAPI3REF: SQL Trace Event Codes
30723072
** KEYWORDS: SQLITE_TRACE
@@ -3151,11 +3151,11 @@
31513151
**
31523152
** The sqlite3_trace_v2() interface is intended to replace the legacy
31533153
** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
31543154
** are deprecated.
31553155
*/
3156
-SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2(
3156
+SQLITE_API int sqlite3_trace_v2(
31573157
sqlite3*,
31583158
unsigned uMask,
31593159
int(*xCallback)(unsigned,void*,void*,void*),
31603160
void *pCtx
31613161
);
@@ -3190,11 +3190,11 @@
31903190
** the database connection that invoked the progress handler.
31913191
** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
31923192
** database connections for the meaning of "modify" in this paragraph.
31933193
**
31943194
*/
3195
-SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
3195
+SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
31963196
31973197
/*
31983198
** CAPI3REF: Opening A New Database Connection
31993199
** CONSTRUCTOR: sqlite3
32003200
**
@@ -3419,19 +3419,19 @@
34193419
** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
34203420
** features that require the use of temporary files may fail.
34213421
**
34223422
** See also: [sqlite3_temp_directory]
34233423
*/
3424
-SQLITE_API int SQLITE_STDCALL sqlite3_open(
3424
+SQLITE_API int sqlite3_open(
34253425
const char *filename, /* Database filename (UTF-8) */
34263426
sqlite3 **ppDb /* OUT: SQLite db handle */
34273427
);
3428
-SQLITE_API int SQLITE_STDCALL sqlite3_open16(
3428
+SQLITE_API int sqlite3_open16(
34293429
const void *filename, /* Database filename (UTF-16) */
34303430
sqlite3 **ppDb /* OUT: SQLite db handle */
34313431
);
3432
-SQLITE_API int SQLITE_STDCALL sqlite3_open_v2(
3432
+SQLITE_API int sqlite3_open_v2(
34333433
const char *filename, /* Database filename (UTF-8) */
34343434
sqlite3 **ppDb, /* OUT: SQLite db handle */
34353435
int flags, /* Flags */
34363436
const char *zVfs /* Name of VFS module to use */
34373437
);
@@ -3473,13 +3473,13 @@
34733473
** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and
34743474
** is not a database file pathname pointer that SQLite passed into the xOpen
34753475
** VFS method, then the behavior of this routine is undefined and probably
34763476
** undesirable.
34773477
*/
3478
-SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3479
-SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3480
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
3478
+SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3479
+SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3480
+SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
34813481
34823482
34833483
/*
34843484
** CAPI3REF: Error Codes And Messages
34853485
** METHOD: sqlite3
@@ -3519,15 +3519,15 @@
35193519
**
35203520
** If an interface fails with SQLITE_MISUSE, that means the interface
35213521
** was invoked incorrectly by the application. In that case, the
35223522
** error code and message may or may not be set.
35233523
*/
3524
-SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db);
3525
-SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db);
3526
-SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*);
3527
-SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*);
3528
-SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int);
3524
+SQLITE_API int sqlite3_errcode(sqlite3 *db);
3525
+SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
3526
+SQLITE_API const char *sqlite3_errmsg(sqlite3*);
3527
+SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
3528
+SQLITE_API const char *sqlite3_errstr(int);
35293529
35303530
/*
35313531
** CAPI3REF: Prepared Statement Object
35323532
** KEYWORDS: {prepared statement} {prepared statements}
35333533
**
@@ -3591,11 +3591,11 @@
35913591
** created by an untrusted script can be contained using the
35923592
** [max_page_count] [PRAGMA].
35933593
**
35943594
** New run-time limit categories may be added in future releases.
35953595
*/
3596
-SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal);
3596
+SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
35973597
35983598
/*
35993599
** CAPI3REF: Run-Time Limit Categories
36003600
** KEYWORDS: {limit category} {*limit categories}
36013601
**
@@ -3743,32 +3743,32 @@
37433743
** or [GLOB] operator or if the parameter is compared to an indexed column
37443744
** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
37453745
** </li>
37463746
** </ol>
37473747
*/
3748
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare(
3748
+SQLITE_API int sqlite3_prepare(
37493749
sqlite3 *db, /* Database handle */
37503750
const char *zSql, /* SQL statement, UTF-8 encoded */
37513751
int nByte, /* Maximum length of zSql in bytes. */
37523752
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
37533753
const char **pzTail /* OUT: Pointer to unused portion of zSql */
37543754
);
3755
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2(
3755
+SQLITE_API int sqlite3_prepare_v2(
37563756
sqlite3 *db, /* Database handle */
37573757
const char *zSql, /* SQL statement, UTF-8 encoded */
37583758
int nByte, /* Maximum length of zSql in bytes. */
37593759
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
37603760
const char **pzTail /* OUT: Pointer to unused portion of zSql */
37613761
);
3762
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare16(
3762
+SQLITE_API int sqlite3_prepare16(
37633763
sqlite3 *db, /* Database handle */
37643764
const void *zSql, /* SQL statement, UTF-16 encoded */
37653765
int nByte, /* Maximum length of zSql in bytes. */
37663766
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
37673767
const void **pzTail /* OUT: Pointer to unused portion of zSql */
37683768
);
3769
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
3769
+SQLITE_API int sqlite3_prepare16_v2(
37703770
sqlite3 *db, /* Database handle */
37713771
const void *zSql, /* SQL statement, UTF-16 encoded */
37723772
int nByte, /* Maximum length of zSql in bytes. */
37733773
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
37743774
const void **pzTail /* OUT: Pointer to unused portion of zSql */
@@ -3803,12 +3803,12 @@
38033803
** automatically freed when the prepared statement is finalized.
38043804
** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
38053805
** is obtained from [sqlite3_malloc()] and must be free by the application
38063806
** by passing it to [sqlite3_free()].
38073807
*/
3808
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt);
3809
-SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt);
3808
+SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
3809
+SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt);
38103810
38113811
/*
38123812
** CAPI3REF: Determine If An SQL Statement Writes The Database
38133813
** METHOD: sqlite3_stmt
38143814
**
@@ -3836,11 +3836,11 @@
38363836
** database. ^The [ATTACH] and [DETACH] statements also cause
38373837
** sqlite3_stmt_readonly() to return true since, while those statements
38383838
** change the configuration of a database connection, they do not make
38393839
** changes to the content of the database files on disk.
38403840
*/
3841
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
3841
+SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
38423842
38433843
/*
38443844
** CAPI3REF: Determine If A Prepared Statement Has Been Reset
38453845
** METHOD: sqlite3_stmt
38463846
**
@@ -3857,11 +3857,11 @@
38573857
** to locate all prepared statements associated with a database
38583858
** connection that are in need of being reset. This can be used,
38593859
** for example, in diagnostic routines to search for prepared
38603860
** statements that are holding a transaction open.
38613861
*/
3862
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*);
3862
+SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
38633863
38643864
/*
38653865
** CAPI3REF: Dynamically Typed Value Object
38663866
** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
38673867
**
@@ -4021,24 +4021,24 @@
40214021
** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
40224022
**
40234023
** See also: [sqlite3_bind_parameter_count()],
40244024
** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
40254025
*/
4026
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
4027
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
4026
+SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
4027
+SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
40284028
void(*)(void*));
4029
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double);
4030
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int);
4031
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
4032
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int);
4033
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
4034
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
4035
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
4029
+SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
4030
+SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
4031
+SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
4032
+SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
4033
+SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
4034
+SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
4035
+SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
40364036
void(*)(void*), unsigned char encoding);
4037
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
4038
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
4039
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
4037
+SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
4038
+SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
4039
+SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
40404040
40414041
/*
40424042
** CAPI3REF: Number Of SQL Parameters
40434043
** METHOD: sqlite3_stmt
40444044
**
@@ -4055,11 +4055,11 @@
40554055
**
40564056
** See also: [sqlite3_bind_blob|sqlite3_bind()],
40574057
** [sqlite3_bind_parameter_name()], and
40584058
** [sqlite3_bind_parameter_index()].
40594059
*/
4060
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*);
4060
+SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
40614061
40624062
/*
40634063
** CAPI3REF: Name Of A Host Parameter
40644064
** METHOD: sqlite3_stmt
40654065
**
@@ -4083,11 +4083,11 @@
40834083
**
40844084
** See also: [sqlite3_bind_blob|sqlite3_bind()],
40854085
** [sqlite3_bind_parameter_count()], and
40864086
** [sqlite3_bind_parameter_index()].
40874087
*/
4088
-SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int);
4088
+SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
40894089
40904090
/*
40914091
** CAPI3REF: Index Of A Parameter With A Given Name
40924092
** METHOD: sqlite3_stmt
40934093
**
@@ -4100,21 +4100,21 @@
41004100
**
41014101
** See also: [sqlite3_bind_blob|sqlite3_bind()],
41024102
** [sqlite3_bind_parameter_count()], and
41034103
** [sqlite3_bind_parameter_name()].
41044104
*/
4105
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
4105
+SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
41064106
41074107
/*
41084108
** CAPI3REF: Reset All Bindings On A Prepared Statement
41094109
** METHOD: sqlite3_stmt
41104110
**
41114111
** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
41124112
** the [sqlite3_bind_blob | bindings] on a [prepared statement].
41134113
** ^Use this routine to reset all host parameters to NULL.
41144114
*/
4115
-SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*);
4115
+SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
41164116
41174117
/*
41184118
** CAPI3REF: Number Of Columns In A Result Set
41194119
** METHOD: sqlite3_stmt
41204120
**
@@ -4122,11 +4122,11 @@
41224122
** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
41234123
** statement that does not return data (for example an [UPDATE]).
41244124
**
41254125
** See also: [sqlite3_data_count()]
41264126
*/
4127
-SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt);
4127
+SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
41284128
41294129
/*
41304130
** CAPI3REF: Column Names In A Result Set
41314131
** METHOD: sqlite3_stmt
41324132
**
@@ -4151,12 +4151,12 @@
41514151
** ^The name of a result column is the value of the "AS" clause for
41524152
** that column, if there is an AS clause. If there is no AS clause
41534153
** then the name of the column is unspecified and may change from
41544154
** one release of SQLite to the next.
41554155
*/
4156
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N);
4157
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N);
4156
+SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
4157
+SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
41584158
41594159
/*
41604160
** CAPI3REF: Source Of Data In A Query Result
41614161
** METHOD: sqlite3_stmt
41624162
**
@@ -4200,16 +4200,16 @@
42004200
** If two or more threads call one or more
42014201
** [sqlite3_column_database_name | column metadata interfaces]
42024202
** for the same [prepared statement] and result column
42034203
** at the same time then the results are undefined.
42044204
*/
4205
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int);
4206
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int);
4207
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int);
4208
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int);
4209
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int);
4210
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int);
4205
+SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
4206
+SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
4207
+SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
4208
+SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
4209
+SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
4210
+SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
42114211
42124212
/*
42134213
** CAPI3REF: Declared Datatype Of A Query Result
42144214
** METHOD: sqlite3_stmt
42154215
**
@@ -4237,12 +4237,12 @@
42374237
** data stored in that column is of the declared type. SQLite is
42384238
** strongly typed, but the typing is dynamic not static. ^Type
42394239
** is associated with individual values, not with the containers
42404240
** used to hold those values.
42414241
*/
4242
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int);
4243
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int);
4242
+SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
4243
+SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
42444244
42454245
/*
42464246
** CAPI3REF: Evaluate An SQL Statement
42474247
** METHOD: sqlite3_stmt
42484248
**
@@ -4318,11 +4318,11 @@
43184318
** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
43194319
** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
43204320
** then the more specific [error codes] are returned directly
43214321
** by sqlite3_step(). The use of the "v2" interface is recommended.
43224322
*/
4323
-SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*);
4323
+SQLITE_API int sqlite3_step(sqlite3_stmt*);
43244324
43254325
/*
43264326
** CAPI3REF: Number of columns in a result set
43274327
** METHOD: sqlite3_stmt
43284328
**
@@ -4339,11 +4339,11 @@
43394339
** where it always returns zero since each step of that multi-step
43404340
** pragma returns 0 columns of data.
43414341
**
43424342
** See also: [sqlite3_column_count()]
43434343
*/
4344
-SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
4344
+SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
43454345
43464346
/*
43474347
** CAPI3REF: Fundamental Datatypes
43484348
** KEYWORDS: SQLITE_TEXT
43494349
**
@@ -4529,20 +4529,20 @@
45294529
** of these routines, a default value is returned. The default value
45304530
** is either the integer 0, the floating point number 0.0, or a NULL
45314531
** pointer. Subsequent calls to [sqlite3_errcode()] will return
45324532
** [SQLITE_NOMEM].)^
45334533
*/
4534
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol);
4535
-SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4536
-SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4537
-SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol);
4538
-SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol);
4539
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol);
4540
-SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol);
4541
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol);
4542
-SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol);
4543
-SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol);
4534
+SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
4535
+SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4536
+SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4537
+SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
4538
+SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
4539
+SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
4540
+SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
4541
+SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
4542
+SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
4543
+SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
45444544
45454545
/*
45464546
** CAPI3REF: Destroy A Prepared Statement Object
45474547
** DESTRUCTOR: sqlite3_stmt
45484548
**
@@ -4566,11 +4566,11 @@
45664566
** resource leaks. It is a grievous error for the application to try to use
45674567
** a prepared statement after it has been finalized. Any use of a prepared
45684568
** statement after it has been finalized can result in undefined and
45694569
** undesirable behavior such as segfaults and heap corruption.
45704570
*/
4571
-SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt);
4571
+SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
45724572
45734573
/*
45744574
** CAPI3REF: Reset A Prepared Statement Object
45754575
** METHOD: sqlite3_stmt
45764576
**
@@ -4593,11 +4593,11 @@
45934593
** [sqlite3_reset(S)] returns an appropriate [error code].
45944594
**
45954595
** ^The [sqlite3_reset(S)] interface does not change the values
45964596
** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
45974597
*/
4598
-SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt);
4598
+SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
45994599
46004600
/*
46014601
** CAPI3REF: Create Or Redefine SQL Functions
46024602
** KEYWORDS: {function creation routines}
46034603
** KEYWORDS: {application-defined SQL function}
@@ -4693,31 +4693,31 @@
46934693
** ^An application-defined function is permitted to call other
46944694
** SQLite interfaces. However, such calls must not
46954695
** close the database connection nor finalize or reset the prepared
46964696
** statement in which the function is running.
46974697
*/
4698
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function(
4698
+SQLITE_API int sqlite3_create_function(
46994699
sqlite3 *db,
47004700
const char *zFunctionName,
47014701
int nArg,
47024702
int eTextRep,
47034703
void *pApp,
47044704
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
47054705
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
47064706
void (*xFinal)(sqlite3_context*)
47074707
);
4708
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function16(
4708
+SQLITE_API int sqlite3_create_function16(
47094709
sqlite3 *db,
47104710
const void *zFunctionName,
47114711
int nArg,
47124712
int eTextRep,
47134713
void *pApp,
47144714
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
47154715
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
47164716
void (*xFinal)(sqlite3_context*)
47174717
);
4718
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2(
4718
+SQLITE_API int sqlite3_create_function_v2(
47194719
sqlite3 *db,
47204720
const char *zFunctionName,
47214721
int nArg,
47224722
int eTextRep,
47234723
void *pApp,
@@ -4759,16 +4759,16 @@
47594759
** to be supported. However, new applications should avoid
47604760
** the use of these functions. To encourage programmers to avoid
47614761
** these functions, we will not explain what they do.
47624762
*/
47634763
#ifndef SQLITE_OMIT_DEPRECATED
4764
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*);
4765
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*);
4766
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4767
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void);
4768
-SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void);
4769
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
4764
+SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
4765
+SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
4766
+SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4767
+SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
4768
+SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
4769
+SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
47704770
void*,sqlite3_int64);
47714771
#endif
47724772
47734773
/*
47744774
** CAPI3REF: Obtaining SQL Values
@@ -4814,22 +4814,22 @@
48144814
** or [sqlite3_value_text16()].
48154815
**
48164816
** These routines must be called from the same thread as
48174817
** the SQL function that supplied the [sqlite3_value*] parameters.
48184818
*/
4819
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*);
4820
-SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*);
4821
-SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*);
4822
-SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*);
4823
-SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*);
4824
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*);
4825
-SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*);
4826
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*);
4827
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*);
4828
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*);
4829
-SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*);
4830
-SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*);
4819
+SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
4820
+SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
4821
+SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
4822
+SQLITE_API double sqlite3_value_double(sqlite3_value*);
4823
+SQLITE_API int sqlite3_value_int(sqlite3_value*);
4824
+SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
4825
+SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
4826
+SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
4827
+SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
4828
+SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
4829
+SQLITE_API int sqlite3_value_type(sqlite3_value*);
4830
+SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
48314831
48324832
/*
48334833
** CAPI3REF: Finding The Subtype Of SQL Values
48344834
** METHOD: sqlite3_value
48354835
**
@@ -4841,11 +4841,11 @@
48414841
**
48424842
** SQLite makes no use of subtype itself. It merely passes the subtype
48434843
** from the result of one [application-defined SQL function] into the
48444844
** input of another.
48454845
*/
4846
-SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*);
4846
+SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
48474847
48484848
/*
48494849
** CAPI3REF: Copy And Free SQL Values
48504850
** METHOD: sqlite3_value
48514851
**
@@ -4857,12 +4857,12 @@
48574857
**
48584858
** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
48594859
** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
48604860
** then sqlite3_value_free(V) is a harmless no-op.
48614861
*/
4862
-SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*);
4863
-SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*);
4862
+SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*);
4863
+SQLITE_API void sqlite3_value_free(sqlite3_value*);
48644864
48654865
/*
48664866
** CAPI3REF: Obtain Aggregate Function Context
48674867
** METHOD: sqlite3_context
48684868
**
@@ -4903,11 +4903,11 @@
49034903
** function.
49044904
**
49054905
** This routine must be called from the same thread in which
49064906
** the aggregate SQL function is running.
49074907
*/
4908
-SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes);
4908
+SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
49094909
49104910
/*
49114911
** CAPI3REF: User Data For Functions
49124912
** METHOD: sqlite3_context
49134913
**
@@ -4918,11 +4918,11 @@
49184918
** registered the application defined function.
49194919
**
49204920
** This routine must be called from the same thread in which
49214921
** the application-defined function is running.
49224922
*/
4923
-SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*);
4923
+SQLITE_API void *sqlite3_user_data(sqlite3_context*);
49244924
49254925
/*
49264926
** CAPI3REF: Database Connection For Functions
49274927
** METHOD: sqlite3_context
49284928
**
@@ -4930,11 +4930,11 @@
49304930
** the pointer to the [database connection] (the 1st parameter)
49314931
** of the [sqlite3_create_function()]
49324932
** and [sqlite3_create_function16()] routines that originally
49334933
** registered the application defined function.
49344934
*/
4935
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*);
4935
+SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
49364936
49374937
/*
49384938
** CAPI3REF: Function Auxiliary Data
49394939
** METHOD: sqlite3_context
49404940
**
@@ -4984,12 +4984,12 @@
49844984
** values and [parameters] and expressions composed from the same.)^
49854985
**
49864986
** These routines must be called from the same thread in which
49874987
** the SQL function is running.
49884988
*/
4989
-SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N);
4990
-SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
4989
+SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
4990
+SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
49914991
49924992
49934993
/*
49944994
** CAPI3REF: Constants Defining Special Destructor Behavior
49954995
**
@@ -5121,31 +5121,31 @@
51215121
**
51225122
** If these routines are called from within the different thread
51235123
** than the one containing the application-defined function that received
51245124
** the [sqlite3_context] pointer, the results are undefined.
51255125
*/
5126
-SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
5127
-SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*,
5126
+SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
5127
+SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,
51285128
sqlite3_uint64,void(*)(void*));
5129
-SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double);
5130
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int);
5131
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int);
5132
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*);
5133
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*);
5134
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int);
5135
-SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int);
5136
-SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
5137
-SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*);
5138
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
5139
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
5129
+SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
5130
+SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
5131
+SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
5132
+SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
5133
+SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
5134
+SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
5135
+SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
5136
+SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
5137
+SQLITE_API void sqlite3_result_null(sqlite3_context*);
5138
+SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
5139
+SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
51405140
void(*)(void*), unsigned char encoding);
5141
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
5142
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
5143
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
5144
-SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
5145
-SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
5146
-SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
5141
+SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
5142
+SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
5143
+SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
5144
+SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
5145
+SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
5146
+SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
51475147
51485148
51495149
/*
51505150
** CAPI3REF: Setting The Subtype Of An SQL Function
51515151
** METHOD: sqlite3_context
@@ -5156,11 +5156,11 @@
51565156
** of the subtype T are preserved in current versions of SQLite;
51575157
** higher order bits are discarded.
51585158
** The number of subtype bytes preserved by SQLite might increase
51595159
** in future releases of SQLite.
51605160
*/
5161
-SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int);
5161
+SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
51625162
51635163
/*
51645164
** CAPI3REF: Define New Collating Sequences
51655165
** METHOD: sqlite3
51665166
**
@@ -5238,26 +5238,26 @@
52385238
** is unfortunate but cannot be changed without breaking backwards
52395239
** compatibility.
52405240
**
52415241
** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
52425242
*/
5243
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation(
5243
+SQLITE_API int sqlite3_create_collation(
52445244
sqlite3*,
52455245
const char *zName,
52465246
int eTextRep,
52475247
void *pArg,
52485248
int(*xCompare)(void*,int,const void*,int,const void*)
52495249
);
5250
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2(
5250
+SQLITE_API int sqlite3_create_collation_v2(
52515251
sqlite3*,
52525252
const char *zName,
52535253
int eTextRep,
52545254
void *pArg,
52555255
int(*xCompare)(void*,int,const void*,int,const void*),
52565256
void(*xDestroy)(void*)
52575257
);
5258
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16(
5258
+SQLITE_API int sqlite3_create_collation16(
52595259
sqlite3*,
52605260
const void *zName,
52615261
int eTextRep,
52625262
void *pArg,
52635263
int(*xCompare)(void*,int,const void*,int,const void*)
@@ -5288,16 +5288,16 @@
52885288
**
52895289
** The callback function should register the desired collation using
52905290
** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
52915291
** [sqlite3_create_collation_v2()].
52925292
*/
5293
-SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed(
5293
+SQLITE_API int sqlite3_collation_needed(
52945294
sqlite3*,
52955295
void*,
52965296
void(*)(void*,sqlite3*,int eTextRep,const char*)
52975297
);
5298
-SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16(
5298
+SQLITE_API int sqlite3_collation_needed16(
52995299
sqlite3*,
53005300
void*,
53015301
void(*)(void*,sqlite3*,int eTextRep,const void*)
53025302
);
53035303
@@ -5307,15 +5307,15 @@
53075307
** called right after sqlite3_open().
53085308
**
53095309
** The code to implement this API is not available in the public release
53105310
** of SQLite.
53115311
*/
5312
-SQLITE_API int SQLITE_STDCALL sqlite3_key(
5312
+SQLITE_API int sqlite3_key(
53135313
sqlite3 *db, /* Database to be rekeyed */
53145314
const void *pKey, int nKey /* The key */
53155315
);
5316
-SQLITE_API int SQLITE_STDCALL sqlite3_key_v2(
5316
+SQLITE_API int sqlite3_key_v2(
53175317
sqlite3 *db, /* Database to be rekeyed */
53185318
const char *zDbName, /* Name of the database */
53195319
const void *pKey, int nKey /* The key */
53205320
);
53215321
@@ -5325,35 +5325,35 @@
53255325
** database is decrypted.
53265326
**
53275327
** The code to implement this API is not available in the public release
53285328
** of SQLite.
53295329
*/
5330
-SQLITE_API int SQLITE_STDCALL sqlite3_rekey(
5330
+SQLITE_API int sqlite3_rekey(
53315331
sqlite3 *db, /* Database to be rekeyed */
53325332
const void *pKey, int nKey /* The new key */
53335333
);
5334
-SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2(
5334
+SQLITE_API int sqlite3_rekey_v2(
53355335
sqlite3 *db, /* Database to be rekeyed */
53365336
const char *zDbName, /* Name of the database */
53375337
const void *pKey, int nKey /* The new key */
53385338
);
53395339
53405340
/*
53415341
** Specify the activation key for a SEE database. Unless
53425342
** activated, none of the SEE routines will work.
53435343
*/
5344
-SQLITE_API void SQLITE_STDCALL sqlite3_activate_see(
5344
+SQLITE_API void sqlite3_activate_see(
53455345
const char *zPassPhrase /* Activation phrase */
53465346
);
53475347
#endif
53485348
53495349
#ifdef SQLITE_ENABLE_CEROD
53505350
/*
53515351
** Specify the activation key for a CEROD database. Unless
53525352
** activated, none of the CEROD routines will work.
53535353
*/
5354
-SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod(
5354
+SQLITE_API void sqlite3_activate_cerod(
53555355
const char *zPassPhrase /* Activation phrase */
53565356
);
53575357
#endif
53585358
53595359
/*
@@ -5371,11 +5371,11 @@
53715371
** method of the default [sqlite3_vfs] object. If the xSleep() method
53725372
** of the default VFS is not implemented correctly, or not implemented at
53735373
** all, then the behavior of sqlite3_sleep() may deviate from the description
53745374
** in the previous paragraphs.
53755375
*/
5376
-SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int);
5376
+SQLITE_API int sqlite3_sleep(int);
53775377
53785378
/*
53795379
** CAPI3REF: Name Of The Folder Holding Temporary Files
53805380
**
53815381
** ^(If this global variable is made to point to a string which is
@@ -5490,11 +5490,11 @@
54905490
**
54915491
** If another thread changes the autocommit status of the database
54925492
** connection while this routine is running, then the return value
54935493
** is undefined.
54945494
*/
5495
-SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*);
5495
+SQLITE_API int sqlite3_get_autocommit(sqlite3*);
54965496
54975497
/*
54985498
** CAPI3REF: Find The Database Handle Of A Prepared Statement
54995499
** METHOD: sqlite3_stmt
55005500
**
@@ -5503,11 +5503,11 @@
55035503
** returned by sqlite3_db_handle is the same [database connection]
55045504
** that was the first argument
55055505
** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
55065506
** create the statement in the first place.
55075507
*/
5508
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*);
5508
+SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
55095509
55105510
/*
55115511
** CAPI3REF: Return The Filename For A Database Connection
55125512
** METHOD: sqlite3
55135513
**
@@ -5520,21 +5520,21 @@
55205520
** ^The filename returned by this function is the output of the
55215521
** xFullPathname method of the [VFS]. ^In other words, the filename
55225522
** will be an absolute pathname, even if the filename used
55235523
** to open the database originally was a URI or relative pathname.
55245524
*/
5525
-SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName);
5525
+SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);
55265526
55275527
/*
55285528
** CAPI3REF: Determine if a database is read-only
55295529
** METHOD: sqlite3
55305530
**
55315531
** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N
55325532
** of connection D is read-only, 0 if it is read/write, or -1 if N is not
55335533
** the name of a database on connection D.
55345534
*/
5535
-SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
5535
+SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
55365536
55375537
/*
55385538
** CAPI3REF: Find the next prepared statement
55395539
** METHOD: sqlite3
55405540
**
@@ -5546,11 +5546,11 @@
55465546
**
55475547
** The [database connection] pointer D in a call to
55485548
** [sqlite3_next_stmt(D,S)] must refer to an open database
55495549
** connection and in particular must not be a NULL pointer.
55505550
*/
5551
-SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
5551
+SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
55525552
55535553
/*
55545554
** CAPI3REF: Commit And Rollback Notification Callbacks
55555555
** METHOD: sqlite3
55565556
**
@@ -5595,12 +5595,12 @@
55955595
** ^The rollback callback is not invoked if a transaction is
55965596
** automatically rolled back because the database connection is closed.
55975597
**
55985598
** See also the [sqlite3_update_hook()] interface.
55995599
*/
5600
-SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5601
-SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5600
+SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5601
+SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
56025602
56035603
/*
56045604
** CAPI3REF: Data Change Notification Callbacks
56055605
** METHOD: sqlite3
56065606
**
@@ -5647,11 +5647,11 @@
56475647
** the first call on D.
56485648
**
56495649
** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
56505650
** and [sqlite3_preupdate_hook()] interfaces.
56515651
*/
5652
-SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
5652
+SQLITE_API void *sqlite3_update_hook(
56535653
sqlite3*,
56545654
void(*)(void *,int ,char const *,char const *,sqlite3_int64),
56555655
void*
56565656
);
56575657
@@ -5687,11 +5687,11 @@
56875687
** This interface is threadsafe on processors where writing a
56885688
** 32-bit integer is atomic.
56895689
**
56905690
** See Also: [SQLite Shared-Cache Mode]
56915691
*/
5692
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int);
5692
+SQLITE_API int sqlite3_enable_shared_cache(int);
56935693
56945694
/*
56955695
** CAPI3REF: Attempt To Free Heap Memory
56965696
**
56975697
** ^The sqlite3_release_memory() interface attempts to free N bytes
@@ -5703,11 +5703,11 @@
57035703
** ^The sqlite3_release_memory() routine is a no-op returning zero
57045704
** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
57055705
**
57065706
** See also: [sqlite3_db_release_memory()]
57075707
*/
5708
-SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int);
5708
+SQLITE_API int sqlite3_release_memory(int);
57095709
57105710
/*
57115711
** CAPI3REF: Free Memory Used By A Database Connection
57125712
** METHOD: sqlite3
57135713
**
@@ -5717,11 +5717,11 @@
57175717
** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is
57185718
** omitted.
57195719
**
57205720
** See also: [sqlite3_release_memory()]
57215721
*/
5722
-SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*);
5722
+SQLITE_API int sqlite3_db_release_memory(sqlite3*);
57235723
57245724
/*
57255725
** CAPI3REF: Impose A Limit On Heap Size
57265726
**
57275727
** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
@@ -5769,11 +5769,11 @@
57695769
** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT].
57705770
**
57715771
** The circumstances under which SQLite will enforce the soft heap limit may
57725772
** changes in future releases of SQLite.
57735773
*/
5774
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N);
5774
+SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
57755775
57765776
/*
57775777
** CAPI3REF: Deprecated Soft Heap Limit Interface
57785778
** DEPRECATED
57795779
**
@@ -5780,11 +5780,11 @@
57805780
** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
57815781
** interface. This routine is provided for historical compatibility
57825782
** only. All new applications should use the
57835783
** [sqlite3_soft_heap_limit64()] interface rather than this one.
57845784
*/
5785
-SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N);
5785
+SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
57865786
57875787
57885788
/*
57895789
** CAPI3REF: Extract Metadata About A Column Of A Table
57905790
** METHOD: sqlite3
@@ -5850,11 +5850,11 @@
58505850
**
58515851
** ^This function causes all database schemas to be read from disk and
58525852
** parsed, if that has not already been done, and returns an error if
58535853
** any errors are encountered while loading the schema.
58545854
*/
5855
-SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata(
5855
+SQLITE_API int sqlite3_table_column_metadata(
58565856
sqlite3 *db, /* Connection handle */
58575857
const char *zDbName, /* Database name or NULL */
58585858
const char *zTableName, /* Table name */
58595859
const char *zColumnName, /* Column name */
58605860
char const **pzDataType, /* OUTPUT: Declared data type */
@@ -5906,11 +5906,11 @@
59065906
** disabled and prevent SQL injections from giving attackers
59075907
** access to extension loading capabilities.
59085908
**
59095909
** See also the [load_extension() SQL function].
59105910
*/
5911
-SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
5911
+SQLITE_API int sqlite3_load_extension(
59125912
sqlite3 *db, /* Load the extension into this database connection */
59135913
const char *zFile, /* Name of the shared library containing extension */
59145914
const char *zProc, /* Entry point. Derived from zFile if 0 */
59155915
char **pzErrMsg /* Put error message here if not 0 */
59165916
);
@@ -5938,11 +5938,11 @@
59385938
** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
59395939
** rather than this interface, so the [load_extension()] SQL function
59405940
** remains disabled. This will prevent SQL injections from giving attackers
59415941
** access to extension loading capabilities.
59425942
*/
5943
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5943
+SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
59445944
59455945
/*
59465946
** CAPI3REF: Automatically Load Statically Linked Extensions
59475947
**
59485948
** ^This interface causes the xEntryPoint() function to be invoked for
@@ -5976,11 +5976,11 @@
59765976
** will be called more than once for each database connection that is opened.
59775977
**
59785978
** See also: [sqlite3_reset_auto_extension()]
59795979
** and [sqlite3_cancel_auto_extension()]
59805980
*/
5981
-SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void));
5981
+SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
59825982
59835983
/*
59845984
** CAPI3REF: Cancel Automatic Extension Loading
59855985
**
59865986
** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the
@@ -5988,19 +5988,19 @@
59885988
** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)]
59895989
** routine returns 1 if initialization routine X was successfully
59905990
** unregistered and it returns 0 if X was not on the list of initialization
59915991
** routines.
59925992
*/
5993
-SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
5993
+SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
59945994
59955995
/*
59965996
** CAPI3REF: Reset Automatic Extension Loading
59975997
**
59985998
** ^This interface disables all automatic extensions previously
59995999
** registered using [sqlite3_auto_extension()].
60006000
*/
6001
-SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void);
6001
+SQLITE_API void sqlite3_reset_auto_extension(void);
60026002
60036003
/*
60046004
** The interface to the virtual-table mechanism is currently considered
60056005
** to be experimental. The interface might change in incompatible ways.
60066006
** If this is a problem for you, do not use the interface at this time.
@@ -6241,17 +6241,17 @@
62416241
** be invoked if the call to sqlite3_create_module_v2() fails.
62426242
** ^The sqlite3_create_module()
62436243
** interface is equivalent to sqlite3_create_module_v2() with a NULL
62446244
** destructor.
62456245
*/
6246
-SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
6246
+SQLITE_API int sqlite3_create_module(
62476247
sqlite3 *db, /* SQLite connection to register module with */
62486248
const char *zName, /* Name of the module */
62496249
const sqlite3_module *p, /* Methods for the module */
62506250
void *pClientData /* Client data for xCreate/xConnect */
62516251
);
6252
-SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
6252
+SQLITE_API int sqlite3_create_module_v2(
62536253
sqlite3 *db, /* SQLite connection to register module with */
62546254
const char *zName, /* Name of the module */
62556255
const sqlite3_module *p, /* Methods for the module */
62566256
void *pClientData, /* Client data for xCreate/xConnect */
62576257
void(*xDestroy)(void*) /* Module destructor function */
@@ -6310,11 +6310,11 @@
63106310
** ^The [xCreate] and [xConnect] methods of a
63116311
** [virtual table module] call this interface
63126312
** to declare the format (the names and datatypes of the columns) of
63136313
** the virtual tables they implement.
63146314
*/
6315
-SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL);
6315
+SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
63166316
63176317
/*
63186318
** CAPI3REF: Overload A Function For A Virtual Table
63196319
** METHOD: sqlite3
63206320
**
@@ -6329,11 +6329,11 @@
63296329
** of the new function always causes an exception to be thrown. So
63306330
** the new function is not good for anything by itself. Its only
63316331
** purpose is to be a placeholder function that can be overloaded
63326332
** by a [virtual table].
63336333
*/
6334
-SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
6334
+SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
63356335
63366336
/*
63376337
** The interface to the virtual-table mechanism defined above (back up
63386338
** to a comment remarkably similar to this one) is currently considered
63396339
** to be experimental. The interface might change in incompatible ways.
@@ -6428,11 +6428,11 @@
64286428
** zero-filled blob to read or write using the incremental-blob interface.
64296429
**
64306430
** To avoid a resource leak, every open [BLOB handle] should eventually
64316431
** be released by a call to [sqlite3_blob_close()].
64326432
*/
6433
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
6433
+SQLITE_API int sqlite3_blob_open(
64346434
sqlite3*,
64356435
const char *zDb,
64366436
const char *zTable,
64376437
const char *zColumn,
64386438
sqlite3_int64 iRow,
@@ -6461,11 +6461,11 @@
64616461
** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
64626462
** always returns zero.
64636463
**
64646464
** ^This function sets the database handle error code and message.
64656465
*/
6466
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
6466
+SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
64676467
64686468
/*
64696469
** CAPI3REF: Close A BLOB Handle
64706470
** DESTRUCTOR: sqlite3_blob
64716471
**
@@ -6484,11 +6484,11 @@
64846484
** with a null pointer (such as would be returned by a failed call to
64856485
** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
64866486
** is passed a valid open blob handle, the values returned by the
64876487
** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
64886488
*/
6489
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *);
6489
+SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
64906490
64916491
/*
64926492
** CAPI3REF: Return The Size Of An Open BLOB
64936493
** METHOD: sqlite3_blob
64946494
**
@@ -6500,11 +6500,11 @@
65006500
** This routine only works on a [BLOB handle] which has been created
65016501
** by a prior successful call to [sqlite3_blob_open()] and which has not
65026502
** been closed by [sqlite3_blob_close()]. Passing any other pointer in
65036503
** to this routine results in undefined and probably undesirable behavior.
65046504
*/
6505
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *);
6505
+SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
65066506
65076507
/*
65086508
** CAPI3REF: Read Data From A BLOB Incrementally
65096509
** METHOD: sqlite3_blob
65106510
**
@@ -6529,11 +6529,11 @@
65296529
** been closed by [sqlite3_blob_close()]. Passing any other pointer in
65306530
** to this routine results in undefined and probably undesirable behavior.
65316531
**
65326532
** See also: [sqlite3_blob_write()].
65336533
*/
6534
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
6534
+SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
65356535
65366536
/*
65376537
** CAPI3REF: Write Data Into A BLOB Incrementally
65386538
** METHOD: sqlite3_blob
65396539
**
@@ -6571,11 +6571,11 @@
65716571
** been closed by [sqlite3_blob_close()]. Passing any other pointer in
65726572
** to this routine results in undefined and probably undesirable behavior.
65736573
**
65746574
** See also: [sqlite3_blob_read()].
65756575
*/
6576
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
6576
+SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
65776577
65786578
/*
65796579
** CAPI3REF: Virtual File System Objects
65806580
**
65816581
** A virtual filesystem (VFS) is an [sqlite3_vfs] object
@@ -6602,13 +6602,13 @@
66026602
**
66036603
** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
66046604
** ^(If the default VFS is unregistered, another VFS is chosen as
66056605
** the default. The choice for the new VFS is arbitrary.)^
66066606
*/
6607
-SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName);
6608
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6609
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
6607
+SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
6608
+SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6609
+SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
66106610
66116611
/*
66126612
** CAPI3REF: Mutexes
66136613
**
66146614
** The SQLite core uses these routines for thread
@@ -6720,15 +6720,15 @@
67206720
** sqlite3_mutex_leave() is a NULL pointer, then all three routines
67216721
** behave as no-ops.
67226722
**
67236723
** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
67246724
*/
6725
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int);
6726
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*);
6727
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*);
6728
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*);
6729
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*);
6725
+SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
6726
+SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
6727
+SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
6728
+SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
6729
+SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
67306730
67316731
/*
67326732
** CAPI3REF: Mutex Methods Object
67336733
**
67346734
** An instance of this structure defines the low-level routines
@@ -6834,12 +6834,12 @@
68346834
** call to sqlite3_mutex_held() to fail, so a non-zero return is
68356835
** the appropriate thing to do. The sqlite3_mutex_notheld()
68366836
** interface should also return 1 when given a NULL pointer.
68376837
*/
68386838
#ifndef NDEBUG
6839
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*);
6840
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
6839
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
6840
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
68416841
#endif
68426842
68436843
/*
68446844
** CAPI3REF: Mutex Types
68456845
**
@@ -6875,11 +6875,11 @@
68756875
** serializes access to the [database connection] given in the argument
68766876
** when the [threading mode] is Serialized.
68776877
** ^If the [threading mode] is Single-thread or Multi-thread then this
68786878
** routine returns a NULL pointer.
68796879
*/
6880
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*);
6880
+SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
68816881
68826882
/*
68836883
** CAPI3REF: Low-Level Control Of Database Files
68846884
** METHOD: sqlite3
68856885
**
@@ -6910,11 +6910,11 @@
69106910
** an incorrect zDbName and an SQLITE_ERROR return from the underlying
69116911
** xFileControl method.
69126912
**
69136913
** See also: [SQLITE_FCNTL_LOCKSTATE]
69146914
*/
6915
-SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6915
+SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
69166916
69176917
/*
69186918
** CAPI3REF: Testing Interface
69196919
**
69206920
** ^The sqlite3_test_control() interface is used to read out internal
@@ -6929,11 +6929,11 @@
69296929
** The details of the operation codes, their meanings, the parameters
69306930
** they take, and what they do are all subject to change without notice.
69316931
** Unlike most of the SQLite API, this function is not guaranteed to
69326932
** operate consistently from one release to the next.
69336933
*/
6934
-SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
6934
+SQLITE_API int sqlite3_test_control(int op, ...);
69356935
69366936
/*
69376937
** CAPI3REF: Testing Interface Operation Codes
69386938
**
69396939
** These constants are the valid operation code parameters used
@@ -6992,12 +6992,12 @@
69926992
** be represented by a 32-bit integer, then the values returned by
69936993
** sqlite3_status() are undefined.
69946994
**
69956995
** See also: [sqlite3_db_status()]
69966996
*/
6997
-SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6998
-SQLITE_API int SQLITE_STDCALL sqlite3_status64(
6997
+SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6998
+SQLITE_API int sqlite3_status64(
69996999
int op,
70007000
sqlite3_int64 *pCurrent,
70017001
sqlite3_int64 *pHighwater,
70027002
int resetFlag
70037003
);
@@ -7118,11 +7118,11 @@
71187118
** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
71197119
** non-zero [error code] on failure.
71207120
**
71217121
** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
71227122
*/
7123
-SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
7123
+SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
71247124
71257125
/*
71267126
** CAPI3REF: Status Parameters for database connections
71277127
** KEYWORDS: {SQLITE_DBSTATUS options}
71287128
**
@@ -7261,11 +7261,11 @@
72617261
** ^If the resetFlg is true, then the counter is reset to zero after this
72627262
** interface call returns.
72637263
**
72647264
** See also: [sqlite3_status()] and [sqlite3_db_status()].
72657265
*/
7266
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
7266
+SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
72677267
72687268
/*
72697269
** CAPI3REF: Status Parameters for prepared statements
72707270
** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters}
72717271
**
@@ -7730,20 +7730,20 @@
77307730
** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
77317731
** APIs are not strictly speaking threadsafe. If they are invoked at the
77327732
** same time as another thread is invoking sqlite3_backup_step() it is
77337733
** possible that they return invalid values.
77347734
*/
7735
-SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
7735
+SQLITE_API sqlite3_backup *sqlite3_backup_init(
77367736
sqlite3 *pDest, /* Destination database handle */
77377737
const char *zDestName, /* Destination database name */
77387738
sqlite3 *pSource, /* Source database handle */
77397739
const char *zSourceName /* Source database name */
77407740
);
7741
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage);
7742
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p);
7743
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p);
7744
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p);
7741
+SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
7742
+SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
7743
+SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);
7744
+SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
77457745
77467746
/*
77477747
** CAPI3REF: Unlock Notification
77487748
** METHOD: sqlite3
77497749
**
@@ -7856,11 +7856,11 @@
78567856
** by an sqlite3_step() call. ^(If there is a blocking connection, then the
78577857
** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
78587858
** the special "DROP TABLE/INDEX" case, the extended error code is just
78597859
** SQLITE_LOCKED.)^
78607860
*/
7861
-SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify(
7861
+SQLITE_API int sqlite3_unlock_notify(
78627862
sqlite3 *pBlocked, /* Waiting connection */
78637863
void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
78647864
void *pNotifyArg /* Argument to pass to xNotify */
78657865
);
78667866
@@ -7871,12 +7871,12 @@
78717871
** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications
78727872
** and extensions to compare the contents of two buffers containing UTF-8
78737873
** strings in a case-independent fashion, using the same definition of "case
78747874
** independence" that SQLite uses internally when comparing identifiers.
78757875
*/
7876
-SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *);
7877
-SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int);
7876
+SQLITE_API int sqlite3_stricmp(const char *, const char *);
7877
+SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
78787878
78797879
/*
78807880
** CAPI3REF: String Globbing
78817881
*
78827882
** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if
@@ -7889,11 +7889,11 @@
78897889
** Note that this routine returns zero on a match and non-zero if the strings
78907890
** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
78917891
**
78927892
** See also: [sqlite3_strlike()].
78937893
*/
7894
-SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr);
7894
+SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
78957895
78967896
/*
78977897
** CAPI3REF: String LIKE Matching
78987898
*
78997899
** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if
@@ -7912,11 +7912,11 @@
79127912
** Note that this routine returns zero on a match and non-zero if the strings
79137913
** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
79147914
**
79157915
** See also: [sqlite3_strglob()].
79167916
*/
7917
-SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
7917
+SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
79187918
79197919
/*
79207920
** CAPI3REF: Error Logging Interface
79217921
**
79227922
** ^The [sqlite3_log()] interface writes a message into the [error log]
@@ -7935,11 +7935,11 @@
79357935
** will not use dynamically allocated memory. The log message is stored in
79367936
** a fixed-length buffer on the stack. If the log message is longer than
79377937
** a few hundred characters, it will be truncated to the length of the
79387938
** buffer.
79397939
*/
7940
-SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...);
7940
+SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
79417941
79427942
/*
79437943
** CAPI3REF: Write-Ahead Log Commit Hook
79447944
** METHOD: sqlite3
79457945
**
@@ -7971,11 +7971,11 @@
79717971
** previously registered write-ahead log callback. ^Note that the
79727972
** [sqlite3_wal_autocheckpoint()] interface and the
79737973
** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
79747974
** overwrite any prior [sqlite3_wal_hook()] settings.
79757975
*/
7976
-SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook(
7976
+SQLITE_API void *sqlite3_wal_hook(
79777977
sqlite3*,
79787978
int(*)(void *,sqlite3*,const char*,int),
79797979
void*
79807980
);
79817981
@@ -8006,11 +8006,11 @@
80068006
** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
80078007
** pages. The use of this interface
80088008
** is only necessary if the default setting is found to be suboptimal
80098009
** for a particular application.
80108010
*/
8011
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
8011
+SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
80128012
80138013
/*
80148014
** CAPI3REF: Checkpoint a database
80158015
** METHOD: sqlite3
80168016
**
@@ -8028,11 +8028,11 @@
80288028
** interface was added. This interface is retained for backwards
80298029
** compatibility and as a convenience for applications that need to manually
80308030
** start a callback but which do not need the full power (and corresponding
80318031
** complication) of [sqlite3_wal_checkpoint_v2()].
80328032
*/
8033
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
8033
+SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
80348034
80358035
/*
80368036
** CAPI3REF: Checkpoint a database
80378037
** METHOD: sqlite3
80388038
**
@@ -8122,11 +8122,11 @@
81228122
** [sqlite3_errcode()] and [sqlite3_errmsg()].
81238123
**
81248124
** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
81258125
** from SQL.
81268126
*/
8127
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2(
8127
+SQLITE_API int sqlite3_wal_checkpoint_v2(
81288128
sqlite3 *db, /* Database handle */
81298129
const char *zDb, /* Name of attached database (or NULL) */
81308130
int eMode, /* SQLITE_CHECKPOINT_* value */
81318131
int *pnLog, /* OUT: Size of WAL log in frames */
81328132
int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -8158,11 +8158,11 @@
81588158
**
81598159
** At present, there is only one option that may be configured using
81608160
** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
81618161
** may be added in the future.
81628162
*/
8163
-SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...);
8163
+SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
81648164
81658165
/*
81668166
** CAPI3REF: Virtual Table Configuration Options
81678167
**
81688168
** These macros define the various options to the
@@ -8211,11 +8211,11 @@
82118211
** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],
82128212
** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode
82138213
** of the SQL statement that triggered the call to the [xUpdate] method of the
82148214
** [virtual table].
82158215
*/
8216
-SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *);
8216
+SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
82178217
82188218
/*
82198219
** CAPI3REF: Conflict resolution modes
82208220
** KEYWORDS: {conflict resolution mode}
82218221
**
@@ -8316,11 +8316,11 @@
83168316
** as if the loop did not exist - it returns non-zero and leave the variable
83178317
** that pOut points to unchanged.
83188318
**
83198319
** See also: [sqlite3_stmt_scanstatus_reset()]
83208320
*/
8321
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
8321
+SQLITE_API int sqlite3_stmt_scanstatus(
83228322
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
83238323
int idx, /* Index of loop to report on */
83248324
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
83258325
void *pOut /* Result written here */
83268326
);
@@ -8332,11 +8332,11 @@
83328332
** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
83338333
**
83348334
** This API is only available if the library is built with pre-processor
83358335
** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
83368336
*/
8337
-SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
8337
+SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
83388338
83398339
/*
83408340
** CAPI3REF: Flush caches to disk mid-transaction
83418341
**
83428342
** ^If a write-transaction is open on [database connection] D when the
@@ -8364,11 +8364,11 @@
83648364
** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.
83658365
**
83668366
** ^This function does not set the database handle error code or message
83678367
** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
83688368
*/
8369
-SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*);
8369
+SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
83708370
83718371
/*
83728372
** CAPI3REF: The pre-update hook.
83738373
**
83748374
** ^These interfaces are only available if SQLite is compiled using the
@@ -8444,11 +8444,11 @@
84448444
** triggers; or 2 for changes resulting from triggers called by top-level
84458445
** triggers; and so forth.
84468446
**
84478447
** See also: [sqlite3_update_hook()]
84488448
*/
8449
-SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook(
8449
+SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook(
84508450
sqlite3 *db,
84518451
void(*xPreUpdate)(
84528452
void *pCtx, /* Copy of third arg to preupdate_hook() */
84538453
sqlite3 *db, /* Database handle */
84548454
int op, /* SQLITE_UPDATE, DELETE or INSERT */
@@ -8457,14 +8457,14 @@
84578457
sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
84588458
sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
84598459
),
84608460
void*
84618461
);
8462
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8463
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *);
8464
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *);
8465
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
8462
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8463
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_count(sqlite3 *);
8464
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_depth(sqlite3 *);
8465
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
84668466
84678467
/*
84688468
** CAPI3REF: Low-level system error code
84698469
**
84708470
** ^Attempt to return the underlying operating system error code or error
@@ -8472,11 +8472,11 @@
84728472
** The return value is OS-dependent. For example, on unix systems, after
84738473
** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
84748474
** called to get back the underlying "errno" that caused the problem, such
84758475
** as ENOSPC, EAUTH, EISDIR, and so forth.
84768476
*/
8477
-SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*);
8477
+SQLITE_API int sqlite3_system_errno(sqlite3*);
84788478
84798479
/*
84808480
** CAPI3REF: Database Snapshot
84818481
** KEYWORDS: {snapshot}
84828482
** EXPERIMENTAL
@@ -8522,11 +8522,11 @@
85228522
** to avoid a memory leak.
85238523
**
85248524
** The [sqlite3_snapshot_get()] interface is only available when the
85258525
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
85268526
*/
8527
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get(
8527
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
85288528
sqlite3 *db,
85298529
const char *zSchema,
85308530
sqlite3_snapshot **ppSnapshot
85318531
);
85328532
@@ -8560,11 +8560,11 @@
85608560
** database connection in order to make it ready to use snapshots.)
85618561
**
85628562
** The [sqlite3_snapshot_open()] interface is only available when the
85638563
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
85648564
*/
8565
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open(
8565
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
85668566
sqlite3 *db,
85678567
const char *zSchema,
85688568
sqlite3_snapshot *pSnapshot
85698569
);
85708570
@@ -8577,11 +8577,11 @@
85778577
** using this routine to avoid a memory leak.
85788578
**
85798579
** The [sqlite3_snapshot_free()] interface is only available when the
85808580
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
85818581
*/
8582
-SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*);
8582
+SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
85838583
85848584
/*
85858585
** CAPI3REF: Compare the ages of two snapshot handles.
85868586
** EXPERIMENTAL
85878587
**
@@ -8601,11 +8601,11 @@
86018601
**
86028602
** Otherwise, this API returns a negative value if P1 refers to an older
86038603
** snapshot than P2, zero if the two handles refer to the same database
86048604
** snapshot, and a positive value if P1 is a newer snapshot than P2.
86058605
*/
8606
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp(
8606
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
86078607
sqlite3_snapshot *p1,
86088608
sqlite3_snapshot *p2
86098609
);
86108610
86118611
/*
@@ -8659,11 +8659,11 @@
86598659
** Register a geometry callback named zGeom that can be used as part of an
86608660
** R-Tree geometry query as follows:
86618661
**
86628662
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
86638663
*/
8664
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback(
8664
+SQLITE_API int sqlite3_rtree_geometry_callback(
86658665
sqlite3 *db,
86668666
const char *zGeom,
86678667
int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
86688668
void *pContext
86698669
);
@@ -8685,11 +8685,11 @@
86858685
** Register a 2nd-generation geometry callback named zScore that can be
86868686
** used as part of an R-Tree geometry query as follows:
86878687
**
86888688
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
86898689
*/
8690
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback(
8690
+SQLITE_API int sqlite3_rtree_query_callback(
86918691
sqlite3 *db,
86928692
const char *zQueryFunc,
86938693
int (*xQueryFunc)(sqlite3_rtree_query_info*),
86948694
void *pContext,
86958695
void (*xDestructor)(void*)
@@ -11900,12 +11900,12 @@
1190011900
*/
1190111901
#ifdef SQLITE_OMIT_WSD
1190211902
#define SQLITE_WSD const
1190311903
#define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v)))
1190411904
#define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config)
11905
-SQLITE_API int SQLITE_STDCALL sqlite3_wsd_init(int N, int J);
11906
-SQLITE_API void *SQLITE_STDCALL sqlite3_wsd_find(void *K, int L);
11905
+SQLITE_API int sqlite3_wsd_init(int N, int J);
11906
+SQLITE_API void *sqlite3_wsd_find(void *K, int L);
1190711907
#else
1190811908
#define SQLITE_WSD
1190911909
#define GLOBAL(t,v) v
1191011910
#define sqlite3GlobalConfig sqlite3Config
1191111911
#endif
@@ -12559,16 +12559,16 @@
1255912559
#define OP_Found 31 /* synopsis: key=r[P3@P4] */
1256012560
#define OP_SeekRowid 32 /* synopsis: intkey=r[P3] */
1256112561
#define OP_NotExists 33 /* synopsis: intkey=r[P3] */
1256212562
#define OP_IsNull 34 /* same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
1256312563
#define OP_NotNull 35 /* same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
12564
-#define OP_Ne 36 /* same as TK_NE, synopsis: if r[P1]!=r[P3] goto P2 */
12565
-#define OP_Eq 37 /* same as TK_EQ, synopsis: if r[P1]==r[P3] goto P2 */
12566
-#define OP_Gt 38 /* same as TK_GT, synopsis: if r[P1]>r[P3] goto P2 */
12567
-#define OP_Le 39 /* same as TK_LE, synopsis: if r[P1]<=r[P3] goto P2 */
12568
-#define OP_Lt 40 /* same as TK_LT, synopsis: if r[P1]<r[P3] goto P2 */
12569
-#define OP_Ge 41 /* same as TK_GE, synopsis: if r[P1]>=r[P3] goto P2 */
12564
+#define OP_Ne 36 /* same as TK_NE, synopsis: IF r[P3]!=r[P1] */
12565
+#define OP_Eq 37 /* same as TK_EQ, synopsis: IF r[P3]==r[P1] */
12566
+#define OP_Gt 38 /* same as TK_GT, synopsis: IF r[P3]>r[P1] */
12567
+#define OP_Le 39 /* same as TK_LE, synopsis: IF r[P3]<=r[P1] */
12568
+#define OP_Lt 40 /* same as TK_LT, synopsis: IF r[P3]<r[P1] */
12569
+#define OP_Ge 41 /* same as TK_GE, synopsis: IF r[P3]>=r[P1] */
1257012570
#define OP_Last 42
1257112571
#define OP_BitAnd 43 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
1257212572
#define OP_BitOr 44 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
1257312573
#define OP_ShiftLeft 45 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */
1257412574
#define OP_ShiftRight 46 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */
@@ -17561,11 +17561,11 @@
1756117561
** was used and false if not.
1756217562
**
1756317563
** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix
1756417564
** is not required for a match.
1756517565
*/
17566
-SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName){
17566
+SQLITE_API int sqlite3_compileoption_used(const char *zOptName){
1756717567
int i, n;
1756817568
1756917569
#if SQLITE_ENABLE_API_ARMOR
1757017570
if( zOptName==0 ){
1757117571
(void)SQLITE_MISUSE_BKPT;
@@ -17589,11 +17589,11 @@
1758917589
1759017590
/*
1759117591
** Return the N-th compile-time option string. If N is out of range,
1759217592
** return a NULL pointer.
1759317593
*/
17594
-SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N){
17594
+SQLITE_API const char *sqlite3_compileoption_get(int N){
1759517595
if( N>=0 && N<ArraySize(azCompileOpt) ){
1759617596
return azCompileOpt[N];
1759717597
}
1759817598
return 0;
1759917599
}
@@ -18299,11 +18299,11 @@
1829918299
}
1830018300
1830118301
/*
1830218302
** Query status information.
1830318303
*/
18304
-SQLITE_API int SQLITE_STDCALL sqlite3_status64(
18304
+SQLITE_API int sqlite3_status64(
1830518305
int op,
1830618306
sqlite3_int64 *pCurrent,
1830718307
sqlite3_int64 *pHighwater,
1830818308
int resetFlag
1830918309
){
@@ -18324,11 +18324,11 @@
1832418324
}
1832518325
sqlite3_mutex_leave(pMutex);
1832618326
(void)pMutex; /* Prevent warning when SQLITE_THREADSAFE=0 */
1832718327
return SQLITE_OK;
1832818328
}
18329
-SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){
18329
+SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){
1833018330
sqlite3_int64 iCur = 0, iHwtr = 0;
1833118331
int rc;
1833218332
#ifdef SQLITE_ENABLE_API_ARMOR
1833318333
if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT;
1833418334
#endif
@@ -18341,11 +18341,11 @@
1834118341
}
1834218342
1834318343
/*
1834418344
** Query status information for a single database connection
1834518345
*/
18346
-SQLITE_API int SQLITE_STDCALL sqlite3_db_status(
18346
+SQLITE_API int sqlite3_db_status(
1834718347
sqlite3 *db, /* The database connection whose status is desired */
1834818348
int op, /* Status verb */
1834918349
int *pCurrent, /* Write current value here */
1835018350
int *pHighwater, /* Write high-water mark here */
1835118351
int resetFlag /* Reset high-water mark if true */
@@ -20018,11 +20018,11 @@
2001820018
2001920019
/*
2002020020
** Locate a VFS by name. If no name is given, simply return the
2002120021
** first VFS on the list.
2002220022
*/
20023
-SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfs){
20023
+SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){
2002420024
sqlite3_vfs *pVfs = 0;
2002520025
#if SQLITE_THREADSAFE
2002620026
sqlite3_mutex *mutex;
2002720027
#endif
2002820028
#ifndef SQLITE_OMIT_AUTOINIT
@@ -20064,11 +20064,11 @@
2006420064
/*
2006520065
** Register a VFS with the system. It is harmless to register the same
2006620066
** VFS multiple times. The new VFS becomes the default if makeDflt is
2006720067
** true.
2006820068
*/
20069
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
20069
+SQLITE_API int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
2007020070
MUTEX_LOGIC(sqlite3_mutex *mutex;)
2007120071
#ifndef SQLITE_OMIT_AUTOINIT
2007220072
int rc = sqlite3_initialize();
2007320073
if( rc ) return rc;
2007420074
#endif
@@ -20092,11 +20092,11 @@
2009220092
}
2009320093
2009420094
/*
2009520095
** Unregister a VFS so that it is no longer accessible.
2009620096
*/
20097
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
20097
+SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
2009820098
#if SQLITE_THREADSAFE
2009920099
sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
2010020100
#endif
2010120101
sqlite3_mutex_enter(mutex);
2010220102
vfsUnlink(pVfs);
@@ -22443,11 +22443,11 @@
2244322443
}
2244422444
2244522445
/*
2244622446
** Retrieve a pointer to a static mutex or allocate a new dynamic one.
2244722447
*/
22448
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int id){
22448
+SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int id){
2244922449
#ifndef SQLITE_OMIT_AUTOINIT
2245022450
if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0;
2245122451
if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0;
2245222452
#endif
2245322453
assert( sqlite3GlobalConfig.mutex.xMutexAlloc );
@@ -22464,11 +22464,11 @@
2246422464
}
2246522465
2246622466
/*
2246722467
** Free a dynamic mutex.
2246822468
*/
22469
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){
22469
+SQLITE_API void sqlite3_mutex_free(sqlite3_mutex *p){
2247022470
if( p ){
2247122471
assert( sqlite3GlobalConfig.mutex.xMutexFree );
2247222472
sqlite3GlobalConfig.mutex.xMutexFree(p);
2247322473
}
2247422474
}
@@ -22475,11 +22475,11 @@
2247522475
2247622476
/*
2247722477
** Obtain the mutex p. If some other thread already has the mutex, block
2247822478
** until it can be obtained.
2247922479
*/
22480
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){
22480
+SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex *p){
2248122481
if( p ){
2248222482
assert( sqlite3GlobalConfig.mutex.xMutexEnter );
2248322483
sqlite3GlobalConfig.mutex.xMutexEnter(p);
2248422484
}
2248522485
}
@@ -22486,11 +22486,11 @@
2248622486
2248722487
/*
2248822488
** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another
2248922489
** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY.
2249022490
*/
22491
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){
22491
+SQLITE_API int sqlite3_mutex_try(sqlite3_mutex *p){
2249222492
int rc = SQLITE_OK;
2249322493
if( p ){
2249422494
assert( sqlite3GlobalConfig.mutex.xMutexTry );
2249522495
return sqlite3GlobalConfig.mutex.xMutexTry(p);
2249622496
}
@@ -22501,11 +22501,11 @@
2250122501
** The sqlite3_mutex_leave() routine exits a mutex that was previously
2250222502
** entered by the same thread. The behavior is undefined if the mutex
2250322503
** is not currently entered. If a NULL pointer is passed as an argument
2250422504
** this function is a no-op.
2250522505
*/
22506
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){
22506
+SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex *p){
2250722507
if( p ){
2250822508
assert( sqlite3GlobalConfig.mutex.xMutexLeave );
2250922509
sqlite3GlobalConfig.mutex.xMutexLeave(p);
2251022510
}
2251122511
}
@@ -22513,15 +22513,15 @@
2251322513
#ifndef NDEBUG
2251422514
/*
2251522515
** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
2251622516
** intended for use inside assert() statements.
2251722517
*/
22518
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex *p){
22518
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex *p){
2251922519
assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld );
2252022520
return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p);
2252122521
}
22522
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex *p){
22522
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *p){
2252322523
assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld );
2252422524
return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p);
2252522525
}
2252622526
#endif
2252722527
@@ -23549,12 +23549,12 @@
2354923549
** of the sqlite3_initialize() and sqlite3_shutdown() processing, the
2355023550
** "interlocked" magic used here is probably not strictly necessary.
2355123551
*/
2355223552
static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0;
2355323553
23554
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void); /* os_win.c */
23555
-SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */
23554
+SQLITE_API int sqlite3_win32_is_nt(void); /* os_win.c */
23555
+SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */
2355623556
2355723557
static int winMutexInit(void){
2355823558
/* The first to increment to 1 does actual initialization */
2355923559
if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){
2356023560
int i;
@@ -23850,11 +23850,11 @@
2385023850
/*
2385123851
** Attempt to release up to n bytes of non-essential memory currently
2385223852
** held by SQLite. An example of non-essential memory is memory used to
2385323853
** cache database pages that are not currently in use.
2385423854
*/
23855
-SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int n){
23855
+SQLITE_API int sqlite3_release_memory(int n){
2385623856
#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
2385723857
return sqlite3PcacheReleaseMemory(n);
2385823858
#else
2385923859
/* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine
2386023860
** is a no-op returning zero if SQLite is not compiled with
@@ -23909,11 +23909,11 @@
2390923909
/*
2391023910
** Deprecated external interface. It used to set an alarm callback
2391123911
** that was invoked when memory usage grew too large. Now it is a
2391223912
** no-op.
2391323913
*/
23914
-SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm(
23914
+SQLITE_API int sqlite3_memory_alarm(
2391523915
void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
2391623916
void *pArg,
2391723917
sqlite3_int64 iThreshold
2391823918
){
2391923919
(void)xCallback;
@@ -23925,11 +23925,11 @@
2392523925
2392623926
/*
2392723927
** Set the soft heap-size limit for the library. Passing a zero or
2392823928
** negative value indicates no limit.
2392923929
*/
23930
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 n){
23930
+SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 n){
2393123931
sqlite3_int64 priorLimit;
2393223932
sqlite3_int64 excess;
2393323933
sqlite3_int64 nUsed;
2393423934
#ifndef SQLITE_OMIT_AUTOINIT
2393523935
int rc = sqlite3_initialize();
@@ -23947,11 +23947,11 @@
2394723947
sqlite3_mutex_leave(mem0.mutex);
2394823948
excess = sqlite3_memory_used() - n;
2394923949
if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff));
2395023950
return priorLimit;
2395123951
}
23952
-SQLITE_API void SQLITE_STDCALL sqlite3_soft_heap_limit(int n){
23952
+SQLITE_API void sqlite3_soft_heap_limit(int n){
2395323953
if( n<0 ) n = 0;
2395423954
sqlite3_soft_heap_limit64(n);
2395523955
}
2395623956
2395723957
/*
@@ -24016,11 +24016,11 @@
2401624016
}
2401724017
2401824018
/*
2401924019
** Return the amount of memory currently checked out.
2402024020
*/
24021
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){
24021
+SQLITE_API sqlite3_int64 sqlite3_memory_used(void){
2402224022
sqlite3_int64 res, mx;
2402324023
sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0);
2402424024
return res;
2402524025
}
2402624026
@@ -24027,11 +24027,11 @@
2402724027
/*
2402824028
** Return the maximum amount of memory that has ever been
2402924029
** checked out since either the beginning of this process
2403024030
** or since the most recent reset.
2403124031
*/
24032
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag){
24032
+SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag){
2403324033
sqlite3_int64 res, mx;
2403424034
sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag);
2403524035
return mx;
2403624036
}
2403724037
@@ -24107,17 +24107,17 @@
2410724107
/*
2410824108
** This version of the memory allocation is for use by the application.
2410924109
** First make sure the memory subsystem is initialized, then do the
2411024110
** allocation.
2411124111
*/
24112
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int n){
24112
+SQLITE_API void *sqlite3_malloc(int n){
2411324113
#ifndef SQLITE_OMIT_AUTOINIT
2411424114
if( sqlite3_initialize() ) return 0;
2411524115
#endif
2411624116
return n<=0 ? 0 : sqlite3Malloc(n);
2411724117
}
24118
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64 n){
24118
+SQLITE_API void *sqlite3_malloc64(sqlite3_uint64 n){
2411924119
#ifndef SQLITE_OMIT_AUTOINIT
2412024120
if( sqlite3_initialize() ) return 0;
2412124121
#endif
2412224122
return sqlite3Malloc(n);
2412324123
}
@@ -24256,20 +24256,20 @@
2425624256
}else{
2425724257
assert( sqlite3_mutex_held(db->mutex) );
2425824258
return db->lookaside.sz;
2425924259
}
2426024260
}
24261
-SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){
24261
+SQLITE_API sqlite3_uint64 sqlite3_msize(void *p){
2426224262
assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
2426324263
assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
2426424264
return p ? sqlite3GlobalConfig.m.xSize(p) : 0;
2426524265
}
2426624266
2426724267
/*
2426824268
** Free memory previously obtained from sqlite3Malloc().
2426924269
*/
24270
-SQLITE_API void SQLITE_STDCALL sqlite3_free(void *p){
24270
+SQLITE_API void sqlite3_free(void *p){
2427124271
if( p==0 ) return; /* IMP: R-49053-54554 */
2427224272
assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
2427324273
assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
2427424274
if( sqlite3GlobalConfig.bMemstat ){
2427524275
sqlite3_mutex_enter(mem0.mutex);
@@ -24374,18 +24374,18 @@
2437424374
2437524375
/*
2437624376
** The public interface to sqlite3Realloc. Make sure that the memory
2437724377
** subsystem is initialized prior to invoking sqliteRealloc.
2437824378
*/
24379
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void *pOld, int n){
24379
+SQLITE_API void *sqlite3_realloc(void *pOld, int n){
2438024380
#ifndef SQLITE_OMIT_AUTOINIT
2438124381
if( sqlite3_initialize() ) return 0;
2438224382
#endif
2438324383
if( n<0 ) n = 0; /* IMP: R-26507-47431 */
2438424384
return sqlite3Realloc(pOld, n);
2438524385
}
24386
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){
24386
+SQLITE_API void *sqlite3_realloc64(void *pOld, sqlite3_uint64 n){
2438724387
#ifndef SQLITE_OMIT_AUTOINIT
2438824388
if( sqlite3_initialize() ) return 0;
2438924389
#endif
2439024390
return sqlite3Realloc(pOld, n);
2439124391
}
@@ -25608,11 +25608,11 @@
2560825608
2560925609
/*
2561025610
** Print into memory obtained from sqlite3_malloc(). Omit the internal
2561125611
** %-conversion extensions.
2561225612
*/
25613
-SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char *zFormat, va_list ap){
25613
+SQLITE_API char *sqlite3_vmprintf(const char *zFormat, va_list ap){
2561425614
char *z;
2561525615
char zBase[SQLITE_PRINT_BUF_SIZE];
2561625616
StrAccum acc;
2561725617
2561825618
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -25632,11 +25632,11 @@
2563225632
2563325633
/*
2563425634
** Print into memory obtained from sqlite3_malloc()(). Omit the internal
2563525635
** %-conversion extensions.
2563625636
*/
25637
-SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char *zFormat, ...){
25637
+SQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){
2563825638
va_list ap;
2563925639
char *z;
2564025640
#ifndef SQLITE_OMIT_AUTOINIT
2564125641
if( sqlite3_initialize() ) return 0;
2564225642
#endif
@@ -25657,11 +25657,11 @@
2565725657
** this without breaking compatibility, so we just have to live with the
2565825658
** mistake.
2565925659
**
2566025660
** sqlite3_vsnprintf() is the varargs version.
2566125661
*/
25662
-SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
25662
+SQLITE_API char *sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
2566325663
StrAccum acc;
2566425664
if( n<=0 ) return zBuf;
2566525665
#ifdef SQLITE_ENABLE_API_ARMOR
2566625666
if( zBuf==0 || zFormat==0 ) {
2566725667
(void)SQLITE_MISUSE_BKPT;
@@ -25671,11 +25671,11 @@
2567125671
#endif
2567225672
sqlite3StrAccumInit(&acc, 0, zBuf, n, 0);
2567325673
sqlite3VXPrintf(&acc, zFormat, ap);
2567425674
return sqlite3StrAccumFinish(&acc);
2567525675
}
25676
-SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
25676
+SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
2567725677
char *z;
2567825678
va_list ap;
2567925679
va_start(ap,zFormat);
2568025680
z = sqlite3_vsnprintf(n, zBuf, zFormat, ap);
2568125681
va_end(ap);
@@ -25707,11 +25707,11 @@
2570725707
}
2570825708
2570925709
/*
2571025710
** Format and write a message to the log if logging is enabled.
2571125711
*/
25712
-SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...){
25712
+SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...){
2571325713
va_list ap; /* Vararg list */
2571425714
if( sqlite3GlobalConfig.xLog ){
2571525715
va_start(ap, zFormat);
2571625716
renderLogMsg(iErrCode, zFormat, ap);
2571725717
va_end(ap);
@@ -26284,11 +26284,11 @@
2628426284
} sqlite3Prng;
2628526285
2628626286
/*
2628726287
** Return N random bytes.
2628826288
*/
26289
-SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *pBuf){
26289
+SQLITE_API void sqlite3_randomness(int N, void *pBuf){
2629026290
unsigned char t;
2629126291
unsigned char *zBuf = pBuf;
2629226292
2629326293
/* The "wsdPrng" macro will resolve to the pseudo-random number generator
2629426294
** state vector. If writable static data is unsupported on the target,
@@ -27487,11 +27487,11 @@
2748727487
** sqlite3_strnicmp() APIs allow applications and extensions to compare
2748827488
** the contents of two buffers containing UTF-8 strings in a
2748927489
** case-independent fashion, using the same definition of "case
2749027490
** independence" that SQLite uses internally when comparing identifiers.
2749127491
*/
27492
-SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *zLeft, const char *zRight){
27492
+SQLITE_API int sqlite3_stricmp(const char *zLeft, const char *zRight){
2749327493
if( zLeft==0 ){
2749427494
return zRight ? -1 : 0;
2749527495
}else if( zRight==0 ){
2749627496
return 1;
2749727497
}
@@ -27508,11 +27508,11 @@
2750827508
a++;
2750927509
b++;
2751027510
}
2751127511
return c;
2751227512
}
27513
-SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
27513
+SQLITE_API int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
2751427514
register unsigned char *a, *b;
2751527515
if( zLeft==0 ){
2751627516
return zRight ? -1 : 0;
2751727517
}else if( zRight==0 ){
2751827518
return 1;
@@ -28990,16 +28990,16 @@
2899028990
/* 31 */ "Found" OpHelp("key=r[P3@P4]"),
2899128991
/* 32 */ "SeekRowid" OpHelp("intkey=r[P3]"),
2899228992
/* 33 */ "NotExists" OpHelp("intkey=r[P3]"),
2899328993
/* 34 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
2899428994
/* 35 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
28995
- /* 36 */ "Ne" OpHelp("if r[P1]!=r[P3] goto P2"),
28996
- /* 37 */ "Eq" OpHelp("if r[P1]==r[P3] goto P2"),
28997
- /* 38 */ "Gt" OpHelp("if r[P1]>r[P3] goto P2"),
28998
- /* 39 */ "Le" OpHelp("if r[P1]<=r[P3] goto P2"),
28999
- /* 40 */ "Lt" OpHelp("if r[P1]<r[P3] goto P2"),
29000
- /* 41 */ "Ge" OpHelp("if r[P1]>=r[P3] goto P2"),
28995
+ /* 36 */ "Ne" OpHelp("IF r[P3]!=r[P1]"),
28996
+ /* 37 */ "Eq" OpHelp("IF r[P3]==r[P1]"),
28997
+ /* 38 */ "Gt" OpHelp("IF r[P3]>r[P1]"),
28998
+ /* 39 */ "Le" OpHelp("IF r[P3]<=r[P1]"),
28999
+ /* 40 */ "Lt" OpHelp("IF r[P3]<r[P1]"),
29000
+ /* 41 */ "Ge" OpHelp("IF r[P3]>=r[P1]"),
2900129001
/* 42 */ "Last" OpHelp(""),
2900229002
/* 43 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
2900329003
/* 44 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
2900429004
/* 45 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
2900529005
/* 46 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
@@ -36807,11 +36807,11 @@
3680736807
** This routine is called once during SQLite initialization and by a
3680836808
** single thread. The memory allocation and mutex subsystems have not
3680936809
** necessarily been initialized when this routine is called, and so they
3681036810
** should not be used.
3681136811
*/
36812
-SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){
36812
+SQLITE_API int sqlite3_os_init(void){
3681336813
/*
3681436814
** The following macro defines an initializer for an sqlite3_vfs object.
3681536815
** The name of the VFS is NAME. The pAppData is a pointer to a pointer
3681636816
** to the "finder" function. (pAppData is a pointer to a pointer because
3681736817
** silly C90 rules prohibit a void* from being cast to a function pointer
@@ -36906,11 +36906,11 @@
3690636906
**
3690736907
** Some operating systems might need to do some cleanup in this routine,
3690836908
** to release dynamically allocated objects. But not on unix.
3690936909
** This routine is a no-op for unix.
3691036910
*/
36911
-SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){
36911
+SQLITE_API int sqlite3_os_end(void){
3691236912
return SQLITE_OK;
3691336913
}
3691436914
3691536915
#endif /* SQLITE_OS_UNIX */
3691636916
@@ -38341,11 +38341,11 @@
3834138341
** compact it. Upon success, SQLITE_OK will be returned. Upon failure, one
3834238342
** of SQLITE_NOMEM, SQLITE_ERROR, or SQLITE_NOTFOUND will be returned. The
3834338343
** "pnLargest" argument, if non-zero, will be used to return the size of the
3834438344
** largest committed free block in the heap, in bytes.
3834538345
*/
38346
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){
38346
+SQLITE_API int sqlite3_win32_compact_heap(LPUINT pnLargest){
3834738347
int rc = SQLITE_OK;
3834838348
UINT nLargest = 0;
3834938349
HANDLE hHeap;
3835038350
3835138351
winMemAssertMagic();
@@ -38381,11 +38381,11 @@
3838138381
** If a Win32 native heap has been configured, this function will attempt to
3838238382
** destroy and recreate it. If the Win32 native heap is not isolated and/or
3838338383
** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will
3838438384
** be returned and no changes will be made to the Win32 native heap.
3838538385
*/
38386
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_reset_heap(){
38386
+SQLITE_API int sqlite3_win32_reset_heap(){
3838738387
int rc;
3838838388
MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
3838938389
MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */
3839038390
MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); )
3839138391
MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); )
@@ -38426,11 +38426,11 @@
3842638426
/*
3842738427
** This function outputs the specified (ANSI) string to the Win32 debugger
3842838428
** (if available).
3842938429
*/
3843038430
38431
-SQLITE_API void SQLITE_STDCALL sqlite3_win32_write_debug(const char *zBuf, int nBuf){
38431
+SQLITE_API void sqlite3_win32_write_debug(const char *zBuf, int nBuf){
3843238432
char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE];
3843338433
int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */
3843438434
if( nMin<-1 ) nMin = -1; /* all negative values become -1. */
3843538435
assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE );
3843638436
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -38472,11 +38472,11 @@
3847238472
*/
3847338473
#if SQLITE_OS_WINRT
3847438474
static HANDLE sleepObj = NULL;
3847538475
#endif
3847638476
38477
-SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds){
38477
+SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds){
3847838478
#if SQLITE_OS_WINRT
3847938479
if ( sleepObj==NULL ){
3848038480
sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET,
3848138481
SYNCHRONIZE);
3848238482
}
@@ -38521,11 +38521,11 @@
3852138521
3852238522
/*
3852338523
** This function determines if the machine is running a version of Windows
3852438524
** based on the NT kernel.
3852538525
*/
38526
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void){
38526
+SQLITE_API int sqlite3_win32_is_nt(void){
3852738527
#if SQLITE_OS_WINRT
3852838528
/*
3852938529
** NOTE: The WinRT sub-platform is always assumed to be based on the NT
3853038530
** kernel.
3853138531
*/
@@ -38909,11 +38909,11 @@
3890938909
}
3891038910
3891138911
/*
3891238912
** This is a public wrapper for the winUtf8ToUnicode() function.
3891338913
*/
38914
-SQLITE_API LPWSTR SQLITE_STDCALL sqlite3_win32_utf8_to_unicode(const char *zText){
38914
+SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char *zText){
3891538915
#ifdef SQLITE_ENABLE_API_ARMOR
3891638916
if( !zText ){
3891738917
(void)SQLITE_MISUSE_BKPT;
3891838918
return 0;
3891938919
}
@@ -38925,11 +38925,11 @@
3892538925
}
3892638926
3892738927
/*
3892838928
** This is a public wrapper for the winUnicodeToUtf8() function.
3892938929
*/
38930
-SQLITE_API char *SQLITE_STDCALL sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){
38930
+SQLITE_API char *sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){
3893138931
#ifdef SQLITE_ENABLE_API_ARMOR
3893238932
if( !zWideText ){
3893338933
(void)SQLITE_MISUSE_BKPT;
3893438934
return 0;
3893538935
}
@@ -38941,11 +38941,11 @@
3894138941
}
3894238942
3894338943
/*
3894438944
** This is a public wrapper for the winMbcsToUtf8() function.
3894538945
*/
38946
-SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8(const char *zText){
38946
+SQLITE_API char *sqlite3_win32_mbcs_to_utf8(const char *zText){
3894738947
#ifdef SQLITE_ENABLE_API_ARMOR
3894838948
if( !zText ){
3894938949
(void)SQLITE_MISUSE_BKPT;
3895038950
return 0;
3895138951
}
@@ -38957,11 +38957,11 @@
3895738957
}
3895838958
3895938959
/*
3896038960
** This is a public wrapper for the winMbcsToUtf8() function.
3896138961
*/
38962
-SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){
38962
+SQLITE_API char *sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){
3896338963
#ifdef SQLITE_ENABLE_API_ARMOR
3896438964
if( !zText ){
3896538965
(void)SQLITE_MISUSE_BKPT;
3896638966
return 0;
3896738967
}
@@ -38973,11 +38973,11 @@
3897338973
}
3897438974
3897538975
/*
3897638976
** This is a public wrapper for the winUtf8ToMbcs() function.
3897738977
*/
38978
-SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs(const char *zText){
38978
+SQLITE_API char *sqlite3_win32_utf8_to_mbcs(const char *zText){
3897938979
#ifdef SQLITE_ENABLE_API_ARMOR
3898038980
if( !zText ){
3898138981
(void)SQLITE_MISUSE_BKPT;
3898238982
return 0;
3898338983
}
@@ -38989,11 +38989,11 @@
3898938989
}
3899038990
3899138991
/*
3899238992
** This is a public wrapper for the winUtf8ToMbcs() function.
3899338993
*/
38994
-SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){
38994
+SQLITE_API char *sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){
3899538995
#ifdef SQLITE_ENABLE_API_ARMOR
3899638996
if( !zText ){
3899738997
(void)SQLITE_MISUSE_BKPT;
3899838998
return 0;
3899938999
}
@@ -39009,11 +39009,11 @@
3900939009
** the provided arguments. The type argument must be 1 in order to set the
3901039010
** data directory or 2 in order to set the temporary directory. The zValue
3901139011
** argument is the name of the directory to use. The return value will be
3901239012
** SQLITE_OK if successful.
3901339013
*/
39014
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){
39014
+SQLITE_API int sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){
3901539015
char **ppDirectory = 0;
3901639016
#ifndef SQLITE_OMIT_AUTOINIT
3901739017
int rc = sqlite3_initialize();
3901839018
if( rc ) return rc;
3901939019
#endif
@@ -42927,11 +42927,11 @@
4292742927
}
4292842928
4292942929
/*
4293042930
** Initialize and deinitialize the operating system interface.
4293142931
*/
42932
-SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){
42932
+SQLITE_API int sqlite3_os_init(void){
4293342933
static sqlite3_vfs winVfs = {
4293442934
3, /* iVersion */
4293542935
sizeof(winFile), /* szOsFile */
4293642936
SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */
4293742937
0, /* pNext */
@@ -43058,11 +43058,11 @@
4305843058
#endif
4305943059
4306043060
return SQLITE_OK;
4306143061
}
4306243062
43063
-SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){
43063
+SQLITE_API int sqlite3_os_end(void){
4306443064
#if SQLITE_OS_WINRT
4306543065
if( sleepObj!=NULL ){
4306643066
osCloseHandle(sleepObj);
4306743067
sleepObj = NULL;
4306843068
}
@@ -57083,11 +57083,11 @@
5708357083
5708457084
/*
5708557085
** Return a +ve value if snapshot p1 is newer than p2. A -ve value if
5708657086
** p1 is older than p2 and zero if p1 and p2 are the same snapshot.
5708757087
*/
57088
-SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){
57088
+SQLITE_API int sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){
5708957089
WalIndexHdr *pHdr1 = (WalIndexHdr*)p1;
5709057090
WalIndexHdr *pHdr2 = (WalIndexHdr*)p2;
5709157091
5709257092
/* aSalt[0] is a copy of the value stored in the wal file header. It
5709357093
** is incremented each time the wal file is restarted. */
@@ -58220,11 +58220,11 @@
5822058220
**
5822158221
** This routine has no effect on existing database connections.
5822258222
** The shared cache setting effects only future calls to
5822358223
** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().
5822458224
*/
58225
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int enable){
58225
+SQLITE_API int sqlite3_enable_shared_cache(int enable){
5822658226
sqlite3GlobalConfig.sharedCacheEnabled = enable;
5822758227
return SQLITE_OK;
5822858228
}
5822958229
#endif
5823058230
@@ -67993,11 +67993,11 @@
6799367993
** a pointer to the new sqlite3_backup object.
6799467994
**
6799567995
** If an error occurs, NULL is returned and an error code and error message
6799667996
** stored in database handle pDestDb.
6799767997
*/
67998
-SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
67998
+SQLITE_API sqlite3_backup *sqlite3_backup_init(
6799967999
sqlite3* pDestDb, /* Database to write to */
6800068000
const char *zDestDb, /* Name of database within pDestDb */
6800168001
sqlite3* pSrcDb, /* Database connection to read from */
6800268002
const char *zSrcDb /* Name of database within pSrcDb */
6800368003
){
@@ -68201,11 +68201,11 @@
6820168201
}
6820268202
6820368203
/*
6820468204
** Copy nPage pages from the source b-tree to the destination.
6820568205
*/
68206
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){
68206
+SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){
6820768207
int rc;
6820868208
int destMode; /* Destination journal mode */
6820968209
int pgszSrc = 0; /* Source page size */
6821068210
int pgszDest = 0; /* Destination page size */
6821168211
@@ -68445,11 +68445,11 @@
6844568445
}
6844668446
6844768447
/*
6844868448
** Release all resources associated with an sqlite3_backup* handle.
6844968449
*/
68450
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p){
68450
+SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p){
6845168451
sqlite3_backup **pp; /* Ptr to head of pagers backup list */
6845268452
sqlite3 *pSrcDb; /* Source database connection */
6845368453
int rc; /* Value to return */
6845468454
6845568455
/* Enter the mutexes */
@@ -68497,11 +68497,11 @@
6849768497
6849868498
/*
6849968499
** Return the number of pages still to be backed up as of the most recent
6850068500
** call to sqlite3_backup_step().
6850168501
*/
68502
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p){
68502
+SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p){
6850368503
#ifdef SQLITE_ENABLE_API_ARMOR
6850468504
if( p==0 ){
6850568505
(void)SQLITE_MISUSE_BKPT;
6850668506
return 0;
6850768507
}
@@ -68511,11 +68511,11 @@
6851168511
6851268512
/*
6851368513
** Return the total number of pages in the source database as of the most
6851468514
** recent call to sqlite3_backup_step().
6851568515
*/
68516
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p){
68516
+SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p){
6851768517
#ifdef SQLITE_ENABLE_API_ARMOR
6851868518
if( p==0 ){
6851968519
(void)SQLITE_MISUSE_BKPT;
6852068520
return 0;
6852168521
}
@@ -71450,16 +71450,25 @@
7145071450
){
7145171451
const char *zOpName;
7145271452
const char *zSynopsis;
7145371453
int nOpName;
7145471454
int ii, jj;
71455
+ char zAlt[50];
7145571456
zOpName = sqlite3OpcodeName(pOp->opcode);
7145671457
nOpName = sqlite3Strlen30(zOpName);
7145771458
if( zOpName[nOpName+1] ){
7145871459
int seenCom = 0;
7145971460
char c;
7146071461
zSynopsis = zOpName += nOpName + 1;
71462
+ if( strncmp(zSynopsis,"IF ",3)==0 ){
71463
+ if( pOp->p5 & SQLITE_STOREP2 ){
71464
+ sqlite3_snprintf(sizeof(zAlt), zAlt, "r[P2] = (%s)", zSynopsis+3);
71465
+ }else{
71466
+ sqlite3_snprintf(sizeof(zAlt), zAlt, "if %s goto P2", zSynopsis+3);
71467
+ }
71468
+ zSynopsis = zAlt;
71469
+ }
7146171470
for(ii=jj=0; jj<nTemp-1 && (c = zSynopsis[ii])!=0; ii++){
7146271471
if( c=='P' ){
7146371472
c = zSynopsis[++ii];
7146471473
if( c=='4' ){
7146571474
sqlite3_snprintf(nTemp-jj, zTemp+jj, "%s", zP4);
@@ -74967,11 +74976,11 @@
7496774976
** execution environment changes in a way that would alter the program
7496874977
** that sqlite3_prepare() generates. For example, if new functions or
7496974978
** collating sequences are registered or if an authorizer function is
7497074979
** added or changed.
7497174980
*/
74972
-SQLITE_API int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt *pStmt){
74981
+SQLITE_API int sqlite3_expired(sqlite3_stmt *pStmt){
7497374982
Vdbe *p = (Vdbe*)pStmt;
7497474983
return p==0 || p->expired;
7497574984
}
7497674985
#endif
7497774986
@@ -75036,11 +75045,11 @@
7503675045
** machine.
7503775046
**
7503875047
** This routine sets the error code and string returned by
7503975048
** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
7504075049
*/
75041
-SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt){
75050
+SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt){
7504275051
int rc;
7504375052
if( pStmt==0 ){
7504475053
/* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL
7504575054
** pointer is a harmless no-op. */
7504675055
rc = SQLITE_OK;
@@ -75063,11 +75072,11 @@
7506375072
** the prior execution is returned.
7506475073
**
7506575074
** This routine sets the error code and string returned by
7506675075
** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
7506775076
*/
75068
-SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt){
75077
+SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt){
7506975078
int rc;
7507075079
if( pStmt==0 ){
7507175080
rc = SQLITE_OK;
7507275081
}else{
7507375082
Vdbe *v = (Vdbe*)pStmt;
@@ -75084,11 +75093,11 @@
7508475093
}
7508575094
7508675095
/*
7508775096
** Set all the parameters in the compiled SQL statement to NULL.
7508875097
*/
75089
-SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){
75098
+SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *pStmt){
7509075099
int i;
7509175100
int rc = SQLITE_OK;
7509275101
Vdbe *p = (Vdbe*)pStmt;
7509375102
#if SQLITE_THREADSAFE
7509475103
sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
@@ -75108,11 +75117,11 @@
7510875117
7510975118
/**************************** sqlite3_value_ *******************************
7511075119
** The following routines extract information from a Mem or sqlite3_value
7511175120
** structure.
7511275121
*/
75113
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){
75122
+SQLITE_API const void *sqlite3_value_blob(sqlite3_value *pVal){
7511475123
Mem *p = (Mem*)pVal;
7511575124
if( p->flags & (MEM_Blob|MEM_Str) ){
7511675125
if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){
7511775126
assert( p->flags==MEM_Null && p->z==0 );
7511875127
return 0;
@@ -75121,48 +75130,48 @@
7512175130
return p->n ? p->z : 0;
7512275131
}else{
7512375132
return sqlite3_value_text(pVal);
7512475133
}
7512575134
}
75126
-SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value *pVal){
75135
+SQLITE_API int sqlite3_value_bytes(sqlite3_value *pVal){
7512775136
return sqlite3ValueBytes(pVal, SQLITE_UTF8);
7512875137
}
75129
-SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value *pVal){
75138
+SQLITE_API int sqlite3_value_bytes16(sqlite3_value *pVal){
7513075139
return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE);
7513175140
}
75132
-SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value *pVal){
75141
+SQLITE_API double sqlite3_value_double(sqlite3_value *pVal){
7513375142
return sqlite3VdbeRealValue((Mem*)pVal);
7513475143
}
75135
-SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value *pVal){
75144
+SQLITE_API int sqlite3_value_int(sqlite3_value *pVal){
7513675145
return (int)sqlite3VdbeIntValue((Mem*)pVal);
7513775146
}
75138
-SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value *pVal){
75147
+SQLITE_API sqlite_int64 sqlite3_value_int64(sqlite3_value *pVal){
7513975148
return sqlite3VdbeIntValue((Mem*)pVal);
7514075149
}
75141
-SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value *pVal){
75150
+SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value *pVal){
7514275151
Mem *pMem = (Mem*)pVal;
7514375152
return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0);
7514475153
}
75145
-SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value *pVal){
75154
+SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value *pVal){
7514675155
return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8);
7514775156
}
7514875157
#ifndef SQLITE_OMIT_UTF16
75149
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value* pVal){
75158
+SQLITE_API const void *sqlite3_value_text16(sqlite3_value* pVal){
7515075159
return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE);
7515175160
}
75152
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value *pVal){
75161
+SQLITE_API const void *sqlite3_value_text16be(sqlite3_value *pVal){
7515375162
return sqlite3ValueText(pVal, SQLITE_UTF16BE);
7515475163
}
75155
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value *pVal){
75164
+SQLITE_API const void *sqlite3_value_text16le(sqlite3_value *pVal){
7515675165
return sqlite3ValueText(pVal, SQLITE_UTF16LE);
7515775166
}
7515875167
#endif /* SQLITE_OMIT_UTF16 */
7515975168
/* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five
7516075169
** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating
7516175170
** point number string BLOB NULL
7516275171
*/
75163
-SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value* pVal){
75172
+SQLITE_API int sqlite3_value_type(sqlite3_value* pVal){
7516475173
static const u8 aType[] = {
7516575174
SQLITE_BLOB, /* 0x00 */
7516675175
SQLITE_NULL, /* 0x01 */
7516775176
SQLITE_TEXT, /* 0x02 */
7516875177
SQLITE_NULL, /* 0x03 */
@@ -75198,11 +75207,11 @@
7519875207
return aType[pVal->flags&MEM_AffMask];
7519975208
}
7520075209
7520175210
/* Make a copy of an sqlite3_value object
7520275211
*/
75203
-SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value *pOrig){
75212
+SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value *pOrig){
7520475213
sqlite3_value *pNew;
7520575214
if( pOrig==0 ) return 0;
7520675215
pNew = sqlite3_malloc( sizeof(*pNew) );
7520775216
if( pNew==0 ) return 0;
7520875217
memset(pNew, 0, sizeof(*pNew));
@@ -75221,11 +75230,11 @@
7522175230
}
7522275231
7522375232
/* Destroy an sqlite3_value object previously obtained from
7522475233
** sqlite3_value_dup().
7522575234
*/
75226
-SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value *pOld){
75235
+SQLITE_API void sqlite3_value_free(sqlite3_value *pOld){
7522775236
sqlite3ValueFree(pOld);
7522875237
}
7522975238
7523075239
7523175240
/**************************** sqlite3_result_ *******************************
@@ -75264,21 +75273,21 @@
7526475273
xDel((void*)p);
7526575274
}
7526675275
if( pCtx ) sqlite3_result_error_toobig(pCtx);
7526775276
return SQLITE_TOOBIG;
7526875277
}
75269
-SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(
75278
+SQLITE_API void sqlite3_result_blob(
7527075279
sqlite3_context *pCtx,
7527175280
const void *z,
7527275281
int n,
7527375282
void (*xDel)(void *)
7527475283
){
7527575284
assert( n>=0 );
7527675285
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7527775286
setResultStrOrError(pCtx, z, n, 0, xDel);
7527875287
}
75279
-SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(
75288
+SQLITE_API void sqlite3_result_blob64(
7528075289
sqlite3_context *pCtx,
7528175290
const void *z,
7528275291
sqlite3_uint64 n,
7528375292
void (*xDel)(void *)
7528475293
){
@@ -75288,56 +75297,56 @@
7528875297
(void)invokeValueDestructor(z, xDel, pCtx);
7528975298
}else{
7529075299
setResultStrOrError(pCtx, z, (int)n, 0, xDel);
7529175300
}
7529275301
}
75293
-SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context *pCtx, double rVal){
75302
+SQLITE_API void sqlite3_result_double(sqlite3_context *pCtx, double rVal){
7529475303
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7529575304
sqlite3VdbeMemSetDouble(pCtx->pOut, rVal);
7529675305
}
75297
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
75306
+SQLITE_API void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
7529875307
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7529975308
pCtx->isError = SQLITE_ERROR;
7530075309
pCtx->fErrorOrAux = 1;
7530175310
sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
7530275311
}
7530375312
#ifndef SQLITE_OMIT_UTF16
75304
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
75313
+SQLITE_API void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
7530575314
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7530675315
pCtx->isError = SQLITE_ERROR;
7530775316
pCtx->fErrorOrAux = 1;
7530875317
sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
7530975318
}
7531075319
#endif
75311
-SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context *pCtx, int iVal){
75320
+SQLITE_API void sqlite3_result_int(sqlite3_context *pCtx, int iVal){
7531275321
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7531375322
sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal);
7531475323
}
75315
-SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){
75324
+SQLITE_API void sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){
7531675325
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7531775326
sqlite3VdbeMemSetInt64(pCtx->pOut, iVal);
7531875327
}
75319
-SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context *pCtx){
75328
+SQLITE_API void sqlite3_result_null(sqlite3_context *pCtx){
7532075329
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7532175330
sqlite3VdbeMemSetNull(pCtx->pOut);
7532275331
}
75323
-SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){
75332
+SQLITE_API void sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){
7532475333
Mem *pOut = pCtx->pOut;
7532575334
assert( sqlite3_mutex_held(pOut->db->mutex) );
7532675335
pOut->eSubtype = eSubtype & 0xff;
7532775336
pOut->flags |= MEM_Subtype;
7532875337
}
75329
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text(
75338
+SQLITE_API void sqlite3_result_text(
7533075339
sqlite3_context *pCtx,
7533175340
const char *z,
7533275341
int n,
7533375342
void (*xDel)(void *)
7533475343
){
7533575344
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7533675345
setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel);
7533775346
}
75338
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(
75347
+SQLITE_API void sqlite3_result_text64(
7533975348
sqlite3_context *pCtx,
7534075349
const char *z,
7534175350
sqlite3_uint64 n,
7534275351
void (*xDel)(void *),
7534375352
unsigned char enc
@@ -75350,56 +75359,56 @@
7535075359
}else{
7535175360
setResultStrOrError(pCtx, z, (int)n, enc, xDel);
7535275361
}
7535375362
}
7535475363
#ifndef SQLITE_OMIT_UTF16
75355
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(
75364
+SQLITE_API void sqlite3_result_text16(
7535675365
sqlite3_context *pCtx,
7535775366
const void *z,
7535875367
int n,
7535975368
void (*xDel)(void *)
7536075369
){
7536175370
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7536275371
setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel);
7536375372
}
75364
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(
75373
+SQLITE_API void sqlite3_result_text16be(
7536575374
sqlite3_context *pCtx,
7536675375
const void *z,
7536775376
int n,
7536875377
void (*xDel)(void *)
7536975378
){
7537075379
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7537175380
setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel);
7537275381
}
75373
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(
75382
+SQLITE_API void sqlite3_result_text16le(
7537475383
sqlite3_context *pCtx,
7537575384
const void *z,
7537675385
int n,
7537775386
void (*xDel)(void *)
7537875387
){
7537975388
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7538075389
setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel);
7538175390
}
7538275391
#endif /* SQLITE_OMIT_UTF16 */
75383
-SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){
75392
+SQLITE_API void sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){
7538475393
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7538575394
sqlite3VdbeMemCopy(pCtx->pOut, pValue);
7538675395
}
75387
-SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){
75396
+SQLITE_API void sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){
7538875397
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7538975398
sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n);
7539075399
}
75391
-SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){
75400
+SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){
7539275401
Mem *pOut = pCtx->pOut;
7539375402
assert( sqlite3_mutex_held(pOut->db->mutex) );
7539475403
if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){
7539575404
return SQLITE_TOOBIG;
7539675405
}
7539775406
sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n);
7539875407
return SQLITE_OK;
7539975408
}
75400
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
75409
+SQLITE_API void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
7540175410
pCtx->isError = errCode;
7540275411
pCtx->fErrorOrAux = 1;
7540375412
#ifdef SQLITE_DEBUG
7540475413
if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode;
7540575414
#endif
@@ -75408,20 +75417,20 @@
7540875417
SQLITE_UTF8, SQLITE_STATIC);
7540975418
}
7541075419
}
7541175420
7541275421
/* Force an SQLITE_TOOBIG error. */
75413
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context *pCtx){
75422
+SQLITE_API void sqlite3_result_error_toobig(sqlite3_context *pCtx){
7541475423
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7541575424
pCtx->isError = SQLITE_TOOBIG;
7541675425
pCtx->fErrorOrAux = 1;
7541775426
sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1,
7541875427
SQLITE_UTF8, SQLITE_STATIC);
7541975428
}
7542075429
7542175430
/* An SQLITE_NOMEM error. */
75422
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context *pCtx){
75431
+SQLITE_API void sqlite3_result_error_nomem(sqlite3_context *pCtx){
7542375432
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7542475433
sqlite3VdbeMemSetNull(pCtx->pOut);
7542575434
pCtx->isError = SQLITE_NOMEM_BKPT;
7542675435
pCtx->fErrorOrAux = 1;
7542775436
sqlite3OomFault(pCtx->pOut->db);
@@ -75589,11 +75598,11 @@
7558975598
/*
7559075599
** This is the top-level implementation of sqlite3_step(). Call
7559175600
** sqlite3Step() to do most of the work. If a schema error occurs,
7559275601
** call sqlite3Reprepare() and try again.
7559375602
*/
75594
-SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt *pStmt){
75603
+SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){
7559575604
int rc = SQLITE_OK; /* Result from sqlite3Step() */
7559675605
int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */
7559775606
Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */
7559875607
int cnt = 0; /* Counter to prevent infinite loop of reprepares */
7559975608
sqlite3 *db; /* The database connection */
@@ -75640,11 +75649,11 @@
7564075649
7564175650
/*
7564275651
** Extract the user data from a sqlite3_context structure and return a
7564375652
** pointer to it.
7564475653
*/
75645
-SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context *p){
75654
+SQLITE_API void *sqlite3_user_data(sqlite3_context *p){
7564675655
assert( p && p->pFunc );
7564775656
return p->pFunc->pUserData;
7564875657
}
7564975658
7565075659
/*
@@ -75655,11 +75664,11 @@
7565575664
** returns a copy of the pointer to the database connection (the 1st
7565675665
** parameter) of the sqlite3_create_function() and
7565775666
** sqlite3_create_function16() routines that originally registered the
7565875667
** application defined function.
7565975668
*/
75660
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context *p){
75669
+SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){
7566175670
assert( p && p->pOut );
7566275671
return p->pOut->db;
7566375672
}
7566475673
7566575674
/*
@@ -75731,11 +75740,11 @@
7573175740
/*
7573275741
** Allocate or return the aggregate context for a user function. A new
7573375742
** context is allocated on the first call. Subsequent calls return the
7573475743
** same context that was returned on prior calls.
7573575744
*/
75736
-SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context *p, int nByte){
75745
+SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *p, int nByte){
7573775746
assert( p && p->pFunc && p->pFunc->xFinalize );
7573875747
assert( sqlite3_mutex_held(p->pOut->db->mutex) );
7573975748
testcase( nByte<0 );
7574075749
if( (p->pMem->flags & MEM_Agg)==0 ){
7574175750
return createAggContext(p, nByte);
@@ -75746,11 +75755,11 @@
7574675755
7574775756
/*
7574875757
** Return the auxiliary data pointer, if any, for the iArg'th argument to
7574975758
** the user-function defined by pCtx.
7575075759
*/
75751
-SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){
75760
+SQLITE_API void *sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){
7575275761
AuxData *pAuxData;
7575375762
7575475763
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7575575764
#if SQLITE_ENABLE_STAT3_OR_STAT4
7575675765
if( pCtx->pVdbe==0 ) return 0;
@@ -75767,11 +75776,11 @@
7576775776
/*
7576875777
** Set the auxiliary data pointer and delete function, for the iArg'th
7576975778
** argument to the user-function defined by pCtx. Any previous value is
7577075779
** deleted by calling the delete function specified when it was set.
7577175780
*/
75772
-SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(
75781
+SQLITE_API void sqlite3_set_auxdata(
7577375782
sqlite3_context *pCtx,
7577475783
int iArg,
7577575784
void *pAux,
7577675785
void (*xDelete)(void*)
7577775786
){
@@ -75822,29 +75831,29 @@
7582275831
** This function is deprecated. Do not use it for new code. It is
7582375832
** provide only to avoid breaking legacy code. New aggregate function
7582475833
** implementations should keep their own counts within their aggregate
7582575834
** context.
7582675835
*/
75827
-SQLITE_API int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context *p){
75836
+SQLITE_API int sqlite3_aggregate_count(sqlite3_context *p){
7582875837
assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize );
7582975838
return p->pMem->n;
7583075839
}
7583175840
#endif
7583275841
7583375842
/*
7583475843
** Return the number of columns in the result set for the statement pStmt.
7583575844
*/
75836
-SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt){
75845
+SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt){
7583775846
Vdbe *pVm = (Vdbe *)pStmt;
7583875847
return pVm ? pVm->nResColumn : 0;
7583975848
}
7584075849
7584175850
/*
7584275851
** Return the number of values available from the current row of the
7584375852
** currently executing statement pStmt.
7584475853
*/
75845
-SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt){
75854
+SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt){
7584675855
Vdbe *pVm = (Vdbe *)pStmt;
7584775856
if( pVm==0 || pVm->pResultSet==0 ) return 0;
7584875857
return pVm->nResColumn;
7584975858
}
7585075859
@@ -75943,67 +75952,67 @@
7594375952
7594475953
/**************************** sqlite3_column_ *******************************
7594575954
** The following routines are used to access elements of the current row
7594675955
** in the result set.
7594775956
*/
75948
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt *pStmt, int i){
75957
+SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt *pStmt, int i){
7594975958
const void *val;
7595075959
val = sqlite3_value_blob( columnMem(pStmt,i) );
7595175960
/* Even though there is no encoding conversion, value_blob() might
7595275961
** need to call malloc() to expand the result of a zeroblob()
7595375962
** expression.
7595475963
*/
7595575964
columnMallocFailure(pStmt);
7595675965
return val;
7595775966
}
75958
-SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){
75967
+SQLITE_API int sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){
7595975968
int val = sqlite3_value_bytes( columnMem(pStmt,i) );
7596075969
columnMallocFailure(pStmt);
7596175970
return val;
7596275971
}
75963
-SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){
75972
+SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){
7596475973
int val = sqlite3_value_bytes16( columnMem(pStmt,i) );
7596575974
columnMallocFailure(pStmt);
7596675975
return val;
7596775976
}
75968
-SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt *pStmt, int i){
75977
+SQLITE_API double sqlite3_column_double(sqlite3_stmt *pStmt, int i){
7596975978
double val = sqlite3_value_double( columnMem(pStmt,i) );
7597075979
columnMallocFailure(pStmt);
7597175980
return val;
7597275981
}
75973
-SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt *pStmt, int i){
75982
+SQLITE_API int sqlite3_column_int(sqlite3_stmt *pStmt, int i){
7597475983
int val = sqlite3_value_int( columnMem(pStmt,i) );
7597575984
columnMallocFailure(pStmt);
7597675985
return val;
7597775986
}
75978
-SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt *pStmt, int i){
75987
+SQLITE_API sqlite_int64 sqlite3_column_int64(sqlite3_stmt *pStmt, int i){
7597975988
sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) );
7598075989
columnMallocFailure(pStmt);
7598175990
return val;
7598275991
}
75983
-SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt *pStmt, int i){
75992
+SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt *pStmt, int i){
7598475993
const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) );
7598575994
columnMallocFailure(pStmt);
7598675995
return val;
7598775996
}
75988
-SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt *pStmt, int i){
75997
+SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt *pStmt, int i){
7598975998
Mem *pOut = columnMem(pStmt, i);
7599075999
if( pOut->flags&MEM_Static ){
7599176000
pOut->flags &= ~MEM_Static;
7599276001
pOut->flags |= MEM_Ephem;
7599376002
}
7599476003
columnMallocFailure(pStmt);
7599576004
return (sqlite3_value *)pOut;
7599676005
}
7599776006
#ifndef SQLITE_OMIT_UTF16
75998
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt *pStmt, int i){
76007
+SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt *pStmt, int i){
7599976008
const void *val = sqlite3_value_text16( columnMem(pStmt,i) );
7600076009
columnMallocFailure(pStmt);
7600176010
return val;
7600276011
}
7600376012
#endif /* SQLITE_OMIT_UTF16 */
76004
-SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt *pStmt, int i){
76013
+SQLITE_API int sqlite3_column_type(sqlite3_stmt *pStmt, int i){
7600576014
int iType = sqlite3_value_type( columnMem(pStmt,i) );
7600676015
columnMallocFailure(pStmt);
7600776016
return iType;
7600876017
}
7600976018
@@ -76063,16 +76072,16 @@
7606376072
7606476073
/*
7606576074
** Return the name of the Nth column of the result set returned by SQL
7606676075
** statement pStmt.
7606776076
*/
76068
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt *pStmt, int N){
76077
+SQLITE_API const char *sqlite3_column_name(sqlite3_stmt *pStmt, int N){
7606976078
return columnName(
7607076079
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME);
7607176080
}
7607276081
#ifndef SQLITE_OMIT_UTF16
76073
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt *pStmt, int N){
76082
+SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt *pStmt, int N){
7607476083
return columnName(
7607576084
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME);
7607676085
}
7607776086
#endif
7607876087
@@ -76088,16 +76097,16 @@
7608876097
#ifndef SQLITE_OMIT_DECLTYPE
7608976098
/*
7609076099
** Return the column declaration type (if applicable) of the 'i'th column
7609176100
** of the result set of SQL statement pStmt.
7609276101
*/
76093
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){
76102
+SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){
7609476103
return columnName(
7609576104
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE);
7609676105
}
7609776106
#ifndef SQLITE_OMIT_UTF16
76098
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){
76107
+SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){
7609976108
return columnName(
7610076109
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE);
7610176110
}
7610276111
#endif /* SQLITE_OMIT_UTF16 */
7610376112
#endif /* SQLITE_OMIT_DECLTYPE */
@@ -76106,16 +76115,16 @@
7610676115
/*
7610776116
** Return the name of the database from which a result column derives.
7610876117
** NULL is returned if the result column is an expression or constant or
7610976118
** anything else which is not an unambiguous reference to a database column.
7611076119
*/
76111
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){
76120
+SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){
7611276121
return columnName(
7611376122
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE);
7611476123
}
7611576124
#ifndef SQLITE_OMIT_UTF16
76116
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){
76125
+SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){
7611776126
return columnName(
7611876127
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE);
7611976128
}
7612076129
#endif /* SQLITE_OMIT_UTF16 */
7612176130
@@ -76122,16 +76131,16 @@
7612276131
/*
7612376132
** Return the name of the table from which a result column derives.
7612476133
** NULL is returned if the result column is an expression or constant or
7612576134
** anything else which is not an unambiguous reference to a database column.
7612676135
*/
76127
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){
76136
+SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){
7612876137
return columnName(
7612976138
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE);
7613076139
}
7613176140
#ifndef SQLITE_OMIT_UTF16
76132
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){
76141
+SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){
7613376142
return columnName(
7613476143
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE);
7613576144
}
7613676145
#endif /* SQLITE_OMIT_UTF16 */
7613776146
@@ -76138,16 +76147,16 @@
7613876147
/*
7613976148
** Return the name of the table column from which a result column derives.
7614076149
** NULL is returned if the result column is an expression or constant or
7614176150
** anything else which is not an unambiguous reference to a database column.
7614276151
*/
76143
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){
76152
+SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){
7614476153
return columnName(
7614576154
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN);
7614676155
}
7614776156
#ifndef SQLITE_OMIT_UTF16
76148
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){
76157
+SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){
7614976158
return columnName(
7615076159
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN);
7615176160
}
7615276161
#endif /* SQLITE_OMIT_UTF16 */
7615376162
#endif /* SQLITE_ENABLE_COLUMN_METADATA */
@@ -76244,11 +76253,11 @@
7624476253
7624576254
7624676255
/*
7624776256
** Bind a blob value to an SQL statement variable.
7624876257
*/
76249
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(
76258
+SQLITE_API int sqlite3_bind_blob(
7625076259
sqlite3_stmt *pStmt,
7625176260
int i,
7625276261
const void *zData,
7625376262
int nData,
7625476263
void (*xDel)(void*)
@@ -76256,11 +76265,11 @@
7625676265
#ifdef SQLITE_ENABLE_API_ARMOR
7625776266
if( nData<0 ) return SQLITE_MISUSE_BKPT;
7625876267
#endif
7625976268
return bindText(pStmt, i, zData, nData, xDel, 0);
7626076269
}
76261
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(
76270
+SQLITE_API int sqlite3_bind_blob64(
7626276271
sqlite3_stmt *pStmt,
7626376272
int i,
7626476273
const void *zData,
7626576274
sqlite3_uint64 nData,
7626676275
void (*xDel)(void*)
@@ -76270,52 +76279,52 @@
7627076279
return invokeValueDestructor(zData, xDel, 0);
7627176280
}else{
7627276281
return bindText(pStmt, i, zData, (int)nData, xDel, 0);
7627376282
}
7627476283
}
76275
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
76284
+SQLITE_API int sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
7627676285
int rc;
7627776286
Vdbe *p = (Vdbe *)pStmt;
7627876287
rc = vdbeUnbind(p, i);
7627976288
if( rc==SQLITE_OK ){
7628076289
sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue);
7628176290
sqlite3_mutex_leave(p->db->mutex);
7628276291
}
7628376292
return rc;
7628476293
}
76285
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){
76294
+SQLITE_API int sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){
7628676295
return sqlite3_bind_int64(p, i, (i64)iValue);
7628776296
}
76288
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
76297
+SQLITE_API int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
7628976298
int rc;
7629076299
Vdbe *p = (Vdbe *)pStmt;
7629176300
rc = vdbeUnbind(p, i);
7629276301
if( rc==SQLITE_OK ){
7629376302
sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue);
7629476303
sqlite3_mutex_leave(p->db->mutex);
7629576304
}
7629676305
return rc;
7629776306
}
76298
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
76307
+SQLITE_API int sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
7629976308
int rc;
7630076309
Vdbe *p = (Vdbe*)pStmt;
7630176310
rc = vdbeUnbind(p, i);
7630276311
if( rc==SQLITE_OK ){
7630376312
sqlite3_mutex_leave(p->db->mutex);
7630476313
}
7630576314
return rc;
7630676315
}
76307
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(
76316
+SQLITE_API int sqlite3_bind_text(
7630876317
sqlite3_stmt *pStmt,
7630976318
int i,
7631076319
const char *zData,
7631176320
int nData,
7631276321
void (*xDel)(void*)
7631376322
){
7631476323
return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8);
7631576324
}
76316
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(
76325
+SQLITE_API int sqlite3_bind_text64(
7631776326
sqlite3_stmt *pStmt,
7631876327
int i,
7631976328
const char *zData,
7632076329
sqlite3_uint64 nData,
7632176330
void (*xDel)(void*),
@@ -76328,21 +76337,21 @@
7632876337
if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE;
7632976338
return bindText(pStmt, i, zData, (int)nData, xDel, enc);
7633076339
}
7633176340
}
7633276341
#ifndef SQLITE_OMIT_UTF16
76333
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(
76342
+SQLITE_API int sqlite3_bind_text16(
7633476343
sqlite3_stmt *pStmt,
7633576344
int i,
7633676345
const void *zData,
7633776346
int nData,
7633876347
void (*xDel)(void*)
7633976348
){
7634076349
return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE);
7634176350
}
7634276351
#endif /* SQLITE_OMIT_UTF16 */
76343
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
76352
+SQLITE_API int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
7634476353
int rc;
7634576354
switch( sqlite3_value_type((sqlite3_value*)pValue) ){
7634676355
case SQLITE_INTEGER: {
7634776356
rc = sqlite3_bind_int64(pStmt, i, pValue->u.i);
7634876357
break;
@@ -76369,21 +76378,21 @@
7636976378
break;
7637076379
}
7637176380
}
7637276381
return rc;
7637376382
}
76374
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){
76383
+SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){
7637576384
int rc;
7637676385
Vdbe *p = (Vdbe *)pStmt;
7637776386
rc = vdbeUnbind(p, i);
7637876387
if( rc==SQLITE_OK ){
7637976388
sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);
7638076389
sqlite3_mutex_leave(p->db->mutex);
7638176390
}
7638276391
return rc;
7638376392
}
76384
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){
76393
+SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){
7638576394
int rc;
7638676395
Vdbe *p = (Vdbe *)pStmt;
7638776396
sqlite3_mutex_enter(p->db->mutex);
7638876397
if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){
7638976398
rc = SQLITE_TOOBIG;
@@ -76398,11 +76407,11 @@
7639876407
7639976408
/*
7640076409
** Return the number of wildcards that can be potentially bound to.
7640176410
** This routine is added to support DBD::SQLite.
7640276411
*/
76403
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){
76412
+SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){
7640476413
Vdbe *p = (Vdbe*)pStmt;
7640576414
return p ? p->nVar : 0;
7640676415
}
7640776416
7640876417
/*
@@ -76409,11 +76418,11 @@
7640976418
** Return the name of a wildcard parameter. Return NULL if the index
7641076419
** is out of range or if the wildcard is unnamed.
7641176420
**
7641276421
** The result is always UTF-8.
7641376422
*/
76414
-SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){
76423
+SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){
7641576424
Vdbe *p = (Vdbe*)pStmt;
7641676425
if( p==0 || i<1 || i>p->nzVar ){
7641776426
return 0;
7641876427
}
7641976428
return p->azVar[i-1];
@@ -76437,11 +76446,11 @@
7643776446
}
7643876447
}
7643976448
}
7644076449
return 0;
7644176450
}
76442
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
76451
+SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
7644376452
return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName));
7644476453
}
7644576454
7644676455
/*
7644776456
** Transfer all bindings from the first statement over to the second.
@@ -76471,11 +76480,11 @@
7647176480
**
7647276481
** If the two statements contain a different number of bindings, then
7647376482
** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise
7647476483
** SQLITE_OK is returned.
7647576484
*/
76476
-SQLITE_API int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
76485
+SQLITE_API int sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
7647776486
Vdbe *pFrom = (Vdbe*)pFromStmt;
7647876487
Vdbe *pTo = (Vdbe*)pToStmt;
7647976488
if( pFrom->nVar!=pTo->nVar ){
7648076489
return SQLITE_ERROR;
7648176490
}
@@ -76493,26 +76502,26 @@
7649376502
** Return the sqlite3* database handle to which the prepared statement given
7649476503
** in the argument belongs. This is the same database handle that was
7649576504
** the first argument to the sqlite3_prepare() that was used to create
7649676505
** the statement in the first place.
7649776506
*/
76498
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt *pStmt){
76507
+SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *pStmt){
7649976508
return pStmt ? ((Vdbe*)pStmt)->db : 0;
7650076509
}
7650176510
7650276511
/*
7650376512
** Return true if the prepared statement is guaranteed to not modify the
7650476513
** database.
7650576514
*/
76506
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt){
76515
+SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt){
7650776516
return pStmt ? ((Vdbe*)pStmt)->readOnly : 1;
7650876517
}
7650976518
7651076519
/*
7651176520
** Return true if the prepared statement is in need of being reset.
7651276521
*/
76513
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){
76522
+SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt *pStmt){
7651476523
Vdbe *v = (Vdbe*)pStmt;
7651576524
return v!=0 && v->pc>=0 && v->magic==VDBE_MAGIC_RUN;
7651676525
}
7651776526
7651876527
/*
@@ -76519,11 +76528,11 @@
7651976528
** Return a pointer to the next prepared statement after pStmt associated
7652076529
** with database connection pDb. If pStmt is NULL, return the first
7652176530
** prepared statement for the database connection. Return NULL if there
7652276531
** are no more.
7652376532
*/
76524
-SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
76533
+SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
7652576534
sqlite3_stmt *pNext;
7652676535
#ifdef SQLITE_ENABLE_API_ARMOR
7652776536
if( !sqlite3SafetyCheckOk(pDb) ){
7652876537
(void)SQLITE_MISUSE_BKPT;
7652976538
return 0;
@@ -76540,11 +76549,11 @@
7654076549
}
7654176550
7654276551
/*
7654376552
** Return the value of a status counter for a prepared statement
7654476553
*/
76545
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
76554
+SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
7654676555
Vdbe *pVdbe = (Vdbe*)pStmt;
7654776556
u32 v;
7654876557
#ifdef SQLITE_ENABLE_API_ARMOR
7654976558
if( !pStmt ){
7655076559
(void)SQLITE_MISUSE_BKPT;
@@ -76557,11 +76566,11 @@
7655776566
}
7655876567
7655976568
/*
7656076569
** Return the SQL associated with a prepared statement
7656176570
*/
76562
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt){
76571
+SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt){
7656376572
Vdbe *p = (Vdbe *)pStmt;
7656476573
return p ? p->zSql : 0;
7656576574
}
7656676575
7656776576
/*
@@ -76571,11 +76580,11 @@
7657176580
** freeing the returned string by passing it to sqlite3_free().
7657276581
**
7657376582
** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of
7657476583
** expanded bound parameters.
7657576584
*/
76576
-SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt){
76585
+SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt){
7657776586
#ifdef SQLITE_OMIT_TRACE
7657876587
return 0;
7657976588
#else
7658076589
char *z = 0;
7658176590
const char *zSql = sqlite3_sql(pStmt);
@@ -76613,11 +76622,11 @@
7661376622
7661476623
/*
7661576624
** This function is called from within a pre-update callback to retrieve
7661676625
** a field of the row currently being updated or deleted.
7661776626
*/
76618
-SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
76627
+SQLITE_API int sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
7661976628
PreUpdate *p = db->pPreUpdate;
7662076629
int rc = SQLITE_OK;
7662176630
7662276631
/* Test that this call is being made from within an SQLITE_DELETE or
7662376632
** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */
@@ -76668,11 +76677,11 @@
7666876677
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
7666976678
/*
7667076679
** This function is called from within a pre-update callback to retrieve
7667176680
** the number of columns in the row being updated, deleted or inserted.
7667276681
*/
76673
-SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *db){
76682
+SQLITE_API int sqlite3_preupdate_count(sqlite3 *db){
7667476683
PreUpdate *p = db->pPreUpdate;
7667576684
return (p ? p->keyinfo.nField : 0);
7667676685
}
7667776686
#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
7667876687
@@ -76686,11 +76695,11 @@
7668676695
** top-level trigger etc.).
7668776696
**
7668876697
** For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL
7668976698
** or SET DEFAULT action is considered a trigger.
7669076699
*/
76691
-SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *db){
76700
+SQLITE_API int sqlite3_preupdate_depth(sqlite3 *db){
7669276701
PreUpdate *p = db->pPreUpdate;
7669376702
return (p ? p->v->nFrame : 0);
7669476703
}
7669576704
#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
7669676705
@@ -76697,11 +76706,11 @@
7669776706
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
7669876707
/*
7669976708
** This function is called from within a pre-update callback to retrieve
7670076709
** a field of the row currently being updated or inserted.
7670176710
*/
76702
-SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
76711
+SQLITE_API int sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
7670376712
PreUpdate *p = db->pPreUpdate;
7670476713
int rc = SQLITE_OK;
7670576714
Mem *pMem;
7670676715
7670776716
if( !p || p->op==SQLITE_DELETE ){
@@ -76771,11 +76780,11 @@
7677176780
7677276781
#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
7677376782
/*
7677476783
** Return status data for a single loop within query pStmt.
7677576784
*/
76776
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
76785
+SQLITE_API int sqlite3_stmt_scanstatus(
7677776786
sqlite3_stmt *pStmt, /* Prepared statement being queried */
7677876787
int idx, /* Index of loop to report on */
7677976788
int iScanStatusOp, /* Which metric to return */
7678076789
void *pOut /* OUT: Write the answer here */
7678176790
){
@@ -76830,11 +76839,11 @@
7683076839
}
7683176840
7683276841
/*
7683376842
** Zero all counters associated with the sqlite3_stmt_scanstatus() data.
7683476843
*/
76835
-SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){
76844
+SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){
7683676845
Vdbe *p = (Vdbe*)pStmt;
7683776846
memset(p->anExec, 0, p->nOp * sizeof(i64));
7683876847
}
7683976848
#endif /* SQLITE_ENABLE_STMT_SCANSTATUS */
7684076849
@@ -77357,11 +77366,11 @@
7735777366
** Try to convert the type of a function argument or a result column
7735877367
** into a numeric representation. Use either INTEGER or REAL whichever
7735977368
** is appropriate. But only do the conversion if it is possible without
7736077369
** loss of information and return the revised type of the argument.
7736177370
*/
77362
-SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value *pVal){
77371
+SQLITE_API int sqlite3_value_numeric_type(sqlite3_value *pVal){
7736377372
int eType = sqlite3_value_type(pVal);
7736477373
if( eType==SQLITE_TEXT ){
7736577374
Mem *pMem = (Mem*)pVal;
7736677375
applyNumericAffinity(pMem, 0);
7736777376
eType = sqlite3_value_type(pVal);
@@ -79007,11 +79016,11 @@
7900779016
break;
7900879017
}
7900979018
#endif /* SQLITE_OMIT_CAST */
7901079019
7901179020
/* Opcode: Lt P1 P2 P3 P4 P5
79012
-** Synopsis: if r[P1]<r[P3] goto P2
79021
+** Synopsis: IF r[P3]<r[P1]
7901379022
**
7901479023
** Compare the values in register P1 and P3. If reg(P3)<reg(P1) then
7901579024
** jump to address P2.
7901679025
**
7901779026
** If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or
@@ -79042,11 +79051,11 @@
7904279051
** If the SQLITE_NULLEQ bit is set in P5, then NULL values are considered
7904379052
** equal to one another, provided that they do not have their MEM_Cleared
7904479053
** bit set.
7904579054
*/
7904679055
/* Opcode: Ne P1 P2 P3 P4 P5
79047
-** Synopsis: if r[P1]!=r[P3] goto P2
79056
+** Synopsis: IF r[P3]!=r[P1]
7904879057
**
7904979058
** This works just like the Lt opcode except that the jump is taken if
7905079059
** the operands in registers P1 and P3 are not equal. See the Lt opcode for
7905179060
** additional information.
7905279061
**
@@ -79055,11 +79064,11 @@
7905579064
** of comparison is false. If either operand is NULL then the result is true.
7905679065
** If neither operand is NULL the result is the same as it would be if
7905779066
** the SQLITE_NULLEQ flag were omitted from P5.
7905879067
*/
7905979068
/* Opcode: Eq P1 P2 P3 P4 P5
79060
-** Synopsis: if r[P1]==r[P3] goto P2
79069
+** Synopsis: IF r[P3]==r[P1]
7906179070
**
7906279071
** This works just like the Lt opcode except that the jump is taken if
7906379072
** the operands in registers P1 and P3 are equal.
7906479073
** See the Lt opcode for additional information.
7906579074
**
@@ -79068,25 +79077,25 @@
7906879077
** of comparison is true. If either operand is NULL then the result is false.
7906979078
** If neither operand is NULL the result is the same as it would be if
7907079079
** the SQLITE_NULLEQ flag were omitted from P5.
7907179080
*/
7907279081
/* Opcode: Le P1 P2 P3 P4 P5
79073
-** Synopsis: if r[P1]<=r[P3] goto P2
79082
+** Synopsis: IF r[P3]<=r[P1]
7907479083
**
7907579084
** This works just like the Lt opcode except that the jump is taken if
7907679085
** the content of register P3 is less than or equal to the content of
7907779086
** register P1. See the Lt opcode for additional information.
7907879087
*/
7907979088
/* Opcode: Gt P1 P2 P3 P4 P5
79080
-** Synopsis: if r[P1]>r[P3] goto P2
79089
+** Synopsis: IF r[P3]>r[P1]
7908179090
**
7908279091
** This works just like the Lt opcode except that the jump is taken if
7908379092
** the content of register P3 is greater than the content of
7908479093
** register P1. See the Lt opcode for additional information.
7908579094
*/
7908679095
/* Opcode: Ge P1 P2 P3 P4 P5
79087
-** Synopsis: if r[P1]>=r[P3] goto P2
79096
+** Synopsis: IF r[P3]>=r[P1]
7908879097
**
7908979098
** This works just like the Lt opcode except that the jump is taken if
7909079099
** the content of register P3 is greater than or equal to the content of
7909179100
** register P1. See the Lt opcode for additional information.
7909279101
*/
@@ -84209,11 +84218,11 @@
8420984218
}
8421084219
8421184220
/*
8421284221
** Open a blob handle.
8421384222
*/
84214
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
84223
+SQLITE_API int sqlite3_blob_open(
8421584224
sqlite3* db, /* The database connection */
8421684225
const char *zDb, /* The attached database containing the blob */
8421784226
const char *zTable, /* The table containing the blob */
8421884227
const char *zColumn, /* The column containing the blob */
8421984228
sqlite_int64 iRow, /* The row containing the glob */
@@ -84450,11 +84459,11 @@
8445084459
8445184460
/*
8445284461
** Close a blob handle that was previously created using
8445384462
** sqlite3_blob_open().
8445484463
*/
84455
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *pBlob){
84464
+SQLITE_API int sqlite3_blob_close(sqlite3_blob *pBlob){
8445684465
Incrblob *p = (Incrblob *)pBlob;
8445784466
int rc;
8445884467
sqlite3 *db;
8445984468
8446084469
if( p ){
@@ -84543,28 +84552,28 @@
8454384552
}
8454484553
8454584554
/*
8454684555
** Read data from a blob handle.
8454784556
*/
84548
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){
84557
+SQLITE_API int sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){
8454984558
return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData);
8455084559
}
8455184560
8455284561
/*
8455384562
** Write data to a blob handle.
8455484563
*/
84555
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){
84564
+SQLITE_API int sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){
8455684565
return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData);
8455784566
}
8455884567
8455984568
/*
8456084569
** Query a blob handle for the size of the data.
8456184570
**
8456284571
** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
8456384572
** so no mutex is required for access.
8456484573
*/
84565
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *pBlob){
84574
+SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *pBlob){
8456684575
Incrblob *p = (Incrblob *)pBlob;
8456784576
return (p && p->pStmt) ? p->nByte : 0;
8456884577
}
8456984578
8457084579
/*
@@ -84575,11 +84584,11 @@
8457584584
** contain a blob or text value, then an error code is returned and the
8457684585
** database handle error code and message set. If this happens, then all
8457784586
** subsequent calls to sqlite3_blob_xxx() functions (except blob_close())
8457884587
** immediately return SQLITE_ABORT.
8457984588
*/
84580
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){
84589
+SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){
8458184590
int rc;
8458284591
Incrblob *p = (Incrblob *)pBlob;
8458384592
sqlite3 *db;
8458484593
8458584594
if( p==0 ) return SQLITE_MISUSE_BKPT;
@@ -97188,11 +97197,11 @@
9718897197
** and attempts to write the column will be ignored.
9718997198
**
9719097199
** Setting the auth function to NULL disables this hook. The default
9719197200
** setting of the auth function is NULL.
9719297201
*/
97193
-SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
97202
+SQLITE_API int sqlite3_set_authorizer(
9719497203
sqlite3 *db,
9719597204
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
9719697205
void *pArg
9719797206
){
9719897207
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -103958,18 +103967,18 @@
103958103967
}
103959103968
103960103969
/*
103961103970
** The sqlite3_strglob() interface.
103962103971
*/
103963
-SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlobPattern, const char *zString){
103972
+SQLITE_API int sqlite3_strglob(const char *zGlobPattern, const char *zString){
103964103973
return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, '[')==0;
103965103974
}
103966103975
103967103976
/*
103968103977
** The sqlite3_strlike() interface.
103969103978
*/
103970
-SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){
103979
+SQLITE_API int sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){
103971103980
return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc)==0;
103972103981
}
103973103982
103974103983
/*
103975103984
** Count the number of times that the LIKE operator (or GLOB which is
@@ -108244,19 +108253,19 @@
108244108253
}
108245108254
if( piIdxCur ) *piIdxCur = iBase;
108246108255
for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
108247108256
int iIdxCur = iBase++;
108248108257
assert( pIdx->pSchema==pTab->pSchema );
108258
+ if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){
108259
+ if( piDataCur ) *piDataCur = iIdxCur;
108260
+ p5 = 0;
108261
+ }
108249108262
if( aToOpen==0 || aToOpen[i+1] ){
108250108263
sqlite3VdbeAddOp3(v, op, iIdxCur, pIdx->tnum, iDb);
108251108264
sqlite3VdbeSetP4KeyInfo(pParse, pIdx);
108252
- VdbeComment((v, "%s", pIdx->zName));
108253
- }
108254
- if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){
108255
- if( piDataCur ) *piDataCur = iIdxCur;
108256
- }else{
108257108265
sqlite3VdbeChangeP5(v, p5);
108266
+ VdbeComment((v, "%s", pIdx->zName));
108258108267
}
108259108268
}
108260108269
if( iBase>pParse->nTab ) pParse->nTab = iBase;
108261108270
return i;
108262108271
}
@@ -108684,11 +108693,11 @@
108684108693
** If the SQL is a query, then for each row in the query result
108685108694
** the xCallback() function is called. pArg becomes the first
108686108695
** argument to xCallback(). If xCallback=NULL then no callback
108687108696
** is invoked, even for queries.
108688108697
*/
108689
-SQLITE_API int SQLITE_STDCALL sqlite3_exec(
108698
+SQLITE_API int sqlite3_exec(
108690108699
sqlite3 *db, /* The database on which the SQL executes */
108691108700
const char *zSql, /* The SQL to be executed */
108692108701
sqlite3_callback xCallback, /* Invoke this callback routine */
108693108702
void *pArg, /* First argument to xCallback() */
108694108703
char **pzErrMsg /* Write error messages here */
@@ -109946,11 +109955,11 @@
109946109955
db->aExtension = aHandle;
109947109956
109948109957
db->aExtension[db->nExtension++] = handle;
109949109958
return SQLITE_OK;
109950109959
}
109951
-SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
109960
+SQLITE_API int sqlite3_load_extension(
109952109961
sqlite3 *db, /* Load the extension into this database connection */
109953109962
const char *zFile, /* Name of the shared library containing extension */
109954109963
const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */
109955109964
char **pzErrMsg /* Put error message here if not 0 */
109956109965
){
@@ -109977,11 +109986,11 @@
109977109986
109978109987
/*
109979109988
** Enable or disable extension loading. Extension loading is disabled by
109980109989
** default so as not to open security holes in older applications.
109981109990
*/
109982
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff){
109991
+SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){
109983109992
sqlite3_mutex_enter(db->mutex);
109984109993
if( onoff ){
109985109994
db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc;
109986109995
}else{
109987109996
db->flags &= ~(SQLITE_LoadExtension|SQLITE_LoadExtFunc);
@@ -110034,11 +110043,11 @@
110034110043
110035110044
/*
110036110045
** Register a statically linked extension that is automatically
110037110046
** loaded by every new database connection.
110038110047
*/
110039
-SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(
110048
+SQLITE_API int sqlite3_auto_extension(
110040110049
void (*xInit)(void)
110041110050
){
110042110051
int rc = SQLITE_OK;
110043110052
#ifndef SQLITE_OMIT_AUTOINIT
110044110053
rc = sqlite3_initialize();
@@ -110081,11 +110090,11 @@
110081110090
** routine is a no-op.
110082110091
**
110083110092
** Return 1 if xInit was found on the list and removed. Return 0 if xInit
110084110093
** was not on the list.
110085110094
*/
110086
-SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(
110095
+SQLITE_API int sqlite3_cancel_auto_extension(
110087110096
void (*xInit)(void)
110088110097
){
110089110098
#if SQLITE_THREADSAFE
110090110099
sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
110091110100
#endif
@@ -110106,11 +110115,11 @@
110106110115
}
110107110116
110108110117
/*
110109110118
** Reset the automatic extension loading mechanism.
110110110119
*/
110111
-SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void){
110120
+SQLITE_API void sqlite3_reset_auto_extension(void){
110112110121
#ifndef SQLITE_OMIT_AUTOINIT
110113110122
if( sqlite3_initialize()==SQLITE_OK )
110114110123
#endif
110115110124
{
110116110125
#if SQLITE_THREADSAFE
@@ -113367,11 +113376,11 @@
113367113376
** and so if a schema change occurs, SQLITE_SCHEMA is returned by
113368113377
** sqlite3_step(). In the new version, the original SQL text is retained
113369113378
** and the statement is automatically recompiled if an schema change
113370113379
** occurs.
113371113380
*/
113372
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare(
113381
+SQLITE_API int sqlite3_prepare(
113373113382
sqlite3 *db, /* Database handle. */
113374113383
const char *zSql, /* UTF-8 encoded SQL statement. */
113375113384
int nBytes, /* Length of zSql in bytes. */
113376113385
sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113377113386
const char **pzTail /* OUT: End of parsed string */
@@ -113379,11 +113388,11 @@
113379113388
int rc;
113380113389
rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail);
113381113390
assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
113382113391
return rc;
113383113392
}
113384
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2(
113393
+SQLITE_API int sqlite3_prepare_v2(
113385113394
sqlite3 *db, /* Database handle. */
113386113395
const char *zSql, /* UTF-8 encoded SQL statement. */
113387113396
int nBytes, /* Length of zSql in bytes. */
113388113397
sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113389113398
const char **pzTail /* OUT: End of parsed string */
@@ -113455,11 +113464,11 @@
113455113464
** and so if a schema change occurs, SQLITE_SCHEMA is returned by
113456113465
** sqlite3_step(). In the new version, the original SQL text is retained
113457113466
** and the statement is automatically recompiled if an schema change
113458113467
** occurs.
113459113468
*/
113460
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare16(
113469
+SQLITE_API int sqlite3_prepare16(
113461113470
sqlite3 *db, /* Database handle. */
113462113471
const void *zSql, /* UTF-16 encoded SQL statement. */
113463113472
int nBytes, /* Length of zSql in bytes. */
113464113473
sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113465113474
const void **pzTail /* OUT: End of parsed string */
@@ -113467,11 +113476,11 @@
113467113476
int rc;
113468113477
rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail);
113469113478
assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
113470113479
return rc;
113471113480
}
113472
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
113481
+SQLITE_API int sqlite3_prepare16_v2(
113473113482
sqlite3 *db, /* Database handle. */
113474113483
const void *zSql, /* UTF-16 encoded SQL statement. */
113475113484
int nBytes, /* Length of zSql in bytes. */
113476113485
sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113477113486
const void **pzTail /* OUT: End of parsed string */
@@ -119310,11 +119319,11 @@
119310119319
** The result that is written to ***pazResult is held in memory obtained
119311119320
** from malloc(). But the caller cannot free this memory directly.
119312119321
** Instead, the entire table should be passed to sqlite3_free_table() when
119313119322
** the calling procedure is finished using it.
119314119323
*/
119315
-SQLITE_API int SQLITE_STDCALL sqlite3_get_table(
119324
+SQLITE_API int sqlite3_get_table(
119316119325
sqlite3 *db, /* The database on which the SQL executes */
119317119326
const char *zSql, /* The SQL to be executed */
119318119327
char ***pazResult, /* Write the result table here */
119319119328
int *pnRow, /* Write the number of rows in the result here */
119320119329
int *pnColumn, /* Write the number of columns of result here */
@@ -119379,11 +119388,11 @@
119379119388
}
119380119389
119381119390
/*
119382119391
** This routine frees the space the sqlite3_get_table() malloced.
119383119392
*/
119384
-SQLITE_API void SQLITE_STDCALL sqlite3_free_table(
119393
+SQLITE_API void sqlite3_free_table(
119385119394
char **azResult /* Result returned from sqlite3_get_table() */
119386119395
){
119387119396
if( azResult ){
119388119397
int i, n;
119389119398
azResult--;
@@ -121789,11 +121798,11 @@
121789121798
121790121799
121791121800
/*
121792121801
** External API function used to create a new virtual-table module.
121793121802
*/
121794
-SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
121803
+SQLITE_API int sqlite3_create_module(
121795121804
sqlite3 *db, /* Database in which module is registered */
121796121805
const char *zName, /* Name assigned to this module */
121797121806
const sqlite3_module *pModule, /* The definition of the module */
121798121807
void *pAux /* Context pointer for xCreate/xConnect */
121799121808
){
@@ -121804,11 +121813,11 @@
121804121813
}
121805121814
121806121815
/*
121807121816
** External API function used to create a new virtual-table module.
121808121817
*/
121809
-SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
121818
+SQLITE_API int sqlite3_create_module_v2(
121810121819
sqlite3 *db, /* Database in which module is registered */
121811121820
const char *zName, /* Name assigned to this module */
121812121821
const sqlite3_module *pModule, /* The definition of the module */
121813121822
void *pAux, /* Context pointer for xCreate/xConnect */
121814121823
void (*xDestroy)(void *) /* Module destructor function */
@@ -122428,11 +122437,11 @@
122428122437
/*
122429122438
** This function is used to set the schema of a virtual table. It is only
122430122439
** valid to call this function from within the xCreate() or xConnect() of a
122431122440
** virtual table module.
122432122441
*/
122433
-SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
122442
+SQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
122434122443
VtabCtx *pCtx;
122435122444
Parse *pParse;
122436122445
int rc = SQLITE_OK;
122437122446
Table *pTab;
122438122447
char *zErr = 0;
@@ -122885,11 +122894,11 @@
122885122894
** table update operation currently in progress.
122886122895
**
122887122896
** The results of this routine are undefined unless it is called from
122888122897
** within an xUpdate method.
122889122898
*/
122890
-SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *db){
122899
+SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *db){
122891122900
static const unsigned char aMap[] = {
122892122901
SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE
122893122902
};
122894122903
#ifdef SQLITE_ENABLE_API_ARMOR
122895122904
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -122903,11 +122912,11 @@
122903122912
/*
122904122913
** Call from within the xCreate() or xConnect() methods to provide
122905122914
** the SQLite core with additional information about the behavior
122906122915
** of the virtual table being implemented.
122907122916
*/
122908
-SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3 *db, int op, ...){
122917
+SQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){
122909122918
va_list ap;
122910122919
int rc = SQLITE_OK;
122911122920
122912122921
#ifdef SQLITE_ENABLE_API_ARMOR
122913122922
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -124028,13 +124037,19 @@
124028124037
regBase = r1;
124029124038
}else{
124030124039
sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j);
124031124040
}
124032124041
}
124033
- testcase( pTerm->eOperator & WO_ISNULL );
124034
- testcase( pTerm->eOperator & WO_IN );
124035
- if( (pTerm->eOperator & (WO_ISNULL|WO_IN))==0 ){
124042
+ if( (pTerm->eOperator & WO_IN)!=0 ){
124043
+ if( pTerm->pExpr->flags & EP_xIsSelect ){
124044
+ /* No affinity ever needs to be (or should be) applied to a value
124045
+ ** from the RHS of an "? IN (SELECT ...)" expression. The
124046
+ ** sqlite3FindInIndex() routine has already ensured that the
124047
+ ** affinity of the comparison has been applied to the value. */
124048
+ if( zAff ) zAff[j] = SQLITE_AFF_BLOB;
124049
+ }
124050
+ }else if( (pTerm->eOperator & WO_ISNULL)==0 ){
124036124051
Expr *pRight = pTerm->pExpr->pRight;
124037124052
if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){
124038124053
sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
124039124054
VdbeCoverage(v);
124040124055
}
@@ -130105,10 +130120,18 @@
130105130120
if( pOBExpr->op!=TK_COLUMN ) continue;
130106130121
if( pOBExpr->iTable!=iCur ) continue;
130107130122
pTerm = sqlite3WhereFindTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn,
130108130123
~ready, eqOpMask, 0);
130109130124
if( pTerm==0 ) continue;
130125
+ if( pTerm->eOperator==WO_IN ){
130126
+ /* IN terms are only valid for sorting in the ORDER BY LIMIT
130127
+ ** optimization, and then only if they are actually used
130128
+ ** by the query plan */
130129
+ assert( wctrlFlags & WHERE_ORDERBY_LIMIT );
130130
+ for(j=0; j<pLoop->nLTerm && pTerm!=pLoop->aLTerm[j]; j++){}
130131
+ if( j>=pLoop->nLTerm ) continue;
130132
+ }
130110130133
if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0 && pOBExpr->iColumn>=0 ){
130111130134
const char *z1, *z2;
130112130135
pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
130113130136
if( !pColl ) pColl = db->pDfltColl;
130114130137
z1 = pColl->zName;
@@ -136210,11 +136233,11 @@
136210136233
**
136211136234
** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed
136212136235
** to recognize the end of a trigger can be omitted. All we have to do
136213136236
** is look for a semicolon that is not part of an string or comment.
136214136237
*/
136215
-SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *zSql){
136238
+SQLITE_API int sqlite3_complete(const char *zSql){
136216136239
u8 state = 0; /* Current state, using numbers defined in header comment */
136217136240
u8 token; /* Value of the next token */
136218136241
136219136242
#ifndef SQLITE_OMIT_TRIGGER
136220136243
/* A complex statement machine used to detect the end of a CREATE TRIGGER
@@ -136375,11 +136398,11 @@
136375136398
/*
136376136399
** This routine is the same as the sqlite3_complete() routine described
136377136400
** above, except that the parameter is required to be UTF-16 encoded, not
136378136401
** UTF-8.
136379136402
*/
136380
-SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *zSql){
136403
+SQLITE_API int sqlite3_complete16(const void *zSql){
136381136404
sqlite3_value *pVal;
136382136405
char const *zSql8;
136383136406
int rc;
136384136407
136385136408
#ifndef SQLITE_OMIT_AUTOINIT
@@ -136535,28 +136558,28 @@
136535136558
#endif
136536136559
136537136560
/* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns
136538136561
** a pointer to the to the sqlite3_version[] string constant.
136539136562
*/
136540
-SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void){ return sqlite3_version; }
136563
+SQLITE_API const char *sqlite3_libversion(void){ return sqlite3_version; }
136541136564
136542136565
/* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a
136543136566
** pointer to a string constant whose value is the same as the
136544136567
** SQLITE_SOURCE_ID C preprocessor macro.
136545136568
*/
136546
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
136569
+SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
136547136570
136548136571
/* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function
136549136572
** returns an integer equal to SQLITE_VERSION_NUMBER.
136550136573
*/
136551
-SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
136574
+SQLITE_API int sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
136552136575
136553136576
/* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns
136554136577
** zero if and only if SQLite was compiled with mutexing code omitted due to
136555136578
** the SQLITE_THREADSAFE compile-time option being set to 0.
136556136579
*/
136557
-SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
136580
+SQLITE_API int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
136558136581
136559136582
/*
136560136583
** When compiling the test fixture or with debugging enabled (on Win32),
136561136584
** this variable being set to non-zero will cause OSTRACE macros to emit
136562136585
** extra diagnostic information.
@@ -136625,11 +136648,11 @@
136625136648
** call by X completes.
136626136649
**
136627136650
** * Recursive calls to this routine from thread X return immediately
136628136651
** without blocking.
136629136652
*/
136630
-SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void){
136653
+SQLITE_API int sqlite3_initialize(void){
136631136654
MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
136632136655
int rc; /* Result code */
136633136656
#ifdef SQLITE_EXTRA_INIT
136634136657
int bRunExtraInit = 0; /* Extra initialization needed */
136635136658
#endif
@@ -136791,11 +136814,11 @@
136791136814
** while any part of SQLite is otherwise in use in any thread. This
136792136815
** routine is not threadsafe. But it is safe to invoke this routine
136793136816
** on when SQLite is already shut down. If SQLite is already shut down
136794136817
** when this routine is invoked, then this routine is a harmless no-op.
136795136818
*/
136796
-SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void){
136819
+SQLITE_API int sqlite3_shutdown(void){
136797136820
#ifdef SQLITE_OMIT_WSD
136798136821
int rc = sqlite3_wsd_init(4096, 24);
136799136822
if( rc!=SQLITE_OK ){
136800136823
return rc;
136801136824
}
@@ -136845,11 +136868,11 @@
136845136868
** This routine should only be called when there are no outstanding
136846136869
** database connections or memory allocations. This routine is not
136847136870
** threadsafe. Failure to heed these warnings can lead to unpredictable
136848136871
** behavior.
136849136872
*/
136850
-SQLITE_API int SQLITE_CDECL sqlite3_config(int op, ...){
136873
+SQLITE_API int sqlite3_config(int op, ...){
136851136874
va_list ap;
136852136875
int rc = SQLITE_OK;
136853136876
136854136877
/* sqlite3_config() shall return SQLITE_MISUSE if it is invoked while
136855136878
** the SQLite library is in use. */
@@ -137210,11 +137233,11 @@
137210137233
}
137211137234
137212137235
/*
137213137236
** Return the mutex associated with a database connection.
137214137237
*/
137215
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3 *db){
137238
+SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){
137216137239
#ifdef SQLITE_ENABLE_API_ARMOR
137217137240
if( !sqlite3SafetyCheckOk(db) ){
137218137241
(void)SQLITE_MISUSE_BKPT;
137219137242
return 0;
137220137243
}
@@ -137224,11 +137247,11 @@
137224137247
137225137248
/*
137226137249
** Free up as much memory as we can from the given database
137227137250
** connection.
137228137251
*/
137229
-SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3 *db){
137252
+SQLITE_API int sqlite3_db_release_memory(sqlite3 *db){
137230137253
int i;
137231137254
137232137255
#ifdef SQLITE_ENABLE_API_ARMOR
137233137256
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
137234137257
#endif
@@ -137248,11 +137271,11 @@
137248137271
137249137272
/*
137250137273
** Flush any dirty pages in the pager-cache for any attached database
137251137274
** to disk.
137252137275
*/
137253
-SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3 *db){
137276
+SQLITE_API int sqlite3_db_cacheflush(sqlite3 *db){
137254137277
int i;
137255137278
int rc = SQLITE_OK;
137256137279
int bSeenBusy = 0;
137257137280
137258137281
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -137277,11 +137300,11 @@
137277137300
}
137278137301
137279137302
/*
137280137303
** Configuration settings for an individual database connection
137281137304
*/
137282
-SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3 *db, int op, ...){
137305
+SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){
137283137306
va_list ap;
137284137307
int rc;
137285137308
va_start(ap, op);
137286137309
switch( op ){
137287137310
case SQLITE_DBCONFIG_LOOKASIDE: {
@@ -137398,11 +137421,11 @@
137398137421
}
137399137422
137400137423
/*
137401137424
** Return the ROWID of the most recent insert
137402137425
*/
137403
-SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3 *db){
137426
+SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){
137404137427
#ifdef SQLITE_ENABLE_API_ARMOR
137405137428
if( !sqlite3SafetyCheckOk(db) ){
137406137429
(void)SQLITE_MISUSE_BKPT;
137407137430
return 0;
137408137431
}
@@ -137411,11 +137434,11 @@
137411137434
}
137412137435
137413137436
/*
137414137437
** Return the number of changes in the most recent call to sqlite3_exec().
137415137438
*/
137416
-SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3 *db){
137439
+SQLITE_API int sqlite3_changes(sqlite3 *db){
137417137440
#ifdef SQLITE_ENABLE_API_ARMOR
137418137441
if( !sqlite3SafetyCheckOk(db) ){
137419137442
(void)SQLITE_MISUSE_BKPT;
137420137443
return 0;
137421137444
}
@@ -137424,11 +137447,11 @@
137424137447
}
137425137448
137426137449
/*
137427137450
** Return the number of changes since the database handle was opened.
137428137451
*/
137429
-SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3 *db){
137452
+SQLITE_API int sqlite3_total_changes(sqlite3 *db){
137430137453
#ifdef SQLITE_ENABLE_API_ARMOR
137431137454
if( !sqlite3SafetyCheckOk(db) ){
137432137455
(void)SQLITE_MISUSE_BKPT;
137433137456
return 0;
137434137457
}
@@ -137575,12 +137598,12 @@
137575137598
** statements or unfinished sqlite3_backups. The sqlite3_close_v2()
137576137599
** version forces the connection to become a zombie if there are
137577137600
** unclosed resources, and arranges for deallocation when the last
137578137601
** prepare statement or sqlite3_backup closes.
137579137602
*/
137580
-SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); }
137581
-SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); }
137603
+SQLITE_API int sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); }
137604
+SQLITE_API int sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); }
137582137605
137583137606
137584137607
/*
137585137608
** Close the mutex on database connection db.
137586137609
**
@@ -137983,11 +138006,11 @@
137983138006
137984138007
/*
137985138008
** This routine sets the busy callback for an Sqlite database to the
137986138009
** given callback function with the given argument.
137987138010
*/
137988
-SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(
138011
+SQLITE_API int sqlite3_busy_handler(
137989138012
sqlite3 *db,
137990138013
int (*xBusy)(void*,int),
137991138014
void *pArg
137992138015
){
137993138016
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -138006,11 +138029,11 @@
138006138029
/*
138007138030
** This routine sets the progress callback for an Sqlite database to the
138008138031
** given callback function with the given argument. The progress callback will
138009138032
** be invoked every nOps opcodes.
138010138033
*/
138011
-SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(
138034
+SQLITE_API void sqlite3_progress_handler(
138012138035
sqlite3 *db,
138013138036
int nOps,
138014138037
int (*xProgress)(void*),
138015138038
void *pArg
138016138039
){
@@ -138037,11 +138060,11 @@
138037138060
138038138061
/*
138039138062
** This routine installs a default busy handler that waits for the
138040138063
** specified number of milliseconds before returning 0.
138041138064
*/
138042
-SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3 *db, int ms){
138065
+SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){
138043138066
#ifdef SQLITE_ENABLE_API_ARMOR
138044138067
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
138045138068
#endif
138046138069
if( ms>0 ){
138047138070
sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db);
@@ -138053,11 +138076,11 @@
138053138076
}
138054138077
138055138078
/*
138056138079
** Cause any pending operation to stop at its earliest opportunity.
138057138080
*/
138058
-SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3 *db){
138081
+SQLITE_API void sqlite3_interrupt(sqlite3 *db){
138059138082
#ifdef SQLITE_ENABLE_API_ARMOR
138060138083
if( !sqlite3SafetyCheckOk(db) ){
138061138084
(void)SQLITE_MISUSE_BKPT;
138062138085
return;
138063138086
}
@@ -138169,11 +138192,11 @@
138169138192
}
138170138193
138171138194
/*
138172138195
** Create new user functions.
138173138196
*/
138174
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function(
138197
+SQLITE_API int sqlite3_create_function(
138175138198
sqlite3 *db,
138176138199
const char *zFunc,
138177138200
int nArg,
138178138201
int enc,
138179138202
void *p,
@@ -138183,11 +138206,11 @@
138183138206
){
138184138207
return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xSFunc, xStep,
138185138208
xFinal, 0);
138186138209
}
138187138210
138188
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2(
138211
+SQLITE_API int sqlite3_create_function_v2(
138189138212
sqlite3 *db,
138190138213
const char *zFunc,
138191138214
int nArg,
138192138215
int enc,
138193138216
void *p,
@@ -138226,11 +138249,11 @@
138226138249
sqlite3_mutex_leave(db->mutex);
138227138250
return rc;
138228138251
}
138229138252
138230138253
#ifndef SQLITE_OMIT_UTF16
138231
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function16(
138254
+SQLITE_API int sqlite3_create_function16(
138232138255
sqlite3 *db,
138233138256
const void *zFunctionName,
138234138257
int nArg,
138235138258
int eTextRep,
138236138259
void *p,
@@ -138266,11 +138289,11 @@
138266138289
** When virtual tables intend to provide an overloaded function, they
138267138290
** should call this routine to make sure the global function exists.
138268138291
** A global function must exist in order for name resolution to work
138269138292
** properly.
138270138293
*/
138271
-SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(
138294
+SQLITE_API int sqlite3_overload_function(
138272138295
sqlite3 *db,
138273138296
const char *zName,
138274138297
int nArg
138275138298
){
138276138299
int rc = SQLITE_OK;
@@ -138298,11 +138321,11 @@
138298138321
** A NULL trace function means that no tracing is executes. A non-NULL
138299138322
** trace is a pointer to a function that is invoked at the start of each
138300138323
** SQL statement.
138301138324
*/
138302138325
#ifndef SQLITE_OMIT_DEPRECATED
138303
-SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){
138326
+SQLITE_API void *sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){
138304138327
void *pOld;
138305138328
138306138329
#ifdef SQLITE_ENABLE_API_ARMOR
138307138330
if( !sqlite3SafetyCheckOk(db) ){
138308138331
(void)SQLITE_MISUSE_BKPT;
@@ -138319,11 +138342,11 @@
138319138342
}
138320138343
#endif /* SQLITE_OMIT_DEPRECATED */
138321138344
138322138345
/* Register a trace callback using the version-2 interface.
138323138346
*/
138324
-SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2(
138347
+SQLITE_API int sqlite3_trace_v2(
138325138348
sqlite3 *db, /* Trace this connection */
138326138349
unsigned mTrace, /* Mask of events to be traced */
138327138350
int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */
138328138351
void *pArg /* Context */
138329138352
){
@@ -138331,10 +138354,12 @@
138331138354
if( !sqlite3SafetyCheckOk(db) ){
138332138355
return SQLITE_MISUSE_BKPT;
138333138356
}
138334138357
#endif
138335138358
sqlite3_mutex_enter(db->mutex);
138359
+ if( mTrace==0 ) xTrace = 0;
138360
+ if( xTrace==0 ) mTrace = 0;
138336138361
db->mTrace = mTrace;
138337138362
db->xTrace = xTrace;
138338138363
db->pTraceArg = pArg;
138339138364
sqlite3_mutex_leave(db->mutex);
138340138365
return SQLITE_OK;
@@ -138347,11 +138372,11 @@
138347138372
**
138348138373
** A NULL profile function means that no profiling is executes. A non-NULL
138349138374
** profile is a pointer to a function that is invoked at the conclusion of
138350138375
** each SQL statement that is run.
138351138376
*/
138352
-SQLITE_API void *SQLITE_STDCALL sqlite3_profile(
138377
+SQLITE_API void *sqlite3_profile(
138353138378
sqlite3 *db,
138354138379
void (*xProfile)(void*,const char*,sqlite_uint64),
138355138380
void *pArg
138356138381
){
138357138382
void *pOld;
@@ -138375,11 +138400,11 @@
138375138400
/*
138376138401
** Register a function to be invoked when a transaction commits.
138377138402
** If the invoked function returns non-zero, then the commit becomes a
138378138403
** rollback.
138379138404
*/
138380
-SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(
138405
+SQLITE_API void *sqlite3_commit_hook(
138381138406
sqlite3 *db, /* Attach the hook to this database */
138382138407
int (*xCallback)(void*), /* Function to invoke on each commit */
138383138408
void *pArg /* Argument to the function */
138384138409
){
138385138410
void *pOld;
@@ -138400,11 +138425,11 @@
138400138425
138401138426
/*
138402138427
** Register a callback to be invoked each time a row is updated,
138403138428
** inserted or deleted using this database connection.
138404138429
*/
138405
-SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
138430
+SQLITE_API void *sqlite3_update_hook(
138406138431
sqlite3 *db, /* Attach the hook to this database */
138407138432
void (*xCallback)(void*,int,char const *,char const *,sqlite_int64),
138408138433
void *pArg /* Argument to the function */
138409138434
){
138410138435
void *pRet;
@@ -138425,11 +138450,11 @@
138425138450
138426138451
/*
138427138452
** Register a callback to be invoked each time a transaction is rolled
138428138453
** back by this database connection.
138429138454
*/
138430
-SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(
138455
+SQLITE_API void *sqlite3_rollback_hook(
138431138456
sqlite3 *db, /* Attach the hook to this database */
138432138457
void (*xCallback)(void*), /* Callback function */
138433138458
void *pArg /* Argument to the function */
138434138459
){
138435138460
void *pRet;
@@ -138451,11 +138476,11 @@
138451138476
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
138452138477
/*
138453138478
** Register a callback to be invoked each time a row is updated,
138454138479
** inserted or deleted using this database connection.
138455138480
*/
138456
-SQLITE_API void *SQLITE_STDCALL sqlite3_preupdate_hook(
138481
+SQLITE_API void *sqlite3_preupdate_hook(
138457138482
sqlite3 *db, /* Attach the hook to this database */
138458138483
void(*xCallback)( /* Callback function */
138459138484
void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64),
138460138485
void *pArg /* First callback argument */
138461138486
){
@@ -138500,11 +138525,11 @@
138500138525
** The callback registered by this function replaces any existing callback
138501138526
** registered using sqlite3_wal_hook(). Likewise, registering a callback
138502138527
** using sqlite3_wal_hook() disables the automatic checkpoint mechanism
138503138528
** configured by this function.
138504138529
*/
138505
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){
138530
+SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){
138506138531
#ifdef SQLITE_OMIT_WAL
138507138532
UNUSED_PARAMETER(db);
138508138533
UNUSED_PARAMETER(nFrame);
138509138534
#else
138510138535
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -138521,11 +138546,11 @@
138521138546
138522138547
/*
138523138548
** Register a callback to be invoked each time a transaction is written
138524138549
** into the write-ahead-log by this database connection.
138525138550
*/
138526
-SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook(
138551
+SQLITE_API void *sqlite3_wal_hook(
138527138552
sqlite3 *db, /* Attach the hook to this db handle */
138528138553
int(*xCallback)(void *, sqlite3*, const char*, int),
138529138554
void *pArg /* First argument passed to xCallback() */
138530138555
){
138531138556
#ifndef SQLITE_OMIT_WAL
@@ -138548,11 +138573,11 @@
138548138573
}
138549138574
138550138575
/*
138551138576
** Checkpoint database zDb.
138552138577
*/
138553
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2(
138578
+SQLITE_API int sqlite3_wal_checkpoint_v2(
138554138579
sqlite3 *db, /* Database handle */
138555138580
const char *zDb, /* Name of attached database (or NULL) */
138556138581
int eMode, /* SQLITE_CHECKPOINT_* value */
138557138582
int *pnLog, /* OUT: Size of WAL log in frames */
138558138583
int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -138603,11 +138628,11 @@
138603138628
/*
138604138629
** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points
138605138630
** to contains a zero-length string, all attached databases are
138606138631
** checkpointed.
138607138632
*/
138608
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){
138633
+SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){
138609138634
/* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to
138610138635
** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */
138611138636
return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0);
138612138637
}
138613138638
@@ -138694,11 +138719,11 @@
138694138719
138695138720
/*
138696138721
** Return UTF-8 encoded English language explanation of the most recent
138697138722
** error.
138698138723
*/
138699
-SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3 *db){
138724
+SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){
138700138725
const char *z;
138701138726
if( !db ){
138702138727
return sqlite3ErrStr(SQLITE_NOMEM_BKPT);
138703138728
}
138704138729
if( !sqlite3SafetyCheckSickOrOk(db) ){
@@ -138722,11 +138747,11 @@
138722138747
#ifndef SQLITE_OMIT_UTF16
138723138748
/*
138724138749
** Return UTF-16 encoded English language explanation of the most recent
138725138750
** error.
138726138751
*/
138727
-SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3 *db){
138752
+SQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){
138728138753
static const u16 outOfMem[] = {
138729138754
'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0
138730138755
};
138731138756
static const u16 misuse[] = {
138732138757
'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ',
@@ -138767,38 +138792,38 @@
138767138792
138768138793
/*
138769138794
** Return the most recent error code generated by an SQLite routine. If NULL is
138770138795
** passed to this function, we assume a malloc() failed during sqlite3_open().
138771138796
*/
138772
-SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db){
138797
+SQLITE_API int sqlite3_errcode(sqlite3 *db){
138773138798
if( db && !sqlite3SafetyCheckSickOrOk(db) ){
138774138799
return SQLITE_MISUSE_BKPT;
138775138800
}
138776138801
if( !db || db->mallocFailed ){
138777138802
return SQLITE_NOMEM_BKPT;
138778138803
}
138779138804
return db->errCode & db->errMask;
138780138805
}
138781
-SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db){
138806
+SQLITE_API int sqlite3_extended_errcode(sqlite3 *db){
138782138807
if( db && !sqlite3SafetyCheckSickOrOk(db) ){
138783138808
return SQLITE_MISUSE_BKPT;
138784138809
}
138785138810
if( !db || db->mallocFailed ){
138786138811
return SQLITE_NOMEM_BKPT;
138787138812
}
138788138813
return db->errCode;
138789138814
}
138790
-SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3 *db){
138815
+SQLITE_API int sqlite3_system_errno(sqlite3 *db){
138791138816
return db ? db->iSysErrno : 0;
138792138817
}
138793138818
138794138819
/*
138795138820
** Return a string that describes the kind of error specified in the
138796138821
** argument. For now, this simply calls the internal sqlite3ErrStr()
138797138822
** function.
138798138823
*/
138799
-SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int rc){
138824
+SQLITE_API const char *sqlite3_errstr(int rc){
138800138825
return sqlite3ErrStr(rc);
138801138826
}
138802138827
138803138828
/*
138804138829
** Create a new collating function for database "db". The name is zName
@@ -138942,11 +138967,11 @@
138942138967
**
138943138968
** A new lower limit does not shrink existing constructs.
138944138969
** It merely prevents new constructs that exceed the limit
138945138970
** from forming.
138946138971
*/
138947
-SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
138972
+SQLITE_API int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
138948138973
int oldLimit;
138949138974
138950138975
#ifdef SQLITE_ENABLE_API_ARMOR
138951138976
if( !sqlite3SafetyCheckOk(db) ){
138952138977
(void)SQLITE_MISUSE_BKPT;
@@ -139566,18 +139591,18 @@
139566139591
}
139567139592
139568139593
/*
139569139594
** Open a new database handle.
139570139595
*/
139571
-SQLITE_API int SQLITE_STDCALL sqlite3_open(
139596
+SQLITE_API int sqlite3_open(
139572139597
const char *zFilename,
139573139598
sqlite3 **ppDb
139574139599
){
139575139600
return openDatabase(zFilename, ppDb,
139576139601
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);
139577139602
}
139578
-SQLITE_API int SQLITE_STDCALL sqlite3_open_v2(
139603
+SQLITE_API int sqlite3_open_v2(
139579139604
const char *filename, /* Database filename (UTF-8) */
139580139605
sqlite3 **ppDb, /* OUT: SQLite db handle */
139581139606
int flags, /* Flags */
139582139607
const char *zVfs /* Name of VFS module to use */
139583139608
){
@@ -139586,11 +139611,11 @@
139586139611
139587139612
#ifndef SQLITE_OMIT_UTF16
139588139613
/*
139589139614
** Open a new database handle.
139590139615
*/
139591
-SQLITE_API int SQLITE_STDCALL sqlite3_open16(
139616
+SQLITE_API int sqlite3_open16(
139592139617
const void *zFilename,
139593139618
sqlite3 **ppDb
139594139619
){
139595139620
char const *zFilename8; /* zFilename encoded in UTF-8 instead of UTF-16 */
139596139621
sqlite3_value *pVal;
@@ -139625,11 +139650,11 @@
139625139650
#endif /* SQLITE_OMIT_UTF16 */
139626139651
139627139652
/*
139628139653
** Register a new collation sequence with the database handle db.
139629139654
*/
139630
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation(
139655
+SQLITE_API int sqlite3_create_collation(
139631139656
sqlite3* db,
139632139657
const char *zName,
139633139658
int enc,
139634139659
void* pCtx,
139635139660
int(*xCompare)(void*,int,const void*,int,const void*)
@@ -139638,11 +139663,11 @@
139638139663
}
139639139664
139640139665
/*
139641139666
** Register a new collation sequence with the database handle db.
139642139667
*/
139643
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2(
139668
+SQLITE_API int sqlite3_create_collation_v2(
139644139669
sqlite3* db,
139645139670
const char *zName,
139646139671
int enc,
139647139672
void* pCtx,
139648139673
int(*xCompare)(void*,int,const void*,int,const void*),
@@ -139663,11 +139688,11 @@
139663139688
139664139689
#ifndef SQLITE_OMIT_UTF16
139665139690
/*
139666139691
** Register a new collation sequence with the database handle db.
139667139692
*/
139668
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16(
139693
+SQLITE_API int sqlite3_create_collation16(
139669139694
sqlite3* db,
139670139695
const void *zName,
139671139696
int enc,
139672139697
void* pCtx,
139673139698
int(*xCompare)(void*,int,const void*,int,const void*)
@@ -139693,11 +139718,11 @@
139693139718
139694139719
/*
139695139720
** Register a collation sequence factory callback with the database handle
139696139721
** db. Replace any previously installed collation sequence factory.
139697139722
*/
139698
-SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed(
139723
+SQLITE_API int sqlite3_collation_needed(
139699139724
sqlite3 *db,
139700139725
void *pCollNeededArg,
139701139726
void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)
139702139727
){
139703139728
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -139714,11 +139739,11 @@
139714139739
#ifndef SQLITE_OMIT_UTF16
139715139740
/*
139716139741
** Register a collation sequence factory callback with the database handle
139717139742
** db. Replace any previously installed collation sequence factory.
139718139743
*/
139719
-SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16(
139744
+SQLITE_API int sqlite3_collation_needed16(
139720139745
sqlite3 *db,
139721139746
void *pCollNeededArg,
139722139747
void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)
139723139748
){
139724139749
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -139736,11 +139761,11 @@
139736139761
#ifndef SQLITE_OMIT_DEPRECATED
139737139762
/*
139738139763
** This function is now an anachronism. It used to be used to recover from a
139739139764
** malloc() failure, but SQLite now does this automatically.
139740139765
*/
139741
-SQLITE_API int SQLITE_STDCALL sqlite3_global_recover(void){
139766
+SQLITE_API int sqlite3_global_recover(void){
139742139767
return SQLITE_OK;
139743139768
}
139744139769
#endif
139745139770
139746139771
/*
@@ -139747,11 +139772,11 @@
139747139772
** Test to see whether or not the database connection is in autocommit
139748139773
** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on
139749139774
** by default. Autocommit is disabled by a BEGIN statement and reenabled
139750139775
** by the next COMMIT or ROLLBACK.
139751139776
*/
139752
-SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3 *db){
139777
+SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){
139753139778
#ifdef SQLITE_ENABLE_API_ARMOR
139754139779
if( !sqlite3SafetyCheckOk(db) ){
139755139780
(void)SQLITE_MISUSE_BKPT;
139756139781
return 0;
139757139782
}
@@ -139804,19 +139829,19 @@
139804139829
** data for this thread has been deallocated.
139805139830
**
139806139831
** SQLite no longer uses thread-specific data so this routine is now a
139807139832
** no-op. It is retained for historical compatibility.
139808139833
*/
139809
-SQLITE_API void SQLITE_STDCALL sqlite3_thread_cleanup(void){
139834
+SQLITE_API void sqlite3_thread_cleanup(void){
139810139835
}
139811139836
#endif
139812139837
139813139838
/*
139814139839
** Return meta information about a specific column of a database table.
139815139840
** See comment in sqlite3.h (sqlite.h.in) for details.
139816139841
*/
139817
-SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata(
139842
+SQLITE_API int sqlite3_table_column_metadata(
139818139843
sqlite3 *db, /* Connection handle */
139819139844
const char *zDbName, /* Database name or NULL */
139820139845
const char *zTableName, /* Table name */
139821139846
const char *zColumnName, /* Column name */
139822139847
char const **pzDataType, /* OUTPUT: Declared data type */
@@ -139930,11 +139955,11 @@
139930139955
}
139931139956
139932139957
/*
139933139958
** Sleep for a little while. Return the amount of time slept.
139934139959
*/
139935
-SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int ms){
139960
+SQLITE_API int sqlite3_sleep(int ms){
139936139961
sqlite3_vfs *pVfs;
139937139962
int rc;
139938139963
pVfs = sqlite3_vfs_find(0);
139939139964
if( pVfs==0 ) return 0;
139940139965
@@ -139946,11 +139971,11 @@
139946139971
}
139947139972
139948139973
/*
139949139974
** Enable or disable the extended result codes.
139950139975
*/
139951
-SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3 *db, int onoff){
139976
+SQLITE_API int sqlite3_extended_result_codes(sqlite3 *db, int onoff){
139952139977
#ifdef SQLITE_ENABLE_API_ARMOR
139953139978
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
139954139979
#endif
139955139980
sqlite3_mutex_enter(db->mutex);
139956139981
db->errMask = onoff ? 0xffffffff : 0xff;
@@ -139959,11 +139984,11 @@
139959139984
}
139960139985
139961139986
/*
139962139987
** Invoke the xFileControl method on a particular database.
139963139988
*/
139964
-SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
139989
+SQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
139965139990
int rc = SQLITE_ERROR;
139966139991
Btree *pBtree;
139967139992
139968139993
#ifdef SQLITE_ENABLE_API_ARMOR
139969139994
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -139999,11 +140024,11 @@
139999140024
}
140000140025
140001140026
/*
140002140027
** Interface to the testing logic.
140003140028
*/
140004
-SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...){
140029
+SQLITE_API int sqlite3_test_control(int op, ...){
140005140030
int rc = 0;
140006140031
#ifdef SQLITE_OMIT_BUILTIN_TEST
140007140032
UNUSED_PARAMETER(op);
140008140033
#else
140009140034
va_list ap;
@@ -140344,11 +140369,11 @@
140344140369
** method of a VFS implementation. The zParam argument is the name of the
140345140370
** query parameter we seek. This routine returns the value of the zParam
140346140371
** parameter if it exists. If the parameter does not exist, this routine
140347140372
** returns a NULL pointer.
140348140373
*/
140349
-SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam){
140374
+SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam){
140350140375
if( zFilename==0 || zParam==0 ) return 0;
140351140376
zFilename += sqlite3Strlen30(zFilename) + 1;
140352140377
while( zFilename[0] ){
140353140378
int x = strcmp(zFilename, zParam);
140354140379
zFilename += sqlite3Strlen30(zFilename) + 1;
@@ -140359,20 +140384,20 @@
140359140384
}
140360140385
140361140386
/*
140362140387
** Return a boolean value for a query parameter.
140363140388
*/
140364
-SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){
140389
+SQLITE_API int sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){
140365140390
const char *z = sqlite3_uri_parameter(zFilename, zParam);
140366140391
bDflt = bDflt!=0;
140367140392
return z ? sqlite3GetBoolean(z, bDflt) : bDflt;
140368140393
}
140369140394
140370140395
/*
140371140396
** Return a 64-bit integer value for a query parameter.
140372140397
*/
140373
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(
140398
+SQLITE_API sqlite3_int64 sqlite3_uri_int64(
140374140399
const char *zFilename, /* Filename as passed to xOpen */
140375140400
const char *zParam, /* URI parameter sought */
140376140401
sqlite3_int64 bDflt /* return if parameter is missing */
140377140402
){
140378140403
const char *z = sqlite3_uri_parameter(zFilename, zParam);
@@ -140400,11 +140425,11 @@
140400140425
140401140426
/*
140402140427
** Return the filename of the database associated with a database
140403140428
** connection.
140404140429
*/
140405
-SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName){
140430
+SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName){
140406140431
Btree *pBt;
140407140432
#ifdef SQLITE_ENABLE_API_ARMOR
140408140433
if( !sqlite3SafetyCheckOk(db) ){
140409140434
(void)SQLITE_MISUSE_BKPT;
140410140435
return 0;
@@ -140416,11 +140441,11 @@
140416140441
140417140442
/*
140418140443
** Return 1 if database is read-only or 0 if read/write. Return -1 if
140419140444
** no such database exists.
140420140445
*/
140421
-SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
140446
+SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
140422140447
Btree *pBt;
140423140448
#ifdef SQLITE_ENABLE_API_ARMOR
140424140449
if( !sqlite3SafetyCheckOk(db) ){
140425140450
(void)SQLITE_MISUSE_BKPT;
140426140451
return -1;
@@ -140433,11 +140458,11 @@
140433140458
#ifdef SQLITE_ENABLE_SNAPSHOT
140434140459
/*
140435140460
** Obtain a snapshot handle for the snapshot of database zDb currently
140436140461
** being read by handle db.
140437140462
*/
140438
-SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_get(
140463
+SQLITE_API int sqlite3_snapshot_get(
140439140464
sqlite3 *db,
140440140465
const char *zDb,
140441140466
sqlite3_snapshot **ppSnapshot
140442140467
){
140443140468
int rc = SQLITE_ERROR;
@@ -140468,11 +140493,11 @@
140468140493
}
140469140494
140470140495
/*
140471140496
** Open a read-transaction on the snapshot idendified by pSnapshot.
140472140497
*/
140473
-SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_open(
140498
+SQLITE_API int sqlite3_snapshot_open(
140474140499
sqlite3 *db,
140475140500
const char *zDb,
140476140501
sqlite3_snapshot *pSnapshot
140477140502
){
140478140503
int rc = SQLITE_ERROR;
@@ -140505,11 +140530,11 @@
140505140530
}
140506140531
140507140532
/*
140508140533
** Free a snapshot handle obtained from sqlite3_snapshot_get().
140509140534
*/
140510
-SQLITE_API void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){
140535
+SQLITE_API void sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){
140511140536
sqlite3_free(pSnapshot);
140512140537
}
140513140538
#endif /* SQLITE_ENABLE_SNAPSHOT */
140514140539
140515140540
/************** End of main.c ************************************************/
@@ -140659,11 +140684,11 @@
140659140684
**
140660140685
** Each call to this routine overrides any prior callbacks registered
140661140686
** on the same "db". If xNotify==0 then any prior callbacks are immediately
140662140687
** cancelled.
140663140688
*/
140664
-SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify(
140689
+SQLITE_API int sqlite3_unlock_notify(
140665140690
sqlite3 *db,
140666140691
void (*xNotify)(void **, int),
140667140692
void *pArg
140668140693
){
140669140694
int rc = SQLITE_OK;
@@ -147662,11 +147687,11 @@
147662147687
** Initialize API pointer table, if required.
147663147688
*/
147664147689
#ifdef _WIN32
147665147690
__declspec(dllexport)
147666147691
#endif
147667
-SQLITE_API int SQLITE_STDCALL sqlite3_fts3_init(
147692
+SQLITE_API int sqlite3_fts3_init(
147668147693
sqlite3 *db,
147669147694
char **pzErrMsg,
147670147695
const sqlite3_api_routines *pApi
147671147696
){
147672147697
SQLITE_EXTENSION_INIT2(pApi)
@@ -163463,11 +163488,11 @@
163463163488
}
163464163489
163465163490
/*
163466163491
** Register a new geometry function for use with the r-tree MATCH operator.
163467163492
*/
163468
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback(
163493
+SQLITE_API int sqlite3_rtree_geometry_callback(
163469163494
sqlite3 *db, /* Register SQL function on this connection */
163470163495
const char *zGeom, /* Name of the new SQL function */
163471163496
int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */
163472163497
void *pContext /* Extra data associated with the callback */
163473163498
){
@@ -163487,11 +163512,11 @@
163487163512
163488163513
/*
163489163514
** Register a new 2nd-generation geometry function for use with the
163490163515
** r-tree MATCH operator.
163491163516
*/
163492
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback(
163517
+SQLITE_API int sqlite3_rtree_query_callback(
163493163518
sqlite3 *db, /* Register SQL function on this connection */
163494163519
const char *zQueryFunc, /* Name of new SQL function */
163495163520
int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */
163496163521
void *pContext, /* Extra data passed into the callback */
163497163522
void (*xDestructor)(void*) /* Destructor for the extra data */
@@ -163512,11 +163537,11 @@
163512163537
163513163538
#if !SQLITE_CORE
163514163539
#ifdef _WIN32
163515163540
__declspec(dllexport)
163516163541
#endif
163517
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_init(
163542
+SQLITE_API int sqlite3_rtree_init(
163518163543
sqlite3 *db,
163519163544
char **pzErrMsg,
163520163545
const sqlite3_api_routines *pApi
163521163546
){
163522163547
SQLITE_EXTENSION_INIT2(pApi)
@@ -164063,11 +164088,11 @@
164063164088
164064164089
#if !SQLITE_CORE
164065164090
#ifdef _WIN32
164066164091
__declspec(dllexport)
164067164092
#endif
164068
-SQLITE_API int SQLITE_STDCALL sqlite3_icu_init(
164093
+SQLITE_API int sqlite3_icu_init(
164069164094
sqlite3 *db,
164070164095
char **pzErrMsg,
164071164096
const sqlite3_api_routines *pApi
164072164097
){
164073164098
SQLITE_EXTENSION_INIT2(pApi)
@@ -164743,11 +164768,11 @@
164743164768
** IMPORTANT NOTE FOR ZIPVFS USERS: The RBU extension works with all of
164744164769
** SQLite's built-in VFSs, including the multiplexor VFS. However it does
164745164770
** not work out of the box with zipvfs. Refer to the comment describing
164746164771
** the zipvfs_create_vfs() API below for details on using RBU with zipvfs.
164747164772
*/
164748
-SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open(
164773
+SQLITE_API sqlite3rbu *sqlite3rbu_open(
164749164774
const char *zTarget,
164750164775
const char *zRbu,
164751164776
const char *zState
164752164777
);
164753164778
@@ -164776,11 +164801,11 @@
164776164801
** As with sqlite3rbu_open(), Zipvfs users should rever to the comment
164777164802
** describing the sqlite3rbu_create_vfs() API function below for
164778164803
** a description of the complications associated with using RBU with
164779164804
** zipvfs databases.
164780164805
*/
164781
-SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum(
164806
+SQLITE_API sqlite3rbu *sqlite3rbu_vacuum(
164782164807
const char *zTarget,
164783164808
const char *zState
164784164809
);
164785164810
164786164811
/*
@@ -164812,11 +164837,11 @@
164812164837
** when sqlite3rbu_close() is called.
164813164838
**
164814164839
** Database handles returned by this function remain valid until the next
164815164840
** call to any sqlite3rbu_xxx() function other than sqlite3rbu_db().
164816164841
*/
164817
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu*, int bRbu);
164842
+SQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu*, int bRbu);
164818164843
164819164844
/*
164820164845
** Do some work towards applying the RBU update to the target db.
164821164846
**
164822164847
** Return SQLITE_DONE if the update has been completely applied, or
@@ -164826,11 +164851,11 @@
164826164851
**
164827164852
** Once a call to sqlite3rbu_step() has returned a value other than
164828164853
** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops
164829164854
** that immediately return the same value.
164830164855
*/
164831
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *pRbu);
164856
+SQLITE_API int sqlite3rbu_step(sqlite3rbu *pRbu);
164832164857
164833164858
/*
164834164859
** Force RBU to save its state to disk.
164835164860
**
164836164861
** If a power failure or application crash occurs during an update, following
@@ -164838,11 +164863,11 @@
164838164863
** was last saved. In other words, from the most recent successful call to
164839164864
** sqlite3rbu_close() or this function.
164840164865
**
164841164866
** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
164842164867
*/
164843
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *pRbu);
164868
+SQLITE_API int sqlite3rbu_savestate(sqlite3rbu *pRbu);
164844164869
164845164870
/*
164846164871
** Close an RBU handle.
164847164872
**
164848164873
** If the RBU update has been completely applied, mark the RBU database
@@ -164858,18 +164883,18 @@
164858164883
**
164859164884
** Otherwise, if no error occurs, this function returns SQLITE_OK if the
164860164885
** update has been partially applied, or SQLITE_DONE if it has been
164861164886
** completely applied.
164862164887
*/
164863
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg);
164888
+SQLITE_API int sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg);
164864164889
164865164890
/*
164866164891
** Return the total number of key-value operations (inserts, deletes or
164867164892
** updates) that have been performed on the target database since the
164868164893
** current RBU update was started.
164869164894
*/
164870
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu);
164895
+SQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu);
164871164896
164872164897
/*
164873164898
** Obtain permyriadage (permyriadage is to 10000 as percentage is to 100)
164874164899
** progress indications for the two stages of an RBU update. This API may
164875164900
** be useful for driving GUI progress indicators and similar.
@@ -164907,11 +164932,11 @@
164907164932
** permyriadage progress of the same stage. If the rbu_count table does
164908164933
** not exist, then (*pnOne) is set to -1 during stage 1. If the rbu_count
164909164934
** table exists but is not correctly populated, the value of the *pnOne
164910164935
** output variable during stage 1 is undefined.
164911164936
*/
164912
-SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo);
164937
+SQLITE_API void sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo);
164913164938
164914164939
/*
164915164940
** Obtain an indication as to the current stage of an RBU update or vacuum.
164916164941
** This function always returns one of the SQLITE_RBU_STATE_XXX constants
164917164942
** defined in this file. Return values should be interpreted as follows:
@@ -164945,11 +164970,11 @@
164945164970
#define SQLITE_RBU_STATE_MOVE 2
164946164971
#define SQLITE_RBU_STATE_CHECKPOINT 3
164947164972
#define SQLITE_RBU_STATE_DONE 4
164948164973
#define SQLITE_RBU_STATE_ERROR 5
164949164974
164950
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *pRbu);
164975
+SQLITE_API int sqlite3rbu_state(sqlite3rbu *pRbu);
164951164976
164952164977
/*
164953164978
** Create an RBU VFS named zName that accesses the underlying file-system
164954164979
** via existing VFS zParent. Or, if the zParent parameter is passed NULL,
164955164980
** then the new RBU VFS uses the default system VFS to access the file-system.
@@ -164989,21 +165014,21 @@
164989165014
** The overhead of adding the "rbu" VFS to the system is negligible for
164990165015
** non-RBU users. There is no harm in an application accessing the
164991165016
** file-system via "rbu" all the time, even if it only uses RBU functionality
164992165017
** occasionally.
164993165018
*/
164994
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent);
165019
+SQLITE_API int sqlite3rbu_create_vfs(const char *zName, const char *zParent);
164995165020
164996165021
/*
164997165022
** Deregister and destroy an RBU vfs created by an earlier call to
164998165023
** sqlite3rbu_create_vfs().
164999165024
**
165000165025
** VFS objects are not reference counted. If a VFS object is destroyed
165001165026
** before all database handles that use it have been closed, the results
165002165027
** are undefined.
165003165028
*/
165004
-SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName);
165029
+SQLITE_API void sqlite3rbu_destroy_vfs(const char *zName);
165005165030
165006165031
#if 0
165007165032
} /* end of the 'extern "C"' block */
165008165033
#endif
165009165034
@@ -168093,11 +168118,11 @@
168093168118
}
168094168119
168095168120
/*
168096168121
** Step the RBU object.
168097168122
*/
168098
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *p){
168123
+SQLITE_API int sqlite3rbu_step(sqlite3rbu *p){
168099168124
if( p ){
168100168125
switch( p->eStage ){
168101168126
case RBU_STAGE_OAL: {
168102168127
RbuObjIter *pIter = &p->objiter;
168103168128
@@ -168535,11 +168560,11 @@
168535168560
}
168536168561
168537168562
/*
168538168563
** Open and return a new RBU handle.
168539168564
*/
168540
-SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open(
168565
+SQLITE_API sqlite3rbu *sqlite3rbu_open(
168541168566
const char *zTarget,
168542168567
const char *zRbu,
168543168568
const char *zState
168544168569
){
168545168570
/* TODO: Check that zTarget and zRbu are non-NULL */
@@ -168547,11 +168572,11 @@
168547168572
}
168548168573
168549168574
/*
168550168575
** Open a handle to begin or resume an RBU VACUUM operation.
168551168576
*/
168552
-SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum(
168577
+SQLITE_API sqlite3rbu *sqlite3rbu_vacuum(
168553168578
const char *zTarget,
168554168579
const char *zState
168555168580
){
168556168581
/* TODO: Check that both arguments are non-NULL */
168557168582
return openRbuHandle(0, zTarget, zState);
@@ -168558,11 +168583,11 @@
168558168583
}
168559168584
168560168585
/*
168561168586
** Return the database handle used by pRbu.
168562168587
*/
168563
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){
168588
+SQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){
168564168589
sqlite3 *db = 0;
168565168590
if( pRbu ){
168566168591
db = (bRbu ? pRbu->dbRbu : pRbu->dbMain);
168567168592
}
168568168593
return db;
@@ -168590,11 +168615,11 @@
168590168615
}
168591168616
168592168617
/*
168593168618
** Close the RBU handle.
168594168619
*/
168595
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){
168620
+SQLITE_API int sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){
168596168621
int rc;
168597168622
if( p ){
168598168623
168599168624
/* Commit the transaction to the *-oal file. */
168600168625
if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){
@@ -168641,19 +168666,19 @@
168641168666
/*
168642168667
** Return the total number of key-value operations (inserts, deletes or
168643168668
** updates) that have been performed on the target database since the
168644168669
** current RBU update was started.
168645168670
*/
168646
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu){
168671
+SQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu){
168647168672
return pRbu->nProgress;
168648168673
}
168649168674
168650168675
/*
168651168676
** Return permyriadage progress indications for the two main stages of
168652168677
** an RBU update.
168653168678
*/
168654
-SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){
168679
+SQLITE_API void sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){
168655168680
const int MAX_PROGRESS = 10000;
168656168681
switch( p->eStage ){
168657168682
case RBU_STAGE_OAL:
168658168683
if( p->nPhaseOneStep>0 ){
168659168684
*pnOne = (int)(MAX_PROGRESS * (i64)p->nProgress/(i64)p->nPhaseOneStep);
@@ -168684,11 +168709,11 @@
168684168709
}
168685168710
168686168711
/*
168687168712
** Return the current state of the RBU vacuum or update operation.
168688168713
*/
168689
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *p){
168714
+SQLITE_API int sqlite3rbu_state(sqlite3rbu *p){
168690168715
int aRes[] = {
168691168716
0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE,
168692168717
0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE
168693168718
};
168694168719
@@ -168712,11 +168737,11 @@
168712168737
);
168713168738
return aRes[p->eStage];
168714168739
}
168715168740
}
168716168741
168717
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *p){
168742
+SQLITE_API int sqlite3rbu_savestate(sqlite3rbu *p){
168718168743
int rc = p->rc;
168719168744
if( rc==SQLITE_DONE ) return SQLITE_OK;
168720168745
168721168746
assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE );
168722168747
if( p->eStage==RBU_STAGE_OAL ){
@@ -169539,11 +169564,11 @@
169539169564
169540169565
/*
169541169566
** Deregister and destroy an RBU vfs created by an earlier call to
169542169567
** sqlite3rbu_create_vfs().
169543169568
*/
169544
-SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName){
169569
+SQLITE_API void sqlite3rbu_destroy_vfs(const char *zName){
169545169570
sqlite3_vfs *pVfs = sqlite3_vfs_find(zName);
169546169571
if( pVfs && pVfs->xOpen==rbuVfsOpen ){
169547169572
sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex);
169548169573
sqlite3_vfs_unregister(pVfs);
169549169574
sqlite3_free(pVfs);
@@ -169553,11 +169578,11 @@
169553169578
/*
169554169579
** Create an RBU VFS named zName that accesses the underlying file-system
169555169580
** via existing VFS zParent. The new object is registered as a non-default
169556169581
** VFS with SQLite before returning.
169557169582
*/
169558
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent){
169583
+SQLITE_API int sqlite3rbu_create_vfs(const char *zName, const char *zParent){
169559169584
169560169585
/* Template for VFS */
169561169586
static sqlite3_vfs vfs_template = {
169562169587
1, /* iVersion */
169563169588
0, /* szOsFile */
@@ -171798,11 +171823,11 @@
171798171823
}
171799171824
171800171825
return rc;
171801171826
}
171802171827
171803
-SQLITE_API int SQLITE_STDCALL sqlite3session_diff(
171828
+SQLITE_API int sqlite3session_diff(
171804171829
sqlite3_session *pSession,
171805171830
const char *zFrom,
171806171831
const char *zTbl,
171807171832
char **pzErrMsg
171808171833
){
@@ -171892,11 +171917,11 @@
171892171917
171893171918
/*
171894171919
** Create a session object. This session object will record changes to
171895171920
** database zDb attached to connection db.
171896171921
*/
171897
-SQLITE_API int SQLITE_STDCALL sqlite3session_create(
171922
+SQLITE_API int sqlite3session_create(
171898171923
sqlite3 *db, /* Database handle */
171899171924
const char *zDb, /* Name of db (e.g. "main") */
171900171925
sqlite3_session **ppSession /* OUT: New session object */
171901171926
){
171902171927
sqlite3_session *pNew; /* Newly allocated session object */
@@ -171954,11 +171979,11 @@
171954171979
}
171955171980
171956171981
/*
171957171982
** Delete a session object previously allocated using sqlite3session_create().
171958171983
*/
171959
-SQLITE_API void SQLITE_STDCALL sqlite3session_delete(sqlite3_session *pSession){
171984
+SQLITE_API void sqlite3session_delete(sqlite3_session *pSession){
171960171985
sqlite3 *db = pSession->db;
171961171986
sqlite3_session *pHead;
171962171987
sqlite3_session **pp;
171963171988
171964171989
/* Unlink the session from the linked list of sessions attached to the
@@ -171983,11 +172008,11 @@
171983172008
}
171984172009
171985172010
/*
171986172011
** Set a table filter on a Session Object.
171987172012
*/
171988
-SQLITE_API void SQLITE_STDCALL sqlite3session_table_filter(
172013
+SQLITE_API void sqlite3session_table_filter(
171989172014
sqlite3_session *pSession,
171990172015
int(*xFilter)(void*, const char*),
171991172016
void *pCtx /* First argument passed to xFilter */
171992172017
){
171993172018
pSession->bAutoAttach = 1;
@@ -172001,11 +172026,11 @@
172001172026
**
172002172027
** Only tables that have a PRIMARY KEY defined may be attached. It does
172003172028
** not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias)
172004172029
** or not.
172005172030
*/
172006
-SQLITE_API int SQLITE_STDCALL sqlite3session_attach(
172031
+SQLITE_API int sqlite3session_attach(
172007172032
sqlite3_session *pSession, /* Session object */
172008172033
const char *zName /* Table name */
172009172034
){
172010172035
int rc = SQLITE_OK;
172011172036
sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
@@ -172691,11 +172716,11 @@
172691172716
** session object passed as the first argument.
172692172717
**
172693172718
** It is the responsibility of the caller to eventually free the buffer
172694172719
** using sqlite3_free().
172695172720
*/
172696
-SQLITE_API int SQLITE_STDCALL sqlite3session_changeset(
172721
+SQLITE_API int sqlite3session_changeset(
172697172722
sqlite3_session *pSession, /* Session object */
172698172723
int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */
172699172724
void **ppChangeset /* OUT: Buffer containing changeset */
172700172725
){
172701172726
return sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset);
@@ -172702,11 +172727,11 @@
172702172727
}
172703172728
172704172729
/*
172705172730
** Streaming version of sqlite3session_changeset().
172706172731
*/
172707
-SQLITE_API int SQLITE_STDCALL sqlite3session_changeset_strm(
172732
+SQLITE_API int sqlite3session_changeset_strm(
172708172733
sqlite3_session *pSession,
172709172734
int (*xOutput)(void *pOut, const void *pData, int nData),
172710172735
void *pOut
172711172736
){
172712172737
return sessionGenerateChangeset(pSession, 0, xOutput, pOut, 0, 0);
@@ -172713,11 +172738,11 @@
172713172738
}
172714172739
172715172740
/*
172716172741
** Streaming version of sqlite3session_patchset().
172717172742
*/
172718
-SQLITE_API int SQLITE_STDCALL sqlite3session_patchset_strm(
172743
+SQLITE_API int sqlite3session_patchset_strm(
172719172744
sqlite3_session *pSession,
172720172745
int (*xOutput)(void *pOut, const void *pData, int nData),
172721172746
void *pOut
172722172747
){
172723172748
return sessionGenerateChangeset(pSession, 1, xOutput, pOut, 0, 0);
@@ -172728,11 +172753,11 @@
172728172753
** session object passed as the first argument.
172729172754
**
172730172755
** It is the responsibility of the caller to eventually free the buffer
172731172756
** using sqlite3_free().
172732172757
*/
172733
-SQLITE_API int SQLITE_STDCALL sqlite3session_patchset(
172758
+SQLITE_API int sqlite3session_patchset(
172734172759
sqlite3_session *pSession, /* Session object */
172735172760
int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */
172736172761
void **ppPatchset /* OUT: Buffer containing changeset */
172737172762
){
172738172763
return sessionGenerateChangeset(pSession, 1, 0, 0, pnPatchset, ppPatchset);
@@ -172739,11 +172764,11 @@
172739172764
}
172740172765
172741172766
/*
172742172767
** Enable or disable the session object passed as the first argument.
172743172768
*/
172744
-SQLITE_API int SQLITE_STDCALL sqlite3session_enable(sqlite3_session *pSession, int bEnable){
172769
+SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable){
172745172770
int ret;
172746172771
sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172747172772
if( bEnable>=0 ){
172748172773
pSession->bEnable = bEnable;
172749172774
}
@@ -172753,11 +172778,11 @@
172753172778
}
172754172779
172755172780
/*
172756172781
** Enable or disable the session object passed as the first argument.
172757172782
*/
172758
-SQLITE_API int SQLITE_STDCALL sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){
172783
+SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){
172759172784
int ret;
172760172785
sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172761172786
if( bIndirect>=0 ){
172762172787
pSession->bIndirect = bIndirect;
172763172788
}
@@ -172768,11 +172793,11 @@
172768172793
172769172794
/*
172770172795
** Return true if there have been no changes to monitored tables recorded
172771172796
** by the session object passed as the only argument.
172772172797
*/
172773
-SQLITE_API int SQLITE_STDCALL sqlite3session_isempty(sqlite3_session *pSession){
172798
+SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession){
172774172799
int ret = 0;
172775172800
SessionTable *pTab;
172776172801
172777172802
sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172778172803
for(pTab=pSession->pTable; pTab && ret==0; pTab=pTab->pNext){
@@ -172818,11 +172843,11 @@
172818172843
}
172819172844
172820172845
/*
172821172846
** Create an iterator used to iterate through the contents of a changeset.
172822172847
*/
172823
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_start(
172848
+SQLITE_API int sqlite3changeset_start(
172824172849
sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */
172825172850
int nChangeset, /* Size of buffer pChangeset in bytes */
172826172851
void *pChangeset /* Pointer to buffer containing changeset */
172827172852
){
172828172853
return sessionChangesetStart(pp, 0, 0, nChangeset, pChangeset);
@@ -172829,11 +172854,11 @@
172829172854
}
172830172855
172831172856
/*
172832172857
** Streaming version of sqlite3changeset_start().
172833172858
*/
172834
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_start_strm(
172859
+SQLITE_API int sqlite3changeset_start_strm(
172835172860
sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */
172836172861
int (*xInput)(void *pIn, void *pData, int *pnData),
172837172862
void *pIn
172838172863
){
172839172864
return sessionChangesetStart(pp, xInput, pIn, 0, 0);
@@ -173250,20 +173275,20 @@
173250173275
** or SQLITE_CORRUPT.
173251173276
**
173252173277
** This function may not be called on iterators passed to a conflict handler
173253173278
** callback by changeset_apply().
173254173279
*/
173255
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_next(sqlite3_changeset_iter *p){
173280
+SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *p){
173256173281
return sessionChangesetNext(p, 0, 0);
173257173282
}
173258173283
173259173284
/*
173260173285
** The following function extracts information on the current change
173261173286
** from a changeset iterator. It may only be called after changeset_next()
173262173287
** has returned SQLITE_ROW.
173263173288
*/
173264
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_op(
173289
+SQLITE_API int sqlite3changeset_op(
173265173290
sqlite3_changeset_iter *pIter, /* Iterator handle */
173266173291
const char **pzTab, /* OUT: Pointer to table name */
173267173292
int *pnCol, /* OUT: Number of columns in table */
173268173293
int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */
173269173294
int *pbIndirect /* OUT: True if change is indirect */
@@ -173279,11 +173304,11 @@
173279173304
** Return information regarding the PRIMARY KEY and number of columns in
173280173305
** the database table affected by the change that pIter currently points
173281173306
** to. This function may only be called after changeset_next() returns
173282173307
** SQLITE_ROW.
173283173308
*/
173284
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_pk(
173309
+SQLITE_API int sqlite3changeset_pk(
173285173310
sqlite3_changeset_iter *pIter, /* Iterator object */
173286173311
unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */
173287173312
int *pnCol /* OUT: Number of entries in output array */
173288173313
){
173289173314
*pabPK = pIter->abPK;
@@ -173302,11 +173327,11 @@
173302173327
** was not modified and is not a PK column), set *ppValue to NULL.
173303173328
**
173304173329
** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is
173305173330
** not modified. Otherwise, SQLITE_OK.
173306173331
*/
173307
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_old(
173332
+SQLITE_API int sqlite3changeset_old(
173308173333
sqlite3_changeset_iter *pIter, /* Changeset iterator */
173309173334
int iVal, /* Index of old.* value to retrieve */
173310173335
sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */
173311173336
){
173312173337
if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_DELETE ){
@@ -173330,11 +173355,11 @@
173330173355
** was not modified), set *ppValue to NULL.
173331173356
**
173332173357
** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is
173333173358
** not modified. Otherwise, SQLITE_OK.
173334173359
*/
173335
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_new(
173360
+SQLITE_API int sqlite3changeset_new(
173336173361
sqlite3_changeset_iter *pIter, /* Changeset iterator */
173337173362
int iVal, /* Index of new.* value to retrieve */
173338173363
sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */
173339173364
){
173340173365
if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_INSERT ){
@@ -173364,11 +173389,11 @@
173364173389
** containing the iVal'th value of the conflicting record.
173365173390
**
173366173391
** If value iVal is out-of-range or some other error occurs, an SQLite error
173367173392
** code is returned. Otherwise, SQLITE_OK.
173368173393
*/
173369
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_conflict(
173394
+SQLITE_API int sqlite3changeset_conflict(
173370173395
sqlite3_changeset_iter *pIter, /* Changeset iterator */
173371173396
int iVal, /* Index of conflict record value to fetch */
173372173397
sqlite3_value **ppValue /* OUT: Value from conflicting row */
173373173398
){
173374173399
if( !pIter->pConflict ){
@@ -173387,11 +173412,11 @@
173387173412
** it sets the output variable to the total number of known foreign key
173388173413
** violations in the destination database and returns SQLITE_OK.
173389173414
**
173390173415
** In all other cases this function returns SQLITE_MISUSE.
173391173416
*/
173392
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_fk_conflicts(
173417
+SQLITE_API int sqlite3changeset_fk_conflicts(
173393173418
sqlite3_changeset_iter *pIter, /* Changeset iterator */
173394173419
int *pnOut /* OUT: Number of FK violations */
173395173420
){
173396173421
if( pIter->pConflict || pIter->apValue ){
173397173422
return SQLITE_MISUSE;
@@ -173405,11 +173430,11 @@
173405173430
** Finalize an iterator allocated with sqlite3changeset_start().
173406173431
**
173407173432
** This function may not be called on iterators passed to a conflict handler
173408173433
** callback by changeset_apply().
173409173434
*/
173410
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_finalize(sqlite3_changeset_iter *p){
173435
+SQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *p){
173411173436
int rc = SQLITE_OK;
173412173437
if( p ){
173413173438
int i; /* Used to iterate through p->apValue[] */
173414173439
rc = p->rc;
173415173440
if( p->apValue ){
@@ -173579,11 +173604,11 @@
173579173604
173580173605
173581173606
/*
173582173607
** Invert a changeset object.
173583173608
*/
173584
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert(
173609
+SQLITE_API int sqlite3changeset_invert(
173585173610
int nChangeset, /* Number of bytes in input */
173586173611
const void *pChangeset, /* Input changeset */
173587173612
int *pnInverted, /* OUT: Number of bytes in output changeset */
173588173613
void **ppInverted /* OUT: Inverse of pChangeset */
173589173614
){
@@ -173598,11 +173623,11 @@
173598173623
}
173599173624
173600173625
/*
173601173626
** Streaming version of sqlite3changeset_invert().
173602173627
*/
173603
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert_strm(
173628
+SQLITE_API int sqlite3changeset_invert_strm(
173604173629
int (*xInput)(void *pIn, void *pData, int *pnData),
173605173630
void *pIn,
173606173631
int (*xOutput)(void *pOut, const void *pData, int nData),
173607173632
void *pOut
173608173633
){
@@ -174478,11 +174503,11 @@
174478174503
/*
174479174504
** Apply the changeset passed via pChangeset/nChangeset to the main database
174480174505
** attached to handle "db". Invoke the supplied conflict handler callback
174481174506
** to resolve any conflicts encountered while applying the change.
174482174507
*/
174483
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply(
174508
+SQLITE_API int sqlite3changeset_apply(
174484174509
sqlite3 *db, /* Apply change to "main" db of this handle */
174485174510
int nChangeset, /* Size of changeset in bytes */
174486174511
void *pChangeset, /* Changeset blob */
174487174512
int(*xFilter)(
174488174513
void *pCtx, /* Copy of sixth arg to _apply() */
@@ -174506,11 +174531,11 @@
174506174531
/*
174507174532
** Apply the changeset passed via xInput/pIn to the main database
174508174533
** attached to handle "db". Invoke the supplied conflict handler callback
174509174534
** to resolve any conflicts encountered while applying the change.
174510174535
*/
174511
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply_strm(
174536
+SQLITE_API int sqlite3changeset_apply_strm(
174512174537
sqlite3 *db, /* Apply change to "main" db of this handle */
174513174538
int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
174514174539
void *pIn, /* First arg for xInput */
174515174540
int(*xFilter)(
174516174541
void *pCtx, /* Copy of sixth arg to _apply() */
@@ -174841,11 +174866,11 @@
174841174866
}
174842174867
174843174868
/*
174844174869
** Allocate a new, empty, sqlite3_changegroup.
174845174870
*/
174846
-SQLITE_API int SQLITE_STDCALL sqlite3changegroup_new(sqlite3_changegroup **pp){
174871
+SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp){
174847174872
int rc = SQLITE_OK; /* Return code */
174848174873
sqlite3_changegroup *p; /* New object */
174849174874
p = (sqlite3_changegroup*)sqlite3_malloc(sizeof(sqlite3_changegroup));
174850174875
if( p==0 ){
174851174876
rc = SQLITE_NOMEM;
@@ -174858,11 +174883,11 @@
174858174883
174859174884
/*
174860174885
** Add the changeset currently stored in buffer pData, size nData bytes,
174861174886
** to changeset-group p.
174862174887
*/
174863
-SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){
174888
+SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){
174864174889
sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */
174865174890
int rc; /* Return code */
174866174891
174867174892
rc = sqlite3changeset_start(&pIter, nData, pData);
174868174893
if( rc==SQLITE_OK ){
@@ -174874,11 +174899,11 @@
174874174899
174875174900
/*
174876174901
** Obtain a buffer containing a changeset representing the concatenation
174877174902
** of all changesets added to the group so far.
174878174903
*/
174879
-SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output(
174904
+SQLITE_API int sqlite3changegroup_output(
174880174905
sqlite3_changegroup *pGrp,
174881174906
int *pnData,
174882174907
void **ppData
174883174908
){
174884174909
return sessionChangegroupOutput(pGrp, 0, 0, pnData, ppData);
@@ -174885,11 +174910,11 @@
174885174910
}
174886174911
174887174912
/*
174888174913
** Streaming versions of changegroup_add().
174889174914
*/
174890
-SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add_strm(
174915
+SQLITE_API int sqlite3changegroup_add_strm(
174891174916
sqlite3_changegroup *pGrp,
174892174917
int (*xInput)(void *pIn, void *pData, int *pnData),
174893174918
void *pIn
174894174919
){
174895174920
sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */
@@ -174904,11 +174929,11 @@
174904174929
}
174905174930
174906174931
/*
174907174932
** Streaming versions of changegroup_output().
174908174933
*/
174909
-SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output_strm(
174934
+SQLITE_API int sqlite3changegroup_output_strm(
174910174935
sqlite3_changegroup *pGrp,
174911174936
int (*xOutput)(void *pOut, const void *pData, int nData),
174912174937
void *pOut
174913174938
){
174914174939
return sessionChangegroupOutput(pGrp, xOutput, pOut, 0, 0);
@@ -174915,21 +174940,21 @@
174915174940
}
174916174941
174917174942
/*
174918174943
** Delete a changegroup object.
174919174944
*/
174920
-SQLITE_API void SQLITE_STDCALL sqlite3changegroup_delete(sqlite3_changegroup *pGrp){
174945
+SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup *pGrp){
174921174946
if( pGrp ){
174922174947
sessionDeleteTable(pGrp->pList);
174923174948
sqlite3_free(pGrp);
174924174949
}
174925174950
}
174926174951
174927174952
/*
174928174953
** Combine two changesets together.
174929174954
*/
174930
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat(
174955
+SQLITE_API int sqlite3changeset_concat(
174931174956
int nLeft, /* Number of bytes in lhs input */
174932174957
void *pLeft, /* Lhs input changeset */
174933174958
int nRight /* Number of bytes in rhs input */,
174934174959
void *pRight, /* Rhs input changeset */
174935174960
int *pnOut, /* OUT: Number of bytes in output changeset */
@@ -174954,11 +174979,11 @@
174954174979
}
174955174980
174956174981
/*
174957174982
** Streaming version of sqlite3changeset_concat().
174958174983
*/
174959
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat_strm(
174984
+SQLITE_API int sqlite3changeset_concat_strm(
174960174985
int (*xInputA)(void *pIn, void *pData, int *pnData),
174961174986
void *pInA,
174962174987
int (*xInputB)(void *pIn, void *pData, int *pnData),
174963174988
void *pInB,
174964174989
int (*xOutput)(void *pOut, const void *pData, int nData),
@@ -177186,11 +177211,11 @@
177186177211
177187177212
#ifndef SQLITE_CORE
177188177213
#ifdef _WIN32
177189177214
__declspec(dllexport)
177190177215
#endif
177191
-SQLITE_API int SQLITE_STDCALL sqlite3_json_init(
177216
+SQLITE_API int sqlite3_json_init(
177192177217
sqlite3 *db,
177193177218
char **pzErrMsg,
177194177219
const sqlite3_api_routines *pApi
177195177220
){
177196177221
SQLITE_EXTENSION_INIT2(pApi);
@@ -194018,11 +194043,11 @@
194018194043
int nArg, /* Number of args */
194019194044
sqlite3_value **apUnused /* Function arguments */
194020194045
){
194021194046
assert( nArg==0 );
194022194047
UNUSED_PARAM2(nArg, apUnused);
194023
- sqlite3_result_text(pCtx, "fts5: 2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b", -1, SQLITE_TRANSIENT);
194048
+ sqlite3_result_text(pCtx, "fts5: 2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6", -1, SQLITE_TRANSIENT);
194024194049
}
194025194050
194026194051
static int fts5Init(sqlite3 *db){
194027194052
static const sqlite3_module fts5Mod = {
194028194053
/* iVersion */ 2,
@@ -194106,11 +194131,11 @@
194106194131
*/
194107194132
#ifndef SQLITE_CORE
194108194133
#ifdef _WIN32
194109194134
__declspec(dllexport)
194110194135
#endif
194111
-SQLITE_API int SQLITE_STDCALL sqlite3_fts_init(
194136
+SQLITE_API int sqlite3_fts_init(
194112194137
sqlite3 *db,
194113194138
char **pzErrMsg,
194114194139
const sqlite3_api_routines *pApi
194115194140
){
194116194141
SQLITE_EXTENSION_INIT2(pApi);
@@ -194119,11 +194144,11 @@
194119194144
}
194120194145
194121194146
#ifdef _WIN32
194122194147
__declspec(dllexport)
194123194148
#endif
194124
-SQLITE_API int SQLITE_STDCALL sqlite3_fts5_init(
194149
+SQLITE_API int sqlite3_fts5_init(
194125194150
sqlite3 *db,
194126194151
char **pzErrMsg,
194127194152
const sqlite3_api_routines *pApi
194128194153
){
194129194154
SQLITE_EXTENSION_INIT2(pApi);
194130194155
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,17 +1,17 @@
1 /******************************************************************************
2 ** This file is an amalgamation of many separate C source files from SQLite
3 ** version 3.14.1. By combining all the individual C code files into this
4 ** single large file, the entire code can be compiled as a single translation
5 ** unit. This allows many compilers to do optimizations that would not be
6 ** possible if the files were compiled separately. Performance improvements
7 ** of 5% or more are commonly seen when SQLite is compiled as a single
8 ** translation unit.
9 **
10 ** This file is all you need to compile SQLite. To use SQLite in other
11 ** programs, you need this file and the "sqlite3.h" header file that defines
12 ** the programming interface to the SQLite library. (If you do not have
13 ** the "sqlite3.h" header file at hand, you will find a copy embedded within
14 ** the text of this file. Search for "Begin file sqlite3.h" to find the start
15 ** of the embedded sqlite3.h header file.) Additional code files may be needed
16 ** if you want a wrapper to interface SQLite with your choice of programming
17 ** language. The code for the "sqlite3" command-line shell is also in a
@@ -378,13 +378,13 @@
378 **
379 ** See also: [sqlite3_libversion()],
380 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
381 ** [sqlite_version()] and [sqlite_source_id()].
382 */
383 #define SQLITE_VERSION "3.14.1"
384 #define SQLITE_VERSION_NUMBER 3014001
385 #define SQLITE_SOURCE_ID "2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b"
386
387 /*
388 ** CAPI3REF: Run-Time Library Version Numbers
389 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
390 **
@@ -413,13 +413,13 @@
413 ** [SQLITE_SOURCE_ID] C preprocessor macro.
414 **
415 ** See also: [sqlite_version()] and [sqlite_source_id()].
416 */
417 SQLITE_API const char sqlite3_version[] = SQLITE_VERSION;
418 SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void);
419 SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void);
420 SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void);
421
422 /*
423 ** CAPI3REF: Run-Time Library Compilation Options Diagnostics
424 **
425 ** ^The sqlite3_compileoption_used() function returns 0 or 1
@@ -440,12 +440,12 @@
440 **
441 ** See also: SQL functions [sqlite_compileoption_used()] and
442 ** [sqlite_compileoption_get()] and the [compile_options pragma].
443 */
444 #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
445 SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName);
446 SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N);
447 #endif
448
449 /*
450 ** CAPI3REF: Test To See If The Library Is Threadsafe
451 **
@@ -480,11 +480,11 @@
480 ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
481 ** is unchanged by calls to sqlite3_config().)^
482 **
483 ** See the [threading mode] documentation for additional information.
484 */
485 SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void);
486
487 /*
488 ** CAPI3REF: Database Connection Handle
489 ** KEYWORDS: {database connection} {database connections}
490 **
@@ -577,12 +577,12 @@
577 ** from [sqlite3_open()], [sqlite3_open16()], or
578 ** [sqlite3_open_v2()], and not previously closed.
579 ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
580 ** argument is a harmless no-op.
581 */
582 SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*);
583 SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*);
584
585 /*
586 ** The type for a callback function.
587 ** This is legacy and deprecated. It is included for historical
588 ** compatibility and is not documented.
@@ -649,11 +649,11 @@
649 ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
650 ** <li> The application must not modify the SQL statement text passed into
651 ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
652 ** </ul>
653 */
654 SQLITE_API int SQLITE_STDCALL sqlite3_exec(
655 sqlite3*, /* An open database */
656 const char *sql, /* SQL to be evaluated */
657 int (*callback)(void*,int,char**,char**), /* Callback function */
658 void *, /* 1st argument to callback */
659 char **errmsg /* Error msg written here */
@@ -1648,14 +1648,14 @@
1648 ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied
1649 ** implementation of sqlite3_os_init() or sqlite3_os_end()
1650 ** must return [SQLITE_OK] on success and some other [error code] upon
1651 ** failure.
1652 */
1653 SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void);
1654 SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void);
1655 SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void);
1656 SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void);
1657
1658 /*
1659 ** CAPI3REF: Configuring The SQLite Library
1660 **
1661 ** The sqlite3_config() interface is used to make global configuration
@@ -1684,11 +1684,11 @@
1684 **
1685 ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
1686 ** ^If the option is unknown or SQLite is unable to set the option
1687 ** then this routine returns a non-zero [error code].
1688 */
1689 SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...);
1690
1691 /*
1692 ** CAPI3REF: Configure database connections
1693 ** METHOD: sqlite3
1694 **
@@ -1703,11 +1703,11 @@
1703 ** Subsequent arguments vary depending on the configuration verb.
1704 **
1705 ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
1706 ** the call is considered successful.
1707 */
1708 SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...);
1709
1710 /*
1711 ** CAPI3REF: Memory Allocation Routines
1712 **
1713 ** An instance of this object defines the interface between SQLite
@@ -2244,11 +2244,11 @@
2244 **
2245 ** ^The sqlite3_extended_result_codes() routine enables or disables the
2246 ** [extended result codes] feature of SQLite. ^The extended result
2247 ** codes are disabled by default for historical compatibility.
2248 */
2249 SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff);
2250
2251 /*
2252 ** CAPI3REF: Last Insert Rowid
2253 ** METHOD: sqlite3
2254 **
@@ -2296,11 +2296,11 @@
2296 ** function is running and thus changes the last insert [rowid],
2297 ** then the value returned by [sqlite3_last_insert_rowid()] is
2298 ** unpredictable and might not equal either the old or the new
2299 ** last insert [rowid].
2300 */
2301 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*);
2302
2303 /*
2304 ** CAPI3REF: Count The Number Of Rows Modified
2305 ** METHOD: sqlite3
2306 **
@@ -2349,11 +2349,11 @@
2349 **
2350 ** If a separate thread makes changes on the same database connection
2351 ** while [sqlite3_changes()] is running then the value returned
2352 ** is unpredictable and not meaningful.
2353 */
2354 SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*);
2355
2356 /*
2357 ** CAPI3REF: Total Number Of Rows Modified
2358 ** METHOD: sqlite3
2359 **
@@ -2373,11 +2373,11 @@
2373 **
2374 ** If a separate thread makes changes on the same database connection
2375 ** while [sqlite3_total_changes()] is running then the value
2376 ** returned is unpredictable and not meaningful.
2377 */
2378 SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*);
2379
2380 /*
2381 ** CAPI3REF: Interrupt A Long-Running Query
2382 ** METHOD: sqlite3
2383 **
@@ -2413,11 +2413,11 @@
2413 ** that are started after the sqlite3_interrupt() call returns.
2414 **
2415 ** If the database connection closes while [sqlite3_interrupt()]
2416 ** is running then bad things will likely happen.
2417 */
2418 SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*);
2419
2420 /*
2421 ** CAPI3REF: Determine If An SQL Statement Is Complete
2422 **
2423 ** These routines are useful during command-line input to determine if the
@@ -2448,12 +2448,12 @@
2448 ** UTF-8 string.
2449 **
2450 ** The input to [sqlite3_complete16()] must be a zero-terminated
2451 ** UTF-16 string in native byte order.
2452 */
2453 SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql);
2454 SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql);
2455
2456 /*
2457 ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
2458 ** KEYWORDS: {busy-handler callback} {busy handler}
2459 ** METHOD: sqlite3
@@ -2510,11 +2510,11 @@
2510 ** result in undefined behavior.
2511 **
2512 ** A busy handler must not close the database connection
2513 ** or [prepared statement] that invoked the busy handler.
2514 */
2515 SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2516
2517 /*
2518 ** CAPI3REF: Set A Busy Timeout
2519 ** METHOD: sqlite3
2520 **
@@ -2533,11 +2533,11 @@
2533 ** was defined (using [sqlite3_busy_handler()]) prior to calling
2534 ** this routine, that other busy handler is cleared.)^
2535 **
2536 ** See also: [PRAGMA busy_timeout]
2537 */
2538 SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms);
2539
2540 /*
2541 ** CAPI3REF: Convenience Routines For Running Queries
2542 ** METHOD: sqlite3
2543 **
@@ -2608,19 +2608,19 @@
2608 ** interface defined here. As a consequence, errors that occur in the
2609 ** wrapper layer outside of the internal [sqlite3_exec()] call are not
2610 ** reflected in subsequent calls to [sqlite3_errcode()] or
2611 ** [sqlite3_errmsg()].
2612 */
2613 SQLITE_API int SQLITE_STDCALL sqlite3_get_table(
2614 sqlite3 *db, /* An open database */
2615 const char *zSql, /* SQL to be evaluated */
2616 char ***pazResult, /* Results of the query */
2617 int *pnRow, /* Number of result rows written here */
2618 int *pnColumn, /* Number of result columns written here */
2619 char **pzErrmsg /* Error msg written here */
2620 );
2621 SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result);
2622
2623 /*
2624 ** CAPI3REF: Formatted String Printing Functions
2625 **
2626 ** These routines are work-alikes of the "printf()" family of functions
@@ -2722,14 +2722,14 @@
2722 **
2723 ** ^(The "%z" formatting option works like "%s" but with the
2724 ** addition that after the string has been read and copied into
2725 ** the result, [sqlite3_free()] is called on the input string.)^
2726 */
2727 SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...);
2728 SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list);
2729 SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...);
2730 SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list);
2731
2732 /*
2733 ** CAPI3REF: Memory Allocation Subsystem
2734 **
2735 ** The SQLite core uses these three routines for all of its own
@@ -2815,16 +2815,16 @@
2815 **
2816 ** The application must not read or write any part of
2817 ** a block of memory after it has been released using
2818 ** [sqlite3_free()] or [sqlite3_realloc()].
2819 */
2820 SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int);
2821 SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64);
2822 SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int);
2823 SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64);
2824 SQLITE_API void SQLITE_STDCALL sqlite3_free(void*);
2825 SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*);
2826
2827 /*
2828 ** CAPI3REF: Memory Allocator Statistics
2829 **
2830 ** SQLite provides these two interfaces for reporting on the status
@@ -2845,12 +2845,12 @@
2845 ** [sqlite3_memory_used()] if and only if the parameter to
2846 ** [sqlite3_memory_highwater()] is true. ^The value returned
2847 ** by [sqlite3_memory_highwater(1)] is the high-water mark
2848 ** prior to the reset.
2849 */
2850 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void);
2851 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag);
2852
2853 /*
2854 ** CAPI3REF: Pseudo-Random Number Generator
2855 **
2856 ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
@@ -2869,11 +2869,11 @@
2869 ** ^If the previous call to this routine had an N of 1 or more and a
2870 ** non-NULL P then the pseudo-randomness is generated
2871 ** internally and without recourse to the [sqlite3_vfs] xRandomness
2872 ** method.
2873 */
2874 SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P);
2875
2876 /*
2877 ** CAPI3REF: Compile-Time Authorization Callbacks
2878 ** METHOD: sqlite3
2879 **
@@ -2952,11 +2952,11 @@
2952 ** [sqlite3_prepare()] or its variants. Authorization is not
2953 ** performed during statement evaluation in [sqlite3_step()], unless
2954 ** as stated in the previous paragraph, sqlite3_step() invokes
2955 ** sqlite3_prepare_v2() to reprepare a statement after a schema change.
2956 */
2957 SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
2958 sqlite3*,
2959 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
2960 void *pUserData
2961 );
2962
@@ -3060,13 +3060,13 @@
3060 ** digits in the time are meaningless. Future versions of SQLite
3061 ** might provide greater resolution on the profiler callback. The
3062 ** sqlite3_profile() function is considered experimental and is
3063 ** subject to change in future versions of SQLite.
3064 */
3065 SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*,
3066 void(*xTrace)(void*,const char*), void*);
3067 SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_profile(sqlite3*,
3068 void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
3069
3070 /*
3071 ** CAPI3REF: SQL Trace Event Codes
3072 ** KEYWORDS: SQLITE_TRACE
@@ -3151,11 +3151,11 @@
3151 **
3152 ** The sqlite3_trace_v2() interface is intended to replace the legacy
3153 ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
3154 ** are deprecated.
3155 */
3156 SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2(
3157 sqlite3*,
3158 unsigned uMask,
3159 int(*xCallback)(unsigned,void*,void*,void*),
3160 void *pCtx
3161 );
@@ -3190,11 +3190,11 @@
3190 ** the database connection that invoked the progress handler.
3191 ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
3192 ** database connections for the meaning of "modify" in this paragraph.
3193 **
3194 */
3195 SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
3196
3197 /*
3198 ** CAPI3REF: Opening A New Database Connection
3199 ** CONSTRUCTOR: sqlite3
3200 **
@@ -3419,19 +3419,19 @@
3419 ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
3420 ** features that require the use of temporary files may fail.
3421 **
3422 ** See also: [sqlite3_temp_directory]
3423 */
3424 SQLITE_API int SQLITE_STDCALL sqlite3_open(
3425 const char *filename, /* Database filename (UTF-8) */
3426 sqlite3 **ppDb /* OUT: SQLite db handle */
3427 );
3428 SQLITE_API int SQLITE_STDCALL sqlite3_open16(
3429 const void *filename, /* Database filename (UTF-16) */
3430 sqlite3 **ppDb /* OUT: SQLite db handle */
3431 );
3432 SQLITE_API int SQLITE_STDCALL sqlite3_open_v2(
3433 const char *filename, /* Database filename (UTF-8) */
3434 sqlite3 **ppDb, /* OUT: SQLite db handle */
3435 int flags, /* Flags */
3436 const char *zVfs /* Name of VFS module to use */
3437 );
@@ -3473,13 +3473,13 @@
3473 ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and
3474 ** is not a database file pathname pointer that SQLite passed into the xOpen
3475 ** VFS method, then the behavior of this routine is undefined and probably
3476 ** undesirable.
3477 */
3478 SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3479 SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3480 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
3481
3482
3483 /*
3484 ** CAPI3REF: Error Codes And Messages
3485 ** METHOD: sqlite3
@@ -3519,15 +3519,15 @@
3519 **
3520 ** If an interface fails with SQLITE_MISUSE, that means the interface
3521 ** was invoked incorrectly by the application. In that case, the
3522 ** error code and message may or may not be set.
3523 */
3524 SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db);
3525 SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db);
3526 SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*);
3527 SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*);
3528 SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int);
3529
3530 /*
3531 ** CAPI3REF: Prepared Statement Object
3532 ** KEYWORDS: {prepared statement} {prepared statements}
3533 **
@@ -3591,11 +3591,11 @@
3591 ** created by an untrusted script can be contained using the
3592 ** [max_page_count] [PRAGMA].
3593 **
3594 ** New run-time limit categories may be added in future releases.
3595 */
3596 SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal);
3597
3598 /*
3599 ** CAPI3REF: Run-Time Limit Categories
3600 ** KEYWORDS: {limit category} {*limit categories}
3601 **
@@ -3743,32 +3743,32 @@
3743 ** or [GLOB] operator or if the parameter is compared to an indexed column
3744 ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
3745 ** </li>
3746 ** </ol>
3747 */
3748 SQLITE_API int SQLITE_STDCALL sqlite3_prepare(
3749 sqlite3 *db, /* Database handle */
3750 const char *zSql, /* SQL statement, UTF-8 encoded */
3751 int nByte, /* Maximum length of zSql in bytes. */
3752 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3753 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3754 );
3755 SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2(
3756 sqlite3 *db, /* Database handle */
3757 const char *zSql, /* SQL statement, UTF-8 encoded */
3758 int nByte, /* Maximum length of zSql in bytes. */
3759 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3760 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3761 );
3762 SQLITE_API int SQLITE_STDCALL sqlite3_prepare16(
3763 sqlite3 *db, /* Database handle */
3764 const void *zSql, /* SQL statement, UTF-16 encoded */
3765 int nByte, /* Maximum length of zSql in bytes. */
3766 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3767 const void **pzTail /* OUT: Pointer to unused portion of zSql */
3768 );
3769 SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
3770 sqlite3 *db, /* Database handle */
3771 const void *zSql, /* SQL statement, UTF-16 encoded */
3772 int nByte, /* Maximum length of zSql in bytes. */
3773 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3774 const void **pzTail /* OUT: Pointer to unused portion of zSql */
@@ -3803,12 +3803,12 @@
3803 ** automatically freed when the prepared statement is finalized.
3804 ** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
3805 ** is obtained from [sqlite3_malloc()] and must be free by the application
3806 ** by passing it to [sqlite3_free()].
3807 */
3808 SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt);
3809 SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt);
3810
3811 /*
3812 ** CAPI3REF: Determine If An SQL Statement Writes The Database
3813 ** METHOD: sqlite3_stmt
3814 **
@@ -3836,11 +3836,11 @@
3836 ** database. ^The [ATTACH] and [DETACH] statements also cause
3837 ** sqlite3_stmt_readonly() to return true since, while those statements
3838 ** change the configuration of a database connection, they do not make
3839 ** changes to the content of the database files on disk.
3840 */
3841 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
3842
3843 /*
3844 ** CAPI3REF: Determine If A Prepared Statement Has Been Reset
3845 ** METHOD: sqlite3_stmt
3846 **
@@ -3857,11 +3857,11 @@
3857 ** to locate all prepared statements associated with a database
3858 ** connection that are in need of being reset. This can be used,
3859 ** for example, in diagnostic routines to search for prepared
3860 ** statements that are holding a transaction open.
3861 */
3862 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*);
3863
3864 /*
3865 ** CAPI3REF: Dynamically Typed Value Object
3866 ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
3867 **
@@ -4021,24 +4021,24 @@
4021 ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
4022 **
4023 ** See also: [sqlite3_bind_parameter_count()],
4024 ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
4025 */
4026 SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
4027 SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
4028 void(*)(void*));
4029 SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double);
4030 SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int);
4031 SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
4032 SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int);
4033 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
4034 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
4035 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
4036 void(*)(void*), unsigned char encoding);
4037 SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
4038 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
4039 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
4040
4041 /*
4042 ** CAPI3REF: Number Of SQL Parameters
4043 ** METHOD: sqlite3_stmt
4044 **
@@ -4055,11 +4055,11 @@
4055 **
4056 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
4057 ** [sqlite3_bind_parameter_name()], and
4058 ** [sqlite3_bind_parameter_index()].
4059 */
4060 SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*);
4061
4062 /*
4063 ** CAPI3REF: Name Of A Host Parameter
4064 ** METHOD: sqlite3_stmt
4065 **
@@ -4083,11 +4083,11 @@
4083 **
4084 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
4085 ** [sqlite3_bind_parameter_count()], and
4086 ** [sqlite3_bind_parameter_index()].
4087 */
4088 SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int);
4089
4090 /*
4091 ** CAPI3REF: Index Of A Parameter With A Given Name
4092 ** METHOD: sqlite3_stmt
4093 **
@@ -4100,21 +4100,21 @@
4100 **
4101 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
4102 ** [sqlite3_bind_parameter_count()], and
4103 ** [sqlite3_bind_parameter_name()].
4104 */
4105 SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
4106
4107 /*
4108 ** CAPI3REF: Reset All Bindings On A Prepared Statement
4109 ** METHOD: sqlite3_stmt
4110 **
4111 ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
4112 ** the [sqlite3_bind_blob | bindings] on a [prepared statement].
4113 ** ^Use this routine to reset all host parameters to NULL.
4114 */
4115 SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*);
4116
4117 /*
4118 ** CAPI3REF: Number Of Columns In A Result Set
4119 ** METHOD: sqlite3_stmt
4120 **
@@ -4122,11 +4122,11 @@
4122 ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
4123 ** statement that does not return data (for example an [UPDATE]).
4124 **
4125 ** See also: [sqlite3_data_count()]
4126 */
4127 SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt);
4128
4129 /*
4130 ** CAPI3REF: Column Names In A Result Set
4131 ** METHOD: sqlite3_stmt
4132 **
@@ -4151,12 +4151,12 @@
4151 ** ^The name of a result column is the value of the "AS" clause for
4152 ** that column, if there is an AS clause. If there is no AS clause
4153 ** then the name of the column is unspecified and may change from
4154 ** one release of SQLite to the next.
4155 */
4156 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N);
4157 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N);
4158
4159 /*
4160 ** CAPI3REF: Source Of Data In A Query Result
4161 ** METHOD: sqlite3_stmt
4162 **
@@ -4200,16 +4200,16 @@
4200 ** If two or more threads call one or more
4201 ** [sqlite3_column_database_name | column metadata interfaces]
4202 ** for the same [prepared statement] and result column
4203 ** at the same time then the results are undefined.
4204 */
4205 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int);
4206 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int);
4207 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int);
4208 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int);
4209 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int);
4210 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int);
4211
4212 /*
4213 ** CAPI3REF: Declared Datatype Of A Query Result
4214 ** METHOD: sqlite3_stmt
4215 **
@@ -4237,12 +4237,12 @@
4237 ** data stored in that column is of the declared type. SQLite is
4238 ** strongly typed, but the typing is dynamic not static. ^Type
4239 ** is associated with individual values, not with the containers
4240 ** used to hold those values.
4241 */
4242 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int);
4243 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int);
4244
4245 /*
4246 ** CAPI3REF: Evaluate An SQL Statement
4247 ** METHOD: sqlite3_stmt
4248 **
@@ -4318,11 +4318,11 @@
4318 ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
4319 ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
4320 ** then the more specific [error codes] are returned directly
4321 ** by sqlite3_step(). The use of the "v2" interface is recommended.
4322 */
4323 SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*);
4324
4325 /*
4326 ** CAPI3REF: Number of columns in a result set
4327 ** METHOD: sqlite3_stmt
4328 **
@@ -4339,11 +4339,11 @@
4339 ** where it always returns zero since each step of that multi-step
4340 ** pragma returns 0 columns of data.
4341 **
4342 ** See also: [sqlite3_column_count()]
4343 */
4344 SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
4345
4346 /*
4347 ** CAPI3REF: Fundamental Datatypes
4348 ** KEYWORDS: SQLITE_TEXT
4349 **
@@ -4529,20 +4529,20 @@
4529 ** of these routines, a default value is returned. The default value
4530 ** is either the integer 0, the floating point number 0.0, or a NULL
4531 ** pointer. Subsequent calls to [sqlite3_errcode()] will return
4532 ** [SQLITE_NOMEM].)^
4533 */
4534 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol);
4535 SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4536 SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4537 SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol);
4538 SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol);
4539 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol);
4540 SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol);
4541 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol);
4542 SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol);
4543 SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol);
4544
4545 /*
4546 ** CAPI3REF: Destroy A Prepared Statement Object
4547 ** DESTRUCTOR: sqlite3_stmt
4548 **
@@ -4566,11 +4566,11 @@
4566 ** resource leaks. It is a grievous error for the application to try to use
4567 ** a prepared statement after it has been finalized. Any use of a prepared
4568 ** statement after it has been finalized can result in undefined and
4569 ** undesirable behavior such as segfaults and heap corruption.
4570 */
4571 SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt);
4572
4573 /*
4574 ** CAPI3REF: Reset A Prepared Statement Object
4575 ** METHOD: sqlite3_stmt
4576 **
@@ -4593,11 +4593,11 @@
4593 ** [sqlite3_reset(S)] returns an appropriate [error code].
4594 **
4595 ** ^The [sqlite3_reset(S)] interface does not change the values
4596 ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
4597 */
4598 SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt);
4599
4600 /*
4601 ** CAPI3REF: Create Or Redefine SQL Functions
4602 ** KEYWORDS: {function creation routines}
4603 ** KEYWORDS: {application-defined SQL function}
@@ -4693,31 +4693,31 @@
4693 ** ^An application-defined function is permitted to call other
4694 ** SQLite interfaces. However, such calls must not
4695 ** close the database connection nor finalize or reset the prepared
4696 ** statement in which the function is running.
4697 */
4698 SQLITE_API int SQLITE_STDCALL sqlite3_create_function(
4699 sqlite3 *db,
4700 const char *zFunctionName,
4701 int nArg,
4702 int eTextRep,
4703 void *pApp,
4704 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4705 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4706 void (*xFinal)(sqlite3_context*)
4707 );
4708 SQLITE_API int SQLITE_STDCALL sqlite3_create_function16(
4709 sqlite3 *db,
4710 const void *zFunctionName,
4711 int nArg,
4712 int eTextRep,
4713 void *pApp,
4714 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4715 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4716 void (*xFinal)(sqlite3_context*)
4717 );
4718 SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2(
4719 sqlite3 *db,
4720 const char *zFunctionName,
4721 int nArg,
4722 int eTextRep,
4723 void *pApp,
@@ -4759,16 +4759,16 @@
4759 ** to be supported. However, new applications should avoid
4760 ** the use of these functions. To encourage programmers to avoid
4761 ** these functions, we will not explain what they do.
4762 */
4763 #ifndef SQLITE_OMIT_DEPRECATED
4764 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*);
4765 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*);
4766 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4767 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void);
4768 SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void);
4769 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
4770 void*,sqlite3_int64);
4771 #endif
4772
4773 /*
4774 ** CAPI3REF: Obtaining SQL Values
@@ -4814,22 +4814,22 @@
4814 ** or [sqlite3_value_text16()].
4815 **
4816 ** These routines must be called from the same thread as
4817 ** the SQL function that supplied the [sqlite3_value*] parameters.
4818 */
4819 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*);
4820 SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*);
4821 SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*);
4822 SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*);
4823 SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*);
4824 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*);
4825 SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*);
4826 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*);
4827 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*);
4828 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*);
4829 SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*);
4830 SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*);
4831
4832 /*
4833 ** CAPI3REF: Finding The Subtype Of SQL Values
4834 ** METHOD: sqlite3_value
4835 **
@@ -4841,11 +4841,11 @@
4841 **
4842 ** SQLite makes no use of subtype itself. It merely passes the subtype
4843 ** from the result of one [application-defined SQL function] into the
4844 ** input of another.
4845 */
4846 SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*);
4847
4848 /*
4849 ** CAPI3REF: Copy And Free SQL Values
4850 ** METHOD: sqlite3_value
4851 **
@@ -4857,12 +4857,12 @@
4857 **
4858 ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
4859 ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
4860 ** then sqlite3_value_free(V) is a harmless no-op.
4861 */
4862 SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*);
4863 SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*);
4864
4865 /*
4866 ** CAPI3REF: Obtain Aggregate Function Context
4867 ** METHOD: sqlite3_context
4868 **
@@ -4903,11 +4903,11 @@
4903 ** function.
4904 **
4905 ** This routine must be called from the same thread in which
4906 ** the aggregate SQL function is running.
4907 */
4908 SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes);
4909
4910 /*
4911 ** CAPI3REF: User Data For Functions
4912 ** METHOD: sqlite3_context
4913 **
@@ -4918,11 +4918,11 @@
4918 ** registered the application defined function.
4919 **
4920 ** This routine must be called from the same thread in which
4921 ** the application-defined function is running.
4922 */
4923 SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*);
4924
4925 /*
4926 ** CAPI3REF: Database Connection For Functions
4927 ** METHOD: sqlite3_context
4928 **
@@ -4930,11 +4930,11 @@
4930 ** the pointer to the [database connection] (the 1st parameter)
4931 ** of the [sqlite3_create_function()]
4932 ** and [sqlite3_create_function16()] routines that originally
4933 ** registered the application defined function.
4934 */
4935 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*);
4936
4937 /*
4938 ** CAPI3REF: Function Auxiliary Data
4939 ** METHOD: sqlite3_context
4940 **
@@ -4984,12 +4984,12 @@
4984 ** values and [parameters] and expressions composed from the same.)^
4985 **
4986 ** These routines must be called from the same thread in which
4987 ** the SQL function is running.
4988 */
4989 SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N);
4990 SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
4991
4992
4993 /*
4994 ** CAPI3REF: Constants Defining Special Destructor Behavior
4995 **
@@ -5121,31 +5121,31 @@
5121 **
5122 ** If these routines are called from within the different thread
5123 ** than the one containing the application-defined function that received
5124 ** the [sqlite3_context] pointer, the results are undefined.
5125 */
5126 SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
5127 SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*,
5128 sqlite3_uint64,void(*)(void*));
5129 SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double);
5130 SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int);
5131 SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int);
5132 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*);
5133 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*);
5134 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int);
5135 SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int);
5136 SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
5137 SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*);
5138 SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
5139 SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
5140 void(*)(void*), unsigned char encoding);
5141 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
5142 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
5143 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
5144 SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
5145 SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
5146 SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
5147
5148
5149 /*
5150 ** CAPI3REF: Setting The Subtype Of An SQL Function
5151 ** METHOD: sqlite3_context
@@ -5156,11 +5156,11 @@
5156 ** of the subtype T are preserved in current versions of SQLite;
5157 ** higher order bits are discarded.
5158 ** The number of subtype bytes preserved by SQLite might increase
5159 ** in future releases of SQLite.
5160 */
5161 SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int);
5162
5163 /*
5164 ** CAPI3REF: Define New Collating Sequences
5165 ** METHOD: sqlite3
5166 **
@@ -5238,26 +5238,26 @@
5238 ** is unfortunate but cannot be changed without breaking backwards
5239 ** compatibility.
5240 **
5241 ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
5242 */
5243 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation(
5244 sqlite3*,
5245 const char *zName,
5246 int eTextRep,
5247 void *pArg,
5248 int(*xCompare)(void*,int,const void*,int,const void*)
5249 );
5250 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2(
5251 sqlite3*,
5252 const char *zName,
5253 int eTextRep,
5254 void *pArg,
5255 int(*xCompare)(void*,int,const void*,int,const void*),
5256 void(*xDestroy)(void*)
5257 );
5258 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16(
5259 sqlite3*,
5260 const void *zName,
5261 int eTextRep,
5262 void *pArg,
5263 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -5288,16 +5288,16 @@
5288 **
5289 ** The callback function should register the desired collation using
5290 ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
5291 ** [sqlite3_create_collation_v2()].
5292 */
5293 SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed(
5294 sqlite3*,
5295 void*,
5296 void(*)(void*,sqlite3*,int eTextRep,const char*)
5297 );
5298 SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16(
5299 sqlite3*,
5300 void*,
5301 void(*)(void*,sqlite3*,int eTextRep,const void*)
5302 );
5303
@@ -5307,15 +5307,15 @@
5307 ** called right after sqlite3_open().
5308 **
5309 ** The code to implement this API is not available in the public release
5310 ** of SQLite.
5311 */
5312 SQLITE_API int SQLITE_STDCALL sqlite3_key(
5313 sqlite3 *db, /* Database to be rekeyed */
5314 const void *pKey, int nKey /* The key */
5315 );
5316 SQLITE_API int SQLITE_STDCALL sqlite3_key_v2(
5317 sqlite3 *db, /* Database to be rekeyed */
5318 const char *zDbName, /* Name of the database */
5319 const void *pKey, int nKey /* The key */
5320 );
5321
@@ -5325,35 +5325,35 @@
5325 ** database is decrypted.
5326 **
5327 ** The code to implement this API is not available in the public release
5328 ** of SQLite.
5329 */
5330 SQLITE_API int SQLITE_STDCALL sqlite3_rekey(
5331 sqlite3 *db, /* Database to be rekeyed */
5332 const void *pKey, int nKey /* The new key */
5333 );
5334 SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2(
5335 sqlite3 *db, /* Database to be rekeyed */
5336 const char *zDbName, /* Name of the database */
5337 const void *pKey, int nKey /* The new key */
5338 );
5339
5340 /*
5341 ** Specify the activation key for a SEE database. Unless
5342 ** activated, none of the SEE routines will work.
5343 */
5344 SQLITE_API void SQLITE_STDCALL sqlite3_activate_see(
5345 const char *zPassPhrase /* Activation phrase */
5346 );
5347 #endif
5348
5349 #ifdef SQLITE_ENABLE_CEROD
5350 /*
5351 ** Specify the activation key for a CEROD database. Unless
5352 ** activated, none of the CEROD routines will work.
5353 */
5354 SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod(
5355 const char *zPassPhrase /* Activation phrase */
5356 );
5357 #endif
5358
5359 /*
@@ -5371,11 +5371,11 @@
5371 ** method of the default [sqlite3_vfs] object. If the xSleep() method
5372 ** of the default VFS is not implemented correctly, or not implemented at
5373 ** all, then the behavior of sqlite3_sleep() may deviate from the description
5374 ** in the previous paragraphs.
5375 */
5376 SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int);
5377
5378 /*
5379 ** CAPI3REF: Name Of The Folder Holding Temporary Files
5380 **
5381 ** ^(If this global variable is made to point to a string which is
@@ -5490,11 +5490,11 @@
5490 **
5491 ** If another thread changes the autocommit status of the database
5492 ** connection while this routine is running, then the return value
5493 ** is undefined.
5494 */
5495 SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*);
5496
5497 /*
5498 ** CAPI3REF: Find The Database Handle Of A Prepared Statement
5499 ** METHOD: sqlite3_stmt
5500 **
@@ -5503,11 +5503,11 @@
5503 ** returned by sqlite3_db_handle is the same [database connection]
5504 ** that was the first argument
5505 ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
5506 ** create the statement in the first place.
5507 */
5508 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*);
5509
5510 /*
5511 ** CAPI3REF: Return The Filename For A Database Connection
5512 ** METHOD: sqlite3
5513 **
@@ -5520,21 +5520,21 @@
5520 ** ^The filename returned by this function is the output of the
5521 ** xFullPathname method of the [VFS]. ^In other words, the filename
5522 ** will be an absolute pathname, even if the filename used
5523 ** to open the database originally was a URI or relative pathname.
5524 */
5525 SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName);
5526
5527 /*
5528 ** CAPI3REF: Determine if a database is read-only
5529 ** METHOD: sqlite3
5530 **
5531 ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N
5532 ** of connection D is read-only, 0 if it is read/write, or -1 if N is not
5533 ** the name of a database on connection D.
5534 */
5535 SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
5536
5537 /*
5538 ** CAPI3REF: Find the next prepared statement
5539 ** METHOD: sqlite3
5540 **
@@ -5546,11 +5546,11 @@
5546 **
5547 ** The [database connection] pointer D in a call to
5548 ** [sqlite3_next_stmt(D,S)] must refer to an open database
5549 ** connection and in particular must not be a NULL pointer.
5550 */
5551 SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
5552
5553 /*
5554 ** CAPI3REF: Commit And Rollback Notification Callbacks
5555 ** METHOD: sqlite3
5556 **
@@ -5595,12 +5595,12 @@
5595 ** ^The rollback callback is not invoked if a transaction is
5596 ** automatically rolled back because the database connection is closed.
5597 **
5598 ** See also the [sqlite3_update_hook()] interface.
5599 */
5600 SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5601 SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5602
5603 /*
5604 ** CAPI3REF: Data Change Notification Callbacks
5605 ** METHOD: sqlite3
5606 **
@@ -5647,11 +5647,11 @@
5647 ** the first call on D.
5648 **
5649 ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
5650 ** and [sqlite3_preupdate_hook()] interfaces.
5651 */
5652 SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
5653 sqlite3*,
5654 void(*)(void *,int ,char const *,char const *,sqlite3_int64),
5655 void*
5656 );
5657
@@ -5687,11 +5687,11 @@
5687 ** This interface is threadsafe on processors where writing a
5688 ** 32-bit integer is atomic.
5689 **
5690 ** See Also: [SQLite Shared-Cache Mode]
5691 */
5692 SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int);
5693
5694 /*
5695 ** CAPI3REF: Attempt To Free Heap Memory
5696 **
5697 ** ^The sqlite3_release_memory() interface attempts to free N bytes
@@ -5703,11 +5703,11 @@
5703 ** ^The sqlite3_release_memory() routine is a no-op returning zero
5704 ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5705 **
5706 ** See also: [sqlite3_db_release_memory()]
5707 */
5708 SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int);
5709
5710 /*
5711 ** CAPI3REF: Free Memory Used By A Database Connection
5712 ** METHOD: sqlite3
5713 **
@@ -5717,11 +5717,11 @@
5717 ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is
5718 ** omitted.
5719 **
5720 ** See also: [sqlite3_release_memory()]
5721 */
5722 SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*);
5723
5724 /*
5725 ** CAPI3REF: Impose A Limit On Heap Size
5726 **
5727 ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
@@ -5769,11 +5769,11 @@
5769 ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5770 **
5771 ** The circumstances under which SQLite will enforce the soft heap limit may
5772 ** changes in future releases of SQLite.
5773 */
5774 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N);
5775
5776 /*
5777 ** CAPI3REF: Deprecated Soft Heap Limit Interface
5778 ** DEPRECATED
5779 **
@@ -5780,11 +5780,11 @@
5780 ** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
5781 ** interface. This routine is provided for historical compatibility
5782 ** only. All new applications should use the
5783 ** [sqlite3_soft_heap_limit64()] interface rather than this one.
5784 */
5785 SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N);
5786
5787
5788 /*
5789 ** CAPI3REF: Extract Metadata About A Column Of A Table
5790 ** METHOD: sqlite3
@@ -5850,11 +5850,11 @@
5850 **
5851 ** ^This function causes all database schemas to be read from disk and
5852 ** parsed, if that has not already been done, and returns an error if
5853 ** any errors are encountered while loading the schema.
5854 */
5855 SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata(
5856 sqlite3 *db, /* Connection handle */
5857 const char *zDbName, /* Database name or NULL */
5858 const char *zTableName, /* Table name */
5859 const char *zColumnName, /* Column name */
5860 char const **pzDataType, /* OUTPUT: Declared data type */
@@ -5906,11 +5906,11 @@
5906 ** disabled and prevent SQL injections from giving attackers
5907 ** access to extension loading capabilities.
5908 **
5909 ** See also the [load_extension() SQL function].
5910 */
5911 SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
5912 sqlite3 *db, /* Load the extension into this database connection */
5913 const char *zFile, /* Name of the shared library containing extension */
5914 const char *zProc, /* Entry point. Derived from zFile if 0 */
5915 char **pzErrMsg /* Put error message here if not 0 */
5916 );
@@ -5938,11 +5938,11 @@
5938 ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
5939 ** rather than this interface, so the [load_extension()] SQL function
5940 ** remains disabled. This will prevent SQL injections from giving attackers
5941 ** access to extension loading capabilities.
5942 */
5943 SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5944
5945 /*
5946 ** CAPI3REF: Automatically Load Statically Linked Extensions
5947 **
5948 ** ^This interface causes the xEntryPoint() function to be invoked for
@@ -5976,11 +5976,11 @@
5976 ** will be called more than once for each database connection that is opened.
5977 **
5978 ** See also: [sqlite3_reset_auto_extension()]
5979 ** and [sqlite3_cancel_auto_extension()]
5980 */
5981 SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void));
5982
5983 /*
5984 ** CAPI3REF: Cancel Automatic Extension Loading
5985 **
5986 ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the
@@ -5988,19 +5988,19 @@
5988 ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)]
5989 ** routine returns 1 if initialization routine X was successfully
5990 ** unregistered and it returns 0 if X was not on the list of initialization
5991 ** routines.
5992 */
5993 SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
5994
5995 /*
5996 ** CAPI3REF: Reset Automatic Extension Loading
5997 **
5998 ** ^This interface disables all automatic extensions previously
5999 ** registered using [sqlite3_auto_extension()].
6000 */
6001 SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void);
6002
6003 /*
6004 ** The interface to the virtual-table mechanism is currently considered
6005 ** to be experimental. The interface might change in incompatible ways.
6006 ** If this is a problem for you, do not use the interface at this time.
@@ -6241,17 +6241,17 @@
6241 ** be invoked if the call to sqlite3_create_module_v2() fails.
6242 ** ^The sqlite3_create_module()
6243 ** interface is equivalent to sqlite3_create_module_v2() with a NULL
6244 ** destructor.
6245 */
6246 SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
6247 sqlite3 *db, /* SQLite connection to register module with */
6248 const char *zName, /* Name of the module */
6249 const sqlite3_module *p, /* Methods for the module */
6250 void *pClientData /* Client data for xCreate/xConnect */
6251 );
6252 SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
6253 sqlite3 *db, /* SQLite connection to register module with */
6254 const char *zName, /* Name of the module */
6255 const sqlite3_module *p, /* Methods for the module */
6256 void *pClientData, /* Client data for xCreate/xConnect */
6257 void(*xDestroy)(void*) /* Module destructor function */
@@ -6310,11 +6310,11 @@
6310 ** ^The [xCreate] and [xConnect] methods of a
6311 ** [virtual table module] call this interface
6312 ** to declare the format (the names and datatypes of the columns) of
6313 ** the virtual tables they implement.
6314 */
6315 SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL);
6316
6317 /*
6318 ** CAPI3REF: Overload A Function For A Virtual Table
6319 ** METHOD: sqlite3
6320 **
@@ -6329,11 +6329,11 @@
6329 ** of the new function always causes an exception to be thrown. So
6330 ** the new function is not good for anything by itself. Its only
6331 ** purpose is to be a placeholder function that can be overloaded
6332 ** by a [virtual table].
6333 */
6334 SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
6335
6336 /*
6337 ** The interface to the virtual-table mechanism defined above (back up
6338 ** to a comment remarkably similar to this one) is currently considered
6339 ** to be experimental. The interface might change in incompatible ways.
@@ -6428,11 +6428,11 @@
6428 ** zero-filled blob to read or write using the incremental-blob interface.
6429 **
6430 ** To avoid a resource leak, every open [BLOB handle] should eventually
6431 ** be released by a call to [sqlite3_blob_close()].
6432 */
6433 SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
6434 sqlite3*,
6435 const char *zDb,
6436 const char *zTable,
6437 const char *zColumn,
6438 sqlite3_int64 iRow,
@@ -6461,11 +6461,11 @@
6461 ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
6462 ** always returns zero.
6463 **
6464 ** ^This function sets the database handle error code and message.
6465 */
6466 SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
6467
6468 /*
6469 ** CAPI3REF: Close A BLOB Handle
6470 ** DESTRUCTOR: sqlite3_blob
6471 **
@@ -6484,11 +6484,11 @@
6484 ** with a null pointer (such as would be returned by a failed call to
6485 ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
6486 ** is passed a valid open blob handle, the values returned by the
6487 ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
6488 */
6489 SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *);
6490
6491 /*
6492 ** CAPI3REF: Return The Size Of An Open BLOB
6493 ** METHOD: sqlite3_blob
6494 **
@@ -6500,11 +6500,11 @@
6500 ** This routine only works on a [BLOB handle] which has been created
6501 ** by a prior successful call to [sqlite3_blob_open()] and which has not
6502 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6503 ** to this routine results in undefined and probably undesirable behavior.
6504 */
6505 SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *);
6506
6507 /*
6508 ** CAPI3REF: Read Data From A BLOB Incrementally
6509 ** METHOD: sqlite3_blob
6510 **
@@ -6529,11 +6529,11 @@
6529 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6530 ** to this routine results in undefined and probably undesirable behavior.
6531 **
6532 ** See also: [sqlite3_blob_write()].
6533 */
6534 SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
6535
6536 /*
6537 ** CAPI3REF: Write Data Into A BLOB Incrementally
6538 ** METHOD: sqlite3_blob
6539 **
@@ -6571,11 +6571,11 @@
6571 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6572 ** to this routine results in undefined and probably undesirable behavior.
6573 **
6574 ** See also: [sqlite3_blob_read()].
6575 */
6576 SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
6577
6578 /*
6579 ** CAPI3REF: Virtual File System Objects
6580 **
6581 ** A virtual filesystem (VFS) is an [sqlite3_vfs] object
@@ -6602,13 +6602,13 @@
6602 **
6603 ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
6604 ** ^(If the default VFS is unregistered, another VFS is chosen as
6605 ** the default. The choice for the new VFS is arbitrary.)^
6606 */
6607 SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName);
6608 SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6609 SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
6610
6611 /*
6612 ** CAPI3REF: Mutexes
6613 **
6614 ** The SQLite core uses these routines for thread
@@ -6720,15 +6720,15 @@
6720 ** sqlite3_mutex_leave() is a NULL pointer, then all three routines
6721 ** behave as no-ops.
6722 **
6723 ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
6724 */
6725 SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int);
6726 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*);
6727 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*);
6728 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*);
6729 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*);
6730
6731 /*
6732 ** CAPI3REF: Mutex Methods Object
6733 **
6734 ** An instance of this structure defines the low-level routines
@@ -6834,12 +6834,12 @@
6834 ** call to sqlite3_mutex_held() to fail, so a non-zero return is
6835 ** the appropriate thing to do. The sqlite3_mutex_notheld()
6836 ** interface should also return 1 when given a NULL pointer.
6837 */
6838 #ifndef NDEBUG
6839 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*);
6840 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
6841 #endif
6842
6843 /*
6844 ** CAPI3REF: Mutex Types
6845 **
@@ -6875,11 +6875,11 @@
6875 ** serializes access to the [database connection] given in the argument
6876 ** when the [threading mode] is Serialized.
6877 ** ^If the [threading mode] is Single-thread or Multi-thread then this
6878 ** routine returns a NULL pointer.
6879 */
6880 SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*);
6881
6882 /*
6883 ** CAPI3REF: Low-Level Control Of Database Files
6884 ** METHOD: sqlite3
6885 **
@@ -6910,11 +6910,11 @@
6910 ** an incorrect zDbName and an SQLITE_ERROR return from the underlying
6911 ** xFileControl method.
6912 **
6913 ** See also: [SQLITE_FCNTL_LOCKSTATE]
6914 */
6915 SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6916
6917 /*
6918 ** CAPI3REF: Testing Interface
6919 **
6920 ** ^The sqlite3_test_control() interface is used to read out internal
@@ -6929,11 +6929,11 @@
6929 ** The details of the operation codes, their meanings, the parameters
6930 ** they take, and what they do are all subject to change without notice.
6931 ** Unlike most of the SQLite API, this function is not guaranteed to
6932 ** operate consistently from one release to the next.
6933 */
6934 SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
6935
6936 /*
6937 ** CAPI3REF: Testing Interface Operation Codes
6938 **
6939 ** These constants are the valid operation code parameters used
@@ -6992,12 +6992,12 @@
6992 ** be represented by a 32-bit integer, then the values returned by
6993 ** sqlite3_status() are undefined.
6994 **
6995 ** See also: [sqlite3_db_status()]
6996 */
6997 SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6998 SQLITE_API int SQLITE_STDCALL sqlite3_status64(
6999 int op,
7000 sqlite3_int64 *pCurrent,
7001 sqlite3_int64 *pHighwater,
7002 int resetFlag
7003 );
@@ -7118,11 +7118,11 @@
7118 ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
7119 ** non-zero [error code] on failure.
7120 **
7121 ** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
7122 */
7123 SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
7124
7125 /*
7126 ** CAPI3REF: Status Parameters for database connections
7127 ** KEYWORDS: {SQLITE_DBSTATUS options}
7128 **
@@ -7261,11 +7261,11 @@
7261 ** ^If the resetFlg is true, then the counter is reset to zero after this
7262 ** interface call returns.
7263 **
7264 ** See also: [sqlite3_status()] and [sqlite3_db_status()].
7265 */
7266 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
7267
7268 /*
7269 ** CAPI3REF: Status Parameters for prepared statements
7270 ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters}
7271 **
@@ -7730,20 +7730,20 @@
7730 ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
7731 ** APIs are not strictly speaking threadsafe. If they are invoked at the
7732 ** same time as another thread is invoking sqlite3_backup_step() it is
7733 ** possible that they return invalid values.
7734 */
7735 SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
7736 sqlite3 *pDest, /* Destination database handle */
7737 const char *zDestName, /* Destination database name */
7738 sqlite3 *pSource, /* Source database handle */
7739 const char *zSourceName /* Source database name */
7740 );
7741 SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage);
7742 SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p);
7743 SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p);
7744 SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p);
7745
7746 /*
7747 ** CAPI3REF: Unlock Notification
7748 ** METHOD: sqlite3
7749 **
@@ -7856,11 +7856,11 @@
7856 ** by an sqlite3_step() call. ^(If there is a blocking connection, then the
7857 ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
7858 ** the special "DROP TABLE/INDEX" case, the extended error code is just
7859 ** SQLITE_LOCKED.)^
7860 */
7861 SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify(
7862 sqlite3 *pBlocked, /* Waiting connection */
7863 void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
7864 void *pNotifyArg /* Argument to pass to xNotify */
7865 );
7866
@@ -7871,12 +7871,12 @@
7871 ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications
7872 ** and extensions to compare the contents of two buffers containing UTF-8
7873 ** strings in a case-independent fashion, using the same definition of "case
7874 ** independence" that SQLite uses internally when comparing identifiers.
7875 */
7876 SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *);
7877 SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int);
7878
7879 /*
7880 ** CAPI3REF: String Globbing
7881 *
7882 ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if
@@ -7889,11 +7889,11 @@
7889 ** Note that this routine returns zero on a match and non-zero if the strings
7890 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7891 **
7892 ** See also: [sqlite3_strlike()].
7893 */
7894 SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr);
7895
7896 /*
7897 ** CAPI3REF: String LIKE Matching
7898 *
7899 ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if
@@ -7912,11 +7912,11 @@
7912 ** Note that this routine returns zero on a match and non-zero if the strings
7913 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7914 **
7915 ** See also: [sqlite3_strglob()].
7916 */
7917 SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
7918
7919 /*
7920 ** CAPI3REF: Error Logging Interface
7921 **
7922 ** ^The [sqlite3_log()] interface writes a message into the [error log]
@@ -7935,11 +7935,11 @@
7935 ** will not use dynamically allocated memory. The log message is stored in
7936 ** a fixed-length buffer on the stack. If the log message is longer than
7937 ** a few hundred characters, it will be truncated to the length of the
7938 ** buffer.
7939 */
7940 SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...);
7941
7942 /*
7943 ** CAPI3REF: Write-Ahead Log Commit Hook
7944 ** METHOD: sqlite3
7945 **
@@ -7971,11 +7971,11 @@
7971 ** previously registered write-ahead log callback. ^Note that the
7972 ** [sqlite3_wal_autocheckpoint()] interface and the
7973 ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
7974 ** overwrite any prior [sqlite3_wal_hook()] settings.
7975 */
7976 SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook(
7977 sqlite3*,
7978 int(*)(void *,sqlite3*,const char*,int),
7979 void*
7980 );
7981
@@ -8006,11 +8006,11 @@
8006 ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
8007 ** pages. The use of this interface
8008 ** is only necessary if the default setting is found to be suboptimal
8009 ** for a particular application.
8010 */
8011 SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
8012
8013 /*
8014 ** CAPI3REF: Checkpoint a database
8015 ** METHOD: sqlite3
8016 **
@@ -8028,11 +8028,11 @@
8028 ** interface was added. This interface is retained for backwards
8029 ** compatibility and as a convenience for applications that need to manually
8030 ** start a callback but which do not need the full power (and corresponding
8031 ** complication) of [sqlite3_wal_checkpoint_v2()].
8032 */
8033 SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
8034
8035 /*
8036 ** CAPI3REF: Checkpoint a database
8037 ** METHOD: sqlite3
8038 **
@@ -8122,11 +8122,11 @@
8122 ** [sqlite3_errcode()] and [sqlite3_errmsg()].
8123 **
8124 ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
8125 ** from SQL.
8126 */
8127 SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2(
8128 sqlite3 *db, /* Database handle */
8129 const char *zDb, /* Name of attached database (or NULL) */
8130 int eMode, /* SQLITE_CHECKPOINT_* value */
8131 int *pnLog, /* OUT: Size of WAL log in frames */
8132 int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -8158,11 +8158,11 @@
8158 **
8159 ** At present, there is only one option that may be configured using
8160 ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
8161 ** may be added in the future.
8162 */
8163 SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...);
8164
8165 /*
8166 ** CAPI3REF: Virtual Table Configuration Options
8167 **
8168 ** These macros define the various options to the
@@ -8211,11 +8211,11 @@
8211 ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],
8212 ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode
8213 ** of the SQL statement that triggered the call to the [xUpdate] method of the
8214 ** [virtual table].
8215 */
8216 SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *);
8217
8218 /*
8219 ** CAPI3REF: Conflict resolution modes
8220 ** KEYWORDS: {conflict resolution mode}
8221 **
@@ -8316,11 +8316,11 @@
8316 ** as if the loop did not exist - it returns non-zero and leave the variable
8317 ** that pOut points to unchanged.
8318 **
8319 ** See also: [sqlite3_stmt_scanstatus_reset()]
8320 */
8321 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
8322 sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
8323 int idx, /* Index of loop to report on */
8324 int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
8325 void *pOut /* Result written here */
8326 );
@@ -8332,11 +8332,11 @@
8332 ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
8333 **
8334 ** This API is only available if the library is built with pre-processor
8335 ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
8336 */
8337 SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
8338
8339 /*
8340 ** CAPI3REF: Flush caches to disk mid-transaction
8341 **
8342 ** ^If a write-transaction is open on [database connection] D when the
@@ -8364,11 +8364,11 @@
8364 ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.
8365 **
8366 ** ^This function does not set the database handle error code or message
8367 ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
8368 */
8369 SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*);
8370
8371 /*
8372 ** CAPI3REF: The pre-update hook.
8373 **
8374 ** ^These interfaces are only available if SQLite is compiled using the
@@ -8444,11 +8444,11 @@
8444 ** triggers; or 2 for changes resulting from triggers called by top-level
8445 ** triggers; and so forth.
8446 **
8447 ** See also: [sqlite3_update_hook()]
8448 */
8449 SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook(
8450 sqlite3 *db,
8451 void(*xPreUpdate)(
8452 void *pCtx, /* Copy of third arg to preupdate_hook() */
8453 sqlite3 *db, /* Database handle */
8454 int op, /* SQLITE_UPDATE, DELETE or INSERT */
@@ -8457,14 +8457,14 @@
8457 sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
8458 sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
8459 ),
8460 void*
8461 );
8462 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8463 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *);
8464 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *);
8465 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
8466
8467 /*
8468 ** CAPI3REF: Low-level system error code
8469 **
8470 ** ^Attempt to return the underlying operating system error code or error
@@ -8472,11 +8472,11 @@
8472 ** The return value is OS-dependent. For example, on unix systems, after
8473 ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
8474 ** called to get back the underlying "errno" that caused the problem, such
8475 ** as ENOSPC, EAUTH, EISDIR, and so forth.
8476 */
8477 SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*);
8478
8479 /*
8480 ** CAPI3REF: Database Snapshot
8481 ** KEYWORDS: {snapshot}
8482 ** EXPERIMENTAL
@@ -8522,11 +8522,11 @@
8522 ** to avoid a memory leak.
8523 **
8524 ** The [sqlite3_snapshot_get()] interface is only available when the
8525 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8526 */
8527 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get(
8528 sqlite3 *db,
8529 const char *zSchema,
8530 sqlite3_snapshot **ppSnapshot
8531 );
8532
@@ -8560,11 +8560,11 @@
8560 ** database connection in order to make it ready to use snapshots.)
8561 **
8562 ** The [sqlite3_snapshot_open()] interface is only available when the
8563 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8564 */
8565 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open(
8566 sqlite3 *db,
8567 const char *zSchema,
8568 sqlite3_snapshot *pSnapshot
8569 );
8570
@@ -8577,11 +8577,11 @@
8577 ** using this routine to avoid a memory leak.
8578 **
8579 ** The [sqlite3_snapshot_free()] interface is only available when the
8580 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8581 */
8582 SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*);
8583
8584 /*
8585 ** CAPI3REF: Compare the ages of two snapshot handles.
8586 ** EXPERIMENTAL
8587 **
@@ -8601,11 +8601,11 @@
8601 **
8602 ** Otherwise, this API returns a negative value if P1 refers to an older
8603 ** snapshot than P2, zero if the two handles refer to the same database
8604 ** snapshot, and a positive value if P1 is a newer snapshot than P2.
8605 */
8606 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp(
8607 sqlite3_snapshot *p1,
8608 sqlite3_snapshot *p2
8609 );
8610
8611 /*
@@ -8659,11 +8659,11 @@
8659 ** Register a geometry callback named zGeom that can be used as part of an
8660 ** R-Tree geometry query as follows:
8661 **
8662 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
8663 */
8664 SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback(
8665 sqlite3 *db,
8666 const char *zGeom,
8667 int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
8668 void *pContext
8669 );
@@ -8685,11 +8685,11 @@
8685 ** Register a 2nd-generation geometry callback named zScore that can be
8686 ** used as part of an R-Tree geometry query as follows:
8687 **
8688 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
8689 */
8690 SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback(
8691 sqlite3 *db,
8692 const char *zQueryFunc,
8693 int (*xQueryFunc)(sqlite3_rtree_query_info*),
8694 void *pContext,
8695 void (*xDestructor)(void*)
@@ -11900,12 +11900,12 @@
11900 */
11901 #ifdef SQLITE_OMIT_WSD
11902 #define SQLITE_WSD const
11903 #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v)))
11904 #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config)
11905 SQLITE_API int SQLITE_STDCALL sqlite3_wsd_init(int N, int J);
11906 SQLITE_API void *SQLITE_STDCALL sqlite3_wsd_find(void *K, int L);
11907 #else
11908 #define SQLITE_WSD
11909 #define GLOBAL(t,v) v
11910 #define sqlite3GlobalConfig sqlite3Config
11911 #endif
@@ -12559,16 +12559,16 @@
12559 #define OP_Found 31 /* synopsis: key=r[P3@P4] */
12560 #define OP_SeekRowid 32 /* synopsis: intkey=r[P3] */
12561 #define OP_NotExists 33 /* synopsis: intkey=r[P3] */
12562 #define OP_IsNull 34 /* same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
12563 #define OP_NotNull 35 /* same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
12564 #define OP_Ne 36 /* same as TK_NE, synopsis: if r[P1]!=r[P3] goto P2 */
12565 #define OP_Eq 37 /* same as TK_EQ, synopsis: if r[P1]==r[P3] goto P2 */
12566 #define OP_Gt 38 /* same as TK_GT, synopsis: if r[P1]>r[P3] goto P2 */
12567 #define OP_Le 39 /* same as TK_LE, synopsis: if r[P1]<=r[P3] goto P2 */
12568 #define OP_Lt 40 /* same as TK_LT, synopsis: if r[P1]<r[P3] goto P2 */
12569 #define OP_Ge 41 /* same as TK_GE, synopsis: if r[P1]>=r[P3] goto P2 */
12570 #define OP_Last 42
12571 #define OP_BitAnd 43 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
12572 #define OP_BitOr 44 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
12573 #define OP_ShiftLeft 45 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */
12574 #define OP_ShiftRight 46 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */
@@ -17561,11 +17561,11 @@
17561 ** was used and false if not.
17562 **
17563 ** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix
17564 ** is not required for a match.
17565 */
17566 SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName){
17567 int i, n;
17568
17569 #if SQLITE_ENABLE_API_ARMOR
17570 if( zOptName==0 ){
17571 (void)SQLITE_MISUSE_BKPT;
@@ -17589,11 +17589,11 @@
17589
17590 /*
17591 ** Return the N-th compile-time option string. If N is out of range,
17592 ** return a NULL pointer.
17593 */
17594 SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N){
17595 if( N>=0 && N<ArraySize(azCompileOpt) ){
17596 return azCompileOpt[N];
17597 }
17598 return 0;
17599 }
@@ -18299,11 +18299,11 @@
18299 }
18300
18301 /*
18302 ** Query status information.
18303 */
18304 SQLITE_API int SQLITE_STDCALL sqlite3_status64(
18305 int op,
18306 sqlite3_int64 *pCurrent,
18307 sqlite3_int64 *pHighwater,
18308 int resetFlag
18309 ){
@@ -18324,11 +18324,11 @@
18324 }
18325 sqlite3_mutex_leave(pMutex);
18326 (void)pMutex; /* Prevent warning when SQLITE_THREADSAFE=0 */
18327 return SQLITE_OK;
18328 }
18329 SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){
18330 sqlite3_int64 iCur = 0, iHwtr = 0;
18331 int rc;
18332 #ifdef SQLITE_ENABLE_API_ARMOR
18333 if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT;
18334 #endif
@@ -18341,11 +18341,11 @@
18341 }
18342
18343 /*
18344 ** Query status information for a single database connection
18345 */
18346 SQLITE_API int SQLITE_STDCALL sqlite3_db_status(
18347 sqlite3 *db, /* The database connection whose status is desired */
18348 int op, /* Status verb */
18349 int *pCurrent, /* Write current value here */
18350 int *pHighwater, /* Write high-water mark here */
18351 int resetFlag /* Reset high-water mark if true */
@@ -20018,11 +20018,11 @@
20018
20019 /*
20020 ** Locate a VFS by name. If no name is given, simply return the
20021 ** first VFS on the list.
20022 */
20023 SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfs){
20024 sqlite3_vfs *pVfs = 0;
20025 #if SQLITE_THREADSAFE
20026 sqlite3_mutex *mutex;
20027 #endif
20028 #ifndef SQLITE_OMIT_AUTOINIT
@@ -20064,11 +20064,11 @@
20064 /*
20065 ** Register a VFS with the system. It is harmless to register the same
20066 ** VFS multiple times. The new VFS becomes the default if makeDflt is
20067 ** true.
20068 */
20069 SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
20070 MUTEX_LOGIC(sqlite3_mutex *mutex;)
20071 #ifndef SQLITE_OMIT_AUTOINIT
20072 int rc = sqlite3_initialize();
20073 if( rc ) return rc;
20074 #endif
@@ -20092,11 +20092,11 @@
20092 }
20093
20094 /*
20095 ** Unregister a VFS so that it is no longer accessible.
20096 */
20097 SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
20098 #if SQLITE_THREADSAFE
20099 sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
20100 #endif
20101 sqlite3_mutex_enter(mutex);
20102 vfsUnlink(pVfs);
@@ -22443,11 +22443,11 @@
22443 }
22444
22445 /*
22446 ** Retrieve a pointer to a static mutex or allocate a new dynamic one.
22447 */
22448 SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int id){
22449 #ifndef SQLITE_OMIT_AUTOINIT
22450 if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0;
22451 if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0;
22452 #endif
22453 assert( sqlite3GlobalConfig.mutex.xMutexAlloc );
@@ -22464,11 +22464,11 @@
22464 }
22465
22466 /*
22467 ** Free a dynamic mutex.
22468 */
22469 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){
22470 if( p ){
22471 assert( sqlite3GlobalConfig.mutex.xMutexFree );
22472 sqlite3GlobalConfig.mutex.xMutexFree(p);
22473 }
22474 }
@@ -22475,11 +22475,11 @@
22475
22476 /*
22477 ** Obtain the mutex p. If some other thread already has the mutex, block
22478 ** until it can be obtained.
22479 */
22480 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){
22481 if( p ){
22482 assert( sqlite3GlobalConfig.mutex.xMutexEnter );
22483 sqlite3GlobalConfig.mutex.xMutexEnter(p);
22484 }
22485 }
@@ -22486,11 +22486,11 @@
22486
22487 /*
22488 ** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another
22489 ** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY.
22490 */
22491 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){
22492 int rc = SQLITE_OK;
22493 if( p ){
22494 assert( sqlite3GlobalConfig.mutex.xMutexTry );
22495 return sqlite3GlobalConfig.mutex.xMutexTry(p);
22496 }
@@ -22501,11 +22501,11 @@
22501 ** The sqlite3_mutex_leave() routine exits a mutex that was previously
22502 ** entered by the same thread. The behavior is undefined if the mutex
22503 ** is not currently entered. If a NULL pointer is passed as an argument
22504 ** this function is a no-op.
22505 */
22506 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){
22507 if( p ){
22508 assert( sqlite3GlobalConfig.mutex.xMutexLeave );
22509 sqlite3GlobalConfig.mutex.xMutexLeave(p);
22510 }
22511 }
@@ -22513,15 +22513,15 @@
22513 #ifndef NDEBUG
22514 /*
22515 ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
22516 ** intended for use inside assert() statements.
22517 */
22518 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex *p){
22519 assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld );
22520 return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p);
22521 }
22522 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex *p){
22523 assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld );
22524 return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p);
22525 }
22526 #endif
22527
@@ -23549,12 +23549,12 @@
23549 ** of the sqlite3_initialize() and sqlite3_shutdown() processing, the
23550 ** "interlocked" magic used here is probably not strictly necessary.
23551 */
23552 static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0;
23553
23554 SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void); /* os_win.c */
23555 SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */
23556
23557 static int winMutexInit(void){
23558 /* The first to increment to 1 does actual initialization */
23559 if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){
23560 int i;
@@ -23850,11 +23850,11 @@
23850 /*
23851 ** Attempt to release up to n bytes of non-essential memory currently
23852 ** held by SQLite. An example of non-essential memory is memory used to
23853 ** cache database pages that are not currently in use.
23854 */
23855 SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int n){
23856 #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
23857 return sqlite3PcacheReleaseMemory(n);
23858 #else
23859 /* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine
23860 ** is a no-op returning zero if SQLite is not compiled with
@@ -23909,11 +23909,11 @@
23909 /*
23910 ** Deprecated external interface. It used to set an alarm callback
23911 ** that was invoked when memory usage grew too large. Now it is a
23912 ** no-op.
23913 */
23914 SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm(
23915 void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
23916 void *pArg,
23917 sqlite3_int64 iThreshold
23918 ){
23919 (void)xCallback;
@@ -23925,11 +23925,11 @@
23925
23926 /*
23927 ** Set the soft heap-size limit for the library. Passing a zero or
23928 ** negative value indicates no limit.
23929 */
23930 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 n){
23931 sqlite3_int64 priorLimit;
23932 sqlite3_int64 excess;
23933 sqlite3_int64 nUsed;
23934 #ifndef SQLITE_OMIT_AUTOINIT
23935 int rc = sqlite3_initialize();
@@ -23947,11 +23947,11 @@
23947 sqlite3_mutex_leave(mem0.mutex);
23948 excess = sqlite3_memory_used() - n;
23949 if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff));
23950 return priorLimit;
23951 }
23952 SQLITE_API void SQLITE_STDCALL sqlite3_soft_heap_limit(int n){
23953 if( n<0 ) n = 0;
23954 sqlite3_soft_heap_limit64(n);
23955 }
23956
23957 /*
@@ -24016,11 +24016,11 @@
24016 }
24017
24018 /*
24019 ** Return the amount of memory currently checked out.
24020 */
24021 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){
24022 sqlite3_int64 res, mx;
24023 sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0);
24024 return res;
24025 }
24026
@@ -24027,11 +24027,11 @@
24027 /*
24028 ** Return the maximum amount of memory that has ever been
24029 ** checked out since either the beginning of this process
24030 ** or since the most recent reset.
24031 */
24032 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag){
24033 sqlite3_int64 res, mx;
24034 sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag);
24035 return mx;
24036 }
24037
@@ -24107,17 +24107,17 @@
24107 /*
24108 ** This version of the memory allocation is for use by the application.
24109 ** First make sure the memory subsystem is initialized, then do the
24110 ** allocation.
24111 */
24112 SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int n){
24113 #ifndef SQLITE_OMIT_AUTOINIT
24114 if( sqlite3_initialize() ) return 0;
24115 #endif
24116 return n<=0 ? 0 : sqlite3Malloc(n);
24117 }
24118 SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64 n){
24119 #ifndef SQLITE_OMIT_AUTOINIT
24120 if( sqlite3_initialize() ) return 0;
24121 #endif
24122 return sqlite3Malloc(n);
24123 }
@@ -24256,20 +24256,20 @@
24256 }else{
24257 assert( sqlite3_mutex_held(db->mutex) );
24258 return db->lookaside.sz;
24259 }
24260 }
24261 SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){
24262 assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
24263 assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
24264 return p ? sqlite3GlobalConfig.m.xSize(p) : 0;
24265 }
24266
24267 /*
24268 ** Free memory previously obtained from sqlite3Malloc().
24269 */
24270 SQLITE_API void SQLITE_STDCALL sqlite3_free(void *p){
24271 if( p==0 ) return; /* IMP: R-49053-54554 */
24272 assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
24273 assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
24274 if( sqlite3GlobalConfig.bMemstat ){
24275 sqlite3_mutex_enter(mem0.mutex);
@@ -24374,18 +24374,18 @@
24374
24375 /*
24376 ** The public interface to sqlite3Realloc. Make sure that the memory
24377 ** subsystem is initialized prior to invoking sqliteRealloc.
24378 */
24379 SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void *pOld, int n){
24380 #ifndef SQLITE_OMIT_AUTOINIT
24381 if( sqlite3_initialize() ) return 0;
24382 #endif
24383 if( n<0 ) n = 0; /* IMP: R-26507-47431 */
24384 return sqlite3Realloc(pOld, n);
24385 }
24386 SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){
24387 #ifndef SQLITE_OMIT_AUTOINIT
24388 if( sqlite3_initialize() ) return 0;
24389 #endif
24390 return sqlite3Realloc(pOld, n);
24391 }
@@ -25608,11 +25608,11 @@
25608
25609 /*
25610 ** Print into memory obtained from sqlite3_malloc(). Omit the internal
25611 ** %-conversion extensions.
25612 */
25613 SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char *zFormat, va_list ap){
25614 char *z;
25615 char zBase[SQLITE_PRINT_BUF_SIZE];
25616 StrAccum acc;
25617
25618 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -25632,11 +25632,11 @@
25632
25633 /*
25634 ** Print into memory obtained from sqlite3_malloc()(). Omit the internal
25635 ** %-conversion extensions.
25636 */
25637 SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char *zFormat, ...){
25638 va_list ap;
25639 char *z;
25640 #ifndef SQLITE_OMIT_AUTOINIT
25641 if( sqlite3_initialize() ) return 0;
25642 #endif
@@ -25657,11 +25657,11 @@
25657 ** this without breaking compatibility, so we just have to live with the
25658 ** mistake.
25659 **
25660 ** sqlite3_vsnprintf() is the varargs version.
25661 */
25662 SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
25663 StrAccum acc;
25664 if( n<=0 ) return zBuf;
25665 #ifdef SQLITE_ENABLE_API_ARMOR
25666 if( zBuf==0 || zFormat==0 ) {
25667 (void)SQLITE_MISUSE_BKPT;
@@ -25671,11 +25671,11 @@
25671 #endif
25672 sqlite3StrAccumInit(&acc, 0, zBuf, n, 0);
25673 sqlite3VXPrintf(&acc, zFormat, ap);
25674 return sqlite3StrAccumFinish(&acc);
25675 }
25676 SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
25677 char *z;
25678 va_list ap;
25679 va_start(ap,zFormat);
25680 z = sqlite3_vsnprintf(n, zBuf, zFormat, ap);
25681 va_end(ap);
@@ -25707,11 +25707,11 @@
25707 }
25708
25709 /*
25710 ** Format and write a message to the log if logging is enabled.
25711 */
25712 SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...){
25713 va_list ap; /* Vararg list */
25714 if( sqlite3GlobalConfig.xLog ){
25715 va_start(ap, zFormat);
25716 renderLogMsg(iErrCode, zFormat, ap);
25717 va_end(ap);
@@ -26284,11 +26284,11 @@
26284 } sqlite3Prng;
26285
26286 /*
26287 ** Return N random bytes.
26288 */
26289 SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *pBuf){
26290 unsigned char t;
26291 unsigned char *zBuf = pBuf;
26292
26293 /* The "wsdPrng" macro will resolve to the pseudo-random number generator
26294 ** state vector. If writable static data is unsupported on the target,
@@ -27487,11 +27487,11 @@
27487 ** sqlite3_strnicmp() APIs allow applications and extensions to compare
27488 ** the contents of two buffers containing UTF-8 strings in a
27489 ** case-independent fashion, using the same definition of "case
27490 ** independence" that SQLite uses internally when comparing identifiers.
27491 */
27492 SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *zLeft, const char *zRight){
27493 if( zLeft==0 ){
27494 return zRight ? -1 : 0;
27495 }else if( zRight==0 ){
27496 return 1;
27497 }
@@ -27508,11 +27508,11 @@
27508 a++;
27509 b++;
27510 }
27511 return c;
27512 }
27513 SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
27514 register unsigned char *a, *b;
27515 if( zLeft==0 ){
27516 return zRight ? -1 : 0;
27517 }else if( zRight==0 ){
27518 return 1;
@@ -28990,16 +28990,16 @@
28990 /* 31 */ "Found" OpHelp("key=r[P3@P4]"),
28991 /* 32 */ "SeekRowid" OpHelp("intkey=r[P3]"),
28992 /* 33 */ "NotExists" OpHelp("intkey=r[P3]"),
28993 /* 34 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
28994 /* 35 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
28995 /* 36 */ "Ne" OpHelp("if r[P1]!=r[P3] goto P2"),
28996 /* 37 */ "Eq" OpHelp("if r[P1]==r[P3] goto P2"),
28997 /* 38 */ "Gt" OpHelp("if r[P1]>r[P3] goto P2"),
28998 /* 39 */ "Le" OpHelp("if r[P1]<=r[P3] goto P2"),
28999 /* 40 */ "Lt" OpHelp("if r[P1]<r[P3] goto P2"),
29000 /* 41 */ "Ge" OpHelp("if r[P1]>=r[P3] goto P2"),
29001 /* 42 */ "Last" OpHelp(""),
29002 /* 43 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
29003 /* 44 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
29004 /* 45 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
29005 /* 46 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
@@ -36807,11 +36807,11 @@
36807 ** This routine is called once during SQLite initialization and by a
36808 ** single thread. The memory allocation and mutex subsystems have not
36809 ** necessarily been initialized when this routine is called, and so they
36810 ** should not be used.
36811 */
36812 SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){
36813 /*
36814 ** The following macro defines an initializer for an sqlite3_vfs object.
36815 ** The name of the VFS is NAME. The pAppData is a pointer to a pointer
36816 ** to the "finder" function. (pAppData is a pointer to a pointer because
36817 ** silly C90 rules prohibit a void* from being cast to a function pointer
@@ -36906,11 +36906,11 @@
36906 **
36907 ** Some operating systems might need to do some cleanup in this routine,
36908 ** to release dynamically allocated objects. But not on unix.
36909 ** This routine is a no-op for unix.
36910 */
36911 SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){
36912 return SQLITE_OK;
36913 }
36914
36915 #endif /* SQLITE_OS_UNIX */
36916
@@ -38341,11 +38341,11 @@
38341 ** compact it. Upon success, SQLITE_OK will be returned. Upon failure, one
38342 ** of SQLITE_NOMEM, SQLITE_ERROR, or SQLITE_NOTFOUND will be returned. The
38343 ** "pnLargest" argument, if non-zero, will be used to return the size of the
38344 ** largest committed free block in the heap, in bytes.
38345 */
38346 SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){
38347 int rc = SQLITE_OK;
38348 UINT nLargest = 0;
38349 HANDLE hHeap;
38350
38351 winMemAssertMagic();
@@ -38381,11 +38381,11 @@
38381 ** If a Win32 native heap has been configured, this function will attempt to
38382 ** destroy and recreate it. If the Win32 native heap is not isolated and/or
38383 ** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will
38384 ** be returned and no changes will be made to the Win32 native heap.
38385 */
38386 SQLITE_API int SQLITE_STDCALL sqlite3_win32_reset_heap(){
38387 int rc;
38388 MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
38389 MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */
38390 MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); )
38391 MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); )
@@ -38426,11 +38426,11 @@
38426 /*
38427 ** This function outputs the specified (ANSI) string to the Win32 debugger
38428 ** (if available).
38429 */
38430
38431 SQLITE_API void SQLITE_STDCALL sqlite3_win32_write_debug(const char *zBuf, int nBuf){
38432 char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE];
38433 int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */
38434 if( nMin<-1 ) nMin = -1; /* all negative values become -1. */
38435 assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE );
38436 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -38472,11 +38472,11 @@
38472 */
38473 #if SQLITE_OS_WINRT
38474 static HANDLE sleepObj = NULL;
38475 #endif
38476
38477 SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds){
38478 #if SQLITE_OS_WINRT
38479 if ( sleepObj==NULL ){
38480 sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET,
38481 SYNCHRONIZE);
38482 }
@@ -38521,11 +38521,11 @@
38521
38522 /*
38523 ** This function determines if the machine is running a version of Windows
38524 ** based on the NT kernel.
38525 */
38526 SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void){
38527 #if SQLITE_OS_WINRT
38528 /*
38529 ** NOTE: The WinRT sub-platform is always assumed to be based on the NT
38530 ** kernel.
38531 */
@@ -38909,11 +38909,11 @@
38909 }
38910
38911 /*
38912 ** This is a public wrapper for the winUtf8ToUnicode() function.
38913 */
38914 SQLITE_API LPWSTR SQLITE_STDCALL sqlite3_win32_utf8_to_unicode(const char *zText){
38915 #ifdef SQLITE_ENABLE_API_ARMOR
38916 if( !zText ){
38917 (void)SQLITE_MISUSE_BKPT;
38918 return 0;
38919 }
@@ -38925,11 +38925,11 @@
38925 }
38926
38927 /*
38928 ** This is a public wrapper for the winUnicodeToUtf8() function.
38929 */
38930 SQLITE_API char *SQLITE_STDCALL sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){
38931 #ifdef SQLITE_ENABLE_API_ARMOR
38932 if( !zWideText ){
38933 (void)SQLITE_MISUSE_BKPT;
38934 return 0;
38935 }
@@ -38941,11 +38941,11 @@
38941 }
38942
38943 /*
38944 ** This is a public wrapper for the winMbcsToUtf8() function.
38945 */
38946 SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8(const char *zText){
38947 #ifdef SQLITE_ENABLE_API_ARMOR
38948 if( !zText ){
38949 (void)SQLITE_MISUSE_BKPT;
38950 return 0;
38951 }
@@ -38957,11 +38957,11 @@
38957 }
38958
38959 /*
38960 ** This is a public wrapper for the winMbcsToUtf8() function.
38961 */
38962 SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){
38963 #ifdef SQLITE_ENABLE_API_ARMOR
38964 if( !zText ){
38965 (void)SQLITE_MISUSE_BKPT;
38966 return 0;
38967 }
@@ -38973,11 +38973,11 @@
38973 }
38974
38975 /*
38976 ** This is a public wrapper for the winUtf8ToMbcs() function.
38977 */
38978 SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs(const char *zText){
38979 #ifdef SQLITE_ENABLE_API_ARMOR
38980 if( !zText ){
38981 (void)SQLITE_MISUSE_BKPT;
38982 return 0;
38983 }
@@ -38989,11 +38989,11 @@
38989 }
38990
38991 /*
38992 ** This is a public wrapper for the winUtf8ToMbcs() function.
38993 */
38994 SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){
38995 #ifdef SQLITE_ENABLE_API_ARMOR
38996 if( !zText ){
38997 (void)SQLITE_MISUSE_BKPT;
38998 return 0;
38999 }
@@ -39009,11 +39009,11 @@
39009 ** the provided arguments. The type argument must be 1 in order to set the
39010 ** data directory or 2 in order to set the temporary directory. The zValue
39011 ** argument is the name of the directory to use. The return value will be
39012 ** SQLITE_OK if successful.
39013 */
39014 SQLITE_API int SQLITE_STDCALL sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){
39015 char **ppDirectory = 0;
39016 #ifndef SQLITE_OMIT_AUTOINIT
39017 int rc = sqlite3_initialize();
39018 if( rc ) return rc;
39019 #endif
@@ -42927,11 +42927,11 @@
42927 }
42928
42929 /*
42930 ** Initialize and deinitialize the operating system interface.
42931 */
42932 SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){
42933 static sqlite3_vfs winVfs = {
42934 3, /* iVersion */
42935 sizeof(winFile), /* szOsFile */
42936 SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */
42937 0, /* pNext */
@@ -43058,11 +43058,11 @@
43058 #endif
43059
43060 return SQLITE_OK;
43061 }
43062
43063 SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){
43064 #if SQLITE_OS_WINRT
43065 if( sleepObj!=NULL ){
43066 osCloseHandle(sleepObj);
43067 sleepObj = NULL;
43068 }
@@ -57083,11 +57083,11 @@
57083
57084 /*
57085 ** Return a +ve value if snapshot p1 is newer than p2. A -ve value if
57086 ** p1 is older than p2 and zero if p1 and p2 are the same snapshot.
57087 */
57088 SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){
57089 WalIndexHdr *pHdr1 = (WalIndexHdr*)p1;
57090 WalIndexHdr *pHdr2 = (WalIndexHdr*)p2;
57091
57092 /* aSalt[0] is a copy of the value stored in the wal file header. It
57093 ** is incremented each time the wal file is restarted. */
@@ -58220,11 +58220,11 @@
58220 **
58221 ** This routine has no effect on existing database connections.
58222 ** The shared cache setting effects only future calls to
58223 ** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().
58224 */
58225 SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int enable){
58226 sqlite3GlobalConfig.sharedCacheEnabled = enable;
58227 return SQLITE_OK;
58228 }
58229 #endif
58230
@@ -67993,11 +67993,11 @@
67993 ** a pointer to the new sqlite3_backup object.
67994 **
67995 ** If an error occurs, NULL is returned and an error code and error message
67996 ** stored in database handle pDestDb.
67997 */
67998 SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
67999 sqlite3* pDestDb, /* Database to write to */
68000 const char *zDestDb, /* Name of database within pDestDb */
68001 sqlite3* pSrcDb, /* Database connection to read from */
68002 const char *zSrcDb /* Name of database within pSrcDb */
68003 ){
@@ -68201,11 +68201,11 @@
68201 }
68202
68203 /*
68204 ** Copy nPage pages from the source b-tree to the destination.
68205 */
68206 SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){
68207 int rc;
68208 int destMode; /* Destination journal mode */
68209 int pgszSrc = 0; /* Source page size */
68210 int pgszDest = 0; /* Destination page size */
68211
@@ -68445,11 +68445,11 @@
68445 }
68446
68447 /*
68448 ** Release all resources associated with an sqlite3_backup* handle.
68449 */
68450 SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p){
68451 sqlite3_backup **pp; /* Ptr to head of pagers backup list */
68452 sqlite3 *pSrcDb; /* Source database connection */
68453 int rc; /* Value to return */
68454
68455 /* Enter the mutexes */
@@ -68497,11 +68497,11 @@
68497
68498 /*
68499 ** Return the number of pages still to be backed up as of the most recent
68500 ** call to sqlite3_backup_step().
68501 */
68502 SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p){
68503 #ifdef SQLITE_ENABLE_API_ARMOR
68504 if( p==0 ){
68505 (void)SQLITE_MISUSE_BKPT;
68506 return 0;
68507 }
@@ -68511,11 +68511,11 @@
68511
68512 /*
68513 ** Return the total number of pages in the source database as of the most
68514 ** recent call to sqlite3_backup_step().
68515 */
68516 SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p){
68517 #ifdef SQLITE_ENABLE_API_ARMOR
68518 if( p==0 ){
68519 (void)SQLITE_MISUSE_BKPT;
68520 return 0;
68521 }
@@ -71450,16 +71450,25 @@
71450 ){
71451 const char *zOpName;
71452 const char *zSynopsis;
71453 int nOpName;
71454 int ii, jj;
 
71455 zOpName = sqlite3OpcodeName(pOp->opcode);
71456 nOpName = sqlite3Strlen30(zOpName);
71457 if( zOpName[nOpName+1] ){
71458 int seenCom = 0;
71459 char c;
71460 zSynopsis = zOpName += nOpName + 1;
 
 
 
 
 
 
 
 
71461 for(ii=jj=0; jj<nTemp-1 && (c = zSynopsis[ii])!=0; ii++){
71462 if( c=='P' ){
71463 c = zSynopsis[++ii];
71464 if( c=='4' ){
71465 sqlite3_snprintf(nTemp-jj, zTemp+jj, "%s", zP4);
@@ -74967,11 +74976,11 @@
74967 ** execution environment changes in a way that would alter the program
74968 ** that sqlite3_prepare() generates. For example, if new functions or
74969 ** collating sequences are registered or if an authorizer function is
74970 ** added or changed.
74971 */
74972 SQLITE_API int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt *pStmt){
74973 Vdbe *p = (Vdbe*)pStmt;
74974 return p==0 || p->expired;
74975 }
74976 #endif
74977
@@ -75036,11 +75045,11 @@
75036 ** machine.
75037 **
75038 ** This routine sets the error code and string returned by
75039 ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
75040 */
75041 SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt){
75042 int rc;
75043 if( pStmt==0 ){
75044 /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL
75045 ** pointer is a harmless no-op. */
75046 rc = SQLITE_OK;
@@ -75063,11 +75072,11 @@
75063 ** the prior execution is returned.
75064 **
75065 ** This routine sets the error code and string returned by
75066 ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
75067 */
75068 SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt){
75069 int rc;
75070 if( pStmt==0 ){
75071 rc = SQLITE_OK;
75072 }else{
75073 Vdbe *v = (Vdbe*)pStmt;
@@ -75084,11 +75093,11 @@
75084 }
75085
75086 /*
75087 ** Set all the parameters in the compiled SQL statement to NULL.
75088 */
75089 SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){
75090 int i;
75091 int rc = SQLITE_OK;
75092 Vdbe *p = (Vdbe*)pStmt;
75093 #if SQLITE_THREADSAFE
75094 sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
@@ -75108,11 +75117,11 @@
75108
75109 /**************************** sqlite3_value_ *******************************
75110 ** The following routines extract information from a Mem or sqlite3_value
75111 ** structure.
75112 */
75113 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){
75114 Mem *p = (Mem*)pVal;
75115 if( p->flags & (MEM_Blob|MEM_Str) ){
75116 if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){
75117 assert( p->flags==MEM_Null && p->z==0 );
75118 return 0;
@@ -75121,48 +75130,48 @@
75121 return p->n ? p->z : 0;
75122 }else{
75123 return sqlite3_value_text(pVal);
75124 }
75125 }
75126 SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value *pVal){
75127 return sqlite3ValueBytes(pVal, SQLITE_UTF8);
75128 }
75129 SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value *pVal){
75130 return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE);
75131 }
75132 SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value *pVal){
75133 return sqlite3VdbeRealValue((Mem*)pVal);
75134 }
75135 SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value *pVal){
75136 return (int)sqlite3VdbeIntValue((Mem*)pVal);
75137 }
75138 SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value *pVal){
75139 return sqlite3VdbeIntValue((Mem*)pVal);
75140 }
75141 SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value *pVal){
75142 Mem *pMem = (Mem*)pVal;
75143 return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0);
75144 }
75145 SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value *pVal){
75146 return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8);
75147 }
75148 #ifndef SQLITE_OMIT_UTF16
75149 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value* pVal){
75150 return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE);
75151 }
75152 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value *pVal){
75153 return sqlite3ValueText(pVal, SQLITE_UTF16BE);
75154 }
75155 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value *pVal){
75156 return sqlite3ValueText(pVal, SQLITE_UTF16LE);
75157 }
75158 #endif /* SQLITE_OMIT_UTF16 */
75159 /* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five
75160 ** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating
75161 ** point number string BLOB NULL
75162 */
75163 SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value* pVal){
75164 static const u8 aType[] = {
75165 SQLITE_BLOB, /* 0x00 */
75166 SQLITE_NULL, /* 0x01 */
75167 SQLITE_TEXT, /* 0x02 */
75168 SQLITE_NULL, /* 0x03 */
@@ -75198,11 +75207,11 @@
75198 return aType[pVal->flags&MEM_AffMask];
75199 }
75200
75201 /* Make a copy of an sqlite3_value object
75202 */
75203 SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value *pOrig){
75204 sqlite3_value *pNew;
75205 if( pOrig==0 ) return 0;
75206 pNew = sqlite3_malloc( sizeof(*pNew) );
75207 if( pNew==0 ) return 0;
75208 memset(pNew, 0, sizeof(*pNew));
@@ -75221,11 +75230,11 @@
75221 }
75222
75223 /* Destroy an sqlite3_value object previously obtained from
75224 ** sqlite3_value_dup().
75225 */
75226 SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value *pOld){
75227 sqlite3ValueFree(pOld);
75228 }
75229
75230
75231 /**************************** sqlite3_result_ *******************************
@@ -75264,21 +75273,21 @@
75264 xDel((void*)p);
75265 }
75266 if( pCtx ) sqlite3_result_error_toobig(pCtx);
75267 return SQLITE_TOOBIG;
75268 }
75269 SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(
75270 sqlite3_context *pCtx,
75271 const void *z,
75272 int n,
75273 void (*xDel)(void *)
75274 ){
75275 assert( n>=0 );
75276 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75277 setResultStrOrError(pCtx, z, n, 0, xDel);
75278 }
75279 SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(
75280 sqlite3_context *pCtx,
75281 const void *z,
75282 sqlite3_uint64 n,
75283 void (*xDel)(void *)
75284 ){
@@ -75288,56 +75297,56 @@
75288 (void)invokeValueDestructor(z, xDel, pCtx);
75289 }else{
75290 setResultStrOrError(pCtx, z, (int)n, 0, xDel);
75291 }
75292 }
75293 SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context *pCtx, double rVal){
75294 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75295 sqlite3VdbeMemSetDouble(pCtx->pOut, rVal);
75296 }
75297 SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
75298 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75299 pCtx->isError = SQLITE_ERROR;
75300 pCtx->fErrorOrAux = 1;
75301 sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
75302 }
75303 #ifndef SQLITE_OMIT_UTF16
75304 SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
75305 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75306 pCtx->isError = SQLITE_ERROR;
75307 pCtx->fErrorOrAux = 1;
75308 sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
75309 }
75310 #endif
75311 SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context *pCtx, int iVal){
75312 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75313 sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal);
75314 }
75315 SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){
75316 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75317 sqlite3VdbeMemSetInt64(pCtx->pOut, iVal);
75318 }
75319 SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context *pCtx){
75320 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75321 sqlite3VdbeMemSetNull(pCtx->pOut);
75322 }
75323 SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){
75324 Mem *pOut = pCtx->pOut;
75325 assert( sqlite3_mutex_held(pOut->db->mutex) );
75326 pOut->eSubtype = eSubtype & 0xff;
75327 pOut->flags |= MEM_Subtype;
75328 }
75329 SQLITE_API void SQLITE_STDCALL sqlite3_result_text(
75330 sqlite3_context *pCtx,
75331 const char *z,
75332 int n,
75333 void (*xDel)(void *)
75334 ){
75335 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75336 setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel);
75337 }
75338 SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(
75339 sqlite3_context *pCtx,
75340 const char *z,
75341 sqlite3_uint64 n,
75342 void (*xDel)(void *),
75343 unsigned char enc
@@ -75350,56 +75359,56 @@
75350 }else{
75351 setResultStrOrError(pCtx, z, (int)n, enc, xDel);
75352 }
75353 }
75354 #ifndef SQLITE_OMIT_UTF16
75355 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(
75356 sqlite3_context *pCtx,
75357 const void *z,
75358 int n,
75359 void (*xDel)(void *)
75360 ){
75361 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75362 setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel);
75363 }
75364 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(
75365 sqlite3_context *pCtx,
75366 const void *z,
75367 int n,
75368 void (*xDel)(void *)
75369 ){
75370 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75371 setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel);
75372 }
75373 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(
75374 sqlite3_context *pCtx,
75375 const void *z,
75376 int n,
75377 void (*xDel)(void *)
75378 ){
75379 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75380 setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel);
75381 }
75382 #endif /* SQLITE_OMIT_UTF16 */
75383 SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){
75384 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75385 sqlite3VdbeMemCopy(pCtx->pOut, pValue);
75386 }
75387 SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){
75388 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75389 sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n);
75390 }
75391 SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){
75392 Mem *pOut = pCtx->pOut;
75393 assert( sqlite3_mutex_held(pOut->db->mutex) );
75394 if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){
75395 return SQLITE_TOOBIG;
75396 }
75397 sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n);
75398 return SQLITE_OK;
75399 }
75400 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
75401 pCtx->isError = errCode;
75402 pCtx->fErrorOrAux = 1;
75403 #ifdef SQLITE_DEBUG
75404 if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode;
75405 #endif
@@ -75408,20 +75417,20 @@
75408 SQLITE_UTF8, SQLITE_STATIC);
75409 }
75410 }
75411
75412 /* Force an SQLITE_TOOBIG error. */
75413 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context *pCtx){
75414 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75415 pCtx->isError = SQLITE_TOOBIG;
75416 pCtx->fErrorOrAux = 1;
75417 sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1,
75418 SQLITE_UTF8, SQLITE_STATIC);
75419 }
75420
75421 /* An SQLITE_NOMEM error. */
75422 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context *pCtx){
75423 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75424 sqlite3VdbeMemSetNull(pCtx->pOut);
75425 pCtx->isError = SQLITE_NOMEM_BKPT;
75426 pCtx->fErrorOrAux = 1;
75427 sqlite3OomFault(pCtx->pOut->db);
@@ -75589,11 +75598,11 @@
75589 /*
75590 ** This is the top-level implementation of sqlite3_step(). Call
75591 ** sqlite3Step() to do most of the work. If a schema error occurs,
75592 ** call sqlite3Reprepare() and try again.
75593 */
75594 SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt *pStmt){
75595 int rc = SQLITE_OK; /* Result from sqlite3Step() */
75596 int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */
75597 Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */
75598 int cnt = 0; /* Counter to prevent infinite loop of reprepares */
75599 sqlite3 *db; /* The database connection */
@@ -75640,11 +75649,11 @@
75640
75641 /*
75642 ** Extract the user data from a sqlite3_context structure and return a
75643 ** pointer to it.
75644 */
75645 SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context *p){
75646 assert( p && p->pFunc );
75647 return p->pFunc->pUserData;
75648 }
75649
75650 /*
@@ -75655,11 +75664,11 @@
75655 ** returns a copy of the pointer to the database connection (the 1st
75656 ** parameter) of the sqlite3_create_function() and
75657 ** sqlite3_create_function16() routines that originally registered the
75658 ** application defined function.
75659 */
75660 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context *p){
75661 assert( p && p->pOut );
75662 return p->pOut->db;
75663 }
75664
75665 /*
@@ -75731,11 +75740,11 @@
75731 /*
75732 ** Allocate or return the aggregate context for a user function. A new
75733 ** context is allocated on the first call. Subsequent calls return the
75734 ** same context that was returned on prior calls.
75735 */
75736 SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context *p, int nByte){
75737 assert( p && p->pFunc && p->pFunc->xFinalize );
75738 assert( sqlite3_mutex_held(p->pOut->db->mutex) );
75739 testcase( nByte<0 );
75740 if( (p->pMem->flags & MEM_Agg)==0 ){
75741 return createAggContext(p, nByte);
@@ -75746,11 +75755,11 @@
75746
75747 /*
75748 ** Return the auxiliary data pointer, if any, for the iArg'th argument to
75749 ** the user-function defined by pCtx.
75750 */
75751 SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){
75752 AuxData *pAuxData;
75753
75754 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75755 #if SQLITE_ENABLE_STAT3_OR_STAT4
75756 if( pCtx->pVdbe==0 ) return 0;
@@ -75767,11 +75776,11 @@
75767 /*
75768 ** Set the auxiliary data pointer and delete function, for the iArg'th
75769 ** argument to the user-function defined by pCtx. Any previous value is
75770 ** deleted by calling the delete function specified when it was set.
75771 */
75772 SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(
75773 sqlite3_context *pCtx,
75774 int iArg,
75775 void *pAux,
75776 void (*xDelete)(void*)
75777 ){
@@ -75822,29 +75831,29 @@
75822 ** This function is deprecated. Do not use it for new code. It is
75823 ** provide only to avoid breaking legacy code. New aggregate function
75824 ** implementations should keep their own counts within their aggregate
75825 ** context.
75826 */
75827 SQLITE_API int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context *p){
75828 assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize );
75829 return p->pMem->n;
75830 }
75831 #endif
75832
75833 /*
75834 ** Return the number of columns in the result set for the statement pStmt.
75835 */
75836 SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt){
75837 Vdbe *pVm = (Vdbe *)pStmt;
75838 return pVm ? pVm->nResColumn : 0;
75839 }
75840
75841 /*
75842 ** Return the number of values available from the current row of the
75843 ** currently executing statement pStmt.
75844 */
75845 SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt){
75846 Vdbe *pVm = (Vdbe *)pStmt;
75847 if( pVm==0 || pVm->pResultSet==0 ) return 0;
75848 return pVm->nResColumn;
75849 }
75850
@@ -75943,67 +75952,67 @@
75943
75944 /**************************** sqlite3_column_ *******************************
75945 ** The following routines are used to access elements of the current row
75946 ** in the result set.
75947 */
75948 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt *pStmt, int i){
75949 const void *val;
75950 val = sqlite3_value_blob( columnMem(pStmt,i) );
75951 /* Even though there is no encoding conversion, value_blob() might
75952 ** need to call malloc() to expand the result of a zeroblob()
75953 ** expression.
75954 */
75955 columnMallocFailure(pStmt);
75956 return val;
75957 }
75958 SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){
75959 int val = sqlite3_value_bytes( columnMem(pStmt,i) );
75960 columnMallocFailure(pStmt);
75961 return val;
75962 }
75963 SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){
75964 int val = sqlite3_value_bytes16( columnMem(pStmt,i) );
75965 columnMallocFailure(pStmt);
75966 return val;
75967 }
75968 SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt *pStmt, int i){
75969 double val = sqlite3_value_double( columnMem(pStmt,i) );
75970 columnMallocFailure(pStmt);
75971 return val;
75972 }
75973 SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt *pStmt, int i){
75974 int val = sqlite3_value_int( columnMem(pStmt,i) );
75975 columnMallocFailure(pStmt);
75976 return val;
75977 }
75978 SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt *pStmt, int i){
75979 sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) );
75980 columnMallocFailure(pStmt);
75981 return val;
75982 }
75983 SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt *pStmt, int i){
75984 const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) );
75985 columnMallocFailure(pStmt);
75986 return val;
75987 }
75988 SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt *pStmt, int i){
75989 Mem *pOut = columnMem(pStmt, i);
75990 if( pOut->flags&MEM_Static ){
75991 pOut->flags &= ~MEM_Static;
75992 pOut->flags |= MEM_Ephem;
75993 }
75994 columnMallocFailure(pStmt);
75995 return (sqlite3_value *)pOut;
75996 }
75997 #ifndef SQLITE_OMIT_UTF16
75998 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt *pStmt, int i){
75999 const void *val = sqlite3_value_text16( columnMem(pStmt,i) );
76000 columnMallocFailure(pStmt);
76001 return val;
76002 }
76003 #endif /* SQLITE_OMIT_UTF16 */
76004 SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt *pStmt, int i){
76005 int iType = sqlite3_value_type( columnMem(pStmt,i) );
76006 columnMallocFailure(pStmt);
76007 return iType;
76008 }
76009
@@ -76063,16 +76072,16 @@
76063
76064 /*
76065 ** Return the name of the Nth column of the result set returned by SQL
76066 ** statement pStmt.
76067 */
76068 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt *pStmt, int N){
76069 return columnName(
76070 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME);
76071 }
76072 #ifndef SQLITE_OMIT_UTF16
76073 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt *pStmt, int N){
76074 return columnName(
76075 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME);
76076 }
76077 #endif
76078
@@ -76088,16 +76097,16 @@
76088 #ifndef SQLITE_OMIT_DECLTYPE
76089 /*
76090 ** Return the column declaration type (if applicable) of the 'i'th column
76091 ** of the result set of SQL statement pStmt.
76092 */
76093 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){
76094 return columnName(
76095 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE);
76096 }
76097 #ifndef SQLITE_OMIT_UTF16
76098 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){
76099 return columnName(
76100 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE);
76101 }
76102 #endif /* SQLITE_OMIT_UTF16 */
76103 #endif /* SQLITE_OMIT_DECLTYPE */
@@ -76106,16 +76115,16 @@
76106 /*
76107 ** Return the name of the database from which a result column derives.
76108 ** NULL is returned if the result column is an expression or constant or
76109 ** anything else which is not an unambiguous reference to a database column.
76110 */
76111 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){
76112 return columnName(
76113 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE);
76114 }
76115 #ifndef SQLITE_OMIT_UTF16
76116 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){
76117 return columnName(
76118 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE);
76119 }
76120 #endif /* SQLITE_OMIT_UTF16 */
76121
@@ -76122,16 +76131,16 @@
76122 /*
76123 ** Return the name of the table from which a result column derives.
76124 ** NULL is returned if the result column is an expression or constant or
76125 ** anything else which is not an unambiguous reference to a database column.
76126 */
76127 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){
76128 return columnName(
76129 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE);
76130 }
76131 #ifndef SQLITE_OMIT_UTF16
76132 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){
76133 return columnName(
76134 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE);
76135 }
76136 #endif /* SQLITE_OMIT_UTF16 */
76137
@@ -76138,16 +76147,16 @@
76138 /*
76139 ** Return the name of the table column from which a result column derives.
76140 ** NULL is returned if the result column is an expression or constant or
76141 ** anything else which is not an unambiguous reference to a database column.
76142 */
76143 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){
76144 return columnName(
76145 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN);
76146 }
76147 #ifndef SQLITE_OMIT_UTF16
76148 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){
76149 return columnName(
76150 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN);
76151 }
76152 #endif /* SQLITE_OMIT_UTF16 */
76153 #endif /* SQLITE_ENABLE_COLUMN_METADATA */
@@ -76244,11 +76253,11 @@
76244
76245
76246 /*
76247 ** Bind a blob value to an SQL statement variable.
76248 */
76249 SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(
76250 sqlite3_stmt *pStmt,
76251 int i,
76252 const void *zData,
76253 int nData,
76254 void (*xDel)(void*)
@@ -76256,11 +76265,11 @@
76256 #ifdef SQLITE_ENABLE_API_ARMOR
76257 if( nData<0 ) return SQLITE_MISUSE_BKPT;
76258 #endif
76259 return bindText(pStmt, i, zData, nData, xDel, 0);
76260 }
76261 SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(
76262 sqlite3_stmt *pStmt,
76263 int i,
76264 const void *zData,
76265 sqlite3_uint64 nData,
76266 void (*xDel)(void*)
@@ -76270,52 +76279,52 @@
76270 return invokeValueDestructor(zData, xDel, 0);
76271 }else{
76272 return bindText(pStmt, i, zData, (int)nData, xDel, 0);
76273 }
76274 }
76275 SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
76276 int rc;
76277 Vdbe *p = (Vdbe *)pStmt;
76278 rc = vdbeUnbind(p, i);
76279 if( rc==SQLITE_OK ){
76280 sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue);
76281 sqlite3_mutex_leave(p->db->mutex);
76282 }
76283 return rc;
76284 }
76285 SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){
76286 return sqlite3_bind_int64(p, i, (i64)iValue);
76287 }
76288 SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
76289 int rc;
76290 Vdbe *p = (Vdbe *)pStmt;
76291 rc = vdbeUnbind(p, i);
76292 if( rc==SQLITE_OK ){
76293 sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue);
76294 sqlite3_mutex_leave(p->db->mutex);
76295 }
76296 return rc;
76297 }
76298 SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
76299 int rc;
76300 Vdbe *p = (Vdbe*)pStmt;
76301 rc = vdbeUnbind(p, i);
76302 if( rc==SQLITE_OK ){
76303 sqlite3_mutex_leave(p->db->mutex);
76304 }
76305 return rc;
76306 }
76307 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(
76308 sqlite3_stmt *pStmt,
76309 int i,
76310 const char *zData,
76311 int nData,
76312 void (*xDel)(void*)
76313 ){
76314 return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8);
76315 }
76316 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(
76317 sqlite3_stmt *pStmt,
76318 int i,
76319 const char *zData,
76320 sqlite3_uint64 nData,
76321 void (*xDel)(void*),
@@ -76328,21 +76337,21 @@
76328 if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE;
76329 return bindText(pStmt, i, zData, (int)nData, xDel, enc);
76330 }
76331 }
76332 #ifndef SQLITE_OMIT_UTF16
76333 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(
76334 sqlite3_stmt *pStmt,
76335 int i,
76336 const void *zData,
76337 int nData,
76338 void (*xDel)(void*)
76339 ){
76340 return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE);
76341 }
76342 #endif /* SQLITE_OMIT_UTF16 */
76343 SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
76344 int rc;
76345 switch( sqlite3_value_type((sqlite3_value*)pValue) ){
76346 case SQLITE_INTEGER: {
76347 rc = sqlite3_bind_int64(pStmt, i, pValue->u.i);
76348 break;
@@ -76369,21 +76378,21 @@
76369 break;
76370 }
76371 }
76372 return rc;
76373 }
76374 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){
76375 int rc;
76376 Vdbe *p = (Vdbe *)pStmt;
76377 rc = vdbeUnbind(p, i);
76378 if( rc==SQLITE_OK ){
76379 sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);
76380 sqlite3_mutex_leave(p->db->mutex);
76381 }
76382 return rc;
76383 }
76384 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){
76385 int rc;
76386 Vdbe *p = (Vdbe *)pStmt;
76387 sqlite3_mutex_enter(p->db->mutex);
76388 if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){
76389 rc = SQLITE_TOOBIG;
@@ -76398,11 +76407,11 @@
76398
76399 /*
76400 ** Return the number of wildcards that can be potentially bound to.
76401 ** This routine is added to support DBD::SQLite.
76402 */
76403 SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){
76404 Vdbe *p = (Vdbe*)pStmt;
76405 return p ? p->nVar : 0;
76406 }
76407
76408 /*
@@ -76409,11 +76418,11 @@
76409 ** Return the name of a wildcard parameter. Return NULL if the index
76410 ** is out of range or if the wildcard is unnamed.
76411 **
76412 ** The result is always UTF-8.
76413 */
76414 SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){
76415 Vdbe *p = (Vdbe*)pStmt;
76416 if( p==0 || i<1 || i>p->nzVar ){
76417 return 0;
76418 }
76419 return p->azVar[i-1];
@@ -76437,11 +76446,11 @@
76437 }
76438 }
76439 }
76440 return 0;
76441 }
76442 SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
76443 return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName));
76444 }
76445
76446 /*
76447 ** Transfer all bindings from the first statement over to the second.
@@ -76471,11 +76480,11 @@
76471 **
76472 ** If the two statements contain a different number of bindings, then
76473 ** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise
76474 ** SQLITE_OK is returned.
76475 */
76476 SQLITE_API int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
76477 Vdbe *pFrom = (Vdbe*)pFromStmt;
76478 Vdbe *pTo = (Vdbe*)pToStmt;
76479 if( pFrom->nVar!=pTo->nVar ){
76480 return SQLITE_ERROR;
76481 }
@@ -76493,26 +76502,26 @@
76493 ** Return the sqlite3* database handle to which the prepared statement given
76494 ** in the argument belongs. This is the same database handle that was
76495 ** the first argument to the sqlite3_prepare() that was used to create
76496 ** the statement in the first place.
76497 */
76498 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt *pStmt){
76499 return pStmt ? ((Vdbe*)pStmt)->db : 0;
76500 }
76501
76502 /*
76503 ** Return true if the prepared statement is guaranteed to not modify the
76504 ** database.
76505 */
76506 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt){
76507 return pStmt ? ((Vdbe*)pStmt)->readOnly : 1;
76508 }
76509
76510 /*
76511 ** Return true if the prepared statement is in need of being reset.
76512 */
76513 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){
76514 Vdbe *v = (Vdbe*)pStmt;
76515 return v!=0 && v->pc>=0 && v->magic==VDBE_MAGIC_RUN;
76516 }
76517
76518 /*
@@ -76519,11 +76528,11 @@
76519 ** Return a pointer to the next prepared statement after pStmt associated
76520 ** with database connection pDb. If pStmt is NULL, return the first
76521 ** prepared statement for the database connection. Return NULL if there
76522 ** are no more.
76523 */
76524 SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
76525 sqlite3_stmt *pNext;
76526 #ifdef SQLITE_ENABLE_API_ARMOR
76527 if( !sqlite3SafetyCheckOk(pDb) ){
76528 (void)SQLITE_MISUSE_BKPT;
76529 return 0;
@@ -76540,11 +76549,11 @@
76540 }
76541
76542 /*
76543 ** Return the value of a status counter for a prepared statement
76544 */
76545 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
76546 Vdbe *pVdbe = (Vdbe*)pStmt;
76547 u32 v;
76548 #ifdef SQLITE_ENABLE_API_ARMOR
76549 if( !pStmt ){
76550 (void)SQLITE_MISUSE_BKPT;
@@ -76557,11 +76566,11 @@
76557 }
76558
76559 /*
76560 ** Return the SQL associated with a prepared statement
76561 */
76562 SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt){
76563 Vdbe *p = (Vdbe *)pStmt;
76564 return p ? p->zSql : 0;
76565 }
76566
76567 /*
@@ -76571,11 +76580,11 @@
76571 ** freeing the returned string by passing it to sqlite3_free().
76572 **
76573 ** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of
76574 ** expanded bound parameters.
76575 */
76576 SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt){
76577 #ifdef SQLITE_OMIT_TRACE
76578 return 0;
76579 #else
76580 char *z = 0;
76581 const char *zSql = sqlite3_sql(pStmt);
@@ -76613,11 +76622,11 @@
76613
76614 /*
76615 ** This function is called from within a pre-update callback to retrieve
76616 ** a field of the row currently being updated or deleted.
76617 */
76618 SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
76619 PreUpdate *p = db->pPreUpdate;
76620 int rc = SQLITE_OK;
76621
76622 /* Test that this call is being made from within an SQLITE_DELETE or
76623 ** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */
@@ -76668,11 +76677,11 @@
76668 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
76669 /*
76670 ** This function is called from within a pre-update callback to retrieve
76671 ** the number of columns in the row being updated, deleted or inserted.
76672 */
76673 SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *db){
76674 PreUpdate *p = db->pPreUpdate;
76675 return (p ? p->keyinfo.nField : 0);
76676 }
76677 #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
76678
@@ -76686,11 +76695,11 @@
76686 ** top-level trigger etc.).
76687 **
76688 ** For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL
76689 ** or SET DEFAULT action is considered a trigger.
76690 */
76691 SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *db){
76692 PreUpdate *p = db->pPreUpdate;
76693 return (p ? p->v->nFrame : 0);
76694 }
76695 #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
76696
@@ -76697,11 +76706,11 @@
76697 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
76698 /*
76699 ** This function is called from within a pre-update callback to retrieve
76700 ** a field of the row currently being updated or inserted.
76701 */
76702 SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
76703 PreUpdate *p = db->pPreUpdate;
76704 int rc = SQLITE_OK;
76705 Mem *pMem;
76706
76707 if( !p || p->op==SQLITE_DELETE ){
@@ -76771,11 +76780,11 @@
76771
76772 #ifdef SQLITE_ENABLE_STMT_SCANSTATUS
76773 /*
76774 ** Return status data for a single loop within query pStmt.
76775 */
76776 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
76777 sqlite3_stmt *pStmt, /* Prepared statement being queried */
76778 int idx, /* Index of loop to report on */
76779 int iScanStatusOp, /* Which metric to return */
76780 void *pOut /* OUT: Write the answer here */
76781 ){
@@ -76830,11 +76839,11 @@
76830 }
76831
76832 /*
76833 ** Zero all counters associated with the sqlite3_stmt_scanstatus() data.
76834 */
76835 SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){
76836 Vdbe *p = (Vdbe*)pStmt;
76837 memset(p->anExec, 0, p->nOp * sizeof(i64));
76838 }
76839 #endif /* SQLITE_ENABLE_STMT_SCANSTATUS */
76840
@@ -77357,11 +77366,11 @@
77357 ** Try to convert the type of a function argument or a result column
77358 ** into a numeric representation. Use either INTEGER or REAL whichever
77359 ** is appropriate. But only do the conversion if it is possible without
77360 ** loss of information and return the revised type of the argument.
77361 */
77362 SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value *pVal){
77363 int eType = sqlite3_value_type(pVal);
77364 if( eType==SQLITE_TEXT ){
77365 Mem *pMem = (Mem*)pVal;
77366 applyNumericAffinity(pMem, 0);
77367 eType = sqlite3_value_type(pVal);
@@ -79007,11 +79016,11 @@
79007 break;
79008 }
79009 #endif /* SQLITE_OMIT_CAST */
79010
79011 /* Opcode: Lt P1 P2 P3 P4 P5
79012 ** Synopsis: if r[P1]<r[P3] goto P2
79013 **
79014 ** Compare the values in register P1 and P3. If reg(P3)<reg(P1) then
79015 ** jump to address P2.
79016 **
79017 ** If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or
@@ -79042,11 +79051,11 @@
79042 ** If the SQLITE_NULLEQ bit is set in P5, then NULL values are considered
79043 ** equal to one another, provided that they do not have their MEM_Cleared
79044 ** bit set.
79045 */
79046 /* Opcode: Ne P1 P2 P3 P4 P5
79047 ** Synopsis: if r[P1]!=r[P3] goto P2
79048 **
79049 ** This works just like the Lt opcode except that the jump is taken if
79050 ** the operands in registers P1 and P3 are not equal. See the Lt opcode for
79051 ** additional information.
79052 **
@@ -79055,11 +79064,11 @@
79055 ** of comparison is false. If either operand is NULL then the result is true.
79056 ** If neither operand is NULL the result is the same as it would be if
79057 ** the SQLITE_NULLEQ flag were omitted from P5.
79058 */
79059 /* Opcode: Eq P1 P2 P3 P4 P5
79060 ** Synopsis: if r[P1]==r[P3] goto P2
79061 **
79062 ** This works just like the Lt opcode except that the jump is taken if
79063 ** the operands in registers P1 and P3 are equal.
79064 ** See the Lt opcode for additional information.
79065 **
@@ -79068,25 +79077,25 @@
79068 ** of comparison is true. If either operand is NULL then the result is false.
79069 ** If neither operand is NULL the result is the same as it would be if
79070 ** the SQLITE_NULLEQ flag were omitted from P5.
79071 */
79072 /* Opcode: Le P1 P2 P3 P4 P5
79073 ** Synopsis: if r[P1]<=r[P3] goto P2
79074 **
79075 ** This works just like the Lt opcode except that the jump is taken if
79076 ** the content of register P3 is less than or equal to the content of
79077 ** register P1. See the Lt opcode for additional information.
79078 */
79079 /* Opcode: Gt P1 P2 P3 P4 P5
79080 ** Synopsis: if r[P1]>r[P3] goto P2
79081 **
79082 ** This works just like the Lt opcode except that the jump is taken if
79083 ** the content of register P3 is greater than the content of
79084 ** register P1. See the Lt opcode for additional information.
79085 */
79086 /* Opcode: Ge P1 P2 P3 P4 P5
79087 ** Synopsis: if r[P1]>=r[P3] goto P2
79088 **
79089 ** This works just like the Lt opcode except that the jump is taken if
79090 ** the content of register P3 is greater than or equal to the content of
79091 ** register P1. See the Lt opcode for additional information.
79092 */
@@ -84209,11 +84218,11 @@
84209 }
84210
84211 /*
84212 ** Open a blob handle.
84213 */
84214 SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
84215 sqlite3* db, /* The database connection */
84216 const char *zDb, /* The attached database containing the blob */
84217 const char *zTable, /* The table containing the blob */
84218 const char *zColumn, /* The column containing the blob */
84219 sqlite_int64 iRow, /* The row containing the glob */
@@ -84450,11 +84459,11 @@
84450
84451 /*
84452 ** Close a blob handle that was previously created using
84453 ** sqlite3_blob_open().
84454 */
84455 SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *pBlob){
84456 Incrblob *p = (Incrblob *)pBlob;
84457 int rc;
84458 sqlite3 *db;
84459
84460 if( p ){
@@ -84543,28 +84552,28 @@
84543 }
84544
84545 /*
84546 ** Read data from a blob handle.
84547 */
84548 SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){
84549 return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData);
84550 }
84551
84552 /*
84553 ** Write data to a blob handle.
84554 */
84555 SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){
84556 return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData);
84557 }
84558
84559 /*
84560 ** Query a blob handle for the size of the data.
84561 **
84562 ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
84563 ** so no mutex is required for access.
84564 */
84565 SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *pBlob){
84566 Incrblob *p = (Incrblob *)pBlob;
84567 return (p && p->pStmt) ? p->nByte : 0;
84568 }
84569
84570 /*
@@ -84575,11 +84584,11 @@
84575 ** contain a blob or text value, then an error code is returned and the
84576 ** database handle error code and message set. If this happens, then all
84577 ** subsequent calls to sqlite3_blob_xxx() functions (except blob_close())
84578 ** immediately return SQLITE_ABORT.
84579 */
84580 SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){
84581 int rc;
84582 Incrblob *p = (Incrblob *)pBlob;
84583 sqlite3 *db;
84584
84585 if( p==0 ) return SQLITE_MISUSE_BKPT;
@@ -97188,11 +97197,11 @@
97188 ** and attempts to write the column will be ignored.
97189 **
97190 ** Setting the auth function to NULL disables this hook. The default
97191 ** setting of the auth function is NULL.
97192 */
97193 SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
97194 sqlite3 *db,
97195 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
97196 void *pArg
97197 ){
97198 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -103958,18 +103967,18 @@
103958 }
103959
103960 /*
103961 ** The sqlite3_strglob() interface.
103962 */
103963 SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlobPattern, const char *zString){
103964 return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, '[')==0;
103965 }
103966
103967 /*
103968 ** The sqlite3_strlike() interface.
103969 */
103970 SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){
103971 return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc)==0;
103972 }
103973
103974 /*
103975 ** Count the number of times that the LIKE operator (or GLOB which is
@@ -108244,19 +108253,19 @@
108244 }
108245 if( piIdxCur ) *piIdxCur = iBase;
108246 for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
108247 int iIdxCur = iBase++;
108248 assert( pIdx->pSchema==pTab->pSchema );
 
 
 
 
108249 if( aToOpen==0 || aToOpen[i+1] ){
108250 sqlite3VdbeAddOp3(v, op, iIdxCur, pIdx->tnum, iDb);
108251 sqlite3VdbeSetP4KeyInfo(pParse, pIdx);
108252 VdbeComment((v, "%s", pIdx->zName));
108253 }
108254 if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){
108255 if( piDataCur ) *piDataCur = iIdxCur;
108256 }else{
108257 sqlite3VdbeChangeP5(v, p5);
 
108258 }
108259 }
108260 if( iBase>pParse->nTab ) pParse->nTab = iBase;
108261 return i;
108262 }
@@ -108684,11 +108693,11 @@
108684 ** If the SQL is a query, then for each row in the query result
108685 ** the xCallback() function is called. pArg becomes the first
108686 ** argument to xCallback(). If xCallback=NULL then no callback
108687 ** is invoked, even for queries.
108688 */
108689 SQLITE_API int SQLITE_STDCALL sqlite3_exec(
108690 sqlite3 *db, /* The database on which the SQL executes */
108691 const char *zSql, /* The SQL to be executed */
108692 sqlite3_callback xCallback, /* Invoke this callback routine */
108693 void *pArg, /* First argument to xCallback() */
108694 char **pzErrMsg /* Write error messages here */
@@ -109946,11 +109955,11 @@
109946 db->aExtension = aHandle;
109947
109948 db->aExtension[db->nExtension++] = handle;
109949 return SQLITE_OK;
109950 }
109951 SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
109952 sqlite3 *db, /* Load the extension into this database connection */
109953 const char *zFile, /* Name of the shared library containing extension */
109954 const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */
109955 char **pzErrMsg /* Put error message here if not 0 */
109956 ){
@@ -109977,11 +109986,11 @@
109977
109978 /*
109979 ** Enable or disable extension loading. Extension loading is disabled by
109980 ** default so as not to open security holes in older applications.
109981 */
109982 SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff){
109983 sqlite3_mutex_enter(db->mutex);
109984 if( onoff ){
109985 db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc;
109986 }else{
109987 db->flags &= ~(SQLITE_LoadExtension|SQLITE_LoadExtFunc);
@@ -110034,11 +110043,11 @@
110034
110035 /*
110036 ** Register a statically linked extension that is automatically
110037 ** loaded by every new database connection.
110038 */
110039 SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(
110040 void (*xInit)(void)
110041 ){
110042 int rc = SQLITE_OK;
110043 #ifndef SQLITE_OMIT_AUTOINIT
110044 rc = sqlite3_initialize();
@@ -110081,11 +110090,11 @@
110081 ** routine is a no-op.
110082 **
110083 ** Return 1 if xInit was found on the list and removed. Return 0 if xInit
110084 ** was not on the list.
110085 */
110086 SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(
110087 void (*xInit)(void)
110088 ){
110089 #if SQLITE_THREADSAFE
110090 sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
110091 #endif
@@ -110106,11 +110115,11 @@
110106 }
110107
110108 /*
110109 ** Reset the automatic extension loading mechanism.
110110 */
110111 SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void){
110112 #ifndef SQLITE_OMIT_AUTOINIT
110113 if( sqlite3_initialize()==SQLITE_OK )
110114 #endif
110115 {
110116 #if SQLITE_THREADSAFE
@@ -113367,11 +113376,11 @@
113367 ** and so if a schema change occurs, SQLITE_SCHEMA is returned by
113368 ** sqlite3_step(). In the new version, the original SQL text is retained
113369 ** and the statement is automatically recompiled if an schema change
113370 ** occurs.
113371 */
113372 SQLITE_API int SQLITE_STDCALL sqlite3_prepare(
113373 sqlite3 *db, /* Database handle. */
113374 const char *zSql, /* UTF-8 encoded SQL statement. */
113375 int nBytes, /* Length of zSql in bytes. */
113376 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113377 const char **pzTail /* OUT: End of parsed string */
@@ -113379,11 +113388,11 @@
113379 int rc;
113380 rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail);
113381 assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
113382 return rc;
113383 }
113384 SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2(
113385 sqlite3 *db, /* Database handle. */
113386 const char *zSql, /* UTF-8 encoded SQL statement. */
113387 int nBytes, /* Length of zSql in bytes. */
113388 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113389 const char **pzTail /* OUT: End of parsed string */
@@ -113455,11 +113464,11 @@
113455 ** and so if a schema change occurs, SQLITE_SCHEMA is returned by
113456 ** sqlite3_step(). In the new version, the original SQL text is retained
113457 ** and the statement is automatically recompiled if an schema change
113458 ** occurs.
113459 */
113460 SQLITE_API int SQLITE_STDCALL sqlite3_prepare16(
113461 sqlite3 *db, /* Database handle. */
113462 const void *zSql, /* UTF-16 encoded SQL statement. */
113463 int nBytes, /* Length of zSql in bytes. */
113464 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113465 const void **pzTail /* OUT: End of parsed string */
@@ -113467,11 +113476,11 @@
113467 int rc;
113468 rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail);
113469 assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
113470 return rc;
113471 }
113472 SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
113473 sqlite3 *db, /* Database handle. */
113474 const void *zSql, /* UTF-16 encoded SQL statement. */
113475 int nBytes, /* Length of zSql in bytes. */
113476 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113477 const void **pzTail /* OUT: End of parsed string */
@@ -119310,11 +119319,11 @@
119310 ** The result that is written to ***pazResult is held in memory obtained
119311 ** from malloc(). But the caller cannot free this memory directly.
119312 ** Instead, the entire table should be passed to sqlite3_free_table() when
119313 ** the calling procedure is finished using it.
119314 */
119315 SQLITE_API int SQLITE_STDCALL sqlite3_get_table(
119316 sqlite3 *db, /* The database on which the SQL executes */
119317 const char *zSql, /* The SQL to be executed */
119318 char ***pazResult, /* Write the result table here */
119319 int *pnRow, /* Write the number of rows in the result here */
119320 int *pnColumn, /* Write the number of columns of result here */
@@ -119379,11 +119388,11 @@
119379 }
119380
119381 /*
119382 ** This routine frees the space the sqlite3_get_table() malloced.
119383 */
119384 SQLITE_API void SQLITE_STDCALL sqlite3_free_table(
119385 char **azResult /* Result returned from sqlite3_get_table() */
119386 ){
119387 if( azResult ){
119388 int i, n;
119389 azResult--;
@@ -121789,11 +121798,11 @@
121789
121790
121791 /*
121792 ** External API function used to create a new virtual-table module.
121793 */
121794 SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
121795 sqlite3 *db, /* Database in which module is registered */
121796 const char *zName, /* Name assigned to this module */
121797 const sqlite3_module *pModule, /* The definition of the module */
121798 void *pAux /* Context pointer for xCreate/xConnect */
121799 ){
@@ -121804,11 +121813,11 @@
121804 }
121805
121806 /*
121807 ** External API function used to create a new virtual-table module.
121808 */
121809 SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
121810 sqlite3 *db, /* Database in which module is registered */
121811 const char *zName, /* Name assigned to this module */
121812 const sqlite3_module *pModule, /* The definition of the module */
121813 void *pAux, /* Context pointer for xCreate/xConnect */
121814 void (*xDestroy)(void *) /* Module destructor function */
@@ -122428,11 +122437,11 @@
122428 /*
122429 ** This function is used to set the schema of a virtual table. It is only
122430 ** valid to call this function from within the xCreate() or xConnect() of a
122431 ** virtual table module.
122432 */
122433 SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
122434 VtabCtx *pCtx;
122435 Parse *pParse;
122436 int rc = SQLITE_OK;
122437 Table *pTab;
122438 char *zErr = 0;
@@ -122885,11 +122894,11 @@
122885 ** table update operation currently in progress.
122886 **
122887 ** The results of this routine are undefined unless it is called from
122888 ** within an xUpdate method.
122889 */
122890 SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *db){
122891 static const unsigned char aMap[] = {
122892 SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE
122893 };
122894 #ifdef SQLITE_ENABLE_API_ARMOR
122895 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -122903,11 +122912,11 @@
122903 /*
122904 ** Call from within the xCreate() or xConnect() methods to provide
122905 ** the SQLite core with additional information about the behavior
122906 ** of the virtual table being implemented.
122907 */
122908 SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3 *db, int op, ...){
122909 va_list ap;
122910 int rc = SQLITE_OK;
122911
122912 #ifdef SQLITE_ENABLE_API_ARMOR
122913 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -124028,13 +124037,19 @@
124028 regBase = r1;
124029 }else{
124030 sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j);
124031 }
124032 }
124033 testcase( pTerm->eOperator & WO_ISNULL );
124034 testcase( pTerm->eOperator & WO_IN );
124035 if( (pTerm->eOperator & (WO_ISNULL|WO_IN))==0 ){
 
 
 
 
 
 
124036 Expr *pRight = pTerm->pExpr->pRight;
124037 if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){
124038 sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
124039 VdbeCoverage(v);
124040 }
@@ -130105,10 +130120,18 @@
130105 if( pOBExpr->op!=TK_COLUMN ) continue;
130106 if( pOBExpr->iTable!=iCur ) continue;
130107 pTerm = sqlite3WhereFindTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn,
130108 ~ready, eqOpMask, 0);
130109 if( pTerm==0 ) continue;
 
 
 
 
 
 
 
 
130110 if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0 && pOBExpr->iColumn>=0 ){
130111 const char *z1, *z2;
130112 pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
130113 if( !pColl ) pColl = db->pDfltColl;
130114 z1 = pColl->zName;
@@ -136210,11 +136233,11 @@
136210 **
136211 ** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed
136212 ** to recognize the end of a trigger can be omitted. All we have to do
136213 ** is look for a semicolon that is not part of an string or comment.
136214 */
136215 SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *zSql){
136216 u8 state = 0; /* Current state, using numbers defined in header comment */
136217 u8 token; /* Value of the next token */
136218
136219 #ifndef SQLITE_OMIT_TRIGGER
136220 /* A complex statement machine used to detect the end of a CREATE TRIGGER
@@ -136375,11 +136398,11 @@
136375 /*
136376 ** This routine is the same as the sqlite3_complete() routine described
136377 ** above, except that the parameter is required to be UTF-16 encoded, not
136378 ** UTF-8.
136379 */
136380 SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *zSql){
136381 sqlite3_value *pVal;
136382 char const *zSql8;
136383 int rc;
136384
136385 #ifndef SQLITE_OMIT_AUTOINIT
@@ -136535,28 +136558,28 @@
136535 #endif
136536
136537 /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns
136538 ** a pointer to the to the sqlite3_version[] string constant.
136539 */
136540 SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void){ return sqlite3_version; }
136541
136542 /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a
136543 ** pointer to a string constant whose value is the same as the
136544 ** SQLITE_SOURCE_ID C preprocessor macro.
136545 */
136546 SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
136547
136548 /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function
136549 ** returns an integer equal to SQLITE_VERSION_NUMBER.
136550 */
136551 SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
136552
136553 /* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns
136554 ** zero if and only if SQLite was compiled with mutexing code omitted due to
136555 ** the SQLITE_THREADSAFE compile-time option being set to 0.
136556 */
136557 SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
136558
136559 /*
136560 ** When compiling the test fixture or with debugging enabled (on Win32),
136561 ** this variable being set to non-zero will cause OSTRACE macros to emit
136562 ** extra diagnostic information.
@@ -136625,11 +136648,11 @@
136625 ** call by X completes.
136626 **
136627 ** * Recursive calls to this routine from thread X return immediately
136628 ** without blocking.
136629 */
136630 SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void){
136631 MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
136632 int rc; /* Result code */
136633 #ifdef SQLITE_EXTRA_INIT
136634 int bRunExtraInit = 0; /* Extra initialization needed */
136635 #endif
@@ -136791,11 +136814,11 @@
136791 ** while any part of SQLite is otherwise in use in any thread. This
136792 ** routine is not threadsafe. But it is safe to invoke this routine
136793 ** on when SQLite is already shut down. If SQLite is already shut down
136794 ** when this routine is invoked, then this routine is a harmless no-op.
136795 */
136796 SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void){
136797 #ifdef SQLITE_OMIT_WSD
136798 int rc = sqlite3_wsd_init(4096, 24);
136799 if( rc!=SQLITE_OK ){
136800 return rc;
136801 }
@@ -136845,11 +136868,11 @@
136845 ** This routine should only be called when there are no outstanding
136846 ** database connections or memory allocations. This routine is not
136847 ** threadsafe. Failure to heed these warnings can lead to unpredictable
136848 ** behavior.
136849 */
136850 SQLITE_API int SQLITE_CDECL sqlite3_config(int op, ...){
136851 va_list ap;
136852 int rc = SQLITE_OK;
136853
136854 /* sqlite3_config() shall return SQLITE_MISUSE if it is invoked while
136855 ** the SQLite library is in use. */
@@ -137210,11 +137233,11 @@
137210 }
137211
137212 /*
137213 ** Return the mutex associated with a database connection.
137214 */
137215 SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3 *db){
137216 #ifdef SQLITE_ENABLE_API_ARMOR
137217 if( !sqlite3SafetyCheckOk(db) ){
137218 (void)SQLITE_MISUSE_BKPT;
137219 return 0;
137220 }
@@ -137224,11 +137247,11 @@
137224
137225 /*
137226 ** Free up as much memory as we can from the given database
137227 ** connection.
137228 */
137229 SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3 *db){
137230 int i;
137231
137232 #ifdef SQLITE_ENABLE_API_ARMOR
137233 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
137234 #endif
@@ -137248,11 +137271,11 @@
137248
137249 /*
137250 ** Flush any dirty pages in the pager-cache for any attached database
137251 ** to disk.
137252 */
137253 SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3 *db){
137254 int i;
137255 int rc = SQLITE_OK;
137256 int bSeenBusy = 0;
137257
137258 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -137277,11 +137300,11 @@
137277 }
137278
137279 /*
137280 ** Configuration settings for an individual database connection
137281 */
137282 SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3 *db, int op, ...){
137283 va_list ap;
137284 int rc;
137285 va_start(ap, op);
137286 switch( op ){
137287 case SQLITE_DBCONFIG_LOOKASIDE: {
@@ -137398,11 +137421,11 @@
137398 }
137399
137400 /*
137401 ** Return the ROWID of the most recent insert
137402 */
137403 SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3 *db){
137404 #ifdef SQLITE_ENABLE_API_ARMOR
137405 if( !sqlite3SafetyCheckOk(db) ){
137406 (void)SQLITE_MISUSE_BKPT;
137407 return 0;
137408 }
@@ -137411,11 +137434,11 @@
137411 }
137412
137413 /*
137414 ** Return the number of changes in the most recent call to sqlite3_exec().
137415 */
137416 SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3 *db){
137417 #ifdef SQLITE_ENABLE_API_ARMOR
137418 if( !sqlite3SafetyCheckOk(db) ){
137419 (void)SQLITE_MISUSE_BKPT;
137420 return 0;
137421 }
@@ -137424,11 +137447,11 @@
137424 }
137425
137426 /*
137427 ** Return the number of changes since the database handle was opened.
137428 */
137429 SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3 *db){
137430 #ifdef SQLITE_ENABLE_API_ARMOR
137431 if( !sqlite3SafetyCheckOk(db) ){
137432 (void)SQLITE_MISUSE_BKPT;
137433 return 0;
137434 }
@@ -137575,12 +137598,12 @@
137575 ** statements or unfinished sqlite3_backups. The sqlite3_close_v2()
137576 ** version forces the connection to become a zombie if there are
137577 ** unclosed resources, and arranges for deallocation when the last
137578 ** prepare statement or sqlite3_backup closes.
137579 */
137580 SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); }
137581 SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); }
137582
137583
137584 /*
137585 ** Close the mutex on database connection db.
137586 **
@@ -137983,11 +138006,11 @@
137983
137984 /*
137985 ** This routine sets the busy callback for an Sqlite database to the
137986 ** given callback function with the given argument.
137987 */
137988 SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(
137989 sqlite3 *db,
137990 int (*xBusy)(void*,int),
137991 void *pArg
137992 ){
137993 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -138006,11 +138029,11 @@
138006 /*
138007 ** This routine sets the progress callback for an Sqlite database to the
138008 ** given callback function with the given argument. The progress callback will
138009 ** be invoked every nOps opcodes.
138010 */
138011 SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(
138012 sqlite3 *db,
138013 int nOps,
138014 int (*xProgress)(void*),
138015 void *pArg
138016 ){
@@ -138037,11 +138060,11 @@
138037
138038 /*
138039 ** This routine installs a default busy handler that waits for the
138040 ** specified number of milliseconds before returning 0.
138041 */
138042 SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3 *db, int ms){
138043 #ifdef SQLITE_ENABLE_API_ARMOR
138044 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
138045 #endif
138046 if( ms>0 ){
138047 sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db);
@@ -138053,11 +138076,11 @@
138053 }
138054
138055 /*
138056 ** Cause any pending operation to stop at its earliest opportunity.
138057 */
138058 SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3 *db){
138059 #ifdef SQLITE_ENABLE_API_ARMOR
138060 if( !sqlite3SafetyCheckOk(db) ){
138061 (void)SQLITE_MISUSE_BKPT;
138062 return;
138063 }
@@ -138169,11 +138192,11 @@
138169 }
138170
138171 /*
138172 ** Create new user functions.
138173 */
138174 SQLITE_API int SQLITE_STDCALL sqlite3_create_function(
138175 sqlite3 *db,
138176 const char *zFunc,
138177 int nArg,
138178 int enc,
138179 void *p,
@@ -138183,11 +138206,11 @@
138183 ){
138184 return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xSFunc, xStep,
138185 xFinal, 0);
138186 }
138187
138188 SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2(
138189 sqlite3 *db,
138190 const char *zFunc,
138191 int nArg,
138192 int enc,
138193 void *p,
@@ -138226,11 +138249,11 @@
138226 sqlite3_mutex_leave(db->mutex);
138227 return rc;
138228 }
138229
138230 #ifndef SQLITE_OMIT_UTF16
138231 SQLITE_API int SQLITE_STDCALL sqlite3_create_function16(
138232 sqlite3 *db,
138233 const void *zFunctionName,
138234 int nArg,
138235 int eTextRep,
138236 void *p,
@@ -138266,11 +138289,11 @@
138266 ** When virtual tables intend to provide an overloaded function, they
138267 ** should call this routine to make sure the global function exists.
138268 ** A global function must exist in order for name resolution to work
138269 ** properly.
138270 */
138271 SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(
138272 sqlite3 *db,
138273 const char *zName,
138274 int nArg
138275 ){
138276 int rc = SQLITE_OK;
@@ -138298,11 +138321,11 @@
138298 ** A NULL trace function means that no tracing is executes. A non-NULL
138299 ** trace is a pointer to a function that is invoked at the start of each
138300 ** SQL statement.
138301 */
138302 #ifndef SQLITE_OMIT_DEPRECATED
138303 SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){
138304 void *pOld;
138305
138306 #ifdef SQLITE_ENABLE_API_ARMOR
138307 if( !sqlite3SafetyCheckOk(db) ){
138308 (void)SQLITE_MISUSE_BKPT;
@@ -138319,11 +138342,11 @@
138319 }
138320 #endif /* SQLITE_OMIT_DEPRECATED */
138321
138322 /* Register a trace callback using the version-2 interface.
138323 */
138324 SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2(
138325 sqlite3 *db, /* Trace this connection */
138326 unsigned mTrace, /* Mask of events to be traced */
138327 int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */
138328 void *pArg /* Context */
138329 ){
@@ -138331,10 +138354,12 @@
138331 if( !sqlite3SafetyCheckOk(db) ){
138332 return SQLITE_MISUSE_BKPT;
138333 }
138334 #endif
138335 sqlite3_mutex_enter(db->mutex);
 
 
138336 db->mTrace = mTrace;
138337 db->xTrace = xTrace;
138338 db->pTraceArg = pArg;
138339 sqlite3_mutex_leave(db->mutex);
138340 return SQLITE_OK;
@@ -138347,11 +138372,11 @@
138347 **
138348 ** A NULL profile function means that no profiling is executes. A non-NULL
138349 ** profile is a pointer to a function that is invoked at the conclusion of
138350 ** each SQL statement that is run.
138351 */
138352 SQLITE_API void *SQLITE_STDCALL sqlite3_profile(
138353 sqlite3 *db,
138354 void (*xProfile)(void*,const char*,sqlite_uint64),
138355 void *pArg
138356 ){
138357 void *pOld;
@@ -138375,11 +138400,11 @@
138375 /*
138376 ** Register a function to be invoked when a transaction commits.
138377 ** If the invoked function returns non-zero, then the commit becomes a
138378 ** rollback.
138379 */
138380 SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(
138381 sqlite3 *db, /* Attach the hook to this database */
138382 int (*xCallback)(void*), /* Function to invoke on each commit */
138383 void *pArg /* Argument to the function */
138384 ){
138385 void *pOld;
@@ -138400,11 +138425,11 @@
138400
138401 /*
138402 ** Register a callback to be invoked each time a row is updated,
138403 ** inserted or deleted using this database connection.
138404 */
138405 SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
138406 sqlite3 *db, /* Attach the hook to this database */
138407 void (*xCallback)(void*,int,char const *,char const *,sqlite_int64),
138408 void *pArg /* Argument to the function */
138409 ){
138410 void *pRet;
@@ -138425,11 +138450,11 @@
138425
138426 /*
138427 ** Register a callback to be invoked each time a transaction is rolled
138428 ** back by this database connection.
138429 */
138430 SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(
138431 sqlite3 *db, /* Attach the hook to this database */
138432 void (*xCallback)(void*), /* Callback function */
138433 void *pArg /* Argument to the function */
138434 ){
138435 void *pRet;
@@ -138451,11 +138476,11 @@
138451 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
138452 /*
138453 ** Register a callback to be invoked each time a row is updated,
138454 ** inserted or deleted using this database connection.
138455 */
138456 SQLITE_API void *SQLITE_STDCALL sqlite3_preupdate_hook(
138457 sqlite3 *db, /* Attach the hook to this database */
138458 void(*xCallback)( /* Callback function */
138459 void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64),
138460 void *pArg /* First callback argument */
138461 ){
@@ -138500,11 +138525,11 @@
138500 ** The callback registered by this function replaces any existing callback
138501 ** registered using sqlite3_wal_hook(). Likewise, registering a callback
138502 ** using sqlite3_wal_hook() disables the automatic checkpoint mechanism
138503 ** configured by this function.
138504 */
138505 SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){
138506 #ifdef SQLITE_OMIT_WAL
138507 UNUSED_PARAMETER(db);
138508 UNUSED_PARAMETER(nFrame);
138509 #else
138510 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -138521,11 +138546,11 @@
138521
138522 /*
138523 ** Register a callback to be invoked each time a transaction is written
138524 ** into the write-ahead-log by this database connection.
138525 */
138526 SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook(
138527 sqlite3 *db, /* Attach the hook to this db handle */
138528 int(*xCallback)(void *, sqlite3*, const char*, int),
138529 void *pArg /* First argument passed to xCallback() */
138530 ){
138531 #ifndef SQLITE_OMIT_WAL
@@ -138548,11 +138573,11 @@
138548 }
138549
138550 /*
138551 ** Checkpoint database zDb.
138552 */
138553 SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2(
138554 sqlite3 *db, /* Database handle */
138555 const char *zDb, /* Name of attached database (or NULL) */
138556 int eMode, /* SQLITE_CHECKPOINT_* value */
138557 int *pnLog, /* OUT: Size of WAL log in frames */
138558 int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -138603,11 +138628,11 @@
138603 /*
138604 ** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points
138605 ** to contains a zero-length string, all attached databases are
138606 ** checkpointed.
138607 */
138608 SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){
138609 /* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to
138610 ** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */
138611 return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0);
138612 }
138613
@@ -138694,11 +138719,11 @@
138694
138695 /*
138696 ** Return UTF-8 encoded English language explanation of the most recent
138697 ** error.
138698 */
138699 SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3 *db){
138700 const char *z;
138701 if( !db ){
138702 return sqlite3ErrStr(SQLITE_NOMEM_BKPT);
138703 }
138704 if( !sqlite3SafetyCheckSickOrOk(db) ){
@@ -138722,11 +138747,11 @@
138722 #ifndef SQLITE_OMIT_UTF16
138723 /*
138724 ** Return UTF-16 encoded English language explanation of the most recent
138725 ** error.
138726 */
138727 SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3 *db){
138728 static const u16 outOfMem[] = {
138729 'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0
138730 };
138731 static const u16 misuse[] = {
138732 'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ',
@@ -138767,38 +138792,38 @@
138767
138768 /*
138769 ** Return the most recent error code generated by an SQLite routine. If NULL is
138770 ** passed to this function, we assume a malloc() failed during sqlite3_open().
138771 */
138772 SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db){
138773 if( db && !sqlite3SafetyCheckSickOrOk(db) ){
138774 return SQLITE_MISUSE_BKPT;
138775 }
138776 if( !db || db->mallocFailed ){
138777 return SQLITE_NOMEM_BKPT;
138778 }
138779 return db->errCode & db->errMask;
138780 }
138781 SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db){
138782 if( db && !sqlite3SafetyCheckSickOrOk(db) ){
138783 return SQLITE_MISUSE_BKPT;
138784 }
138785 if( !db || db->mallocFailed ){
138786 return SQLITE_NOMEM_BKPT;
138787 }
138788 return db->errCode;
138789 }
138790 SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3 *db){
138791 return db ? db->iSysErrno : 0;
138792 }
138793
138794 /*
138795 ** Return a string that describes the kind of error specified in the
138796 ** argument. For now, this simply calls the internal sqlite3ErrStr()
138797 ** function.
138798 */
138799 SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int rc){
138800 return sqlite3ErrStr(rc);
138801 }
138802
138803 /*
138804 ** Create a new collating function for database "db". The name is zName
@@ -138942,11 +138967,11 @@
138942 **
138943 ** A new lower limit does not shrink existing constructs.
138944 ** It merely prevents new constructs that exceed the limit
138945 ** from forming.
138946 */
138947 SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
138948 int oldLimit;
138949
138950 #ifdef SQLITE_ENABLE_API_ARMOR
138951 if( !sqlite3SafetyCheckOk(db) ){
138952 (void)SQLITE_MISUSE_BKPT;
@@ -139566,18 +139591,18 @@
139566 }
139567
139568 /*
139569 ** Open a new database handle.
139570 */
139571 SQLITE_API int SQLITE_STDCALL sqlite3_open(
139572 const char *zFilename,
139573 sqlite3 **ppDb
139574 ){
139575 return openDatabase(zFilename, ppDb,
139576 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);
139577 }
139578 SQLITE_API int SQLITE_STDCALL sqlite3_open_v2(
139579 const char *filename, /* Database filename (UTF-8) */
139580 sqlite3 **ppDb, /* OUT: SQLite db handle */
139581 int flags, /* Flags */
139582 const char *zVfs /* Name of VFS module to use */
139583 ){
@@ -139586,11 +139611,11 @@
139586
139587 #ifndef SQLITE_OMIT_UTF16
139588 /*
139589 ** Open a new database handle.
139590 */
139591 SQLITE_API int SQLITE_STDCALL sqlite3_open16(
139592 const void *zFilename,
139593 sqlite3 **ppDb
139594 ){
139595 char const *zFilename8; /* zFilename encoded in UTF-8 instead of UTF-16 */
139596 sqlite3_value *pVal;
@@ -139625,11 +139650,11 @@
139625 #endif /* SQLITE_OMIT_UTF16 */
139626
139627 /*
139628 ** Register a new collation sequence with the database handle db.
139629 */
139630 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation(
139631 sqlite3* db,
139632 const char *zName,
139633 int enc,
139634 void* pCtx,
139635 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -139638,11 +139663,11 @@
139638 }
139639
139640 /*
139641 ** Register a new collation sequence with the database handle db.
139642 */
139643 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2(
139644 sqlite3* db,
139645 const char *zName,
139646 int enc,
139647 void* pCtx,
139648 int(*xCompare)(void*,int,const void*,int,const void*),
@@ -139663,11 +139688,11 @@
139663
139664 #ifndef SQLITE_OMIT_UTF16
139665 /*
139666 ** Register a new collation sequence with the database handle db.
139667 */
139668 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16(
139669 sqlite3* db,
139670 const void *zName,
139671 int enc,
139672 void* pCtx,
139673 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -139693,11 +139718,11 @@
139693
139694 /*
139695 ** Register a collation sequence factory callback with the database handle
139696 ** db. Replace any previously installed collation sequence factory.
139697 */
139698 SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed(
139699 sqlite3 *db,
139700 void *pCollNeededArg,
139701 void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)
139702 ){
139703 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -139714,11 +139739,11 @@
139714 #ifndef SQLITE_OMIT_UTF16
139715 /*
139716 ** Register a collation sequence factory callback with the database handle
139717 ** db. Replace any previously installed collation sequence factory.
139718 */
139719 SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16(
139720 sqlite3 *db,
139721 void *pCollNeededArg,
139722 void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)
139723 ){
139724 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -139736,11 +139761,11 @@
139736 #ifndef SQLITE_OMIT_DEPRECATED
139737 /*
139738 ** This function is now an anachronism. It used to be used to recover from a
139739 ** malloc() failure, but SQLite now does this automatically.
139740 */
139741 SQLITE_API int SQLITE_STDCALL sqlite3_global_recover(void){
139742 return SQLITE_OK;
139743 }
139744 #endif
139745
139746 /*
@@ -139747,11 +139772,11 @@
139747 ** Test to see whether or not the database connection is in autocommit
139748 ** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on
139749 ** by default. Autocommit is disabled by a BEGIN statement and reenabled
139750 ** by the next COMMIT or ROLLBACK.
139751 */
139752 SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3 *db){
139753 #ifdef SQLITE_ENABLE_API_ARMOR
139754 if( !sqlite3SafetyCheckOk(db) ){
139755 (void)SQLITE_MISUSE_BKPT;
139756 return 0;
139757 }
@@ -139804,19 +139829,19 @@
139804 ** data for this thread has been deallocated.
139805 **
139806 ** SQLite no longer uses thread-specific data so this routine is now a
139807 ** no-op. It is retained for historical compatibility.
139808 */
139809 SQLITE_API void SQLITE_STDCALL sqlite3_thread_cleanup(void){
139810 }
139811 #endif
139812
139813 /*
139814 ** Return meta information about a specific column of a database table.
139815 ** See comment in sqlite3.h (sqlite.h.in) for details.
139816 */
139817 SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata(
139818 sqlite3 *db, /* Connection handle */
139819 const char *zDbName, /* Database name or NULL */
139820 const char *zTableName, /* Table name */
139821 const char *zColumnName, /* Column name */
139822 char const **pzDataType, /* OUTPUT: Declared data type */
@@ -139930,11 +139955,11 @@
139930 }
139931
139932 /*
139933 ** Sleep for a little while. Return the amount of time slept.
139934 */
139935 SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int ms){
139936 sqlite3_vfs *pVfs;
139937 int rc;
139938 pVfs = sqlite3_vfs_find(0);
139939 if( pVfs==0 ) return 0;
139940
@@ -139946,11 +139971,11 @@
139946 }
139947
139948 /*
139949 ** Enable or disable the extended result codes.
139950 */
139951 SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3 *db, int onoff){
139952 #ifdef SQLITE_ENABLE_API_ARMOR
139953 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
139954 #endif
139955 sqlite3_mutex_enter(db->mutex);
139956 db->errMask = onoff ? 0xffffffff : 0xff;
@@ -139959,11 +139984,11 @@
139959 }
139960
139961 /*
139962 ** Invoke the xFileControl method on a particular database.
139963 */
139964 SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
139965 int rc = SQLITE_ERROR;
139966 Btree *pBtree;
139967
139968 #ifdef SQLITE_ENABLE_API_ARMOR
139969 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -139999,11 +140024,11 @@
139999 }
140000
140001 /*
140002 ** Interface to the testing logic.
140003 */
140004 SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...){
140005 int rc = 0;
140006 #ifdef SQLITE_OMIT_BUILTIN_TEST
140007 UNUSED_PARAMETER(op);
140008 #else
140009 va_list ap;
@@ -140344,11 +140369,11 @@
140344 ** method of a VFS implementation. The zParam argument is the name of the
140345 ** query parameter we seek. This routine returns the value of the zParam
140346 ** parameter if it exists. If the parameter does not exist, this routine
140347 ** returns a NULL pointer.
140348 */
140349 SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam){
140350 if( zFilename==0 || zParam==0 ) return 0;
140351 zFilename += sqlite3Strlen30(zFilename) + 1;
140352 while( zFilename[0] ){
140353 int x = strcmp(zFilename, zParam);
140354 zFilename += sqlite3Strlen30(zFilename) + 1;
@@ -140359,20 +140384,20 @@
140359 }
140360
140361 /*
140362 ** Return a boolean value for a query parameter.
140363 */
140364 SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){
140365 const char *z = sqlite3_uri_parameter(zFilename, zParam);
140366 bDflt = bDflt!=0;
140367 return z ? sqlite3GetBoolean(z, bDflt) : bDflt;
140368 }
140369
140370 /*
140371 ** Return a 64-bit integer value for a query parameter.
140372 */
140373 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(
140374 const char *zFilename, /* Filename as passed to xOpen */
140375 const char *zParam, /* URI parameter sought */
140376 sqlite3_int64 bDflt /* return if parameter is missing */
140377 ){
140378 const char *z = sqlite3_uri_parameter(zFilename, zParam);
@@ -140400,11 +140425,11 @@
140400
140401 /*
140402 ** Return the filename of the database associated with a database
140403 ** connection.
140404 */
140405 SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName){
140406 Btree *pBt;
140407 #ifdef SQLITE_ENABLE_API_ARMOR
140408 if( !sqlite3SafetyCheckOk(db) ){
140409 (void)SQLITE_MISUSE_BKPT;
140410 return 0;
@@ -140416,11 +140441,11 @@
140416
140417 /*
140418 ** Return 1 if database is read-only or 0 if read/write. Return -1 if
140419 ** no such database exists.
140420 */
140421 SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
140422 Btree *pBt;
140423 #ifdef SQLITE_ENABLE_API_ARMOR
140424 if( !sqlite3SafetyCheckOk(db) ){
140425 (void)SQLITE_MISUSE_BKPT;
140426 return -1;
@@ -140433,11 +140458,11 @@
140433 #ifdef SQLITE_ENABLE_SNAPSHOT
140434 /*
140435 ** Obtain a snapshot handle for the snapshot of database zDb currently
140436 ** being read by handle db.
140437 */
140438 SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_get(
140439 sqlite3 *db,
140440 const char *zDb,
140441 sqlite3_snapshot **ppSnapshot
140442 ){
140443 int rc = SQLITE_ERROR;
@@ -140468,11 +140493,11 @@
140468 }
140469
140470 /*
140471 ** Open a read-transaction on the snapshot idendified by pSnapshot.
140472 */
140473 SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_open(
140474 sqlite3 *db,
140475 const char *zDb,
140476 sqlite3_snapshot *pSnapshot
140477 ){
140478 int rc = SQLITE_ERROR;
@@ -140505,11 +140530,11 @@
140505 }
140506
140507 /*
140508 ** Free a snapshot handle obtained from sqlite3_snapshot_get().
140509 */
140510 SQLITE_API void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){
140511 sqlite3_free(pSnapshot);
140512 }
140513 #endif /* SQLITE_ENABLE_SNAPSHOT */
140514
140515 /************** End of main.c ************************************************/
@@ -140659,11 +140684,11 @@
140659 **
140660 ** Each call to this routine overrides any prior callbacks registered
140661 ** on the same "db". If xNotify==0 then any prior callbacks are immediately
140662 ** cancelled.
140663 */
140664 SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify(
140665 sqlite3 *db,
140666 void (*xNotify)(void **, int),
140667 void *pArg
140668 ){
140669 int rc = SQLITE_OK;
@@ -147662,11 +147687,11 @@
147662 ** Initialize API pointer table, if required.
147663 */
147664 #ifdef _WIN32
147665 __declspec(dllexport)
147666 #endif
147667 SQLITE_API int SQLITE_STDCALL sqlite3_fts3_init(
147668 sqlite3 *db,
147669 char **pzErrMsg,
147670 const sqlite3_api_routines *pApi
147671 ){
147672 SQLITE_EXTENSION_INIT2(pApi)
@@ -163463,11 +163488,11 @@
163463 }
163464
163465 /*
163466 ** Register a new geometry function for use with the r-tree MATCH operator.
163467 */
163468 SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback(
163469 sqlite3 *db, /* Register SQL function on this connection */
163470 const char *zGeom, /* Name of the new SQL function */
163471 int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */
163472 void *pContext /* Extra data associated with the callback */
163473 ){
@@ -163487,11 +163512,11 @@
163487
163488 /*
163489 ** Register a new 2nd-generation geometry function for use with the
163490 ** r-tree MATCH operator.
163491 */
163492 SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback(
163493 sqlite3 *db, /* Register SQL function on this connection */
163494 const char *zQueryFunc, /* Name of new SQL function */
163495 int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */
163496 void *pContext, /* Extra data passed into the callback */
163497 void (*xDestructor)(void*) /* Destructor for the extra data */
@@ -163512,11 +163537,11 @@
163512
163513 #if !SQLITE_CORE
163514 #ifdef _WIN32
163515 __declspec(dllexport)
163516 #endif
163517 SQLITE_API int SQLITE_STDCALL sqlite3_rtree_init(
163518 sqlite3 *db,
163519 char **pzErrMsg,
163520 const sqlite3_api_routines *pApi
163521 ){
163522 SQLITE_EXTENSION_INIT2(pApi)
@@ -164063,11 +164088,11 @@
164063
164064 #if !SQLITE_CORE
164065 #ifdef _WIN32
164066 __declspec(dllexport)
164067 #endif
164068 SQLITE_API int SQLITE_STDCALL sqlite3_icu_init(
164069 sqlite3 *db,
164070 char **pzErrMsg,
164071 const sqlite3_api_routines *pApi
164072 ){
164073 SQLITE_EXTENSION_INIT2(pApi)
@@ -164743,11 +164768,11 @@
164743 ** IMPORTANT NOTE FOR ZIPVFS USERS: The RBU extension works with all of
164744 ** SQLite's built-in VFSs, including the multiplexor VFS. However it does
164745 ** not work out of the box with zipvfs. Refer to the comment describing
164746 ** the zipvfs_create_vfs() API below for details on using RBU with zipvfs.
164747 */
164748 SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open(
164749 const char *zTarget,
164750 const char *zRbu,
164751 const char *zState
164752 );
164753
@@ -164776,11 +164801,11 @@
164776 ** As with sqlite3rbu_open(), Zipvfs users should rever to the comment
164777 ** describing the sqlite3rbu_create_vfs() API function below for
164778 ** a description of the complications associated with using RBU with
164779 ** zipvfs databases.
164780 */
164781 SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum(
164782 const char *zTarget,
164783 const char *zState
164784 );
164785
164786 /*
@@ -164812,11 +164837,11 @@
164812 ** when sqlite3rbu_close() is called.
164813 **
164814 ** Database handles returned by this function remain valid until the next
164815 ** call to any sqlite3rbu_xxx() function other than sqlite3rbu_db().
164816 */
164817 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu*, int bRbu);
164818
164819 /*
164820 ** Do some work towards applying the RBU update to the target db.
164821 **
164822 ** Return SQLITE_DONE if the update has been completely applied, or
@@ -164826,11 +164851,11 @@
164826 **
164827 ** Once a call to sqlite3rbu_step() has returned a value other than
164828 ** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops
164829 ** that immediately return the same value.
164830 */
164831 SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *pRbu);
164832
164833 /*
164834 ** Force RBU to save its state to disk.
164835 **
164836 ** If a power failure or application crash occurs during an update, following
@@ -164838,11 +164863,11 @@
164838 ** was last saved. In other words, from the most recent successful call to
164839 ** sqlite3rbu_close() or this function.
164840 **
164841 ** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
164842 */
164843 SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *pRbu);
164844
164845 /*
164846 ** Close an RBU handle.
164847 **
164848 ** If the RBU update has been completely applied, mark the RBU database
@@ -164858,18 +164883,18 @@
164858 **
164859 ** Otherwise, if no error occurs, this function returns SQLITE_OK if the
164860 ** update has been partially applied, or SQLITE_DONE if it has been
164861 ** completely applied.
164862 */
164863 SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg);
164864
164865 /*
164866 ** Return the total number of key-value operations (inserts, deletes or
164867 ** updates) that have been performed on the target database since the
164868 ** current RBU update was started.
164869 */
164870 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu);
164871
164872 /*
164873 ** Obtain permyriadage (permyriadage is to 10000 as percentage is to 100)
164874 ** progress indications for the two stages of an RBU update. This API may
164875 ** be useful for driving GUI progress indicators and similar.
@@ -164907,11 +164932,11 @@
164907 ** permyriadage progress of the same stage. If the rbu_count table does
164908 ** not exist, then (*pnOne) is set to -1 during stage 1. If the rbu_count
164909 ** table exists but is not correctly populated, the value of the *pnOne
164910 ** output variable during stage 1 is undefined.
164911 */
164912 SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo);
164913
164914 /*
164915 ** Obtain an indication as to the current stage of an RBU update or vacuum.
164916 ** This function always returns one of the SQLITE_RBU_STATE_XXX constants
164917 ** defined in this file. Return values should be interpreted as follows:
@@ -164945,11 +164970,11 @@
164945 #define SQLITE_RBU_STATE_MOVE 2
164946 #define SQLITE_RBU_STATE_CHECKPOINT 3
164947 #define SQLITE_RBU_STATE_DONE 4
164948 #define SQLITE_RBU_STATE_ERROR 5
164949
164950 SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *pRbu);
164951
164952 /*
164953 ** Create an RBU VFS named zName that accesses the underlying file-system
164954 ** via existing VFS zParent. Or, if the zParent parameter is passed NULL,
164955 ** then the new RBU VFS uses the default system VFS to access the file-system.
@@ -164989,21 +165014,21 @@
164989 ** The overhead of adding the "rbu" VFS to the system is negligible for
164990 ** non-RBU users. There is no harm in an application accessing the
164991 ** file-system via "rbu" all the time, even if it only uses RBU functionality
164992 ** occasionally.
164993 */
164994 SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent);
164995
164996 /*
164997 ** Deregister and destroy an RBU vfs created by an earlier call to
164998 ** sqlite3rbu_create_vfs().
164999 **
165000 ** VFS objects are not reference counted. If a VFS object is destroyed
165001 ** before all database handles that use it have been closed, the results
165002 ** are undefined.
165003 */
165004 SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName);
165005
165006 #if 0
165007 } /* end of the 'extern "C"' block */
165008 #endif
165009
@@ -168093,11 +168118,11 @@
168093 }
168094
168095 /*
168096 ** Step the RBU object.
168097 */
168098 SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *p){
168099 if( p ){
168100 switch( p->eStage ){
168101 case RBU_STAGE_OAL: {
168102 RbuObjIter *pIter = &p->objiter;
168103
@@ -168535,11 +168560,11 @@
168535 }
168536
168537 /*
168538 ** Open and return a new RBU handle.
168539 */
168540 SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open(
168541 const char *zTarget,
168542 const char *zRbu,
168543 const char *zState
168544 ){
168545 /* TODO: Check that zTarget and zRbu are non-NULL */
@@ -168547,11 +168572,11 @@
168547 }
168548
168549 /*
168550 ** Open a handle to begin or resume an RBU VACUUM operation.
168551 */
168552 SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum(
168553 const char *zTarget,
168554 const char *zState
168555 ){
168556 /* TODO: Check that both arguments are non-NULL */
168557 return openRbuHandle(0, zTarget, zState);
@@ -168558,11 +168583,11 @@
168558 }
168559
168560 /*
168561 ** Return the database handle used by pRbu.
168562 */
168563 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){
168564 sqlite3 *db = 0;
168565 if( pRbu ){
168566 db = (bRbu ? pRbu->dbRbu : pRbu->dbMain);
168567 }
168568 return db;
@@ -168590,11 +168615,11 @@
168590 }
168591
168592 /*
168593 ** Close the RBU handle.
168594 */
168595 SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){
168596 int rc;
168597 if( p ){
168598
168599 /* Commit the transaction to the *-oal file. */
168600 if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){
@@ -168641,19 +168666,19 @@
168641 /*
168642 ** Return the total number of key-value operations (inserts, deletes or
168643 ** updates) that have been performed on the target database since the
168644 ** current RBU update was started.
168645 */
168646 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu){
168647 return pRbu->nProgress;
168648 }
168649
168650 /*
168651 ** Return permyriadage progress indications for the two main stages of
168652 ** an RBU update.
168653 */
168654 SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){
168655 const int MAX_PROGRESS = 10000;
168656 switch( p->eStage ){
168657 case RBU_STAGE_OAL:
168658 if( p->nPhaseOneStep>0 ){
168659 *pnOne = (int)(MAX_PROGRESS * (i64)p->nProgress/(i64)p->nPhaseOneStep);
@@ -168684,11 +168709,11 @@
168684 }
168685
168686 /*
168687 ** Return the current state of the RBU vacuum or update operation.
168688 */
168689 SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *p){
168690 int aRes[] = {
168691 0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE,
168692 0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE
168693 };
168694
@@ -168712,11 +168737,11 @@
168712 );
168713 return aRes[p->eStage];
168714 }
168715 }
168716
168717 SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *p){
168718 int rc = p->rc;
168719 if( rc==SQLITE_DONE ) return SQLITE_OK;
168720
168721 assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE );
168722 if( p->eStage==RBU_STAGE_OAL ){
@@ -169539,11 +169564,11 @@
169539
169540 /*
169541 ** Deregister and destroy an RBU vfs created by an earlier call to
169542 ** sqlite3rbu_create_vfs().
169543 */
169544 SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName){
169545 sqlite3_vfs *pVfs = sqlite3_vfs_find(zName);
169546 if( pVfs && pVfs->xOpen==rbuVfsOpen ){
169547 sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex);
169548 sqlite3_vfs_unregister(pVfs);
169549 sqlite3_free(pVfs);
@@ -169553,11 +169578,11 @@
169553 /*
169554 ** Create an RBU VFS named zName that accesses the underlying file-system
169555 ** via existing VFS zParent. The new object is registered as a non-default
169556 ** VFS with SQLite before returning.
169557 */
169558 SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent){
169559
169560 /* Template for VFS */
169561 static sqlite3_vfs vfs_template = {
169562 1, /* iVersion */
169563 0, /* szOsFile */
@@ -171798,11 +171823,11 @@
171798 }
171799
171800 return rc;
171801 }
171802
171803 SQLITE_API int SQLITE_STDCALL sqlite3session_diff(
171804 sqlite3_session *pSession,
171805 const char *zFrom,
171806 const char *zTbl,
171807 char **pzErrMsg
171808 ){
@@ -171892,11 +171917,11 @@
171892
171893 /*
171894 ** Create a session object. This session object will record changes to
171895 ** database zDb attached to connection db.
171896 */
171897 SQLITE_API int SQLITE_STDCALL sqlite3session_create(
171898 sqlite3 *db, /* Database handle */
171899 const char *zDb, /* Name of db (e.g. "main") */
171900 sqlite3_session **ppSession /* OUT: New session object */
171901 ){
171902 sqlite3_session *pNew; /* Newly allocated session object */
@@ -171954,11 +171979,11 @@
171954 }
171955
171956 /*
171957 ** Delete a session object previously allocated using sqlite3session_create().
171958 */
171959 SQLITE_API void SQLITE_STDCALL sqlite3session_delete(sqlite3_session *pSession){
171960 sqlite3 *db = pSession->db;
171961 sqlite3_session *pHead;
171962 sqlite3_session **pp;
171963
171964 /* Unlink the session from the linked list of sessions attached to the
@@ -171983,11 +172008,11 @@
171983 }
171984
171985 /*
171986 ** Set a table filter on a Session Object.
171987 */
171988 SQLITE_API void SQLITE_STDCALL sqlite3session_table_filter(
171989 sqlite3_session *pSession,
171990 int(*xFilter)(void*, const char*),
171991 void *pCtx /* First argument passed to xFilter */
171992 ){
171993 pSession->bAutoAttach = 1;
@@ -172001,11 +172026,11 @@
172001 **
172002 ** Only tables that have a PRIMARY KEY defined may be attached. It does
172003 ** not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias)
172004 ** or not.
172005 */
172006 SQLITE_API int SQLITE_STDCALL sqlite3session_attach(
172007 sqlite3_session *pSession, /* Session object */
172008 const char *zName /* Table name */
172009 ){
172010 int rc = SQLITE_OK;
172011 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
@@ -172691,11 +172716,11 @@
172691 ** session object passed as the first argument.
172692 **
172693 ** It is the responsibility of the caller to eventually free the buffer
172694 ** using sqlite3_free().
172695 */
172696 SQLITE_API int SQLITE_STDCALL sqlite3session_changeset(
172697 sqlite3_session *pSession, /* Session object */
172698 int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */
172699 void **ppChangeset /* OUT: Buffer containing changeset */
172700 ){
172701 return sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset);
@@ -172702,11 +172727,11 @@
172702 }
172703
172704 /*
172705 ** Streaming version of sqlite3session_changeset().
172706 */
172707 SQLITE_API int SQLITE_STDCALL sqlite3session_changeset_strm(
172708 sqlite3_session *pSession,
172709 int (*xOutput)(void *pOut, const void *pData, int nData),
172710 void *pOut
172711 ){
172712 return sessionGenerateChangeset(pSession, 0, xOutput, pOut, 0, 0);
@@ -172713,11 +172738,11 @@
172713 }
172714
172715 /*
172716 ** Streaming version of sqlite3session_patchset().
172717 */
172718 SQLITE_API int SQLITE_STDCALL sqlite3session_patchset_strm(
172719 sqlite3_session *pSession,
172720 int (*xOutput)(void *pOut, const void *pData, int nData),
172721 void *pOut
172722 ){
172723 return sessionGenerateChangeset(pSession, 1, xOutput, pOut, 0, 0);
@@ -172728,11 +172753,11 @@
172728 ** session object passed as the first argument.
172729 **
172730 ** It is the responsibility of the caller to eventually free the buffer
172731 ** using sqlite3_free().
172732 */
172733 SQLITE_API int SQLITE_STDCALL sqlite3session_patchset(
172734 sqlite3_session *pSession, /* Session object */
172735 int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */
172736 void **ppPatchset /* OUT: Buffer containing changeset */
172737 ){
172738 return sessionGenerateChangeset(pSession, 1, 0, 0, pnPatchset, ppPatchset);
@@ -172739,11 +172764,11 @@
172739 }
172740
172741 /*
172742 ** Enable or disable the session object passed as the first argument.
172743 */
172744 SQLITE_API int SQLITE_STDCALL sqlite3session_enable(sqlite3_session *pSession, int bEnable){
172745 int ret;
172746 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172747 if( bEnable>=0 ){
172748 pSession->bEnable = bEnable;
172749 }
@@ -172753,11 +172778,11 @@
172753 }
172754
172755 /*
172756 ** Enable or disable the session object passed as the first argument.
172757 */
172758 SQLITE_API int SQLITE_STDCALL sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){
172759 int ret;
172760 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172761 if( bIndirect>=0 ){
172762 pSession->bIndirect = bIndirect;
172763 }
@@ -172768,11 +172793,11 @@
172768
172769 /*
172770 ** Return true if there have been no changes to monitored tables recorded
172771 ** by the session object passed as the only argument.
172772 */
172773 SQLITE_API int SQLITE_STDCALL sqlite3session_isempty(sqlite3_session *pSession){
172774 int ret = 0;
172775 SessionTable *pTab;
172776
172777 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172778 for(pTab=pSession->pTable; pTab && ret==0; pTab=pTab->pNext){
@@ -172818,11 +172843,11 @@
172818 }
172819
172820 /*
172821 ** Create an iterator used to iterate through the contents of a changeset.
172822 */
172823 SQLITE_API int SQLITE_STDCALL sqlite3changeset_start(
172824 sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */
172825 int nChangeset, /* Size of buffer pChangeset in bytes */
172826 void *pChangeset /* Pointer to buffer containing changeset */
172827 ){
172828 return sessionChangesetStart(pp, 0, 0, nChangeset, pChangeset);
@@ -172829,11 +172854,11 @@
172829 }
172830
172831 /*
172832 ** Streaming version of sqlite3changeset_start().
172833 */
172834 SQLITE_API int SQLITE_STDCALL sqlite3changeset_start_strm(
172835 sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */
172836 int (*xInput)(void *pIn, void *pData, int *pnData),
172837 void *pIn
172838 ){
172839 return sessionChangesetStart(pp, xInput, pIn, 0, 0);
@@ -173250,20 +173275,20 @@
173250 ** or SQLITE_CORRUPT.
173251 **
173252 ** This function may not be called on iterators passed to a conflict handler
173253 ** callback by changeset_apply().
173254 */
173255 SQLITE_API int SQLITE_STDCALL sqlite3changeset_next(sqlite3_changeset_iter *p){
173256 return sessionChangesetNext(p, 0, 0);
173257 }
173258
173259 /*
173260 ** The following function extracts information on the current change
173261 ** from a changeset iterator. It may only be called after changeset_next()
173262 ** has returned SQLITE_ROW.
173263 */
173264 SQLITE_API int SQLITE_STDCALL sqlite3changeset_op(
173265 sqlite3_changeset_iter *pIter, /* Iterator handle */
173266 const char **pzTab, /* OUT: Pointer to table name */
173267 int *pnCol, /* OUT: Number of columns in table */
173268 int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */
173269 int *pbIndirect /* OUT: True if change is indirect */
@@ -173279,11 +173304,11 @@
173279 ** Return information regarding the PRIMARY KEY and number of columns in
173280 ** the database table affected by the change that pIter currently points
173281 ** to. This function may only be called after changeset_next() returns
173282 ** SQLITE_ROW.
173283 */
173284 SQLITE_API int SQLITE_STDCALL sqlite3changeset_pk(
173285 sqlite3_changeset_iter *pIter, /* Iterator object */
173286 unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */
173287 int *pnCol /* OUT: Number of entries in output array */
173288 ){
173289 *pabPK = pIter->abPK;
@@ -173302,11 +173327,11 @@
173302 ** was not modified and is not a PK column), set *ppValue to NULL.
173303 **
173304 ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is
173305 ** not modified. Otherwise, SQLITE_OK.
173306 */
173307 SQLITE_API int SQLITE_STDCALL sqlite3changeset_old(
173308 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173309 int iVal, /* Index of old.* value to retrieve */
173310 sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */
173311 ){
173312 if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_DELETE ){
@@ -173330,11 +173355,11 @@
173330 ** was not modified), set *ppValue to NULL.
173331 **
173332 ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is
173333 ** not modified. Otherwise, SQLITE_OK.
173334 */
173335 SQLITE_API int SQLITE_STDCALL sqlite3changeset_new(
173336 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173337 int iVal, /* Index of new.* value to retrieve */
173338 sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */
173339 ){
173340 if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_INSERT ){
@@ -173364,11 +173389,11 @@
173364 ** containing the iVal'th value of the conflicting record.
173365 **
173366 ** If value iVal is out-of-range or some other error occurs, an SQLite error
173367 ** code is returned. Otherwise, SQLITE_OK.
173368 */
173369 SQLITE_API int SQLITE_STDCALL sqlite3changeset_conflict(
173370 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173371 int iVal, /* Index of conflict record value to fetch */
173372 sqlite3_value **ppValue /* OUT: Value from conflicting row */
173373 ){
173374 if( !pIter->pConflict ){
@@ -173387,11 +173412,11 @@
173387 ** it sets the output variable to the total number of known foreign key
173388 ** violations in the destination database and returns SQLITE_OK.
173389 **
173390 ** In all other cases this function returns SQLITE_MISUSE.
173391 */
173392 SQLITE_API int SQLITE_STDCALL sqlite3changeset_fk_conflicts(
173393 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173394 int *pnOut /* OUT: Number of FK violations */
173395 ){
173396 if( pIter->pConflict || pIter->apValue ){
173397 return SQLITE_MISUSE;
@@ -173405,11 +173430,11 @@
173405 ** Finalize an iterator allocated with sqlite3changeset_start().
173406 **
173407 ** This function may not be called on iterators passed to a conflict handler
173408 ** callback by changeset_apply().
173409 */
173410 SQLITE_API int SQLITE_STDCALL sqlite3changeset_finalize(sqlite3_changeset_iter *p){
173411 int rc = SQLITE_OK;
173412 if( p ){
173413 int i; /* Used to iterate through p->apValue[] */
173414 rc = p->rc;
173415 if( p->apValue ){
@@ -173579,11 +173604,11 @@
173579
173580
173581 /*
173582 ** Invert a changeset object.
173583 */
173584 SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert(
173585 int nChangeset, /* Number of bytes in input */
173586 const void *pChangeset, /* Input changeset */
173587 int *pnInverted, /* OUT: Number of bytes in output changeset */
173588 void **ppInverted /* OUT: Inverse of pChangeset */
173589 ){
@@ -173598,11 +173623,11 @@
173598 }
173599
173600 /*
173601 ** Streaming version of sqlite3changeset_invert().
173602 */
173603 SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert_strm(
173604 int (*xInput)(void *pIn, void *pData, int *pnData),
173605 void *pIn,
173606 int (*xOutput)(void *pOut, const void *pData, int nData),
173607 void *pOut
173608 ){
@@ -174478,11 +174503,11 @@
174478 /*
174479 ** Apply the changeset passed via pChangeset/nChangeset to the main database
174480 ** attached to handle "db". Invoke the supplied conflict handler callback
174481 ** to resolve any conflicts encountered while applying the change.
174482 */
174483 SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply(
174484 sqlite3 *db, /* Apply change to "main" db of this handle */
174485 int nChangeset, /* Size of changeset in bytes */
174486 void *pChangeset, /* Changeset blob */
174487 int(*xFilter)(
174488 void *pCtx, /* Copy of sixth arg to _apply() */
@@ -174506,11 +174531,11 @@
174506 /*
174507 ** Apply the changeset passed via xInput/pIn to the main database
174508 ** attached to handle "db". Invoke the supplied conflict handler callback
174509 ** to resolve any conflicts encountered while applying the change.
174510 */
174511 SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply_strm(
174512 sqlite3 *db, /* Apply change to "main" db of this handle */
174513 int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
174514 void *pIn, /* First arg for xInput */
174515 int(*xFilter)(
174516 void *pCtx, /* Copy of sixth arg to _apply() */
@@ -174841,11 +174866,11 @@
174841 }
174842
174843 /*
174844 ** Allocate a new, empty, sqlite3_changegroup.
174845 */
174846 SQLITE_API int SQLITE_STDCALL sqlite3changegroup_new(sqlite3_changegroup **pp){
174847 int rc = SQLITE_OK; /* Return code */
174848 sqlite3_changegroup *p; /* New object */
174849 p = (sqlite3_changegroup*)sqlite3_malloc(sizeof(sqlite3_changegroup));
174850 if( p==0 ){
174851 rc = SQLITE_NOMEM;
@@ -174858,11 +174883,11 @@
174858
174859 /*
174860 ** Add the changeset currently stored in buffer pData, size nData bytes,
174861 ** to changeset-group p.
174862 */
174863 SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){
174864 sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */
174865 int rc; /* Return code */
174866
174867 rc = sqlite3changeset_start(&pIter, nData, pData);
174868 if( rc==SQLITE_OK ){
@@ -174874,11 +174899,11 @@
174874
174875 /*
174876 ** Obtain a buffer containing a changeset representing the concatenation
174877 ** of all changesets added to the group so far.
174878 */
174879 SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output(
174880 sqlite3_changegroup *pGrp,
174881 int *pnData,
174882 void **ppData
174883 ){
174884 return sessionChangegroupOutput(pGrp, 0, 0, pnData, ppData);
@@ -174885,11 +174910,11 @@
174885 }
174886
174887 /*
174888 ** Streaming versions of changegroup_add().
174889 */
174890 SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add_strm(
174891 sqlite3_changegroup *pGrp,
174892 int (*xInput)(void *pIn, void *pData, int *pnData),
174893 void *pIn
174894 ){
174895 sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */
@@ -174904,11 +174929,11 @@
174904 }
174905
174906 /*
174907 ** Streaming versions of changegroup_output().
174908 */
174909 SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output_strm(
174910 sqlite3_changegroup *pGrp,
174911 int (*xOutput)(void *pOut, const void *pData, int nData),
174912 void *pOut
174913 ){
174914 return sessionChangegroupOutput(pGrp, xOutput, pOut, 0, 0);
@@ -174915,21 +174940,21 @@
174915 }
174916
174917 /*
174918 ** Delete a changegroup object.
174919 */
174920 SQLITE_API void SQLITE_STDCALL sqlite3changegroup_delete(sqlite3_changegroup *pGrp){
174921 if( pGrp ){
174922 sessionDeleteTable(pGrp->pList);
174923 sqlite3_free(pGrp);
174924 }
174925 }
174926
174927 /*
174928 ** Combine two changesets together.
174929 */
174930 SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat(
174931 int nLeft, /* Number of bytes in lhs input */
174932 void *pLeft, /* Lhs input changeset */
174933 int nRight /* Number of bytes in rhs input */,
174934 void *pRight, /* Rhs input changeset */
174935 int *pnOut, /* OUT: Number of bytes in output changeset */
@@ -174954,11 +174979,11 @@
174954 }
174955
174956 /*
174957 ** Streaming version of sqlite3changeset_concat().
174958 */
174959 SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat_strm(
174960 int (*xInputA)(void *pIn, void *pData, int *pnData),
174961 void *pInA,
174962 int (*xInputB)(void *pIn, void *pData, int *pnData),
174963 void *pInB,
174964 int (*xOutput)(void *pOut, const void *pData, int nData),
@@ -177186,11 +177211,11 @@
177186
177187 #ifndef SQLITE_CORE
177188 #ifdef _WIN32
177189 __declspec(dllexport)
177190 #endif
177191 SQLITE_API int SQLITE_STDCALL sqlite3_json_init(
177192 sqlite3 *db,
177193 char **pzErrMsg,
177194 const sqlite3_api_routines *pApi
177195 ){
177196 SQLITE_EXTENSION_INIT2(pApi);
@@ -194018,11 +194043,11 @@
194018 int nArg, /* Number of args */
194019 sqlite3_value **apUnused /* Function arguments */
194020 ){
194021 assert( nArg==0 );
194022 UNUSED_PARAM2(nArg, apUnused);
194023 sqlite3_result_text(pCtx, "fts5: 2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b", -1, SQLITE_TRANSIENT);
194024 }
194025
194026 static int fts5Init(sqlite3 *db){
194027 static const sqlite3_module fts5Mod = {
194028 /* iVersion */ 2,
@@ -194106,11 +194131,11 @@
194106 */
194107 #ifndef SQLITE_CORE
194108 #ifdef _WIN32
194109 __declspec(dllexport)
194110 #endif
194111 SQLITE_API int SQLITE_STDCALL sqlite3_fts_init(
194112 sqlite3 *db,
194113 char **pzErrMsg,
194114 const sqlite3_api_routines *pApi
194115 ){
194116 SQLITE_EXTENSION_INIT2(pApi);
@@ -194119,11 +194144,11 @@
194119 }
194120
194121 #ifdef _WIN32
194122 __declspec(dllexport)
194123 #endif
194124 SQLITE_API int SQLITE_STDCALL sqlite3_fts5_init(
194125 sqlite3 *db,
194126 char **pzErrMsg,
194127 const sqlite3_api_routines *pApi
194128 ){
194129 SQLITE_EXTENSION_INIT2(pApi);
194130
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,17 +1,17 @@
1 /******************************************************************************
2 ** This file is an amalgamation of many separate C source files from SQLite
3 ** version 3.14.2. By combining all the individual C code files into this
4 ** single large file, the entire code can be compiled as a single translation
5 ** unit. This allows many compilers to do optimizations that would not be
6 ** possible if the files were compiled separately. Performance improvements
7 ** of 5% or more are commonly seen when SQLite is compiled as a single
8 ** translation unit.
9 **
10 ** This file is all you need to compile SQLite. To use SQLite in other
11 ** programs, you need this file and the "sqlite3.h" header file that defines
12 ** the programming interface to the SQLite library. (If you do not have
13 ** the "sqlite3.h" header file at hand, you will find a copy embedded within
14 ** the text of this file. Search for "Begin file sqlite3.h" to find the start
15 ** of the embedded sqlite3.h header file.) Additional code files may be needed
16 ** if you want a wrapper to interface SQLite with your choice of programming
17 ** language. The code for the "sqlite3" command-line shell is also in a
@@ -378,13 +378,13 @@
378 **
379 ** See also: [sqlite3_libversion()],
380 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
381 ** [sqlite_version()] and [sqlite_source_id()].
382 */
383 #define SQLITE_VERSION "3.14.2"
384 #define SQLITE_VERSION_NUMBER 3014002
385 #define SQLITE_SOURCE_ID "2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6"
386
387 /*
388 ** CAPI3REF: Run-Time Library Version Numbers
389 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
390 **
@@ -413,13 +413,13 @@
413 ** [SQLITE_SOURCE_ID] C preprocessor macro.
414 **
415 ** See also: [sqlite_version()] and [sqlite_source_id()].
416 */
417 SQLITE_API const char sqlite3_version[] = SQLITE_VERSION;
418 SQLITE_API const char *sqlite3_libversion(void);
419 SQLITE_API const char *sqlite3_sourceid(void);
420 SQLITE_API int sqlite3_libversion_number(void);
421
422 /*
423 ** CAPI3REF: Run-Time Library Compilation Options Diagnostics
424 **
425 ** ^The sqlite3_compileoption_used() function returns 0 or 1
@@ -440,12 +440,12 @@
440 **
441 ** See also: SQL functions [sqlite_compileoption_used()] and
442 ** [sqlite_compileoption_get()] and the [compile_options pragma].
443 */
444 #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
445 SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
446 SQLITE_API const char *sqlite3_compileoption_get(int N);
447 #endif
448
449 /*
450 ** CAPI3REF: Test To See If The Library Is Threadsafe
451 **
@@ -480,11 +480,11 @@
480 ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
481 ** is unchanged by calls to sqlite3_config().)^
482 **
483 ** See the [threading mode] documentation for additional information.
484 */
485 SQLITE_API int sqlite3_threadsafe(void);
486
487 /*
488 ** CAPI3REF: Database Connection Handle
489 ** KEYWORDS: {database connection} {database connections}
490 **
@@ -577,12 +577,12 @@
577 ** from [sqlite3_open()], [sqlite3_open16()], or
578 ** [sqlite3_open_v2()], and not previously closed.
579 ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
580 ** argument is a harmless no-op.
581 */
582 SQLITE_API int sqlite3_close(sqlite3*);
583 SQLITE_API int sqlite3_close_v2(sqlite3*);
584
585 /*
586 ** The type for a callback function.
587 ** This is legacy and deprecated. It is included for historical
588 ** compatibility and is not documented.
@@ -649,11 +649,11 @@
649 ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
650 ** <li> The application must not modify the SQL statement text passed into
651 ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
652 ** </ul>
653 */
654 SQLITE_API int sqlite3_exec(
655 sqlite3*, /* An open database */
656 const char *sql, /* SQL to be evaluated */
657 int (*callback)(void*,int,char**,char**), /* Callback function */
658 void *, /* 1st argument to callback */
659 char **errmsg /* Error msg written here */
@@ -1648,14 +1648,14 @@
1648 ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied
1649 ** implementation of sqlite3_os_init() or sqlite3_os_end()
1650 ** must return [SQLITE_OK] on success and some other [error code] upon
1651 ** failure.
1652 */
1653 SQLITE_API int sqlite3_initialize(void);
1654 SQLITE_API int sqlite3_shutdown(void);
1655 SQLITE_API int sqlite3_os_init(void);
1656 SQLITE_API int sqlite3_os_end(void);
1657
1658 /*
1659 ** CAPI3REF: Configuring The SQLite Library
1660 **
1661 ** The sqlite3_config() interface is used to make global configuration
@@ -1684,11 +1684,11 @@
1684 **
1685 ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
1686 ** ^If the option is unknown or SQLite is unable to set the option
1687 ** then this routine returns a non-zero [error code].
1688 */
1689 SQLITE_API int sqlite3_config(int, ...);
1690
1691 /*
1692 ** CAPI3REF: Configure database connections
1693 ** METHOD: sqlite3
1694 **
@@ -1703,11 +1703,11 @@
1703 ** Subsequent arguments vary depending on the configuration verb.
1704 **
1705 ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
1706 ** the call is considered successful.
1707 */
1708 SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
1709
1710 /*
1711 ** CAPI3REF: Memory Allocation Routines
1712 **
1713 ** An instance of this object defines the interface between SQLite
@@ -2244,11 +2244,11 @@
2244 **
2245 ** ^The sqlite3_extended_result_codes() routine enables or disables the
2246 ** [extended result codes] feature of SQLite. ^The extended result
2247 ** codes are disabled by default for historical compatibility.
2248 */
2249 SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
2250
2251 /*
2252 ** CAPI3REF: Last Insert Rowid
2253 ** METHOD: sqlite3
2254 **
@@ -2296,11 +2296,11 @@
2296 ** function is running and thus changes the last insert [rowid],
2297 ** then the value returned by [sqlite3_last_insert_rowid()] is
2298 ** unpredictable and might not equal either the old or the new
2299 ** last insert [rowid].
2300 */
2301 SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
2302
2303 /*
2304 ** CAPI3REF: Count The Number Of Rows Modified
2305 ** METHOD: sqlite3
2306 **
@@ -2349,11 +2349,11 @@
2349 **
2350 ** If a separate thread makes changes on the same database connection
2351 ** while [sqlite3_changes()] is running then the value returned
2352 ** is unpredictable and not meaningful.
2353 */
2354 SQLITE_API int sqlite3_changes(sqlite3*);
2355
2356 /*
2357 ** CAPI3REF: Total Number Of Rows Modified
2358 ** METHOD: sqlite3
2359 **
@@ -2373,11 +2373,11 @@
2373 **
2374 ** If a separate thread makes changes on the same database connection
2375 ** while [sqlite3_total_changes()] is running then the value
2376 ** returned is unpredictable and not meaningful.
2377 */
2378 SQLITE_API int sqlite3_total_changes(sqlite3*);
2379
2380 /*
2381 ** CAPI3REF: Interrupt A Long-Running Query
2382 ** METHOD: sqlite3
2383 **
@@ -2413,11 +2413,11 @@
2413 ** that are started after the sqlite3_interrupt() call returns.
2414 **
2415 ** If the database connection closes while [sqlite3_interrupt()]
2416 ** is running then bad things will likely happen.
2417 */
2418 SQLITE_API void sqlite3_interrupt(sqlite3*);
2419
2420 /*
2421 ** CAPI3REF: Determine If An SQL Statement Is Complete
2422 **
2423 ** These routines are useful during command-line input to determine if the
@@ -2448,12 +2448,12 @@
2448 ** UTF-8 string.
2449 **
2450 ** The input to [sqlite3_complete16()] must be a zero-terminated
2451 ** UTF-16 string in native byte order.
2452 */
2453 SQLITE_API int sqlite3_complete(const char *sql);
2454 SQLITE_API int sqlite3_complete16(const void *sql);
2455
2456 /*
2457 ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
2458 ** KEYWORDS: {busy-handler callback} {busy handler}
2459 ** METHOD: sqlite3
@@ -2510,11 +2510,11 @@
2510 ** result in undefined behavior.
2511 **
2512 ** A busy handler must not close the database connection
2513 ** or [prepared statement] that invoked the busy handler.
2514 */
2515 SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2516
2517 /*
2518 ** CAPI3REF: Set A Busy Timeout
2519 ** METHOD: sqlite3
2520 **
@@ -2533,11 +2533,11 @@
2533 ** was defined (using [sqlite3_busy_handler()]) prior to calling
2534 ** this routine, that other busy handler is cleared.)^
2535 **
2536 ** See also: [PRAGMA busy_timeout]
2537 */
2538 SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
2539
2540 /*
2541 ** CAPI3REF: Convenience Routines For Running Queries
2542 ** METHOD: sqlite3
2543 **
@@ -2608,19 +2608,19 @@
2608 ** interface defined here. As a consequence, errors that occur in the
2609 ** wrapper layer outside of the internal [sqlite3_exec()] call are not
2610 ** reflected in subsequent calls to [sqlite3_errcode()] or
2611 ** [sqlite3_errmsg()].
2612 */
2613 SQLITE_API int sqlite3_get_table(
2614 sqlite3 *db, /* An open database */
2615 const char *zSql, /* SQL to be evaluated */
2616 char ***pazResult, /* Results of the query */
2617 int *pnRow, /* Number of result rows written here */
2618 int *pnColumn, /* Number of result columns written here */
2619 char **pzErrmsg /* Error msg written here */
2620 );
2621 SQLITE_API void sqlite3_free_table(char **result);
2622
2623 /*
2624 ** CAPI3REF: Formatted String Printing Functions
2625 **
2626 ** These routines are work-alikes of the "printf()" family of functions
@@ -2722,14 +2722,14 @@
2722 **
2723 ** ^(The "%z" formatting option works like "%s" but with the
2724 ** addition that after the string has been read and copied into
2725 ** the result, [sqlite3_free()] is called on the input string.)^
2726 */
2727 SQLITE_API char *sqlite3_mprintf(const char*,...);
2728 SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
2729 SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
2730 SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
2731
2732 /*
2733 ** CAPI3REF: Memory Allocation Subsystem
2734 **
2735 ** The SQLite core uses these three routines for all of its own
@@ -2815,16 +2815,16 @@
2815 **
2816 ** The application must not read or write any part of
2817 ** a block of memory after it has been released using
2818 ** [sqlite3_free()] or [sqlite3_realloc()].
2819 */
2820 SQLITE_API void *sqlite3_malloc(int);
2821 SQLITE_API void *sqlite3_malloc64(sqlite3_uint64);
2822 SQLITE_API void *sqlite3_realloc(void*, int);
2823 SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64);
2824 SQLITE_API void sqlite3_free(void*);
2825 SQLITE_API sqlite3_uint64 sqlite3_msize(void*);
2826
2827 /*
2828 ** CAPI3REF: Memory Allocator Statistics
2829 **
2830 ** SQLite provides these two interfaces for reporting on the status
@@ -2845,12 +2845,12 @@
2845 ** [sqlite3_memory_used()] if and only if the parameter to
2846 ** [sqlite3_memory_highwater()] is true. ^The value returned
2847 ** by [sqlite3_memory_highwater(1)] is the high-water mark
2848 ** prior to the reset.
2849 */
2850 SQLITE_API sqlite3_int64 sqlite3_memory_used(void);
2851 SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
2852
2853 /*
2854 ** CAPI3REF: Pseudo-Random Number Generator
2855 **
2856 ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
@@ -2869,11 +2869,11 @@
2869 ** ^If the previous call to this routine had an N of 1 or more and a
2870 ** non-NULL P then the pseudo-randomness is generated
2871 ** internally and without recourse to the [sqlite3_vfs] xRandomness
2872 ** method.
2873 */
2874 SQLITE_API void sqlite3_randomness(int N, void *P);
2875
2876 /*
2877 ** CAPI3REF: Compile-Time Authorization Callbacks
2878 ** METHOD: sqlite3
2879 **
@@ -2952,11 +2952,11 @@
2952 ** [sqlite3_prepare()] or its variants. Authorization is not
2953 ** performed during statement evaluation in [sqlite3_step()], unless
2954 ** as stated in the previous paragraph, sqlite3_step() invokes
2955 ** sqlite3_prepare_v2() to reprepare a statement after a schema change.
2956 */
2957 SQLITE_API int sqlite3_set_authorizer(
2958 sqlite3*,
2959 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
2960 void *pUserData
2961 );
2962
@@ -3060,13 +3060,13 @@
3060 ** digits in the time are meaningless. Future versions of SQLite
3061 ** might provide greater resolution on the profiler callback. The
3062 ** sqlite3_profile() function is considered experimental and is
3063 ** subject to change in future versions of SQLite.
3064 */
3065 SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,
3066 void(*xTrace)(void*,const char*), void*);
3067 SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
3068 void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
3069
3070 /*
3071 ** CAPI3REF: SQL Trace Event Codes
3072 ** KEYWORDS: SQLITE_TRACE
@@ -3151,11 +3151,11 @@
3151 **
3152 ** The sqlite3_trace_v2() interface is intended to replace the legacy
3153 ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
3154 ** are deprecated.
3155 */
3156 SQLITE_API int sqlite3_trace_v2(
3157 sqlite3*,
3158 unsigned uMask,
3159 int(*xCallback)(unsigned,void*,void*,void*),
3160 void *pCtx
3161 );
@@ -3190,11 +3190,11 @@
3190 ** the database connection that invoked the progress handler.
3191 ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
3192 ** database connections for the meaning of "modify" in this paragraph.
3193 **
3194 */
3195 SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
3196
3197 /*
3198 ** CAPI3REF: Opening A New Database Connection
3199 ** CONSTRUCTOR: sqlite3
3200 **
@@ -3419,19 +3419,19 @@
3419 ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
3420 ** features that require the use of temporary files may fail.
3421 **
3422 ** See also: [sqlite3_temp_directory]
3423 */
3424 SQLITE_API int sqlite3_open(
3425 const char *filename, /* Database filename (UTF-8) */
3426 sqlite3 **ppDb /* OUT: SQLite db handle */
3427 );
3428 SQLITE_API int sqlite3_open16(
3429 const void *filename, /* Database filename (UTF-16) */
3430 sqlite3 **ppDb /* OUT: SQLite db handle */
3431 );
3432 SQLITE_API int sqlite3_open_v2(
3433 const char *filename, /* Database filename (UTF-8) */
3434 sqlite3 **ppDb, /* OUT: SQLite db handle */
3435 int flags, /* Flags */
3436 const char *zVfs /* Name of VFS module to use */
3437 );
@@ -3473,13 +3473,13 @@
3473 ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and
3474 ** is not a database file pathname pointer that SQLite passed into the xOpen
3475 ** VFS method, then the behavior of this routine is undefined and probably
3476 ** undesirable.
3477 */
3478 SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3479 SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3480 SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
3481
3482
3483 /*
3484 ** CAPI3REF: Error Codes And Messages
3485 ** METHOD: sqlite3
@@ -3519,15 +3519,15 @@
3519 **
3520 ** If an interface fails with SQLITE_MISUSE, that means the interface
3521 ** was invoked incorrectly by the application. In that case, the
3522 ** error code and message may or may not be set.
3523 */
3524 SQLITE_API int sqlite3_errcode(sqlite3 *db);
3525 SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
3526 SQLITE_API const char *sqlite3_errmsg(sqlite3*);
3527 SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
3528 SQLITE_API const char *sqlite3_errstr(int);
3529
3530 /*
3531 ** CAPI3REF: Prepared Statement Object
3532 ** KEYWORDS: {prepared statement} {prepared statements}
3533 **
@@ -3591,11 +3591,11 @@
3591 ** created by an untrusted script can be contained using the
3592 ** [max_page_count] [PRAGMA].
3593 **
3594 ** New run-time limit categories may be added in future releases.
3595 */
3596 SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
3597
3598 /*
3599 ** CAPI3REF: Run-Time Limit Categories
3600 ** KEYWORDS: {limit category} {*limit categories}
3601 **
@@ -3743,32 +3743,32 @@
3743 ** or [GLOB] operator or if the parameter is compared to an indexed column
3744 ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
3745 ** </li>
3746 ** </ol>
3747 */
3748 SQLITE_API int sqlite3_prepare(
3749 sqlite3 *db, /* Database handle */
3750 const char *zSql, /* SQL statement, UTF-8 encoded */
3751 int nByte, /* Maximum length of zSql in bytes. */
3752 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3753 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3754 );
3755 SQLITE_API int sqlite3_prepare_v2(
3756 sqlite3 *db, /* Database handle */
3757 const char *zSql, /* SQL statement, UTF-8 encoded */
3758 int nByte, /* Maximum length of zSql in bytes. */
3759 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3760 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3761 );
3762 SQLITE_API int sqlite3_prepare16(
3763 sqlite3 *db, /* Database handle */
3764 const void *zSql, /* SQL statement, UTF-16 encoded */
3765 int nByte, /* Maximum length of zSql in bytes. */
3766 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3767 const void **pzTail /* OUT: Pointer to unused portion of zSql */
3768 );
3769 SQLITE_API int sqlite3_prepare16_v2(
3770 sqlite3 *db, /* Database handle */
3771 const void *zSql, /* SQL statement, UTF-16 encoded */
3772 int nByte, /* Maximum length of zSql in bytes. */
3773 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3774 const void **pzTail /* OUT: Pointer to unused portion of zSql */
@@ -3803,12 +3803,12 @@
3803 ** automatically freed when the prepared statement is finalized.
3804 ** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
3805 ** is obtained from [sqlite3_malloc()] and must be free by the application
3806 ** by passing it to [sqlite3_free()].
3807 */
3808 SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
3809 SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt);
3810
3811 /*
3812 ** CAPI3REF: Determine If An SQL Statement Writes The Database
3813 ** METHOD: sqlite3_stmt
3814 **
@@ -3836,11 +3836,11 @@
3836 ** database. ^The [ATTACH] and [DETACH] statements also cause
3837 ** sqlite3_stmt_readonly() to return true since, while those statements
3838 ** change the configuration of a database connection, they do not make
3839 ** changes to the content of the database files on disk.
3840 */
3841 SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
3842
3843 /*
3844 ** CAPI3REF: Determine If A Prepared Statement Has Been Reset
3845 ** METHOD: sqlite3_stmt
3846 **
@@ -3857,11 +3857,11 @@
3857 ** to locate all prepared statements associated with a database
3858 ** connection that are in need of being reset. This can be used,
3859 ** for example, in diagnostic routines to search for prepared
3860 ** statements that are holding a transaction open.
3861 */
3862 SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
3863
3864 /*
3865 ** CAPI3REF: Dynamically Typed Value Object
3866 ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
3867 **
@@ -4021,24 +4021,24 @@
4021 ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
4022 **
4023 ** See also: [sqlite3_bind_parameter_count()],
4024 ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
4025 */
4026 SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
4027 SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
4028 void(*)(void*));
4029 SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
4030 SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
4031 SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
4032 SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
4033 SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
4034 SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
4035 SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
4036 void(*)(void*), unsigned char encoding);
4037 SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
4038 SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
4039 SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
4040
4041 /*
4042 ** CAPI3REF: Number Of SQL Parameters
4043 ** METHOD: sqlite3_stmt
4044 **
@@ -4055,11 +4055,11 @@
4055 **
4056 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
4057 ** [sqlite3_bind_parameter_name()], and
4058 ** [sqlite3_bind_parameter_index()].
4059 */
4060 SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
4061
4062 /*
4063 ** CAPI3REF: Name Of A Host Parameter
4064 ** METHOD: sqlite3_stmt
4065 **
@@ -4083,11 +4083,11 @@
4083 **
4084 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
4085 ** [sqlite3_bind_parameter_count()], and
4086 ** [sqlite3_bind_parameter_index()].
4087 */
4088 SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
4089
4090 /*
4091 ** CAPI3REF: Index Of A Parameter With A Given Name
4092 ** METHOD: sqlite3_stmt
4093 **
@@ -4100,21 +4100,21 @@
4100 **
4101 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
4102 ** [sqlite3_bind_parameter_count()], and
4103 ** [sqlite3_bind_parameter_name()].
4104 */
4105 SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
4106
4107 /*
4108 ** CAPI3REF: Reset All Bindings On A Prepared Statement
4109 ** METHOD: sqlite3_stmt
4110 **
4111 ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
4112 ** the [sqlite3_bind_blob | bindings] on a [prepared statement].
4113 ** ^Use this routine to reset all host parameters to NULL.
4114 */
4115 SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
4116
4117 /*
4118 ** CAPI3REF: Number Of Columns In A Result Set
4119 ** METHOD: sqlite3_stmt
4120 **
@@ -4122,11 +4122,11 @@
4122 ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
4123 ** statement that does not return data (for example an [UPDATE]).
4124 **
4125 ** See also: [sqlite3_data_count()]
4126 */
4127 SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
4128
4129 /*
4130 ** CAPI3REF: Column Names In A Result Set
4131 ** METHOD: sqlite3_stmt
4132 **
@@ -4151,12 +4151,12 @@
4151 ** ^The name of a result column is the value of the "AS" clause for
4152 ** that column, if there is an AS clause. If there is no AS clause
4153 ** then the name of the column is unspecified and may change from
4154 ** one release of SQLite to the next.
4155 */
4156 SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
4157 SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
4158
4159 /*
4160 ** CAPI3REF: Source Of Data In A Query Result
4161 ** METHOD: sqlite3_stmt
4162 **
@@ -4200,16 +4200,16 @@
4200 ** If two or more threads call one or more
4201 ** [sqlite3_column_database_name | column metadata interfaces]
4202 ** for the same [prepared statement] and result column
4203 ** at the same time then the results are undefined.
4204 */
4205 SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
4206 SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
4207 SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
4208 SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
4209 SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
4210 SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
4211
4212 /*
4213 ** CAPI3REF: Declared Datatype Of A Query Result
4214 ** METHOD: sqlite3_stmt
4215 **
@@ -4237,12 +4237,12 @@
4237 ** data stored in that column is of the declared type. SQLite is
4238 ** strongly typed, but the typing is dynamic not static. ^Type
4239 ** is associated with individual values, not with the containers
4240 ** used to hold those values.
4241 */
4242 SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
4243 SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
4244
4245 /*
4246 ** CAPI3REF: Evaluate An SQL Statement
4247 ** METHOD: sqlite3_stmt
4248 **
@@ -4318,11 +4318,11 @@
4318 ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
4319 ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
4320 ** then the more specific [error codes] are returned directly
4321 ** by sqlite3_step(). The use of the "v2" interface is recommended.
4322 */
4323 SQLITE_API int sqlite3_step(sqlite3_stmt*);
4324
4325 /*
4326 ** CAPI3REF: Number of columns in a result set
4327 ** METHOD: sqlite3_stmt
4328 **
@@ -4339,11 +4339,11 @@
4339 ** where it always returns zero since each step of that multi-step
4340 ** pragma returns 0 columns of data.
4341 **
4342 ** See also: [sqlite3_column_count()]
4343 */
4344 SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
4345
4346 /*
4347 ** CAPI3REF: Fundamental Datatypes
4348 ** KEYWORDS: SQLITE_TEXT
4349 **
@@ -4529,20 +4529,20 @@
4529 ** of these routines, a default value is returned. The default value
4530 ** is either the integer 0, the floating point number 0.0, or a NULL
4531 ** pointer. Subsequent calls to [sqlite3_errcode()] will return
4532 ** [SQLITE_NOMEM].)^
4533 */
4534 SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
4535 SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4536 SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4537 SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
4538 SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
4539 SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
4540 SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
4541 SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
4542 SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
4543 SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
4544
4545 /*
4546 ** CAPI3REF: Destroy A Prepared Statement Object
4547 ** DESTRUCTOR: sqlite3_stmt
4548 **
@@ -4566,11 +4566,11 @@
4566 ** resource leaks. It is a grievous error for the application to try to use
4567 ** a prepared statement after it has been finalized. Any use of a prepared
4568 ** statement after it has been finalized can result in undefined and
4569 ** undesirable behavior such as segfaults and heap corruption.
4570 */
4571 SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
4572
4573 /*
4574 ** CAPI3REF: Reset A Prepared Statement Object
4575 ** METHOD: sqlite3_stmt
4576 **
@@ -4593,11 +4593,11 @@
4593 ** [sqlite3_reset(S)] returns an appropriate [error code].
4594 **
4595 ** ^The [sqlite3_reset(S)] interface does not change the values
4596 ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
4597 */
4598 SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
4599
4600 /*
4601 ** CAPI3REF: Create Or Redefine SQL Functions
4602 ** KEYWORDS: {function creation routines}
4603 ** KEYWORDS: {application-defined SQL function}
@@ -4693,31 +4693,31 @@
4693 ** ^An application-defined function is permitted to call other
4694 ** SQLite interfaces. However, such calls must not
4695 ** close the database connection nor finalize or reset the prepared
4696 ** statement in which the function is running.
4697 */
4698 SQLITE_API int sqlite3_create_function(
4699 sqlite3 *db,
4700 const char *zFunctionName,
4701 int nArg,
4702 int eTextRep,
4703 void *pApp,
4704 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4705 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4706 void (*xFinal)(sqlite3_context*)
4707 );
4708 SQLITE_API int sqlite3_create_function16(
4709 sqlite3 *db,
4710 const void *zFunctionName,
4711 int nArg,
4712 int eTextRep,
4713 void *pApp,
4714 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4715 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4716 void (*xFinal)(sqlite3_context*)
4717 );
4718 SQLITE_API int sqlite3_create_function_v2(
4719 sqlite3 *db,
4720 const char *zFunctionName,
4721 int nArg,
4722 int eTextRep,
4723 void *pApp,
@@ -4759,16 +4759,16 @@
4759 ** to be supported. However, new applications should avoid
4760 ** the use of these functions. To encourage programmers to avoid
4761 ** these functions, we will not explain what they do.
4762 */
4763 #ifndef SQLITE_OMIT_DEPRECATED
4764 SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
4765 SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
4766 SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4767 SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
4768 SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
4769 SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
4770 void*,sqlite3_int64);
4771 #endif
4772
4773 /*
4774 ** CAPI3REF: Obtaining SQL Values
@@ -4814,22 +4814,22 @@
4814 ** or [sqlite3_value_text16()].
4815 **
4816 ** These routines must be called from the same thread as
4817 ** the SQL function that supplied the [sqlite3_value*] parameters.
4818 */
4819 SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
4820 SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
4821 SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
4822 SQLITE_API double sqlite3_value_double(sqlite3_value*);
4823 SQLITE_API int sqlite3_value_int(sqlite3_value*);
4824 SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
4825 SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
4826 SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
4827 SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
4828 SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
4829 SQLITE_API int sqlite3_value_type(sqlite3_value*);
4830 SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
4831
4832 /*
4833 ** CAPI3REF: Finding The Subtype Of SQL Values
4834 ** METHOD: sqlite3_value
4835 **
@@ -4841,11 +4841,11 @@
4841 **
4842 ** SQLite makes no use of subtype itself. It merely passes the subtype
4843 ** from the result of one [application-defined SQL function] into the
4844 ** input of another.
4845 */
4846 SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
4847
4848 /*
4849 ** CAPI3REF: Copy And Free SQL Values
4850 ** METHOD: sqlite3_value
4851 **
@@ -4857,12 +4857,12 @@
4857 **
4858 ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
4859 ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
4860 ** then sqlite3_value_free(V) is a harmless no-op.
4861 */
4862 SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*);
4863 SQLITE_API void sqlite3_value_free(sqlite3_value*);
4864
4865 /*
4866 ** CAPI3REF: Obtain Aggregate Function Context
4867 ** METHOD: sqlite3_context
4868 **
@@ -4903,11 +4903,11 @@
4903 ** function.
4904 **
4905 ** This routine must be called from the same thread in which
4906 ** the aggregate SQL function is running.
4907 */
4908 SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
4909
4910 /*
4911 ** CAPI3REF: User Data For Functions
4912 ** METHOD: sqlite3_context
4913 **
@@ -4918,11 +4918,11 @@
4918 ** registered the application defined function.
4919 **
4920 ** This routine must be called from the same thread in which
4921 ** the application-defined function is running.
4922 */
4923 SQLITE_API void *sqlite3_user_data(sqlite3_context*);
4924
4925 /*
4926 ** CAPI3REF: Database Connection For Functions
4927 ** METHOD: sqlite3_context
4928 **
@@ -4930,11 +4930,11 @@
4930 ** the pointer to the [database connection] (the 1st parameter)
4931 ** of the [sqlite3_create_function()]
4932 ** and [sqlite3_create_function16()] routines that originally
4933 ** registered the application defined function.
4934 */
4935 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
4936
4937 /*
4938 ** CAPI3REF: Function Auxiliary Data
4939 ** METHOD: sqlite3_context
4940 **
@@ -4984,12 +4984,12 @@
4984 ** values and [parameters] and expressions composed from the same.)^
4985 **
4986 ** These routines must be called from the same thread in which
4987 ** the SQL function is running.
4988 */
4989 SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
4990 SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
4991
4992
4993 /*
4994 ** CAPI3REF: Constants Defining Special Destructor Behavior
4995 **
@@ -5121,31 +5121,31 @@
5121 **
5122 ** If these routines are called from within the different thread
5123 ** than the one containing the application-defined function that received
5124 ** the [sqlite3_context] pointer, the results are undefined.
5125 */
5126 SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
5127 SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,
5128 sqlite3_uint64,void(*)(void*));
5129 SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
5130 SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
5131 SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
5132 SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
5133 SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
5134 SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
5135 SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
5136 SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
5137 SQLITE_API void sqlite3_result_null(sqlite3_context*);
5138 SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
5139 SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
5140 void(*)(void*), unsigned char encoding);
5141 SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
5142 SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
5143 SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
5144 SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
5145 SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
5146 SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
5147
5148
5149 /*
5150 ** CAPI3REF: Setting The Subtype Of An SQL Function
5151 ** METHOD: sqlite3_context
@@ -5156,11 +5156,11 @@
5156 ** of the subtype T are preserved in current versions of SQLite;
5157 ** higher order bits are discarded.
5158 ** The number of subtype bytes preserved by SQLite might increase
5159 ** in future releases of SQLite.
5160 */
5161 SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
5162
5163 /*
5164 ** CAPI3REF: Define New Collating Sequences
5165 ** METHOD: sqlite3
5166 **
@@ -5238,26 +5238,26 @@
5238 ** is unfortunate but cannot be changed without breaking backwards
5239 ** compatibility.
5240 **
5241 ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
5242 */
5243 SQLITE_API int sqlite3_create_collation(
5244 sqlite3*,
5245 const char *zName,
5246 int eTextRep,
5247 void *pArg,
5248 int(*xCompare)(void*,int,const void*,int,const void*)
5249 );
5250 SQLITE_API int sqlite3_create_collation_v2(
5251 sqlite3*,
5252 const char *zName,
5253 int eTextRep,
5254 void *pArg,
5255 int(*xCompare)(void*,int,const void*,int,const void*),
5256 void(*xDestroy)(void*)
5257 );
5258 SQLITE_API int sqlite3_create_collation16(
5259 sqlite3*,
5260 const void *zName,
5261 int eTextRep,
5262 void *pArg,
5263 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -5288,16 +5288,16 @@
5288 **
5289 ** The callback function should register the desired collation using
5290 ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
5291 ** [sqlite3_create_collation_v2()].
5292 */
5293 SQLITE_API int sqlite3_collation_needed(
5294 sqlite3*,
5295 void*,
5296 void(*)(void*,sqlite3*,int eTextRep,const char*)
5297 );
5298 SQLITE_API int sqlite3_collation_needed16(
5299 sqlite3*,
5300 void*,
5301 void(*)(void*,sqlite3*,int eTextRep,const void*)
5302 );
5303
@@ -5307,15 +5307,15 @@
5307 ** called right after sqlite3_open().
5308 **
5309 ** The code to implement this API is not available in the public release
5310 ** of SQLite.
5311 */
5312 SQLITE_API int sqlite3_key(
5313 sqlite3 *db, /* Database to be rekeyed */
5314 const void *pKey, int nKey /* The key */
5315 );
5316 SQLITE_API int sqlite3_key_v2(
5317 sqlite3 *db, /* Database to be rekeyed */
5318 const char *zDbName, /* Name of the database */
5319 const void *pKey, int nKey /* The key */
5320 );
5321
@@ -5325,35 +5325,35 @@
5325 ** database is decrypted.
5326 **
5327 ** The code to implement this API is not available in the public release
5328 ** of SQLite.
5329 */
5330 SQLITE_API int sqlite3_rekey(
5331 sqlite3 *db, /* Database to be rekeyed */
5332 const void *pKey, int nKey /* The new key */
5333 );
5334 SQLITE_API int sqlite3_rekey_v2(
5335 sqlite3 *db, /* Database to be rekeyed */
5336 const char *zDbName, /* Name of the database */
5337 const void *pKey, int nKey /* The new key */
5338 );
5339
5340 /*
5341 ** Specify the activation key for a SEE database. Unless
5342 ** activated, none of the SEE routines will work.
5343 */
5344 SQLITE_API void sqlite3_activate_see(
5345 const char *zPassPhrase /* Activation phrase */
5346 );
5347 #endif
5348
5349 #ifdef SQLITE_ENABLE_CEROD
5350 /*
5351 ** Specify the activation key for a CEROD database. Unless
5352 ** activated, none of the CEROD routines will work.
5353 */
5354 SQLITE_API void sqlite3_activate_cerod(
5355 const char *zPassPhrase /* Activation phrase */
5356 );
5357 #endif
5358
5359 /*
@@ -5371,11 +5371,11 @@
5371 ** method of the default [sqlite3_vfs] object. If the xSleep() method
5372 ** of the default VFS is not implemented correctly, or not implemented at
5373 ** all, then the behavior of sqlite3_sleep() may deviate from the description
5374 ** in the previous paragraphs.
5375 */
5376 SQLITE_API int sqlite3_sleep(int);
5377
5378 /*
5379 ** CAPI3REF: Name Of The Folder Holding Temporary Files
5380 **
5381 ** ^(If this global variable is made to point to a string which is
@@ -5490,11 +5490,11 @@
5490 **
5491 ** If another thread changes the autocommit status of the database
5492 ** connection while this routine is running, then the return value
5493 ** is undefined.
5494 */
5495 SQLITE_API int sqlite3_get_autocommit(sqlite3*);
5496
5497 /*
5498 ** CAPI3REF: Find The Database Handle Of A Prepared Statement
5499 ** METHOD: sqlite3_stmt
5500 **
@@ -5503,11 +5503,11 @@
5503 ** returned by sqlite3_db_handle is the same [database connection]
5504 ** that was the first argument
5505 ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
5506 ** create the statement in the first place.
5507 */
5508 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
5509
5510 /*
5511 ** CAPI3REF: Return The Filename For A Database Connection
5512 ** METHOD: sqlite3
5513 **
@@ -5520,21 +5520,21 @@
5520 ** ^The filename returned by this function is the output of the
5521 ** xFullPathname method of the [VFS]. ^In other words, the filename
5522 ** will be an absolute pathname, even if the filename used
5523 ** to open the database originally was a URI or relative pathname.
5524 */
5525 SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);
5526
5527 /*
5528 ** CAPI3REF: Determine if a database is read-only
5529 ** METHOD: sqlite3
5530 **
5531 ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N
5532 ** of connection D is read-only, 0 if it is read/write, or -1 if N is not
5533 ** the name of a database on connection D.
5534 */
5535 SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
5536
5537 /*
5538 ** CAPI3REF: Find the next prepared statement
5539 ** METHOD: sqlite3
5540 **
@@ -5546,11 +5546,11 @@
5546 **
5547 ** The [database connection] pointer D in a call to
5548 ** [sqlite3_next_stmt(D,S)] must refer to an open database
5549 ** connection and in particular must not be a NULL pointer.
5550 */
5551 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
5552
5553 /*
5554 ** CAPI3REF: Commit And Rollback Notification Callbacks
5555 ** METHOD: sqlite3
5556 **
@@ -5595,12 +5595,12 @@
5595 ** ^The rollback callback is not invoked if a transaction is
5596 ** automatically rolled back because the database connection is closed.
5597 **
5598 ** See also the [sqlite3_update_hook()] interface.
5599 */
5600 SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5601 SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5602
5603 /*
5604 ** CAPI3REF: Data Change Notification Callbacks
5605 ** METHOD: sqlite3
5606 **
@@ -5647,11 +5647,11 @@
5647 ** the first call on D.
5648 **
5649 ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
5650 ** and [sqlite3_preupdate_hook()] interfaces.
5651 */
5652 SQLITE_API void *sqlite3_update_hook(
5653 sqlite3*,
5654 void(*)(void *,int ,char const *,char const *,sqlite3_int64),
5655 void*
5656 );
5657
@@ -5687,11 +5687,11 @@
5687 ** This interface is threadsafe on processors where writing a
5688 ** 32-bit integer is atomic.
5689 **
5690 ** See Also: [SQLite Shared-Cache Mode]
5691 */
5692 SQLITE_API int sqlite3_enable_shared_cache(int);
5693
5694 /*
5695 ** CAPI3REF: Attempt To Free Heap Memory
5696 **
5697 ** ^The sqlite3_release_memory() interface attempts to free N bytes
@@ -5703,11 +5703,11 @@
5703 ** ^The sqlite3_release_memory() routine is a no-op returning zero
5704 ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5705 **
5706 ** See also: [sqlite3_db_release_memory()]
5707 */
5708 SQLITE_API int sqlite3_release_memory(int);
5709
5710 /*
5711 ** CAPI3REF: Free Memory Used By A Database Connection
5712 ** METHOD: sqlite3
5713 **
@@ -5717,11 +5717,11 @@
5717 ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is
5718 ** omitted.
5719 **
5720 ** See also: [sqlite3_release_memory()]
5721 */
5722 SQLITE_API int sqlite3_db_release_memory(sqlite3*);
5723
5724 /*
5725 ** CAPI3REF: Impose A Limit On Heap Size
5726 **
5727 ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
@@ -5769,11 +5769,11 @@
5769 ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5770 **
5771 ** The circumstances under which SQLite will enforce the soft heap limit may
5772 ** changes in future releases of SQLite.
5773 */
5774 SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
5775
5776 /*
5777 ** CAPI3REF: Deprecated Soft Heap Limit Interface
5778 ** DEPRECATED
5779 **
@@ -5780,11 +5780,11 @@
5780 ** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
5781 ** interface. This routine is provided for historical compatibility
5782 ** only. All new applications should use the
5783 ** [sqlite3_soft_heap_limit64()] interface rather than this one.
5784 */
5785 SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
5786
5787
5788 /*
5789 ** CAPI3REF: Extract Metadata About A Column Of A Table
5790 ** METHOD: sqlite3
@@ -5850,11 +5850,11 @@
5850 **
5851 ** ^This function causes all database schemas to be read from disk and
5852 ** parsed, if that has not already been done, and returns an error if
5853 ** any errors are encountered while loading the schema.
5854 */
5855 SQLITE_API int sqlite3_table_column_metadata(
5856 sqlite3 *db, /* Connection handle */
5857 const char *zDbName, /* Database name or NULL */
5858 const char *zTableName, /* Table name */
5859 const char *zColumnName, /* Column name */
5860 char const **pzDataType, /* OUTPUT: Declared data type */
@@ -5906,11 +5906,11 @@
5906 ** disabled and prevent SQL injections from giving attackers
5907 ** access to extension loading capabilities.
5908 **
5909 ** See also the [load_extension() SQL function].
5910 */
5911 SQLITE_API int sqlite3_load_extension(
5912 sqlite3 *db, /* Load the extension into this database connection */
5913 const char *zFile, /* Name of the shared library containing extension */
5914 const char *zProc, /* Entry point. Derived from zFile if 0 */
5915 char **pzErrMsg /* Put error message here if not 0 */
5916 );
@@ -5938,11 +5938,11 @@
5938 ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
5939 ** rather than this interface, so the [load_extension()] SQL function
5940 ** remains disabled. This will prevent SQL injections from giving attackers
5941 ** access to extension loading capabilities.
5942 */
5943 SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5944
5945 /*
5946 ** CAPI3REF: Automatically Load Statically Linked Extensions
5947 **
5948 ** ^This interface causes the xEntryPoint() function to be invoked for
@@ -5976,11 +5976,11 @@
5976 ** will be called more than once for each database connection that is opened.
5977 **
5978 ** See also: [sqlite3_reset_auto_extension()]
5979 ** and [sqlite3_cancel_auto_extension()]
5980 */
5981 SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
5982
5983 /*
5984 ** CAPI3REF: Cancel Automatic Extension Loading
5985 **
5986 ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the
@@ -5988,19 +5988,19 @@
5988 ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)]
5989 ** routine returns 1 if initialization routine X was successfully
5990 ** unregistered and it returns 0 if X was not on the list of initialization
5991 ** routines.
5992 */
5993 SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
5994
5995 /*
5996 ** CAPI3REF: Reset Automatic Extension Loading
5997 **
5998 ** ^This interface disables all automatic extensions previously
5999 ** registered using [sqlite3_auto_extension()].
6000 */
6001 SQLITE_API void sqlite3_reset_auto_extension(void);
6002
6003 /*
6004 ** The interface to the virtual-table mechanism is currently considered
6005 ** to be experimental. The interface might change in incompatible ways.
6006 ** If this is a problem for you, do not use the interface at this time.
@@ -6241,17 +6241,17 @@
6241 ** be invoked if the call to sqlite3_create_module_v2() fails.
6242 ** ^The sqlite3_create_module()
6243 ** interface is equivalent to sqlite3_create_module_v2() with a NULL
6244 ** destructor.
6245 */
6246 SQLITE_API int sqlite3_create_module(
6247 sqlite3 *db, /* SQLite connection to register module with */
6248 const char *zName, /* Name of the module */
6249 const sqlite3_module *p, /* Methods for the module */
6250 void *pClientData /* Client data for xCreate/xConnect */
6251 );
6252 SQLITE_API int sqlite3_create_module_v2(
6253 sqlite3 *db, /* SQLite connection to register module with */
6254 const char *zName, /* Name of the module */
6255 const sqlite3_module *p, /* Methods for the module */
6256 void *pClientData, /* Client data for xCreate/xConnect */
6257 void(*xDestroy)(void*) /* Module destructor function */
@@ -6310,11 +6310,11 @@
6310 ** ^The [xCreate] and [xConnect] methods of a
6311 ** [virtual table module] call this interface
6312 ** to declare the format (the names and datatypes of the columns) of
6313 ** the virtual tables they implement.
6314 */
6315 SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
6316
6317 /*
6318 ** CAPI3REF: Overload A Function For A Virtual Table
6319 ** METHOD: sqlite3
6320 **
@@ -6329,11 +6329,11 @@
6329 ** of the new function always causes an exception to be thrown. So
6330 ** the new function is not good for anything by itself. Its only
6331 ** purpose is to be a placeholder function that can be overloaded
6332 ** by a [virtual table].
6333 */
6334 SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
6335
6336 /*
6337 ** The interface to the virtual-table mechanism defined above (back up
6338 ** to a comment remarkably similar to this one) is currently considered
6339 ** to be experimental. The interface might change in incompatible ways.
@@ -6428,11 +6428,11 @@
6428 ** zero-filled blob to read or write using the incremental-blob interface.
6429 **
6430 ** To avoid a resource leak, every open [BLOB handle] should eventually
6431 ** be released by a call to [sqlite3_blob_close()].
6432 */
6433 SQLITE_API int sqlite3_blob_open(
6434 sqlite3*,
6435 const char *zDb,
6436 const char *zTable,
6437 const char *zColumn,
6438 sqlite3_int64 iRow,
@@ -6461,11 +6461,11 @@
6461 ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
6462 ** always returns zero.
6463 **
6464 ** ^This function sets the database handle error code and message.
6465 */
6466 SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
6467
6468 /*
6469 ** CAPI3REF: Close A BLOB Handle
6470 ** DESTRUCTOR: sqlite3_blob
6471 **
@@ -6484,11 +6484,11 @@
6484 ** with a null pointer (such as would be returned by a failed call to
6485 ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
6486 ** is passed a valid open blob handle, the values returned by the
6487 ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
6488 */
6489 SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
6490
6491 /*
6492 ** CAPI3REF: Return The Size Of An Open BLOB
6493 ** METHOD: sqlite3_blob
6494 **
@@ -6500,11 +6500,11 @@
6500 ** This routine only works on a [BLOB handle] which has been created
6501 ** by a prior successful call to [sqlite3_blob_open()] and which has not
6502 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6503 ** to this routine results in undefined and probably undesirable behavior.
6504 */
6505 SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
6506
6507 /*
6508 ** CAPI3REF: Read Data From A BLOB Incrementally
6509 ** METHOD: sqlite3_blob
6510 **
@@ -6529,11 +6529,11 @@
6529 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6530 ** to this routine results in undefined and probably undesirable behavior.
6531 **
6532 ** See also: [sqlite3_blob_write()].
6533 */
6534 SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
6535
6536 /*
6537 ** CAPI3REF: Write Data Into A BLOB Incrementally
6538 ** METHOD: sqlite3_blob
6539 **
@@ -6571,11 +6571,11 @@
6571 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6572 ** to this routine results in undefined and probably undesirable behavior.
6573 **
6574 ** See also: [sqlite3_blob_read()].
6575 */
6576 SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
6577
6578 /*
6579 ** CAPI3REF: Virtual File System Objects
6580 **
6581 ** A virtual filesystem (VFS) is an [sqlite3_vfs] object
@@ -6602,13 +6602,13 @@
6602 **
6603 ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
6604 ** ^(If the default VFS is unregistered, another VFS is chosen as
6605 ** the default. The choice for the new VFS is arbitrary.)^
6606 */
6607 SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
6608 SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6609 SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
6610
6611 /*
6612 ** CAPI3REF: Mutexes
6613 **
6614 ** The SQLite core uses these routines for thread
@@ -6720,15 +6720,15 @@
6720 ** sqlite3_mutex_leave() is a NULL pointer, then all three routines
6721 ** behave as no-ops.
6722 **
6723 ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
6724 */
6725 SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
6726 SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
6727 SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
6728 SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
6729 SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
6730
6731 /*
6732 ** CAPI3REF: Mutex Methods Object
6733 **
6734 ** An instance of this structure defines the low-level routines
@@ -6834,12 +6834,12 @@
6834 ** call to sqlite3_mutex_held() to fail, so a non-zero return is
6835 ** the appropriate thing to do. The sqlite3_mutex_notheld()
6836 ** interface should also return 1 when given a NULL pointer.
6837 */
6838 #ifndef NDEBUG
6839 SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
6840 SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
6841 #endif
6842
6843 /*
6844 ** CAPI3REF: Mutex Types
6845 **
@@ -6875,11 +6875,11 @@
6875 ** serializes access to the [database connection] given in the argument
6876 ** when the [threading mode] is Serialized.
6877 ** ^If the [threading mode] is Single-thread or Multi-thread then this
6878 ** routine returns a NULL pointer.
6879 */
6880 SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
6881
6882 /*
6883 ** CAPI3REF: Low-Level Control Of Database Files
6884 ** METHOD: sqlite3
6885 **
@@ -6910,11 +6910,11 @@
6910 ** an incorrect zDbName and an SQLITE_ERROR return from the underlying
6911 ** xFileControl method.
6912 **
6913 ** See also: [SQLITE_FCNTL_LOCKSTATE]
6914 */
6915 SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6916
6917 /*
6918 ** CAPI3REF: Testing Interface
6919 **
6920 ** ^The sqlite3_test_control() interface is used to read out internal
@@ -6929,11 +6929,11 @@
6929 ** The details of the operation codes, their meanings, the parameters
6930 ** they take, and what they do are all subject to change without notice.
6931 ** Unlike most of the SQLite API, this function is not guaranteed to
6932 ** operate consistently from one release to the next.
6933 */
6934 SQLITE_API int sqlite3_test_control(int op, ...);
6935
6936 /*
6937 ** CAPI3REF: Testing Interface Operation Codes
6938 **
6939 ** These constants are the valid operation code parameters used
@@ -6992,12 +6992,12 @@
6992 ** be represented by a 32-bit integer, then the values returned by
6993 ** sqlite3_status() are undefined.
6994 **
6995 ** See also: [sqlite3_db_status()]
6996 */
6997 SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6998 SQLITE_API int sqlite3_status64(
6999 int op,
7000 sqlite3_int64 *pCurrent,
7001 sqlite3_int64 *pHighwater,
7002 int resetFlag
7003 );
@@ -7118,11 +7118,11 @@
7118 ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
7119 ** non-zero [error code] on failure.
7120 **
7121 ** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
7122 */
7123 SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
7124
7125 /*
7126 ** CAPI3REF: Status Parameters for database connections
7127 ** KEYWORDS: {SQLITE_DBSTATUS options}
7128 **
@@ -7261,11 +7261,11 @@
7261 ** ^If the resetFlg is true, then the counter is reset to zero after this
7262 ** interface call returns.
7263 **
7264 ** See also: [sqlite3_status()] and [sqlite3_db_status()].
7265 */
7266 SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
7267
7268 /*
7269 ** CAPI3REF: Status Parameters for prepared statements
7270 ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters}
7271 **
@@ -7730,20 +7730,20 @@
7730 ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
7731 ** APIs are not strictly speaking threadsafe. If they are invoked at the
7732 ** same time as another thread is invoking sqlite3_backup_step() it is
7733 ** possible that they return invalid values.
7734 */
7735 SQLITE_API sqlite3_backup *sqlite3_backup_init(
7736 sqlite3 *pDest, /* Destination database handle */
7737 const char *zDestName, /* Destination database name */
7738 sqlite3 *pSource, /* Source database handle */
7739 const char *zSourceName /* Source database name */
7740 );
7741 SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
7742 SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
7743 SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);
7744 SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
7745
7746 /*
7747 ** CAPI3REF: Unlock Notification
7748 ** METHOD: sqlite3
7749 **
@@ -7856,11 +7856,11 @@
7856 ** by an sqlite3_step() call. ^(If there is a blocking connection, then the
7857 ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
7858 ** the special "DROP TABLE/INDEX" case, the extended error code is just
7859 ** SQLITE_LOCKED.)^
7860 */
7861 SQLITE_API int sqlite3_unlock_notify(
7862 sqlite3 *pBlocked, /* Waiting connection */
7863 void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
7864 void *pNotifyArg /* Argument to pass to xNotify */
7865 );
7866
@@ -7871,12 +7871,12 @@
7871 ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications
7872 ** and extensions to compare the contents of two buffers containing UTF-8
7873 ** strings in a case-independent fashion, using the same definition of "case
7874 ** independence" that SQLite uses internally when comparing identifiers.
7875 */
7876 SQLITE_API int sqlite3_stricmp(const char *, const char *);
7877 SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
7878
7879 /*
7880 ** CAPI3REF: String Globbing
7881 *
7882 ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if
@@ -7889,11 +7889,11 @@
7889 ** Note that this routine returns zero on a match and non-zero if the strings
7890 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7891 **
7892 ** See also: [sqlite3_strlike()].
7893 */
7894 SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
7895
7896 /*
7897 ** CAPI3REF: String LIKE Matching
7898 *
7899 ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if
@@ -7912,11 +7912,11 @@
7912 ** Note that this routine returns zero on a match and non-zero if the strings
7913 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7914 **
7915 ** See also: [sqlite3_strglob()].
7916 */
7917 SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
7918
7919 /*
7920 ** CAPI3REF: Error Logging Interface
7921 **
7922 ** ^The [sqlite3_log()] interface writes a message into the [error log]
@@ -7935,11 +7935,11 @@
7935 ** will not use dynamically allocated memory. The log message is stored in
7936 ** a fixed-length buffer on the stack. If the log message is longer than
7937 ** a few hundred characters, it will be truncated to the length of the
7938 ** buffer.
7939 */
7940 SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
7941
7942 /*
7943 ** CAPI3REF: Write-Ahead Log Commit Hook
7944 ** METHOD: sqlite3
7945 **
@@ -7971,11 +7971,11 @@
7971 ** previously registered write-ahead log callback. ^Note that the
7972 ** [sqlite3_wal_autocheckpoint()] interface and the
7973 ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
7974 ** overwrite any prior [sqlite3_wal_hook()] settings.
7975 */
7976 SQLITE_API void *sqlite3_wal_hook(
7977 sqlite3*,
7978 int(*)(void *,sqlite3*,const char*,int),
7979 void*
7980 );
7981
@@ -8006,11 +8006,11 @@
8006 ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
8007 ** pages. The use of this interface
8008 ** is only necessary if the default setting is found to be suboptimal
8009 ** for a particular application.
8010 */
8011 SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
8012
8013 /*
8014 ** CAPI3REF: Checkpoint a database
8015 ** METHOD: sqlite3
8016 **
@@ -8028,11 +8028,11 @@
8028 ** interface was added. This interface is retained for backwards
8029 ** compatibility and as a convenience for applications that need to manually
8030 ** start a callback but which do not need the full power (and corresponding
8031 ** complication) of [sqlite3_wal_checkpoint_v2()].
8032 */
8033 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
8034
8035 /*
8036 ** CAPI3REF: Checkpoint a database
8037 ** METHOD: sqlite3
8038 **
@@ -8122,11 +8122,11 @@
8122 ** [sqlite3_errcode()] and [sqlite3_errmsg()].
8123 **
8124 ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
8125 ** from SQL.
8126 */
8127 SQLITE_API int sqlite3_wal_checkpoint_v2(
8128 sqlite3 *db, /* Database handle */
8129 const char *zDb, /* Name of attached database (or NULL) */
8130 int eMode, /* SQLITE_CHECKPOINT_* value */
8131 int *pnLog, /* OUT: Size of WAL log in frames */
8132 int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -8158,11 +8158,11 @@
8158 **
8159 ** At present, there is only one option that may be configured using
8160 ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
8161 ** may be added in the future.
8162 */
8163 SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
8164
8165 /*
8166 ** CAPI3REF: Virtual Table Configuration Options
8167 **
8168 ** These macros define the various options to the
@@ -8211,11 +8211,11 @@
8211 ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],
8212 ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode
8213 ** of the SQL statement that triggered the call to the [xUpdate] method of the
8214 ** [virtual table].
8215 */
8216 SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
8217
8218 /*
8219 ** CAPI3REF: Conflict resolution modes
8220 ** KEYWORDS: {conflict resolution mode}
8221 **
@@ -8316,11 +8316,11 @@
8316 ** as if the loop did not exist - it returns non-zero and leave the variable
8317 ** that pOut points to unchanged.
8318 **
8319 ** See also: [sqlite3_stmt_scanstatus_reset()]
8320 */
8321 SQLITE_API int sqlite3_stmt_scanstatus(
8322 sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
8323 int idx, /* Index of loop to report on */
8324 int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
8325 void *pOut /* Result written here */
8326 );
@@ -8332,11 +8332,11 @@
8332 ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
8333 **
8334 ** This API is only available if the library is built with pre-processor
8335 ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
8336 */
8337 SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
8338
8339 /*
8340 ** CAPI3REF: Flush caches to disk mid-transaction
8341 **
8342 ** ^If a write-transaction is open on [database connection] D when the
@@ -8364,11 +8364,11 @@
8364 ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.
8365 **
8366 ** ^This function does not set the database handle error code or message
8367 ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
8368 */
8369 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
8370
8371 /*
8372 ** CAPI3REF: The pre-update hook.
8373 **
8374 ** ^These interfaces are only available if SQLite is compiled using the
@@ -8444,11 +8444,11 @@
8444 ** triggers; or 2 for changes resulting from triggers called by top-level
8445 ** triggers; and so forth.
8446 **
8447 ** See also: [sqlite3_update_hook()]
8448 */
8449 SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook(
8450 sqlite3 *db,
8451 void(*xPreUpdate)(
8452 void *pCtx, /* Copy of third arg to preupdate_hook() */
8453 sqlite3 *db, /* Database handle */
8454 int op, /* SQLITE_UPDATE, DELETE or INSERT */
@@ -8457,14 +8457,14 @@
8457 sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
8458 sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
8459 ),
8460 void*
8461 );
8462 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8463 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_count(sqlite3 *);
8464 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_depth(sqlite3 *);
8465 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
8466
8467 /*
8468 ** CAPI3REF: Low-level system error code
8469 **
8470 ** ^Attempt to return the underlying operating system error code or error
@@ -8472,11 +8472,11 @@
8472 ** The return value is OS-dependent. For example, on unix systems, after
8473 ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
8474 ** called to get back the underlying "errno" that caused the problem, such
8475 ** as ENOSPC, EAUTH, EISDIR, and so forth.
8476 */
8477 SQLITE_API int sqlite3_system_errno(sqlite3*);
8478
8479 /*
8480 ** CAPI3REF: Database Snapshot
8481 ** KEYWORDS: {snapshot}
8482 ** EXPERIMENTAL
@@ -8522,11 +8522,11 @@
8522 ** to avoid a memory leak.
8523 **
8524 ** The [sqlite3_snapshot_get()] interface is only available when the
8525 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8526 */
8527 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
8528 sqlite3 *db,
8529 const char *zSchema,
8530 sqlite3_snapshot **ppSnapshot
8531 );
8532
@@ -8560,11 +8560,11 @@
8560 ** database connection in order to make it ready to use snapshots.)
8561 **
8562 ** The [sqlite3_snapshot_open()] interface is only available when the
8563 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8564 */
8565 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
8566 sqlite3 *db,
8567 const char *zSchema,
8568 sqlite3_snapshot *pSnapshot
8569 );
8570
@@ -8577,11 +8577,11 @@
8577 ** using this routine to avoid a memory leak.
8578 **
8579 ** The [sqlite3_snapshot_free()] interface is only available when the
8580 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8581 */
8582 SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
8583
8584 /*
8585 ** CAPI3REF: Compare the ages of two snapshot handles.
8586 ** EXPERIMENTAL
8587 **
@@ -8601,11 +8601,11 @@
8601 **
8602 ** Otherwise, this API returns a negative value if P1 refers to an older
8603 ** snapshot than P2, zero if the two handles refer to the same database
8604 ** snapshot, and a positive value if P1 is a newer snapshot than P2.
8605 */
8606 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
8607 sqlite3_snapshot *p1,
8608 sqlite3_snapshot *p2
8609 );
8610
8611 /*
@@ -8659,11 +8659,11 @@
8659 ** Register a geometry callback named zGeom that can be used as part of an
8660 ** R-Tree geometry query as follows:
8661 **
8662 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
8663 */
8664 SQLITE_API int sqlite3_rtree_geometry_callback(
8665 sqlite3 *db,
8666 const char *zGeom,
8667 int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
8668 void *pContext
8669 );
@@ -8685,11 +8685,11 @@
8685 ** Register a 2nd-generation geometry callback named zScore that can be
8686 ** used as part of an R-Tree geometry query as follows:
8687 **
8688 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
8689 */
8690 SQLITE_API int sqlite3_rtree_query_callback(
8691 sqlite3 *db,
8692 const char *zQueryFunc,
8693 int (*xQueryFunc)(sqlite3_rtree_query_info*),
8694 void *pContext,
8695 void (*xDestructor)(void*)
@@ -11900,12 +11900,12 @@
11900 */
11901 #ifdef SQLITE_OMIT_WSD
11902 #define SQLITE_WSD const
11903 #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v)))
11904 #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config)
11905 SQLITE_API int sqlite3_wsd_init(int N, int J);
11906 SQLITE_API void *sqlite3_wsd_find(void *K, int L);
11907 #else
11908 #define SQLITE_WSD
11909 #define GLOBAL(t,v) v
11910 #define sqlite3GlobalConfig sqlite3Config
11911 #endif
@@ -12559,16 +12559,16 @@
12559 #define OP_Found 31 /* synopsis: key=r[P3@P4] */
12560 #define OP_SeekRowid 32 /* synopsis: intkey=r[P3] */
12561 #define OP_NotExists 33 /* synopsis: intkey=r[P3] */
12562 #define OP_IsNull 34 /* same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
12563 #define OP_NotNull 35 /* same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
12564 #define OP_Ne 36 /* same as TK_NE, synopsis: IF r[P3]!=r[P1] */
12565 #define OP_Eq 37 /* same as TK_EQ, synopsis: IF r[P3]==r[P1] */
12566 #define OP_Gt 38 /* same as TK_GT, synopsis: IF r[P3]>r[P1] */
12567 #define OP_Le 39 /* same as TK_LE, synopsis: IF r[P3]<=r[P1] */
12568 #define OP_Lt 40 /* same as TK_LT, synopsis: IF r[P3]<r[P1] */
12569 #define OP_Ge 41 /* same as TK_GE, synopsis: IF r[P3]>=r[P1] */
12570 #define OP_Last 42
12571 #define OP_BitAnd 43 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
12572 #define OP_BitOr 44 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
12573 #define OP_ShiftLeft 45 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */
12574 #define OP_ShiftRight 46 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */
@@ -17561,11 +17561,11 @@
17561 ** was used and false if not.
17562 **
17563 ** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix
17564 ** is not required for a match.
17565 */
17566 SQLITE_API int sqlite3_compileoption_used(const char *zOptName){
17567 int i, n;
17568
17569 #if SQLITE_ENABLE_API_ARMOR
17570 if( zOptName==0 ){
17571 (void)SQLITE_MISUSE_BKPT;
@@ -17589,11 +17589,11 @@
17589
17590 /*
17591 ** Return the N-th compile-time option string. If N is out of range,
17592 ** return a NULL pointer.
17593 */
17594 SQLITE_API const char *sqlite3_compileoption_get(int N){
17595 if( N>=0 && N<ArraySize(azCompileOpt) ){
17596 return azCompileOpt[N];
17597 }
17598 return 0;
17599 }
@@ -18299,11 +18299,11 @@
18299 }
18300
18301 /*
18302 ** Query status information.
18303 */
18304 SQLITE_API int sqlite3_status64(
18305 int op,
18306 sqlite3_int64 *pCurrent,
18307 sqlite3_int64 *pHighwater,
18308 int resetFlag
18309 ){
@@ -18324,11 +18324,11 @@
18324 }
18325 sqlite3_mutex_leave(pMutex);
18326 (void)pMutex; /* Prevent warning when SQLITE_THREADSAFE=0 */
18327 return SQLITE_OK;
18328 }
18329 SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){
18330 sqlite3_int64 iCur = 0, iHwtr = 0;
18331 int rc;
18332 #ifdef SQLITE_ENABLE_API_ARMOR
18333 if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT;
18334 #endif
@@ -18341,11 +18341,11 @@
18341 }
18342
18343 /*
18344 ** Query status information for a single database connection
18345 */
18346 SQLITE_API int sqlite3_db_status(
18347 sqlite3 *db, /* The database connection whose status is desired */
18348 int op, /* Status verb */
18349 int *pCurrent, /* Write current value here */
18350 int *pHighwater, /* Write high-water mark here */
18351 int resetFlag /* Reset high-water mark if true */
@@ -20018,11 +20018,11 @@
20018
20019 /*
20020 ** Locate a VFS by name. If no name is given, simply return the
20021 ** first VFS on the list.
20022 */
20023 SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){
20024 sqlite3_vfs *pVfs = 0;
20025 #if SQLITE_THREADSAFE
20026 sqlite3_mutex *mutex;
20027 #endif
20028 #ifndef SQLITE_OMIT_AUTOINIT
@@ -20064,11 +20064,11 @@
20064 /*
20065 ** Register a VFS with the system. It is harmless to register the same
20066 ** VFS multiple times. The new VFS becomes the default if makeDflt is
20067 ** true.
20068 */
20069 SQLITE_API int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
20070 MUTEX_LOGIC(sqlite3_mutex *mutex;)
20071 #ifndef SQLITE_OMIT_AUTOINIT
20072 int rc = sqlite3_initialize();
20073 if( rc ) return rc;
20074 #endif
@@ -20092,11 +20092,11 @@
20092 }
20093
20094 /*
20095 ** Unregister a VFS so that it is no longer accessible.
20096 */
20097 SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
20098 #if SQLITE_THREADSAFE
20099 sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
20100 #endif
20101 sqlite3_mutex_enter(mutex);
20102 vfsUnlink(pVfs);
@@ -22443,11 +22443,11 @@
22443 }
22444
22445 /*
22446 ** Retrieve a pointer to a static mutex or allocate a new dynamic one.
22447 */
22448 SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int id){
22449 #ifndef SQLITE_OMIT_AUTOINIT
22450 if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0;
22451 if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0;
22452 #endif
22453 assert( sqlite3GlobalConfig.mutex.xMutexAlloc );
@@ -22464,11 +22464,11 @@
22464 }
22465
22466 /*
22467 ** Free a dynamic mutex.
22468 */
22469 SQLITE_API void sqlite3_mutex_free(sqlite3_mutex *p){
22470 if( p ){
22471 assert( sqlite3GlobalConfig.mutex.xMutexFree );
22472 sqlite3GlobalConfig.mutex.xMutexFree(p);
22473 }
22474 }
@@ -22475,11 +22475,11 @@
22475
22476 /*
22477 ** Obtain the mutex p. If some other thread already has the mutex, block
22478 ** until it can be obtained.
22479 */
22480 SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex *p){
22481 if( p ){
22482 assert( sqlite3GlobalConfig.mutex.xMutexEnter );
22483 sqlite3GlobalConfig.mutex.xMutexEnter(p);
22484 }
22485 }
@@ -22486,11 +22486,11 @@
22486
22487 /*
22488 ** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another
22489 ** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY.
22490 */
22491 SQLITE_API int sqlite3_mutex_try(sqlite3_mutex *p){
22492 int rc = SQLITE_OK;
22493 if( p ){
22494 assert( sqlite3GlobalConfig.mutex.xMutexTry );
22495 return sqlite3GlobalConfig.mutex.xMutexTry(p);
22496 }
@@ -22501,11 +22501,11 @@
22501 ** The sqlite3_mutex_leave() routine exits a mutex that was previously
22502 ** entered by the same thread. The behavior is undefined if the mutex
22503 ** is not currently entered. If a NULL pointer is passed as an argument
22504 ** this function is a no-op.
22505 */
22506 SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex *p){
22507 if( p ){
22508 assert( sqlite3GlobalConfig.mutex.xMutexLeave );
22509 sqlite3GlobalConfig.mutex.xMutexLeave(p);
22510 }
22511 }
@@ -22513,15 +22513,15 @@
22513 #ifndef NDEBUG
22514 /*
22515 ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
22516 ** intended for use inside assert() statements.
22517 */
22518 SQLITE_API int sqlite3_mutex_held(sqlite3_mutex *p){
22519 assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld );
22520 return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p);
22521 }
22522 SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *p){
22523 assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld );
22524 return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p);
22525 }
22526 #endif
22527
@@ -23549,12 +23549,12 @@
23549 ** of the sqlite3_initialize() and sqlite3_shutdown() processing, the
23550 ** "interlocked" magic used here is probably not strictly necessary.
23551 */
23552 static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0;
23553
23554 SQLITE_API int sqlite3_win32_is_nt(void); /* os_win.c */
23555 SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */
23556
23557 static int winMutexInit(void){
23558 /* The first to increment to 1 does actual initialization */
23559 if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){
23560 int i;
@@ -23850,11 +23850,11 @@
23850 /*
23851 ** Attempt to release up to n bytes of non-essential memory currently
23852 ** held by SQLite. An example of non-essential memory is memory used to
23853 ** cache database pages that are not currently in use.
23854 */
23855 SQLITE_API int sqlite3_release_memory(int n){
23856 #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
23857 return sqlite3PcacheReleaseMemory(n);
23858 #else
23859 /* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine
23860 ** is a no-op returning zero if SQLite is not compiled with
@@ -23909,11 +23909,11 @@
23909 /*
23910 ** Deprecated external interface. It used to set an alarm callback
23911 ** that was invoked when memory usage grew too large. Now it is a
23912 ** no-op.
23913 */
23914 SQLITE_API int sqlite3_memory_alarm(
23915 void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
23916 void *pArg,
23917 sqlite3_int64 iThreshold
23918 ){
23919 (void)xCallback;
@@ -23925,11 +23925,11 @@
23925
23926 /*
23927 ** Set the soft heap-size limit for the library. Passing a zero or
23928 ** negative value indicates no limit.
23929 */
23930 SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 n){
23931 sqlite3_int64 priorLimit;
23932 sqlite3_int64 excess;
23933 sqlite3_int64 nUsed;
23934 #ifndef SQLITE_OMIT_AUTOINIT
23935 int rc = sqlite3_initialize();
@@ -23947,11 +23947,11 @@
23947 sqlite3_mutex_leave(mem0.mutex);
23948 excess = sqlite3_memory_used() - n;
23949 if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff));
23950 return priorLimit;
23951 }
23952 SQLITE_API void sqlite3_soft_heap_limit(int n){
23953 if( n<0 ) n = 0;
23954 sqlite3_soft_heap_limit64(n);
23955 }
23956
23957 /*
@@ -24016,11 +24016,11 @@
24016 }
24017
24018 /*
24019 ** Return the amount of memory currently checked out.
24020 */
24021 SQLITE_API sqlite3_int64 sqlite3_memory_used(void){
24022 sqlite3_int64 res, mx;
24023 sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0);
24024 return res;
24025 }
24026
@@ -24027,11 +24027,11 @@
24027 /*
24028 ** Return the maximum amount of memory that has ever been
24029 ** checked out since either the beginning of this process
24030 ** or since the most recent reset.
24031 */
24032 SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag){
24033 sqlite3_int64 res, mx;
24034 sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag);
24035 return mx;
24036 }
24037
@@ -24107,17 +24107,17 @@
24107 /*
24108 ** This version of the memory allocation is for use by the application.
24109 ** First make sure the memory subsystem is initialized, then do the
24110 ** allocation.
24111 */
24112 SQLITE_API void *sqlite3_malloc(int n){
24113 #ifndef SQLITE_OMIT_AUTOINIT
24114 if( sqlite3_initialize() ) return 0;
24115 #endif
24116 return n<=0 ? 0 : sqlite3Malloc(n);
24117 }
24118 SQLITE_API void *sqlite3_malloc64(sqlite3_uint64 n){
24119 #ifndef SQLITE_OMIT_AUTOINIT
24120 if( sqlite3_initialize() ) return 0;
24121 #endif
24122 return sqlite3Malloc(n);
24123 }
@@ -24256,20 +24256,20 @@
24256 }else{
24257 assert( sqlite3_mutex_held(db->mutex) );
24258 return db->lookaside.sz;
24259 }
24260 }
24261 SQLITE_API sqlite3_uint64 sqlite3_msize(void *p){
24262 assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
24263 assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
24264 return p ? sqlite3GlobalConfig.m.xSize(p) : 0;
24265 }
24266
24267 /*
24268 ** Free memory previously obtained from sqlite3Malloc().
24269 */
24270 SQLITE_API void sqlite3_free(void *p){
24271 if( p==0 ) return; /* IMP: R-49053-54554 */
24272 assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
24273 assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
24274 if( sqlite3GlobalConfig.bMemstat ){
24275 sqlite3_mutex_enter(mem0.mutex);
@@ -24374,18 +24374,18 @@
24374
24375 /*
24376 ** The public interface to sqlite3Realloc. Make sure that the memory
24377 ** subsystem is initialized prior to invoking sqliteRealloc.
24378 */
24379 SQLITE_API void *sqlite3_realloc(void *pOld, int n){
24380 #ifndef SQLITE_OMIT_AUTOINIT
24381 if( sqlite3_initialize() ) return 0;
24382 #endif
24383 if( n<0 ) n = 0; /* IMP: R-26507-47431 */
24384 return sqlite3Realloc(pOld, n);
24385 }
24386 SQLITE_API void *sqlite3_realloc64(void *pOld, sqlite3_uint64 n){
24387 #ifndef SQLITE_OMIT_AUTOINIT
24388 if( sqlite3_initialize() ) return 0;
24389 #endif
24390 return sqlite3Realloc(pOld, n);
24391 }
@@ -25608,11 +25608,11 @@
25608
25609 /*
25610 ** Print into memory obtained from sqlite3_malloc(). Omit the internal
25611 ** %-conversion extensions.
25612 */
25613 SQLITE_API char *sqlite3_vmprintf(const char *zFormat, va_list ap){
25614 char *z;
25615 char zBase[SQLITE_PRINT_BUF_SIZE];
25616 StrAccum acc;
25617
25618 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -25632,11 +25632,11 @@
25632
25633 /*
25634 ** Print into memory obtained from sqlite3_malloc()(). Omit the internal
25635 ** %-conversion extensions.
25636 */
25637 SQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){
25638 va_list ap;
25639 char *z;
25640 #ifndef SQLITE_OMIT_AUTOINIT
25641 if( sqlite3_initialize() ) return 0;
25642 #endif
@@ -25657,11 +25657,11 @@
25657 ** this without breaking compatibility, so we just have to live with the
25658 ** mistake.
25659 **
25660 ** sqlite3_vsnprintf() is the varargs version.
25661 */
25662 SQLITE_API char *sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
25663 StrAccum acc;
25664 if( n<=0 ) return zBuf;
25665 #ifdef SQLITE_ENABLE_API_ARMOR
25666 if( zBuf==0 || zFormat==0 ) {
25667 (void)SQLITE_MISUSE_BKPT;
@@ -25671,11 +25671,11 @@
25671 #endif
25672 sqlite3StrAccumInit(&acc, 0, zBuf, n, 0);
25673 sqlite3VXPrintf(&acc, zFormat, ap);
25674 return sqlite3StrAccumFinish(&acc);
25675 }
25676 SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
25677 char *z;
25678 va_list ap;
25679 va_start(ap,zFormat);
25680 z = sqlite3_vsnprintf(n, zBuf, zFormat, ap);
25681 va_end(ap);
@@ -25707,11 +25707,11 @@
25707 }
25708
25709 /*
25710 ** Format and write a message to the log if logging is enabled.
25711 */
25712 SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...){
25713 va_list ap; /* Vararg list */
25714 if( sqlite3GlobalConfig.xLog ){
25715 va_start(ap, zFormat);
25716 renderLogMsg(iErrCode, zFormat, ap);
25717 va_end(ap);
@@ -26284,11 +26284,11 @@
26284 } sqlite3Prng;
26285
26286 /*
26287 ** Return N random bytes.
26288 */
26289 SQLITE_API void sqlite3_randomness(int N, void *pBuf){
26290 unsigned char t;
26291 unsigned char *zBuf = pBuf;
26292
26293 /* The "wsdPrng" macro will resolve to the pseudo-random number generator
26294 ** state vector. If writable static data is unsupported on the target,
@@ -27487,11 +27487,11 @@
27487 ** sqlite3_strnicmp() APIs allow applications and extensions to compare
27488 ** the contents of two buffers containing UTF-8 strings in a
27489 ** case-independent fashion, using the same definition of "case
27490 ** independence" that SQLite uses internally when comparing identifiers.
27491 */
27492 SQLITE_API int sqlite3_stricmp(const char *zLeft, const char *zRight){
27493 if( zLeft==0 ){
27494 return zRight ? -1 : 0;
27495 }else if( zRight==0 ){
27496 return 1;
27497 }
@@ -27508,11 +27508,11 @@
27508 a++;
27509 b++;
27510 }
27511 return c;
27512 }
27513 SQLITE_API int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
27514 register unsigned char *a, *b;
27515 if( zLeft==0 ){
27516 return zRight ? -1 : 0;
27517 }else if( zRight==0 ){
27518 return 1;
@@ -28990,16 +28990,16 @@
28990 /* 31 */ "Found" OpHelp("key=r[P3@P4]"),
28991 /* 32 */ "SeekRowid" OpHelp("intkey=r[P3]"),
28992 /* 33 */ "NotExists" OpHelp("intkey=r[P3]"),
28993 /* 34 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
28994 /* 35 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
28995 /* 36 */ "Ne" OpHelp("IF r[P3]!=r[P1]"),
28996 /* 37 */ "Eq" OpHelp("IF r[P3]==r[P1]"),
28997 /* 38 */ "Gt" OpHelp("IF r[P3]>r[P1]"),
28998 /* 39 */ "Le" OpHelp("IF r[P3]<=r[P1]"),
28999 /* 40 */ "Lt" OpHelp("IF r[P3]<r[P1]"),
29000 /* 41 */ "Ge" OpHelp("IF r[P3]>=r[P1]"),
29001 /* 42 */ "Last" OpHelp(""),
29002 /* 43 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
29003 /* 44 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
29004 /* 45 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
29005 /* 46 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
@@ -36807,11 +36807,11 @@
36807 ** This routine is called once during SQLite initialization and by a
36808 ** single thread. The memory allocation and mutex subsystems have not
36809 ** necessarily been initialized when this routine is called, and so they
36810 ** should not be used.
36811 */
36812 SQLITE_API int sqlite3_os_init(void){
36813 /*
36814 ** The following macro defines an initializer for an sqlite3_vfs object.
36815 ** The name of the VFS is NAME. The pAppData is a pointer to a pointer
36816 ** to the "finder" function. (pAppData is a pointer to a pointer because
36817 ** silly C90 rules prohibit a void* from being cast to a function pointer
@@ -36906,11 +36906,11 @@
36906 **
36907 ** Some operating systems might need to do some cleanup in this routine,
36908 ** to release dynamically allocated objects. But not on unix.
36909 ** This routine is a no-op for unix.
36910 */
36911 SQLITE_API int sqlite3_os_end(void){
36912 return SQLITE_OK;
36913 }
36914
36915 #endif /* SQLITE_OS_UNIX */
36916
@@ -38341,11 +38341,11 @@
38341 ** compact it. Upon success, SQLITE_OK will be returned. Upon failure, one
38342 ** of SQLITE_NOMEM, SQLITE_ERROR, or SQLITE_NOTFOUND will be returned. The
38343 ** "pnLargest" argument, if non-zero, will be used to return the size of the
38344 ** largest committed free block in the heap, in bytes.
38345 */
38346 SQLITE_API int sqlite3_win32_compact_heap(LPUINT pnLargest){
38347 int rc = SQLITE_OK;
38348 UINT nLargest = 0;
38349 HANDLE hHeap;
38350
38351 winMemAssertMagic();
@@ -38381,11 +38381,11 @@
38381 ** If a Win32 native heap has been configured, this function will attempt to
38382 ** destroy and recreate it. If the Win32 native heap is not isolated and/or
38383 ** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will
38384 ** be returned and no changes will be made to the Win32 native heap.
38385 */
38386 SQLITE_API int sqlite3_win32_reset_heap(){
38387 int rc;
38388 MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
38389 MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */
38390 MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); )
38391 MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); )
@@ -38426,11 +38426,11 @@
38426 /*
38427 ** This function outputs the specified (ANSI) string to the Win32 debugger
38428 ** (if available).
38429 */
38430
38431 SQLITE_API void sqlite3_win32_write_debug(const char *zBuf, int nBuf){
38432 char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE];
38433 int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */
38434 if( nMin<-1 ) nMin = -1; /* all negative values become -1. */
38435 assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE );
38436 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -38472,11 +38472,11 @@
38472 */
38473 #if SQLITE_OS_WINRT
38474 static HANDLE sleepObj = NULL;
38475 #endif
38476
38477 SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds){
38478 #if SQLITE_OS_WINRT
38479 if ( sleepObj==NULL ){
38480 sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET,
38481 SYNCHRONIZE);
38482 }
@@ -38521,11 +38521,11 @@
38521
38522 /*
38523 ** This function determines if the machine is running a version of Windows
38524 ** based on the NT kernel.
38525 */
38526 SQLITE_API int sqlite3_win32_is_nt(void){
38527 #if SQLITE_OS_WINRT
38528 /*
38529 ** NOTE: The WinRT sub-platform is always assumed to be based on the NT
38530 ** kernel.
38531 */
@@ -38909,11 +38909,11 @@
38909 }
38910
38911 /*
38912 ** This is a public wrapper for the winUtf8ToUnicode() function.
38913 */
38914 SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char *zText){
38915 #ifdef SQLITE_ENABLE_API_ARMOR
38916 if( !zText ){
38917 (void)SQLITE_MISUSE_BKPT;
38918 return 0;
38919 }
@@ -38925,11 +38925,11 @@
38925 }
38926
38927 /*
38928 ** This is a public wrapper for the winUnicodeToUtf8() function.
38929 */
38930 SQLITE_API char *sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){
38931 #ifdef SQLITE_ENABLE_API_ARMOR
38932 if( !zWideText ){
38933 (void)SQLITE_MISUSE_BKPT;
38934 return 0;
38935 }
@@ -38941,11 +38941,11 @@
38941 }
38942
38943 /*
38944 ** This is a public wrapper for the winMbcsToUtf8() function.
38945 */
38946 SQLITE_API char *sqlite3_win32_mbcs_to_utf8(const char *zText){
38947 #ifdef SQLITE_ENABLE_API_ARMOR
38948 if( !zText ){
38949 (void)SQLITE_MISUSE_BKPT;
38950 return 0;
38951 }
@@ -38957,11 +38957,11 @@
38957 }
38958
38959 /*
38960 ** This is a public wrapper for the winMbcsToUtf8() function.
38961 */
38962 SQLITE_API char *sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){
38963 #ifdef SQLITE_ENABLE_API_ARMOR
38964 if( !zText ){
38965 (void)SQLITE_MISUSE_BKPT;
38966 return 0;
38967 }
@@ -38973,11 +38973,11 @@
38973 }
38974
38975 /*
38976 ** This is a public wrapper for the winUtf8ToMbcs() function.
38977 */
38978 SQLITE_API char *sqlite3_win32_utf8_to_mbcs(const char *zText){
38979 #ifdef SQLITE_ENABLE_API_ARMOR
38980 if( !zText ){
38981 (void)SQLITE_MISUSE_BKPT;
38982 return 0;
38983 }
@@ -38989,11 +38989,11 @@
38989 }
38990
38991 /*
38992 ** This is a public wrapper for the winUtf8ToMbcs() function.
38993 */
38994 SQLITE_API char *sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){
38995 #ifdef SQLITE_ENABLE_API_ARMOR
38996 if( !zText ){
38997 (void)SQLITE_MISUSE_BKPT;
38998 return 0;
38999 }
@@ -39009,11 +39009,11 @@
39009 ** the provided arguments. The type argument must be 1 in order to set the
39010 ** data directory or 2 in order to set the temporary directory. The zValue
39011 ** argument is the name of the directory to use. The return value will be
39012 ** SQLITE_OK if successful.
39013 */
39014 SQLITE_API int sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){
39015 char **ppDirectory = 0;
39016 #ifndef SQLITE_OMIT_AUTOINIT
39017 int rc = sqlite3_initialize();
39018 if( rc ) return rc;
39019 #endif
@@ -42927,11 +42927,11 @@
42927 }
42928
42929 /*
42930 ** Initialize and deinitialize the operating system interface.
42931 */
42932 SQLITE_API int sqlite3_os_init(void){
42933 static sqlite3_vfs winVfs = {
42934 3, /* iVersion */
42935 sizeof(winFile), /* szOsFile */
42936 SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */
42937 0, /* pNext */
@@ -43058,11 +43058,11 @@
43058 #endif
43059
43060 return SQLITE_OK;
43061 }
43062
43063 SQLITE_API int sqlite3_os_end(void){
43064 #if SQLITE_OS_WINRT
43065 if( sleepObj!=NULL ){
43066 osCloseHandle(sleepObj);
43067 sleepObj = NULL;
43068 }
@@ -57083,11 +57083,11 @@
57083
57084 /*
57085 ** Return a +ve value if snapshot p1 is newer than p2. A -ve value if
57086 ** p1 is older than p2 and zero if p1 and p2 are the same snapshot.
57087 */
57088 SQLITE_API int sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){
57089 WalIndexHdr *pHdr1 = (WalIndexHdr*)p1;
57090 WalIndexHdr *pHdr2 = (WalIndexHdr*)p2;
57091
57092 /* aSalt[0] is a copy of the value stored in the wal file header. It
57093 ** is incremented each time the wal file is restarted. */
@@ -58220,11 +58220,11 @@
58220 **
58221 ** This routine has no effect on existing database connections.
58222 ** The shared cache setting effects only future calls to
58223 ** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().
58224 */
58225 SQLITE_API int sqlite3_enable_shared_cache(int enable){
58226 sqlite3GlobalConfig.sharedCacheEnabled = enable;
58227 return SQLITE_OK;
58228 }
58229 #endif
58230
@@ -67993,11 +67993,11 @@
67993 ** a pointer to the new sqlite3_backup object.
67994 **
67995 ** If an error occurs, NULL is returned and an error code and error message
67996 ** stored in database handle pDestDb.
67997 */
67998 SQLITE_API sqlite3_backup *sqlite3_backup_init(
67999 sqlite3* pDestDb, /* Database to write to */
68000 const char *zDestDb, /* Name of database within pDestDb */
68001 sqlite3* pSrcDb, /* Database connection to read from */
68002 const char *zSrcDb /* Name of database within pSrcDb */
68003 ){
@@ -68201,11 +68201,11 @@
68201 }
68202
68203 /*
68204 ** Copy nPage pages from the source b-tree to the destination.
68205 */
68206 SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){
68207 int rc;
68208 int destMode; /* Destination journal mode */
68209 int pgszSrc = 0; /* Source page size */
68210 int pgszDest = 0; /* Destination page size */
68211
@@ -68445,11 +68445,11 @@
68445 }
68446
68447 /*
68448 ** Release all resources associated with an sqlite3_backup* handle.
68449 */
68450 SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p){
68451 sqlite3_backup **pp; /* Ptr to head of pagers backup list */
68452 sqlite3 *pSrcDb; /* Source database connection */
68453 int rc; /* Value to return */
68454
68455 /* Enter the mutexes */
@@ -68497,11 +68497,11 @@
68497
68498 /*
68499 ** Return the number of pages still to be backed up as of the most recent
68500 ** call to sqlite3_backup_step().
68501 */
68502 SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p){
68503 #ifdef SQLITE_ENABLE_API_ARMOR
68504 if( p==0 ){
68505 (void)SQLITE_MISUSE_BKPT;
68506 return 0;
68507 }
@@ -68511,11 +68511,11 @@
68511
68512 /*
68513 ** Return the total number of pages in the source database as of the most
68514 ** recent call to sqlite3_backup_step().
68515 */
68516 SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p){
68517 #ifdef SQLITE_ENABLE_API_ARMOR
68518 if( p==0 ){
68519 (void)SQLITE_MISUSE_BKPT;
68520 return 0;
68521 }
@@ -71450,16 +71450,25 @@
71450 ){
71451 const char *zOpName;
71452 const char *zSynopsis;
71453 int nOpName;
71454 int ii, jj;
71455 char zAlt[50];
71456 zOpName = sqlite3OpcodeName(pOp->opcode);
71457 nOpName = sqlite3Strlen30(zOpName);
71458 if( zOpName[nOpName+1] ){
71459 int seenCom = 0;
71460 char c;
71461 zSynopsis = zOpName += nOpName + 1;
71462 if( strncmp(zSynopsis,"IF ",3)==0 ){
71463 if( pOp->p5 & SQLITE_STOREP2 ){
71464 sqlite3_snprintf(sizeof(zAlt), zAlt, "r[P2] = (%s)", zSynopsis+3);
71465 }else{
71466 sqlite3_snprintf(sizeof(zAlt), zAlt, "if %s goto P2", zSynopsis+3);
71467 }
71468 zSynopsis = zAlt;
71469 }
71470 for(ii=jj=0; jj<nTemp-1 && (c = zSynopsis[ii])!=0; ii++){
71471 if( c=='P' ){
71472 c = zSynopsis[++ii];
71473 if( c=='4' ){
71474 sqlite3_snprintf(nTemp-jj, zTemp+jj, "%s", zP4);
@@ -74967,11 +74976,11 @@
74976 ** execution environment changes in a way that would alter the program
74977 ** that sqlite3_prepare() generates. For example, if new functions or
74978 ** collating sequences are registered or if an authorizer function is
74979 ** added or changed.
74980 */
74981 SQLITE_API int sqlite3_expired(sqlite3_stmt *pStmt){
74982 Vdbe *p = (Vdbe*)pStmt;
74983 return p==0 || p->expired;
74984 }
74985 #endif
74986
@@ -75036,11 +75045,11 @@
75045 ** machine.
75046 **
75047 ** This routine sets the error code and string returned by
75048 ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
75049 */
75050 SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt){
75051 int rc;
75052 if( pStmt==0 ){
75053 /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL
75054 ** pointer is a harmless no-op. */
75055 rc = SQLITE_OK;
@@ -75063,11 +75072,11 @@
75072 ** the prior execution is returned.
75073 **
75074 ** This routine sets the error code and string returned by
75075 ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
75076 */
75077 SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt){
75078 int rc;
75079 if( pStmt==0 ){
75080 rc = SQLITE_OK;
75081 }else{
75082 Vdbe *v = (Vdbe*)pStmt;
@@ -75084,11 +75093,11 @@
75093 }
75094
75095 /*
75096 ** Set all the parameters in the compiled SQL statement to NULL.
75097 */
75098 SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *pStmt){
75099 int i;
75100 int rc = SQLITE_OK;
75101 Vdbe *p = (Vdbe*)pStmt;
75102 #if SQLITE_THREADSAFE
75103 sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
@@ -75108,11 +75117,11 @@
75117
75118 /**************************** sqlite3_value_ *******************************
75119 ** The following routines extract information from a Mem or sqlite3_value
75120 ** structure.
75121 */
75122 SQLITE_API const void *sqlite3_value_blob(sqlite3_value *pVal){
75123 Mem *p = (Mem*)pVal;
75124 if( p->flags & (MEM_Blob|MEM_Str) ){
75125 if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){
75126 assert( p->flags==MEM_Null && p->z==0 );
75127 return 0;
@@ -75121,48 +75130,48 @@
75130 return p->n ? p->z : 0;
75131 }else{
75132 return sqlite3_value_text(pVal);
75133 }
75134 }
75135 SQLITE_API int sqlite3_value_bytes(sqlite3_value *pVal){
75136 return sqlite3ValueBytes(pVal, SQLITE_UTF8);
75137 }
75138 SQLITE_API int sqlite3_value_bytes16(sqlite3_value *pVal){
75139 return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE);
75140 }
75141 SQLITE_API double sqlite3_value_double(sqlite3_value *pVal){
75142 return sqlite3VdbeRealValue((Mem*)pVal);
75143 }
75144 SQLITE_API int sqlite3_value_int(sqlite3_value *pVal){
75145 return (int)sqlite3VdbeIntValue((Mem*)pVal);
75146 }
75147 SQLITE_API sqlite_int64 sqlite3_value_int64(sqlite3_value *pVal){
75148 return sqlite3VdbeIntValue((Mem*)pVal);
75149 }
75150 SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value *pVal){
75151 Mem *pMem = (Mem*)pVal;
75152 return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0);
75153 }
75154 SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value *pVal){
75155 return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8);
75156 }
75157 #ifndef SQLITE_OMIT_UTF16
75158 SQLITE_API const void *sqlite3_value_text16(sqlite3_value* pVal){
75159 return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE);
75160 }
75161 SQLITE_API const void *sqlite3_value_text16be(sqlite3_value *pVal){
75162 return sqlite3ValueText(pVal, SQLITE_UTF16BE);
75163 }
75164 SQLITE_API const void *sqlite3_value_text16le(sqlite3_value *pVal){
75165 return sqlite3ValueText(pVal, SQLITE_UTF16LE);
75166 }
75167 #endif /* SQLITE_OMIT_UTF16 */
75168 /* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five
75169 ** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating
75170 ** point number string BLOB NULL
75171 */
75172 SQLITE_API int sqlite3_value_type(sqlite3_value* pVal){
75173 static const u8 aType[] = {
75174 SQLITE_BLOB, /* 0x00 */
75175 SQLITE_NULL, /* 0x01 */
75176 SQLITE_TEXT, /* 0x02 */
75177 SQLITE_NULL, /* 0x03 */
@@ -75198,11 +75207,11 @@
75207 return aType[pVal->flags&MEM_AffMask];
75208 }
75209
75210 /* Make a copy of an sqlite3_value object
75211 */
75212 SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value *pOrig){
75213 sqlite3_value *pNew;
75214 if( pOrig==0 ) return 0;
75215 pNew = sqlite3_malloc( sizeof(*pNew) );
75216 if( pNew==0 ) return 0;
75217 memset(pNew, 0, sizeof(*pNew));
@@ -75221,11 +75230,11 @@
75230 }
75231
75232 /* Destroy an sqlite3_value object previously obtained from
75233 ** sqlite3_value_dup().
75234 */
75235 SQLITE_API void sqlite3_value_free(sqlite3_value *pOld){
75236 sqlite3ValueFree(pOld);
75237 }
75238
75239
75240 /**************************** sqlite3_result_ *******************************
@@ -75264,21 +75273,21 @@
75273 xDel((void*)p);
75274 }
75275 if( pCtx ) sqlite3_result_error_toobig(pCtx);
75276 return SQLITE_TOOBIG;
75277 }
75278 SQLITE_API void sqlite3_result_blob(
75279 sqlite3_context *pCtx,
75280 const void *z,
75281 int n,
75282 void (*xDel)(void *)
75283 ){
75284 assert( n>=0 );
75285 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75286 setResultStrOrError(pCtx, z, n, 0, xDel);
75287 }
75288 SQLITE_API void sqlite3_result_blob64(
75289 sqlite3_context *pCtx,
75290 const void *z,
75291 sqlite3_uint64 n,
75292 void (*xDel)(void *)
75293 ){
@@ -75288,56 +75297,56 @@
75297 (void)invokeValueDestructor(z, xDel, pCtx);
75298 }else{
75299 setResultStrOrError(pCtx, z, (int)n, 0, xDel);
75300 }
75301 }
75302 SQLITE_API void sqlite3_result_double(sqlite3_context *pCtx, double rVal){
75303 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75304 sqlite3VdbeMemSetDouble(pCtx->pOut, rVal);
75305 }
75306 SQLITE_API void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
75307 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75308 pCtx->isError = SQLITE_ERROR;
75309 pCtx->fErrorOrAux = 1;
75310 sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
75311 }
75312 #ifndef SQLITE_OMIT_UTF16
75313 SQLITE_API void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
75314 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75315 pCtx->isError = SQLITE_ERROR;
75316 pCtx->fErrorOrAux = 1;
75317 sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
75318 }
75319 #endif
75320 SQLITE_API void sqlite3_result_int(sqlite3_context *pCtx, int iVal){
75321 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75322 sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal);
75323 }
75324 SQLITE_API void sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){
75325 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75326 sqlite3VdbeMemSetInt64(pCtx->pOut, iVal);
75327 }
75328 SQLITE_API void sqlite3_result_null(sqlite3_context *pCtx){
75329 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75330 sqlite3VdbeMemSetNull(pCtx->pOut);
75331 }
75332 SQLITE_API void sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){
75333 Mem *pOut = pCtx->pOut;
75334 assert( sqlite3_mutex_held(pOut->db->mutex) );
75335 pOut->eSubtype = eSubtype & 0xff;
75336 pOut->flags |= MEM_Subtype;
75337 }
75338 SQLITE_API void sqlite3_result_text(
75339 sqlite3_context *pCtx,
75340 const char *z,
75341 int n,
75342 void (*xDel)(void *)
75343 ){
75344 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75345 setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel);
75346 }
75347 SQLITE_API void sqlite3_result_text64(
75348 sqlite3_context *pCtx,
75349 const char *z,
75350 sqlite3_uint64 n,
75351 void (*xDel)(void *),
75352 unsigned char enc
@@ -75350,56 +75359,56 @@
75359 }else{
75360 setResultStrOrError(pCtx, z, (int)n, enc, xDel);
75361 }
75362 }
75363 #ifndef SQLITE_OMIT_UTF16
75364 SQLITE_API void sqlite3_result_text16(
75365 sqlite3_context *pCtx,
75366 const void *z,
75367 int n,
75368 void (*xDel)(void *)
75369 ){
75370 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75371 setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel);
75372 }
75373 SQLITE_API void sqlite3_result_text16be(
75374 sqlite3_context *pCtx,
75375 const void *z,
75376 int n,
75377 void (*xDel)(void *)
75378 ){
75379 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75380 setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel);
75381 }
75382 SQLITE_API void sqlite3_result_text16le(
75383 sqlite3_context *pCtx,
75384 const void *z,
75385 int n,
75386 void (*xDel)(void *)
75387 ){
75388 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75389 setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel);
75390 }
75391 #endif /* SQLITE_OMIT_UTF16 */
75392 SQLITE_API void sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){
75393 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75394 sqlite3VdbeMemCopy(pCtx->pOut, pValue);
75395 }
75396 SQLITE_API void sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){
75397 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75398 sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n);
75399 }
75400 SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){
75401 Mem *pOut = pCtx->pOut;
75402 assert( sqlite3_mutex_held(pOut->db->mutex) );
75403 if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){
75404 return SQLITE_TOOBIG;
75405 }
75406 sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n);
75407 return SQLITE_OK;
75408 }
75409 SQLITE_API void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
75410 pCtx->isError = errCode;
75411 pCtx->fErrorOrAux = 1;
75412 #ifdef SQLITE_DEBUG
75413 if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode;
75414 #endif
@@ -75408,20 +75417,20 @@
75417 SQLITE_UTF8, SQLITE_STATIC);
75418 }
75419 }
75420
75421 /* Force an SQLITE_TOOBIG error. */
75422 SQLITE_API void sqlite3_result_error_toobig(sqlite3_context *pCtx){
75423 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75424 pCtx->isError = SQLITE_TOOBIG;
75425 pCtx->fErrorOrAux = 1;
75426 sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1,
75427 SQLITE_UTF8, SQLITE_STATIC);
75428 }
75429
75430 /* An SQLITE_NOMEM error. */
75431 SQLITE_API void sqlite3_result_error_nomem(sqlite3_context *pCtx){
75432 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75433 sqlite3VdbeMemSetNull(pCtx->pOut);
75434 pCtx->isError = SQLITE_NOMEM_BKPT;
75435 pCtx->fErrorOrAux = 1;
75436 sqlite3OomFault(pCtx->pOut->db);
@@ -75589,11 +75598,11 @@
75598 /*
75599 ** This is the top-level implementation of sqlite3_step(). Call
75600 ** sqlite3Step() to do most of the work. If a schema error occurs,
75601 ** call sqlite3Reprepare() and try again.
75602 */
75603 SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){
75604 int rc = SQLITE_OK; /* Result from sqlite3Step() */
75605 int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */
75606 Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */
75607 int cnt = 0; /* Counter to prevent infinite loop of reprepares */
75608 sqlite3 *db; /* The database connection */
@@ -75640,11 +75649,11 @@
75649
75650 /*
75651 ** Extract the user data from a sqlite3_context structure and return a
75652 ** pointer to it.
75653 */
75654 SQLITE_API void *sqlite3_user_data(sqlite3_context *p){
75655 assert( p && p->pFunc );
75656 return p->pFunc->pUserData;
75657 }
75658
75659 /*
@@ -75655,11 +75664,11 @@
75664 ** returns a copy of the pointer to the database connection (the 1st
75665 ** parameter) of the sqlite3_create_function() and
75666 ** sqlite3_create_function16() routines that originally registered the
75667 ** application defined function.
75668 */
75669 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){
75670 assert( p && p->pOut );
75671 return p->pOut->db;
75672 }
75673
75674 /*
@@ -75731,11 +75740,11 @@
75740 /*
75741 ** Allocate or return the aggregate context for a user function. A new
75742 ** context is allocated on the first call. Subsequent calls return the
75743 ** same context that was returned on prior calls.
75744 */
75745 SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *p, int nByte){
75746 assert( p && p->pFunc && p->pFunc->xFinalize );
75747 assert( sqlite3_mutex_held(p->pOut->db->mutex) );
75748 testcase( nByte<0 );
75749 if( (p->pMem->flags & MEM_Agg)==0 ){
75750 return createAggContext(p, nByte);
@@ -75746,11 +75755,11 @@
75755
75756 /*
75757 ** Return the auxiliary data pointer, if any, for the iArg'th argument to
75758 ** the user-function defined by pCtx.
75759 */
75760 SQLITE_API void *sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){
75761 AuxData *pAuxData;
75762
75763 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75764 #if SQLITE_ENABLE_STAT3_OR_STAT4
75765 if( pCtx->pVdbe==0 ) return 0;
@@ -75767,11 +75776,11 @@
75776 /*
75777 ** Set the auxiliary data pointer and delete function, for the iArg'th
75778 ** argument to the user-function defined by pCtx. Any previous value is
75779 ** deleted by calling the delete function specified when it was set.
75780 */
75781 SQLITE_API void sqlite3_set_auxdata(
75782 sqlite3_context *pCtx,
75783 int iArg,
75784 void *pAux,
75785 void (*xDelete)(void*)
75786 ){
@@ -75822,29 +75831,29 @@
75831 ** This function is deprecated. Do not use it for new code. It is
75832 ** provide only to avoid breaking legacy code. New aggregate function
75833 ** implementations should keep their own counts within their aggregate
75834 ** context.
75835 */
75836 SQLITE_API int sqlite3_aggregate_count(sqlite3_context *p){
75837 assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize );
75838 return p->pMem->n;
75839 }
75840 #endif
75841
75842 /*
75843 ** Return the number of columns in the result set for the statement pStmt.
75844 */
75845 SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt){
75846 Vdbe *pVm = (Vdbe *)pStmt;
75847 return pVm ? pVm->nResColumn : 0;
75848 }
75849
75850 /*
75851 ** Return the number of values available from the current row of the
75852 ** currently executing statement pStmt.
75853 */
75854 SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt){
75855 Vdbe *pVm = (Vdbe *)pStmt;
75856 if( pVm==0 || pVm->pResultSet==0 ) return 0;
75857 return pVm->nResColumn;
75858 }
75859
@@ -75943,67 +75952,67 @@
75952
75953 /**************************** sqlite3_column_ *******************************
75954 ** The following routines are used to access elements of the current row
75955 ** in the result set.
75956 */
75957 SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt *pStmt, int i){
75958 const void *val;
75959 val = sqlite3_value_blob( columnMem(pStmt,i) );
75960 /* Even though there is no encoding conversion, value_blob() might
75961 ** need to call malloc() to expand the result of a zeroblob()
75962 ** expression.
75963 */
75964 columnMallocFailure(pStmt);
75965 return val;
75966 }
75967 SQLITE_API int sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){
75968 int val = sqlite3_value_bytes( columnMem(pStmt,i) );
75969 columnMallocFailure(pStmt);
75970 return val;
75971 }
75972 SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){
75973 int val = sqlite3_value_bytes16( columnMem(pStmt,i) );
75974 columnMallocFailure(pStmt);
75975 return val;
75976 }
75977 SQLITE_API double sqlite3_column_double(sqlite3_stmt *pStmt, int i){
75978 double val = sqlite3_value_double( columnMem(pStmt,i) );
75979 columnMallocFailure(pStmt);
75980 return val;
75981 }
75982 SQLITE_API int sqlite3_column_int(sqlite3_stmt *pStmt, int i){
75983 int val = sqlite3_value_int( columnMem(pStmt,i) );
75984 columnMallocFailure(pStmt);
75985 return val;
75986 }
75987 SQLITE_API sqlite_int64 sqlite3_column_int64(sqlite3_stmt *pStmt, int i){
75988 sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) );
75989 columnMallocFailure(pStmt);
75990 return val;
75991 }
75992 SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt *pStmt, int i){
75993 const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) );
75994 columnMallocFailure(pStmt);
75995 return val;
75996 }
75997 SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt *pStmt, int i){
75998 Mem *pOut = columnMem(pStmt, i);
75999 if( pOut->flags&MEM_Static ){
76000 pOut->flags &= ~MEM_Static;
76001 pOut->flags |= MEM_Ephem;
76002 }
76003 columnMallocFailure(pStmt);
76004 return (sqlite3_value *)pOut;
76005 }
76006 #ifndef SQLITE_OMIT_UTF16
76007 SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt *pStmt, int i){
76008 const void *val = sqlite3_value_text16( columnMem(pStmt,i) );
76009 columnMallocFailure(pStmt);
76010 return val;
76011 }
76012 #endif /* SQLITE_OMIT_UTF16 */
76013 SQLITE_API int sqlite3_column_type(sqlite3_stmt *pStmt, int i){
76014 int iType = sqlite3_value_type( columnMem(pStmt,i) );
76015 columnMallocFailure(pStmt);
76016 return iType;
76017 }
76018
@@ -76063,16 +76072,16 @@
76072
76073 /*
76074 ** Return the name of the Nth column of the result set returned by SQL
76075 ** statement pStmt.
76076 */
76077 SQLITE_API const char *sqlite3_column_name(sqlite3_stmt *pStmt, int N){
76078 return columnName(
76079 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME);
76080 }
76081 #ifndef SQLITE_OMIT_UTF16
76082 SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt *pStmt, int N){
76083 return columnName(
76084 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME);
76085 }
76086 #endif
76087
@@ -76088,16 +76097,16 @@
76097 #ifndef SQLITE_OMIT_DECLTYPE
76098 /*
76099 ** Return the column declaration type (if applicable) of the 'i'th column
76100 ** of the result set of SQL statement pStmt.
76101 */
76102 SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){
76103 return columnName(
76104 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE);
76105 }
76106 #ifndef SQLITE_OMIT_UTF16
76107 SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){
76108 return columnName(
76109 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE);
76110 }
76111 #endif /* SQLITE_OMIT_UTF16 */
76112 #endif /* SQLITE_OMIT_DECLTYPE */
@@ -76106,16 +76115,16 @@
76115 /*
76116 ** Return the name of the database from which a result column derives.
76117 ** NULL is returned if the result column is an expression or constant or
76118 ** anything else which is not an unambiguous reference to a database column.
76119 */
76120 SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){
76121 return columnName(
76122 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE);
76123 }
76124 #ifndef SQLITE_OMIT_UTF16
76125 SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){
76126 return columnName(
76127 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE);
76128 }
76129 #endif /* SQLITE_OMIT_UTF16 */
76130
@@ -76122,16 +76131,16 @@
76131 /*
76132 ** Return the name of the table from which a result column derives.
76133 ** NULL is returned if the result column is an expression or constant or
76134 ** anything else which is not an unambiguous reference to a database column.
76135 */
76136 SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){
76137 return columnName(
76138 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE);
76139 }
76140 #ifndef SQLITE_OMIT_UTF16
76141 SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){
76142 return columnName(
76143 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE);
76144 }
76145 #endif /* SQLITE_OMIT_UTF16 */
76146
@@ -76138,16 +76147,16 @@
76147 /*
76148 ** Return the name of the table column from which a result column derives.
76149 ** NULL is returned if the result column is an expression or constant or
76150 ** anything else which is not an unambiguous reference to a database column.
76151 */
76152 SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){
76153 return columnName(
76154 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN);
76155 }
76156 #ifndef SQLITE_OMIT_UTF16
76157 SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){
76158 return columnName(
76159 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN);
76160 }
76161 #endif /* SQLITE_OMIT_UTF16 */
76162 #endif /* SQLITE_ENABLE_COLUMN_METADATA */
@@ -76244,11 +76253,11 @@
76253
76254
76255 /*
76256 ** Bind a blob value to an SQL statement variable.
76257 */
76258 SQLITE_API int sqlite3_bind_blob(
76259 sqlite3_stmt *pStmt,
76260 int i,
76261 const void *zData,
76262 int nData,
76263 void (*xDel)(void*)
@@ -76256,11 +76265,11 @@
76265 #ifdef SQLITE_ENABLE_API_ARMOR
76266 if( nData<0 ) return SQLITE_MISUSE_BKPT;
76267 #endif
76268 return bindText(pStmt, i, zData, nData, xDel, 0);
76269 }
76270 SQLITE_API int sqlite3_bind_blob64(
76271 sqlite3_stmt *pStmt,
76272 int i,
76273 const void *zData,
76274 sqlite3_uint64 nData,
76275 void (*xDel)(void*)
@@ -76270,52 +76279,52 @@
76279 return invokeValueDestructor(zData, xDel, 0);
76280 }else{
76281 return bindText(pStmt, i, zData, (int)nData, xDel, 0);
76282 }
76283 }
76284 SQLITE_API int sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
76285 int rc;
76286 Vdbe *p = (Vdbe *)pStmt;
76287 rc = vdbeUnbind(p, i);
76288 if( rc==SQLITE_OK ){
76289 sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue);
76290 sqlite3_mutex_leave(p->db->mutex);
76291 }
76292 return rc;
76293 }
76294 SQLITE_API int sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){
76295 return sqlite3_bind_int64(p, i, (i64)iValue);
76296 }
76297 SQLITE_API int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
76298 int rc;
76299 Vdbe *p = (Vdbe *)pStmt;
76300 rc = vdbeUnbind(p, i);
76301 if( rc==SQLITE_OK ){
76302 sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue);
76303 sqlite3_mutex_leave(p->db->mutex);
76304 }
76305 return rc;
76306 }
76307 SQLITE_API int sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
76308 int rc;
76309 Vdbe *p = (Vdbe*)pStmt;
76310 rc = vdbeUnbind(p, i);
76311 if( rc==SQLITE_OK ){
76312 sqlite3_mutex_leave(p->db->mutex);
76313 }
76314 return rc;
76315 }
76316 SQLITE_API int sqlite3_bind_text(
76317 sqlite3_stmt *pStmt,
76318 int i,
76319 const char *zData,
76320 int nData,
76321 void (*xDel)(void*)
76322 ){
76323 return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8);
76324 }
76325 SQLITE_API int sqlite3_bind_text64(
76326 sqlite3_stmt *pStmt,
76327 int i,
76328 const char *zData,
76329 sqlite3_uint64 nData,
76330 void (*xDel)(void*),
@@ -76328,21 +76337,21 @@
76337 if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE;
76338 return bindText(pStmt, i, zData, (int)nData, xDel, enc);
76339 }
76340 }
76341 #ifndef SQLITE_OMIT_UTF16
76342 SQLITE_API int sqlite3_bind_text16(
76343 sqlite3_stmt *pStmt,
76344 int i,
76345 const void *zData,
76346 int nData,
76347 void (*xDel)(void*)
76348 ){
76349 return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE);
76350 }
76351 #endif /* SQLITE_OMIT_UTF16 */
76352 SQLITE_API int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
76353 int rc;
76354 switch( sqlite3_value_type((sqlite3_value*)pValue) ){
76355 case SQLITE_INTEGER: {
76356 rc = sqlite3_bind_int64(pStmt, i, pValue->u.i);
76357 break;
@@ -76369,21 +76378,21 @@
76378 break;
76379 }
76380 }
76381 return rc;
76382 }
76383 SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){
76384 int rc;
76385 Vdbe *p = (Vdbe *)pStmt;
76386 rc = vdbeUnbind(p, i);
76387 if( rc==SQLITE_OK ){
76388 sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);
76389 sqlite3_mutex_leave(p->db->mutex);
76390 }
76391 return rc;
76392 }
76393 SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){
76394 int rc;
76395 Vdbe *p = (Vdbe *)pStmt;
76396 sqlite3_mutex_enter(p->db->mutex);
76397 if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){
76398 rc = SQLITE_TOOBIG;
@@ -76398,11 +76407,11 @@
76407
76408 /*
76409 ** Return the number of wildcards that can be potentially bound to.
76410 ** This routine is added to support DBD::SQLite.
76411 */
76412 SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){
76413 Vdbe *p = (Vdbe*)pStmt;
76414 return p ? p->nVar : 0;
76415 }
76416
76417 /*
@@ -76409,11 +76418,11 @@
76418 ** Return the name of a wildcard parameter. Return NULL if the index
76419 ** is out of range or if the wildcard is unnamed.
76420 **
76421 ** The result is always UTF-8.
76422 */
76423 SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){
76424 Vdbe *p = (Vdbe*)pStmt;
76425 if( p==0 || i<1 || i>p->nzVar ){
76426 return 0;
76427 }
76428 return p->azVar[i-1];
@@ -76437,11 +76446,11 @@
76446 }
76447 }
76448 }
76449 return 0;
76450 }
76451 SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
76452 return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName));
76453 }
76454
76455 /*
76456 ** Transfer all bindings from the first statement over to the second.
@@ -76471,11 +76480,11 @@
76480 **
76481 ** If the two statements contain a different number of bindings, then
76482 ** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise
76483 ** SQLITE_OK is returned.
76484 */
76485 SQLITE_API int sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
76486 Vdbe *pFrom = (Vdbe*)pFromStmt;
76487 Vdbe *pTo = (Vdbe*)pToStmt;
76488 if( pFrom->nVar!=pTo->nVar ){
76489 return SQLITE_ERROR;
76490 }
@@ -76493,26 +76502,26 @@
76502 ** Return the sqlite3* database handle to which the prepared statement given
76503 ** in the argument belongs. This is the same database handle that was
76504 ** the first argument to the sqlite3_prepare() that was used to create
76505 ** the statement in the first place.
76506 */
76507 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *pStmt){
76508 return pStmt ? ((Vdbe*)pStmt)->db : 0;
76509 }
76510
76511 /*
76512 ** Return true if the prepared statement is guaranteed to not modify the
76513 ** database.
76514 */
76515 SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt){
76516 return pStmt ? ((Vdbe*)pStmt)->readOnly : 1;
76517 }
76518
76519 /*
76520 ** Return true if the prepared statement is in need of being reset.
76521 */
76522 SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt *pStmt){
76523 Vdbe *v = (Vdbe*)pStmt;
76524 return v!=0 && v->pc>=0 && v->magic==VDBE_MAGIC_RUN;
76525 }
76526
76527 /*
@@ -76519,11 +76528,11 @@
76528 ** Return a pointer to the next prepared statement after pStmt associated
76529 ** with database connection pDb. If pStmt is NULL, return the first
76530 ** prepared statement for the database connection. Return NULL if there
76531 ** are no more.
76532 */
76533 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
76534 sqlite3_stmt *pNext;
76535 #ifdef SQLITE_ENABLE_API_ARMOR
76536 if( !sqlite3SafetyCheckOk(pDb) ){
76537 (void)SQLITE_MISUSE_BKPT;
76538 return 0;
@@ -76540,11 +76549,11 @@
76549 }
76550
76551 /*
76552 ** Return the value of a status counter for a prepared statement
76553 */
76554 SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
76555 Vdbe *pVdbe = (Vdbe*)pStmt;
76556 u32 v;
76557 #ifdef SQLITE_ENABLE_API_ARMOR
76558 if( !pStmt ){
76559 (void)SQLITE_MISUSE_BKPT;
@@ -76557,11 +76566,11 @@
76566 }
76567
76568 /*
76569 ** Return the SQL associated with a prepared statement
76570 */
76571 SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt){
76572 Vdbe *p = (Vdbe *)pStmt;
76573 return p ? p->zSql : 0;
76574 }
76575
76576 /*
@@ -76571,11 +76580,11 @@
76580 ** freeing the returned string by passing it to sqlite3_free().
76581 **
76582 ** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of
76583 ** expanded bound parameters.
76584 */
76585 SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt){
76586 #ifdef SQLITE_OMIT_TRACE
76587 return 0;
76588 #else
76589 char *z = 0;
76590 const char *zSql = sqlite3_sql(pStmt);
@@ -76613,11 +76622,11 @@
76622
76623 /*
76624 ** This function is called from within a pre-update callback to retrieve
76625 ** a field of the row currently being updated or deleted.
76626 */
76627 SQLITE_API int sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
76628 PreUpdate *p = db->pPreUpdate;
76629 int rc = SQLITE_OK;
76630
76631 /* Test that this call is being made from within an SQLITE_DELETE or
76632 ** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */
@@ -76668,11 +76677,11 @@
76677 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
76678 /*
76679 ** This function is called from within a pre-update callback to retrieve
76680 ** the number of columns in the row being updated, deleted or inserted.
76681 */
76682 SQLITE_API int sqlite3_preupdate_count(sqlite3 *db){
76683 PreUpdate *p = db->pPreUpdate;
76684 return (p ? p->keyinfo.nField : 0);
76685 }
76686 #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
76687
@@ -76686,11 +76695,11 @@
76695 ** top-level trigger etc.).
76696 **
76697 ** For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL
76698 ** or SET DEFAULT action is considered a trigger.
76699 */
76700 SQLITE_API int sqlite3_preupdate_depth(sqlite3 *db){
76701 PreUpdate *p = db->pPreUpdate;
76702 return (p ? p->v->nFrame : 0);
76703 }
76704 #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
76705
@@ -76697,11 +76706,11 @@
76706 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
76707 /*
76708 ** This function is called from within a pre-update callback to retrieve
76709 ** a field of the row currently being updated or inserted.
76710 */
76711 SQLITE_API int sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
76712 PreUpdate *p = db->pPreUpdate;
76713 int rc = SQLITE_OK;
76714 Mem *pMem;
76715
76716 if( !p || p->op==SQLITE_DELETE ){
@@ -76771,11 +76780,11 @@
76780
76781 #ifdef SQLITE_ENABLE_STMT_SCANSTATUS
76782 /*
76783 ** Return status data for a single loop within query pStmt.
76784 */
76785 SQLITE_API int sqlite3_stmt_scanstatus(
76786 sqlite3_stmt *pStmt, /* Prepared statement being queried */
76787 int idx, /* Index of loop to report on */
76788 int iScanStatusOp, /* Which metric to return */
76789 void *pOut /* OUT: Write the answer here */
76790 ){
@@ -76830,11 +76839,11 @@
76839 }
76840
76841 /*
76842 ** Zero all counters associated with the sqlite3_stmt_scanstatus() data.
76843 */
76844 SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){
76845 Vdbe *p = (Vdbe*)pStmt;
76846 memset(p->anExec, 0, p->nOp * sizeof(i64));
76847 }
76848 #endif /* SQLITE_ENABLE_STMT_SCANSTATUS */
76849
@@ -77357,11 +77366,11 @@
77366 ** Try to convert the type of a function argument or a result column
77367 ** into a numeric representation. Use either INTEGER or REAL whichever
77368 ** is appropriate. But only do the conversion if it is possible without
77369 ** loss of information and return the revised type of the argument.
77370 */
77371 SQLITE_API int sqlite3_value_numeric_type(sqlite3_value *pVal){
77372 int eType = sqlite3_value_type(pVal);
77373 if( eType==SQLITE_TEXT ){
77374 Mem *pMem = (Mem*)pVal;
77375 applyNumericAffinity(pMem, 0);
77376 eType = sqlite3_value_type(pVal);
@@ -79007,11 +79016,11 @@
79016 break;
79017 }
79018 #endif /* SQLITE_OMIT_CAST */
79019
79020 /* Opcode: Lt P1 P2 P3 P4 P5
79021 ** Synopsis: IF r[P3]<r[P1]
79022 **
79023 ** Compare the values in register P1 and P3. If reg(P3)<reg(P1) then
79024 ** jump to address P2.
79025 **
79026 ** If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or
@@ -79042,11 +79051,11 @@
79051 ** If the SQLITE_NULLEQ bit is set in P5, then NULL values are considered
79052 ** equal to one another, provided that they do not have their MEM_Cleared
79053 ** bit set.
79054 */
79055 /* Opcode: Ne P1 P2 P3 P4 P5
79056 ** Synopsis: IF r[P3]!=r[P1]
79057 **
79058 ** This works just like the Lt opcode except that the jump is taken if
79059 ** the operands in registers P1 and P3 are not equal. See the Lt opcode for
79060 ** additional information.
79061 **
@@ -79055,11 +79064,11 @@
79064 ** of comparison is false. If either operand is NULL then the result is true.
79065 ** If neither operand is NULL the result is the same as it would be if
79066 ** the SQLITE_NULLEQ flag were omitted from P5.
79067 */
79068 /* Opcode: Eq P1 P2 P3 P4 P5
79069 ** Synopsis: IF r[P3]==r[P1]
79070 **
79071 ** This works just like the Lt opcode except that the jump is taken if
79072 ** the operands in registers P1 and P3 are equal.
79073 ** See the Lt opcode for additional information.
79074 **
@@ -79068,25 +79077,25 @@
79077 ** of comparison is true. If either operand is NULL then the result is false.
79078 ** If neither operand is NULL the result is the same as it would be if
79079 ** the SQLITE_NULLEQ flag were omitted from P5.
79080 */
79081 /* Opcode: Le P1 P2 P3 P4 P5
79082 ** Synopsis: IF r[P3]<=r[P1]
79083 **
79084 ** This works just like the Lt opcode except that the jump is taken if
79085 ** the content of register P3 is less than or equal to the content of
79086 ** register P1. See the Lt opcode for additional information.
79087 */
79088 /* Opcode: Gt P1 P2 P3 P4 P5
79089 ** Synopsis: IF r[P3]>r[P1]
79090 **
79091 ** This works just like the Lt opcode except that the jump is taken if
79092 ** the content of register P3 is greater than the content of
79093 ** register P1. See the Lt opcode for additional information.
79094 */
79095 /* Opcode: Ge P1 P2 P3 P4 P5
79096 ** Synopsis: IF r[P3]>=r[P1]
79097 **
79098 ** This works just like the Lt opcode except that the jump is taken if
79099 ** the content of register P3 is greater than or equal to the content of
79100 ** register P1. See the Lt opcode for additional information.
79101 */
@@ -84209,11 +84218,11 @@
84218 }
84219
84220 /*
84221 ** Open a blob handle.
84222 */
84223 SQLITE_API int sqlite3_blob_open(
84224 sqlite3* db, /* The database connection */
84225 const char *zDb, /* The attached database containing the blob */
84226 const char *zTable, /* The table containing the blob */
84227 const char *zColumn, /* The column containing the blob */
84228 sqlite_int64 iRow, /* The row containing the glob */
@@ -84450,11 +84459,11 @@
84459
84460 /*
84461 ** Close a blob handle that was previously created using
84462 ** sqlite3_blob_open().
84463 */
84464 SQLITE_API int sqlite3_blob_close(sqlite3_blob *pBlob){
84465 Incrblob *p = (Incrblob *)pBlob;
84466 int rc;
84467 sqlite3 *db;
84468
84469 if( p ){
@@ -84543,28 +84552,28 @@
84552 }
84553
84554 /*
84555 ** Read data from a blob handle.
84556 */
84557 SQLITE_API int sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){
84558 return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData);
84559 }
84560
84561 /*
84562 ** Write data to a blob handle.
84563 */
84564 SQLITE_API int sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){
84565 return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData);
84566 }
84567
84568 /*
84569 ** Query a blob handle for the size of the data.
84570 **
84571 ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
84572 ** so no mutex is required for access.
84573 */
84574 SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *pBlob){
84575 Incrblob *p = (Incrblob *)pBlob;
84576 return (p && p->pStmt) ? p->nByte : 0;
84577 }
84578
84579 /*
@@ -84575,11 +84584,11 @@
84584 ** contain a blob or text value, then an error code is returned and the
84585 ** database handle error code and message set. If this happens, then all
84586 ** subsequent calls to sqlite3_blob_xxx() functions (except blob_close())
84587 ** immediately return SQLITE_ABORT.
84588 */
84589 SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){
84590 int rc;
84591 Incrblob *p = (Incrblob *)pBlob;
84592 sqlite3 *db;
84593
84594 if( p==0 ) return SQLITE_MISUSE_BKPT;
@@ -97188,11 +97197,11 @@
97197 ** and attempts to write the column will be ignored.
97198 **
97199 ** Setting the auth function to NULL disables this hook. The default
97200 ** setting of the auth function is NULL.
97201 */
97202 SQLITE_API int sqlite3_set_authorizer(
97203 sqlite3 *db,
97204 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
97205 void *pArg
97206 ){
97207 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -103958,18 +103967,18 @@
103967 }
103968
103969 /*
103970 ** The sqlite3_strglob() interface.
103971 */
103972 SQLITE_API int sqlite3_strglob(const char *zGlobPattern, const char *zString){
103973 return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, '[')==0;
103974 }
103975
103976 /*
103977 ** The sqlite3_strlike() interface.
103978 */
103979 SQLITE_API int sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){
103980 return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc)==0;
103981 }
103982
103983 /*
103984 ** Count the number of times that the LIKE operator (or GLOB which is
@@ -108244,19 +108253,19 @@
108253 }
108254 if( piIdxCur ) *piIdxCur = iBase;
108255 for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
108256 int iIdxCur = iBase++;
108257 assert( pIdx->pSchema==pTab->pSchema );
108258 if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){
108259 if( piDataCur ) *piDataCur = iIdxCur;
108260 p5 = 0;
108261 }
108262 if( aToOpen==0 || aToOpen[i+1] ){
108263 sqlite3VdbeAddOp3(v, op, iIdxCur, pIdx->tnum, iDb);
108264 sqlite3VdbeSetP4KeyInfo(pParse, pIdx);
 
 
 
 
 
108265 sqlite3VdbeChangeP5(v, p5);
108266 VdbeComment((v, "%s", pIdx->zName));
108267 }
108268 }
108269 if( iBase>pParse->nTab ) pParse->nTab = iBase;
108270 return i;
108271 }
@@ -108684,11 +108693,11 @@
108693 ** If the SQL is a query, then for each row in the query result
108694 ** the xCallback() function is called. pArg becomes the first
108695 ** argument to xCallback(). If xCallback=NULL then no callback
108696 ** is invoked, even for queries.
108697 */
108698 SQLITE_API int sqlite3_exec(
108699 sqlite3 *db, /* The database on which the SQL executes */
108700 const char *zSql, /* The SQL to be executed */
108701 sqlite3_callback xCallback, /* Invoke this callback routine */
108702 void *pArg, /* First argument to xCallback() */
108703 char **pzErrMsg /* Write error messages here */
@@ -109946,11 +109955,11 @@
109955 db->aExtension = aHandle;
109956
109957 db->aExtension[db->nExtension++] = handle;
109958 return SQLITE_OK;
109959 }
109960 SQLITE_API int sqlite3_load_extension(
109961 sqlite3 *db, /* Load the extension into this database connection */
109962 const char *zFile, /* Name of the shared library containing extension */
109963 const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */
109964 char **pzErrMsg /* Put error message here if not 0 */
109965 ){
@@ -109977,11 +109986,11 @@
109986
109987 /*
109988 ** Enable or disable extension loading. Extension loading is disabled by
109989 ** default so as not to open security holes in older applications.
109990 */
109991 SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){
109992 sqlite3_mutex_enter(db->mutex);
109993 if( onoff ){
109994 db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc;
109995 }else{
109996 db->flags &= ~(SQLITE_LoadExtension|SQLITE_LoadExtFunc);
@@ -110034,11 +110043,11 @@
110043
110044 /*
110045 ** Register a statically linked extension that is automatically
110046 ** loaded by every new database connection.
110047 */
110048 SQLITE_API int sqlite3_auto_extension(
110049 void (*xInit)(void)
110050 ){
110051 int rc = SQLITE_OK;
110052 #ifndef SQLITE_OMIT_AUTOINIT
110053 rc = sqlite3_initialize();
@@ -110081,11 +110090,11 @@
110090 ** routine is a no-op.
110091 **
110092 ** Return 1 if xInit was found on the list and removed. Return 0 if xInit
110093 ** was not on the list.
110094 */
110095 SQLITE_API int sqlite3_cancel_auto_extension(
110096 void (*xInit)(void)
110097 ){
110098 #if SQLITE_THREADSAFE
110099 sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
110100 #endif
@@ -110106,11 +110115,11 @@
110115 }
110116
110117 /*
110118 ** Reset the automatic extension loading mechanism.
110119 */
110120 SQLITE_API void sqlite3_reset_auto_extension(void){
110121 #ifndef SQLITE_OMIT_AUTOINIT
110122 if( sqlite3_initialize()==SQLITE_OK )
110123 #endif
110124 {
110125 #if SQLITE_THREADSAFE
@@ -113367,11 +113376,11 @@
113376 ** and so if a schema change occurs, SQLITE_SCHEMA is returned by
113377 ** sqlite3_step(). In the new version, the original SQL text is retained
113378 ** and the statement is automatically recompiled if an schema change
113379 ** occurs.
113380 */
113381 SQLITE_API int sqlite3_prepare(
113382 sqlite3 *db, /* Database handle. */
113383 const char *zSql, /* UTF-8 encoded SQL statement. */
113384 int nBytes, /* Length of zSql in bytes. */
113385 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113386 const char **pzTail /* OUT: End of parsed string */
@@ -113379,11 +113388,11 @@
113388 int rc;
113389 rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail);
113390 assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
113391 return rc;
113392 }
113393 SQLITE_API int sqlite3_prepare_v2(
113394 sqlite3 *db, /* Database handle. */
113395 const char *zSql, /* UTF-8 encoded SQL statement. */
113396 int nBytes, /* Length of zSql in bytes. */
113397 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113398 const char **pzTail /* OUT: End of parsed string */
@@ -113455,11 +113464,11 @@
113464 ** and so if a schema change occurs, SQLITE_SCHEMA is returned by
113465 ** sqlite3_step(). In the new version, the original SQL text is retained
113466 ** and the statement is automatically recompiled if an schema change
113467 ** occurs.
113468 */
113469 SQLITE_API int sqlite3_prepare16(
113470 sqlite3 *db, /* Database handle. */
113471 const void *zSql, /* UTF-16 encoded SQL statement. */
113472 int nBytes, /* Length of zSql in bytes. */
113473 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113474 const void **pzTail /* OUT: End of parsed string */
@@ -113467,11 +113476,11 @@
113476 int rc;
113477 rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail);
113478 assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
113479 return rc;
113480 }
113481 SQLITE_API int sqlite3_prepare16_v2(
113482 sqlite3 *db, /* Database handle. */
113483 const void *zSql, /* UTF-16 encoded SQL statement. */
113484 int nBytes, /* Length of zSql in bytes. */
113485 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113486 const void **pzTail /* OUT: End of parsed string */
@@ -119310,11 +119319,11 @@
119319 ** The result that is written to ***pazResult is held in memory obtained
119320 ** from malloc(). But the caller cannot free this memory directly.
119321 ** Instead, the entire table should be passed to sqlite3_free_table() when
119322 ** the calling procedure is finished using it.
119323 */
119324 SQLITE_API int sqlite3_get_table(
119325 sqlite3 *db, /* The database on which the SQL executes */
119326 const char *zSql, /* The SQL to be executed */
119327 char ***pazResult, /* Write the result table here */
119328 int *pnRow, /* Write the number of rows in the result here */
119329 int *pnColumn, /* Write the number of columns of result here */
@@ -119379,11 +119388,11 @@
119388 }
119389
119390 /*
119391 ** This routine frees the space the sqlite3_get_table() malloced.
119392 */
119393 SQLITE_API void sqlite3_free_table(
119394 char **azResult /* Result returned from sqlite3_get_table() */
119395 ){
119396 if( azResult ){
119397 int i, n;
119398 azResult--;
@@ -121789,11 +121798,11 @@
121798
121799
121800 /*
121801 ** External API function used to create a new virtual-table module.
121802 */
121803 SQLITE_API int sqlite3_create_module(
121804 sqlite3 *db, /* Database in which module is registered */
121805 const char *zName, /* Name assigned to this module */
121806 const sqlite3_module *pModule, /* The definition of the module */
121807 void *pAux /* Context pointer for xCreate/xConnect */
121808 ){
@@ -121804,11 +121813,11 @@
121813 }
121814
121815 /*
121816 ** External API function used to create a new virtual-table module.
121817 */
121818 SQLITE_API int sqlite3_create_module_v2(
121819 sqlite3 *db, /* Database in which module is registered */
121820 const char *zName, /* Name assigned to this module */
121821 const sqlite3_module *pModule, /* The definition of the module */
121822 void *pAux, /* Context pointer for xCreate/xConnect */
121823 void (*xDestroy)(void *) /* Module destructor function */
@@ -122428,11 +122437,11 @@
122437 /*
122438 ** This function is used to set the schema of a virtual table. It is only
122439 ** valid to call this function from within the xCreate() or xConnect() of a
122440 ** virtual table module.
122441 */
122442 SQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
122443 VtabCtx *pCtx;
122444 Parse *pParse;
122445 int rc = SQLITE_OK;
122446 Table *pTab;
122447 char *zErr = 0;
@@ -122885,11 +122894,11 @@
122894 ** table update operation currently in progress.
122895 **
122896 ** The results of this routine are undefined unless it is called from
122897 ** within an xUpdate method.
122898 */
122899 SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *db){
122900 static const unsigned char aMap[] = {
122901 SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE
122902 };
122903 #ifdef SQLITE_ENABLE_API_ARMOR
122904 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -122903,11 +122912,11 @@
122912 /*
122913 ** Call from within the xCreate() or xConnect() methods to provide
122914 ** the SQLite core with additional information about the behavior
122915 ** of the virtual table being implemented.
122916 */
122917 SQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){
122918 va_list ap;
122919 int rc = SQLITE_OK;
122920
122921 #ifdef SQLITE_ENABLE_API_ARMOR
122922 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -124028,13 +124037,19 @@
124037 regBase = r1;
124038 }else{
124039 sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j);
124040 }
124041 }
124042 if( (pTerm->eOperator & WO_IN)!=0 ){
124043 if( pTerm->pExpr->flags & EP_xIsSelect ){
124044 /* No affinity ever needs to be (or should be) applied to a value
124045 ** from the RHS of an "? IN (SELECT ...)" expression. The
124046 ** sqlite3FindInIndex() routine has already ensured that the
124047 ** affinity of the comparison has been applied to the value. */
124048 if( zAff ) zAff[j] = SQLITE_AFF_BLOB;
124049 }
124050 }else if( (pTerm->eOperator & WO_ISNULL)==0 ){
124051 Expr *pRight = pTerm->pExpr->pRight;
124052 if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){
124053 sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
124054 VdbeCoverage(v);
124055 }
@@ -130105,10 +130120,18 @@
130120 if( pOBExpr->op!=TK_COLUMN ) continue;
130121 if( pOBExpr->iTable!=iCur ) continue;
130122 pTerm = sqlite3WhereFindTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn,
130123 ~ready, eqOpMask, 0);
130124 if( pTerm==0 ) continue;
130125 if( pTerm->eOperator==WO_IN ){
130126 /* IN terms are only valid for sorting in the ORDER BY LIMIT
130127 ** optimization, and then only if they are actually used
130128 ** by the query plan */
130129 assert( wctrlFlags & WHERE_ORDERBY_LIMIT );
130130 for(j=0; j<pLoop->nLTerm && pTerm!=pLoop->aLTerm[j]; j++){}
130131 if( j>=pLoop->nLTerm ) continue;
130132 }
130133 if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0 && pOBExpr->iColumn>=0 ){
130134 const char *z1, *z2;
130135 pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
130136 if( !pColl ) pColl = db->pDfltColl;
130137 z1 = pColl->zName;
@@ -136210,11 +136233,11 @@
136233 **
136234 ** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed
136235 ** to recognize the end of a trigger can be omitted. All we have to do
136236 ** is look for a semicolon that is not part of an string or comment.
136237 */
136238 SQLITE_API int sqlite3_complete(const char *zSql){
136239 u8 state = 0; /* Current state, using numbers defined in header comment */
136240 u8 token; /* Value of the next token */
136241
136242 #ifndef SQLITE_OMIT_TRIGGER
136243 /* A complex statement machine used to detect the end of a CREATE TRIGGER
@@ -136375,11 +136398,11 @@
136398 /*
136399 ** This routine is the same as the sqlite3_complete() routine described
136400 ** above, except that the parameter is required to be UTF-16 encoded, not
136401 ** UTF-8.
136402 */
136403 SQLITE_API int sqlite3_complete16(const void *zSql){
136404 sqlite3_value *pVal;
136405 char const *zSql8;
136406 int rc;
136407
136408 #ifndef SQLITE_OMIT_AUTOINIT
@@ -136535,28 +136558,28 @@
136558 #endif
136559
136560 /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns
136561 ** a pointer to the to the sqlite3_version[] string constant.
136562 */
136563 SQLITE_API const char *sqlite3_libversion(void){ return sqlite3_version; }
136564
136565 /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a
136566 ** pointer to a string constant whose value is the same as the
136567 ** SQLITE_SOURCE_ID C preprocessor macro.
136568 */
136569 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
136570
136571 /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function
136572 ** returns an integer equal to SQLITE_VERSION_NUMBER.
136573 */
136574 SQLITE_API int sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
136575
136576 /* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns
136577 ** zero if and only if SQLite was compiled with mutexing code omitted due to
136578 ** the SQLITE_THREADSAFE compile-time option being set to 0.
136579 */
136580 SQLITE_API int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
136581
136582 /*
136583 ** When compiling the test fixture or with debugging enabled (on Win32),
136584 ** this variable being set to non-zero will cause OSTRACE macros to emit
136585 ** extra diagnostic information.
@@ -136625,11 +136648,11 @@
136648 ** call by X completes.
136649 **
136650 ** * Recursive calls to this routine from thread X return immediately
136651 ** without blocking.
136652 */
136653 SQLITE_API int sqlite3_initialize(void){
136654 MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
136655 int rc; /* Result code */
136656 #ifdef SQLITE_EXTRA_INIT
136657 int bRunExtraInit = 0; /* Extra initialization needed */
136658 #endif
@@ -136791,11 +136814,11 @@
136814 ** while any part of SQLite is otherwise in use in any thread. This
136815 ** routine is not threadsafe. But it is safe to invoke this routine
136816 ** on when SQLite is already shut down. If SQLite is already shut down
136817 ** when this routine is invoked, then this routine is a harmless no-op.
136818 */
136819 SQLITE_API int sqlite3_shutdown(void){
136820 #ifdef SQLITE_OMIT_WSD
136821 int rc = sqlite3_wsd_init(4096, 24);
136822 if( rc!=SQLITE_OK ){
136823 return rc;
136824 }
@@ -136845,11 +136868,11 @@
136868 ** This routine should only be called when there are no outstanding
136869 ** database connections or memory allocations. This routine is not
136870 ** threadsafe. Failure to heed these warnings can lead to unpredictable
136871 ** behavior.
136872 */
136873 SQLITE_API int sqlite3_config(int op, ...){
136874 va_list ap;
136875 int rc = SQLITE_OK;
136876
136877 /* sqlite3_config() shall return SQLITE_MISUSE if it is invoked while
136878 ** the SQLite library is in use. */
@@ -137210,11 +137233,11 @@
137233 }
137234
137235 /*
137236 ** Return the mutex associated with a database connection.
137237 */
137238 SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){
137239 #ifdef SQLITE_ENABLE_API_ARMOR
137240 if( !sqlite3SafetyCheckOk(db) ){
137241 (void)SQLITE_MISUSE_BKPT;
137242 return 0;
137243 }
@@ -137224,11 +137247,11 @@
137247
137248 /*
137249 ** Free up as much memory as we can from the given database
137250 ** connection.
137251 */
137252 SQLITE_API int sqlite3_db_release_memory(sqlite3 *db){
137253 int i;
137254
137255 #ifdef SQLITE_ENABLE_API_ARMOR
137256 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
137257 #endif
@@ -137248,11 +137271,11 @@
137271
137272 /*
137273 ** Flush any dirty pages in the pager-cache for any attached database
137274 ** to disk.
137275 */
137276 SQLITE_API int sqlite3_db_cacheflush(sqlite3 *db){
137277 int i;
137278 int rc = SQLITE_OK;
137279 int bSeenBusy = 0;
137280
137281 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -137277,11 +137300,11 @@
137300 }
137301
137302 /*
137303 ** Configuration settings for an individual database connection
137304 */
137305 SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){
137306 va_list ap;
137307 int rc;
137308 va_start(ap, op);
137309 switch( op ){
137310 case SQLITE_DBCONFIG_LOOKASIDE: {
@@ -137398,11 +137421,11 @@
137421 }
137422
137423 /*
137424 ** Return the ROWID of the most recent insert
137425 */
137426 SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){
137427 #ifdef SQLITE_ENABLE_API_ARMOR
137428 if( !sqlite3SafetyCheckOk(db) ){
137429 (void)SQLITE_MISUSE_BKPT;
137430 return 0;
137431 }
@@ -137411,11 +137434,11 @@
137434 }
137435
137436 /*
137437 ** Return the number of changes in the most recent call to sqlite3_exec().
137438 */
137439 SQLITE_API int sqlite3_changes(sqlite3 *db){
137440 #ifdef SQLITE_ENABLE_API_ARMOR
137441 if( !sqlite3SafetyCheckOk(db) ){
137442 (void)SQLITE_MISUSE_BKPT;
137443 return 0;
137444 }
@@ -137424,11 +137447,11 @@
137447 }
137448
137449 /*
137450 ** Return the number of changes since the database handle was opened.
137451 */
137452 SQLITE_API int sqlite3_total_changes(sqlite3 *db){
137453 #ifdef SQLITE_ENABLE_API_ARMOR
137454 if( !sqlite3SafetyCheckOk(db) ){
137455 (void)SQLITE_MISUSE_BKPT;
137456 return 0;
137457 }
@@ -137575,12 +137598,12 @@
137598 ** statements or unfinished sqlite3_backups. The sqlite3_close_v2()
137599 ** version forces the connection to become a zombie if there are
137600 ** unclosed resources, and arranges for deallocation when the last
137601 ** prepare statement or sqlite3_backup closes.
137602 */
137603 SQLITE_API int sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); }
137604 SQLITE_API int sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); }
137605
137606
137607 /*
137608 ** Close the mutex on database connection db.
137609 **
@@ -137983,11 +138006,11 @@
138006
138007 /*
138008 ** This routine sets the busy callback for an Sqlite database to the
138009 ** given callback function with the given argument.
138010 */
138011 SQLITE_API int sqlite3_busy_handler(
138012 sqlite3 *db,
138013 int (*xBusy)(void*,int),
138014 void *pArg
138015 ){
138016 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -138006,11 +138029,11 @@
138029 /*
138030 ** This routine sets the progress callback for an Sqlite database to the
138031 ** given callback function with the given argument. The progress callback will
138032 ** be invoked every nOps opcodes.
138033 */
138034 SQLITE_API void sqlite3_progress_handler(
138035 sqlite3 *db,
138036 int nOps,
138037 int (*xProgress)(void*),
138038 void *pArg
138039 ){
@@ -138037,11 +138060,11 @@
138060
138061 /*
138062 ** This routine installs a default busy handler that waits for the
138063 ** specified number of milliseconds before returning 0.
138064 */
138065 SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){
138066 #ifdef SQLITE_ENABLE_API_ARMOR
138067 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
138068 #endif
138069 if( ms>0 ){
138070 sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db);
@@ -138053,11 +138076,11 @@
138076 }
138077
138078 /*
138079 ** Cause any pending operation to stop at its earliest opportunity.
138080 */
138081 SQLITE_API void sqlite3_interrupt(sqlite3 *db){
138082 #ifdef SQLITE_ENABLE_API_ARMOR
138083 if( !sqlite3SafetyCheckOk(db) ){
138084 (void)SQLITE_MISUSE_BKPT;
138085 return;
138086 }
@@ -138169,11 +138192,11 @@
138192 }
138193
138194 /*
138195 ** Create new user functions.
138196 */
138197 SQLITE_API int sqlite3_create_function(
138198 sqlite3 *db,
138199 const char *zFunc,
138200 int nArg,
138201 int enc,
138202 void *p,
@@ -138183,11 +138206,11 @@
138206 ){
138207 return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xSFunc, xStep,
138208 xFinal, 0);
138209 }
138210
138211 SQLITE_API int sqlite3_create_function_v2(
138212 sqlite3 *db,
138213 const char *zFunc,
138214 int nArg,
138215 int enc,
138216 void *p,
@@ -138226,11 +138249,11 @@
138249 sqlite3_mutex_leave(db->mutex);
138250 return rc;
138251 }
138252
138253 #ifndef SQLITE_OMIT_UTF16
138254 SQLITE_API int sqlite3_create_function16(
138255 sqlite3 *db,
138256 const void *zFunctionName,
138257 int nArg,
138258 int eTextRep,
138259 void *p,
@@ -138266,11 +138289,11 @@
138289 ** When virtual tables intend to provide an overloaded function, they
138290 ** should call this routine to make sure the global function exists.
138291 ** A global function must exist in order for name resolution to work
138292 ** properly.
138293 */
138294 SQLITE_API int sqlite3_overload_function(
138295 sqlite3 *db,
138296 const char *zName,
138297 int nArg
138298 ){
138299 int rc = SQLITE_OK;
@@ -138298,11 +138321,11 @@
138321 ** A NULL trace function means that no tracing is executes. A non-NULL
138322 ** trace is a pointer to a function that is invoked at the start of each
138323 ** SQL statement.
138324 */
138325 #ifndef SQLITE_OMIT_DEPRECATED
138326 SQLITE_API void *sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){
138327 void *pOld;
138328
138329 #ifdef SQLITE_ENABLE_API_ARMOR
138330 if( !sqlite3SafetyCheckOk(db) ){
138331 (void)SQLITE_MISUSE_BKPT;
@@ -138319,11 +138342,11 @@
138342 }
138343 #endif /* SQLITE_OMIT_DEPRECATED */
138344
138345 /* Register a trace callback using the version-2 interface.
138346 */
138347 SQLITE_API int sqlite3_trace_v2(
138348 sqlite3 *db, /* Trace this connection */
138349 unsigned mTrace, /* Mask of events to be traced */
138350 int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */
138351 void *pArg /* Context */
138352 ){
@@ -138331,10 +138354,12 @@
138354 if( !sqlite3SafetyCheckOk(db) ){
138355 return SQLITE_MISUSE_BKPT;
138356 }
138357 #endif
138358 sqlite3_mutex_enter(db->mutex);
138359 if( mTrace==0 ) xTrace = 0;
138360 if( xTrace==0 ) mTrace = 0;
138361 db->mTrace = mTrace;
138362 db->xTrace = xTrace;
138363 db->pTraceArg = pArg;
138364 sqlite3_mutex_leave(db->mutex);
138365 return SQLITE_OK;
@@ -138347,11 +138372,11 @@
138372 **
138373 ** A NULL profile function means that no profiling is executes. A non-NULL
138374 ** profile is a pointer to a function that is invoked at the conclusion of
138375 ** each SQL statement that is run.
138376 */
138377 SQLITE_API void *sqlite3_profile(
138378 sqlite3 *db,
138379 void (*xProfile)(void*,const char*,sqlite_uint64),
138380 void *pArg
138381 ){
138382 void *pOld;
@@ -138375,11 +138400,11 @@
138400 /*
138401 ** Register a function to be invoked when a transaction commits.
138402 ** If the invoked function returns non-zero, then the commit becomes a
138403 ** rollback.
138404 */
138405 SQLITE_API void *sqlite3_commit_hook(
138406 sqlite3 *db, /* Attach the hook to this database */
138407 int (*xCallback)(void*), /* Function to invoke on each commit */
138408 void *pArg /* Argument to the function */
138409 ){
138410 void *pOld;
@@ -138400,11 +138425,11 @@
138425
138426 /*
138427 ** Register a callback to be invoked each time a row is updated,
138428 ** inserted or deleted using this database connection.
138429 */
138430 SQLITE_API void *sqlite3_update_hook(
138431 sqlite3 *db, /* Attach the hook to this database */
138432 void (*xCallback)(void*,int,char const *,char const *,sqlite_int64),
138433 void *pArg /* Argument to the function */
138434 ){
138435 void *pRet;
@@ -138425,11 +138450,11 @@
138450
138451 /*
138452 ** Register a callback to be invoked each time a transaction is rolled
138453 ** back by this database connection.
138454 */
138455 SQLITE_API void *sqlite3_rollback_hook(
138456 sqlite3 *db, /* Attach the hook to this database */
138457 void (*xCallback)(void*), /* Callback function */
138458 void *pArg /* Argument to the function */
138459 ){
138460 void *pRet;
@@ -138451,11 +138476,11 @@
138476 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
138477 /*
138478 ** Register a callback to be invoked each time a row is updated,
138479 ** inserted or deleted using this database connection.
138480 */
138481 SQLITE_API void *sqlite3_preupdate_hook(
138482 sqlite3 *db, /* Attach the hook to this database */
138483 void(*xCallback)( /* Callback function */
138484 void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64),
138485 void *pArg /* First callback argument */
138486 ){
@@ -138500,11 +138525,11 @@
138525 ** The callback registered by this function replaces any existing callback
138526 ** registered using sqlite3_wal_hook(). Likewise, registering a callback
138527 ** using sqlite3_wal_hook() disables the automatic checkpoint mechanism
138528 ** configured by this function.
138529 */
138530 SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){
138531 #ifdef SQLITE_OMIT_WAL
138532 UNUSED_PARAMETER(db);
138533 UNUSED_PARAMETER(nFrame);
138534 #else
138535 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -138521,11 +138546,11 @@
138546
138547 /*
138548 ** Register a callback to be invoked each time a transaction is written
138549 ** into the write-ahead-log by this database connection.
138550 */
138551 SQLITE_API void *sqlite3_wal_hook(
138552 sqlite3 *db, /* Attach the hook to this db handle */
138553 int(*xCallback)(void *, sqlite3*, const char*, int),
138554 void *pArg /* First argument passed to xCallback() */
138555 ){
138556 #ifndef SQLITE_OMIT_WAL
@@ -138548,11 +138573,11 @@
138573 }
138574
138575 /*
138576 ** Checkpoint database zDb.
138577 */
138578 SQLITE_API int sqlite3_wal_checkpoint_v2(
138579 sqlite3 *db, /* Database handle */
138580 const char *zDb, /* Name of attached database (or NULL) */
138581 int eMode, /* SQLITE_CHECKPOINT_* value */
138582 int *pnLog, /* OUT: Size of WAL log in frames */
138583 int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -138603,11 +138628,11 @@
138628 /*
138629 ** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points
138630 ** to contains a zero-length string, all attached databases are
138631 ** checkpointed.
138632 */
138633 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){
138634 /* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to
138635 ** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */
138636 return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0);
138637 }
138638
@@ -138694,11 +138719,11 @@
138719
138720 /*
138721 ** Return UTF-8 encoded English language explanation of the most recent
138722 ** error.
138723 */
138724 SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){
138725 const char *z;
138726 if( !db ){
138727 return sqlite3ErrStr(SQLITE_NOMEM_BKPT);
138728 }
138729 if( !sqlite3SafetyCheckSickOrOk(db) ){
@@ -138722,11 +138747,11 @@
138747 #ifndef SQLITE_OMIT_UTF16
138748 /*
138749 ** Return UTF-16 encoded English language explanation of the most recent
138750 ** error.
138751 */
138752 SQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){
138753 static const u16 outOfMem[] = {
138754 'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0
138755 };
138756 static const u16 misuse[] = {
138757 'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ',
@@ -138767,38 +138792,38 @@
138792
138793 /*
138794 ** Return the most recent error code generated by an SQLite routine. If NULL is
138795 ** passed to this function, we assume a malloc() failed during sqlite3_open().
138796 */
138797 SQLITE_API int sqlite3_errcode(sqlite3 *db){
138798 if( db && !sqlite3SafetyCheckSickOrOk(db) ){
138799 return SQLITE_MISUSE_BKPT;
138800 }
138801 if( !db || db->mallocFailed ){
138802 return SQLITE_NOMEM_BKPT;
138803 }
138804 return db->errCode & db->errMask;
138805 }
138806 SQLITE_API int sqlite3_extended_errcode(sqlite3 *db){
138807 if( db && !sqlite3SafetyCheckSickOrOk(db) ){
138808 return SQLITE_MISUSE_BKPT;
138809 }
138810 if( !db || db->mallocFailed ){
138811 return SQLITE_NOMEM_BKPT;
138812 }
138813 return db->errCode;
138814 }
138815 SQLITE_API int sqlite3_system_errno(sqlite3 *db){
138816 return db ? db->iSysErrno : 0;
138817 }
138818
138819 /*
138820 ** Return a string that describes the kind of error specified in the
138821 ** argument. For now, this simply calls the internal sqlite3ErrStr()
138822 ** function.
138823 */
138824 SQLITE_API const char *sqlite3_errstr(int rc){
138825 return sqlite3ErrStr(rc);
138826 }
138827
138828 /*
138829 ** Create a new collating function for database "db". The name is zName
@@ -138942,11 +138967,11 @@
138967 **
138968 ** A new lower limit does not shrink existing constructs.
138969 ** It merely prevents new constructs that exceed the limit
138970 ** from forming.
138971 */
138972 SQLITE_API int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
138973 int oldLimit;
138974
138975 #ifdef SQLITE_ENABLE_API_ARMOR
138976 if( !sqlite3SafetyCheckOk(db) ){
138977 (void)SQLITE_MISUSE_BKPT;
@@ -139566,18 +139591,18 @@
139591 }
139592
139593 /*
139594 ** Open a new database handle.
139595 */
139596 SQLITE_API int sqlite3_open(
139597 const char *zFilename,
139598 sqlite3 **ppDb
139599 ){
139600 return openDatabase(zFilename, ppDb,
139601 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);
139602 }
139603 SQLITE_API int sqlite3_open_v2(
139604 const char *filename, /* Database filename (UTF-8) */
139605 sqlite3 **ppDb, /* OUT: SQLite db handle */
139606 int flags, /* Flags */
139607 const char *zVfs /* Name of VFS module to use */
139608 ){
@@ -139586,11 +139611,11 @@
139611
139612 #ifndef SQLITE_OMIT_UTF16
139613 /*
139614 ** Open a new database handle.
139615 */
139616 SQLITE_API int sqlite3_open16(
139617 const void *zFilename,
139618 sqlite3 **ppDb
139619 ){
139620 char const *zFilename8; /* zFilename encoded in UTF-8 instead of UTF-16 */
139621 sqlite3_value *pVal;
@@ -139625,11 +139650,11 @@
139650 #endif /* SQLITE_OMIT_UTF16 */
139651
139652 /*
139653 ** Register a new collation sequence with the database handle db.
139654 */
139655 SQLITE_API int sqlite3_create_collation(
139656 sqlite3* db,
139657 const char *zName,
139658 int enc,
139659 void* pCtx,
139660 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -139638,11 +139663,11 @@
139663 }
139664
139665 /*
139666 ** Register a new collation sequence with the database handle db.
139667 */
139668 SQLITE_API int sqlite3_create_collation_v2(
139669 sqlite3* db,
139670 const char *zName,
139671 int enc,
139672 void* pCtx,
139673 int(*xCompare)(void*,int,const void*,int,const void*),
@@ -139663,11 +139688,11 @@
139688
139689 #ifndef SQLITE_OMIT_UTF16
139690 /*
139691 ** Register a new collation sequence with the database handle db.
139692 */
139693 SQLITE_API int sqlite3_create_collation16(
139694 sqlite3* db,
139695 const void *zName,
139696 int enc,
139697 void* pCtx,
139698 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -139693,11 +139718,11 @@
139718
139719 /*
139720 ** Register a collation sequence factory callback with the database handle
139721 ** db. Replace any previously installed collation sequence factory.
139722 */
139723 SQLITE_API int sqlite3_collation_needed(
139724 sqlite3 *db,
139725 void *pCollNeededArg,
139726 void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)
139727 ){
139728 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -139714,11 +139739,11 @@
139739 #ifndef SQLITE_OMIT_UTF16
139740 /*
139741 ** Register a collation sequence factory callback with the database handle
139742 ** db. Replace any previously installed collation sequence factory.
139743 */
139744 SQLITE_API int sqlite3_collation_needed16(
139745 sqlite3 *db,
139746 void *pCollNeededArg,
139747 void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)
139748 ){
139749 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -139736,11 +139761,11 @@
139761 #ifndef SQLITE_OMIT_DEPRECATED
139762 /*
139763 ** This function is now an anachronism. It used to be used to recover from a
139764 ** malloc() failure, but SQLite now does this automatically.
139765 */
139766 SQLITE_API int sqlite3_global_recover(void){
139767 return SQLITE_OK;
139768 }
139769 #endif
139770
139771 /*
@@ -139747,11 +139772,11 @@
139772 ** Test to see whether or not the database connection is in autocommit
139773 ** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on
139774 ** by default. Autocommit is disabled by a BEGIN statement and reenabled
139775 ** by the next COMMIT or ROLLBACK.
139776 */
139777 SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){
139778 #ifdef SQLITE_ENABLE_API_ARMOR
139779 if( !sqlite3SafetyCheckOk(db) ){
139780 (void)SQLITE_MISUSE_BKPT;
139781 return 0;
139782 }
@@ -139804,19 +139829,19 @@
139829 ** data for this thread has been deallocated.
139830 **
139831 ** SQLite no longer uses thread-specific data so this routine is now a
139832 ** no-op. It is retained for historical compatibility.
139833 */
139834 SQLITE_API void sqlite3_thread_cleanup(void){
139835 }
139836 #endif
139837
139838 /*
139839 ** Return meta information about a specific column of a database table.
139840 ** See comment in sqlite3.h (sqlite.h.in) for details.
139841 */
139842 SQLITE_API int sqlite3_table_column_metadata(
139843 sqlite3 *db, /* Connection handle */
139844 const char *zDbName, /* Database name or NULL */
139845 const char *zTableName, /* Table name */
139846 const char *zColumnName, /* Column name */
139847 char const **pzDataType, /* OUTPUT: Declared data type */
@@ -139930,11 +139955,11 @@
139955 }
139956
139957 /*
139958 ** Sleep for a little while. Return the amount of time slept.
139959 */
139960 SQLITE_API int sqlite3_sleep(int ms){
139961 sqlite3_vfs *pVfs;
139962 int rc;
139963 pVfs = sqlite3_vfs_find(0);
139964 if( pVfs==0 ) return 0;
139965
@@ -139946,11 +139971,11 @@
139971 }
139972
139973 /*
139974 ** Enable or disable the extended result codes.
139975 */
139976 SQLITE_API int sqlite3_extended_result_codes(sqlite3 *db, int onoff){
139977 #ifdef SQLITE_ENABLE_API_ARMOR
139978 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
139979 #endif
139980 sqlite3_mutex_enter(db->mutex);
139981 db->errMask = onoff ? 0xffffffff : 0xff;
@@ -139959,11 +139984,11 @@
139984 }
139985
139986 /*
139987 ** Invoke the xFileControl method on a particular database.
139988 */
139989 SQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
139990 int rc = SQLITE_ERROR;
139991 Btree *pBtree;
139992
139993 #ifdef SQLITE_ENABLE_API_ARMOR
139994 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -139999,11 +140024,11 @@
140024 }
140025
140026 /*
140027 ** Interface to the testing logic.
140028 */
140029 SQLITE_API int sqlite3_test_control(int op, ...){
140030 int rc = 0;
140031 #ifdef SQLITE_OMIT_BUILTIN_TEST
140032 UNUSED_PARAMETER(op);
140033 #else
140034 va_list ap;
@@ -140344,11 +140369,11 @@
140369 ** method of a VFS implementation. The zParam argument is the name of the
140370 ** query parameter we seek. This routine returns the value of the zParam
140371 ** parameter if it exists. If the parameter does not exist, this routine
140372 ** returns a NULL pointer.
140373 */
140374 SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam){
140375 if( zFilename==0 || zParam==0 ) return 0;
140376 zFilename += sqlite3Strlen30(zFilename) + 1;
140377 while( zFilename[0] ){
140378 int x = strcmp(zFilename, zParam);
140379 zFilename += sqlite3Strlen30(zFilename) + 1;
@@ -140359,20 +140384,20 @@
140384 }
140385
140386 /*
140387 ** Return a boolean value for a query parameter.
140388 */
140389 SQLITE_API int sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){
140390 const char *z = sqlite3_uri_parameter(zFilename, zParam);
140391 bDflt = bDflt!=0;
140392 return z ? sqlite3GetBoolean(z, bDflt) : bDflt;
140393 }
140394
140395 /*
140396 ** Return a 64-bit integer value for a query parameter.
140397 */
140398 SQLITE_API sqlite3_int64 sqlite3_uri_int64(
140399 const char *zFilename, /* Filename as passed to xOpen */
140400 const char *zParam, /* URI parameter sought */
140401 sqlite3_int64 bDflt /* return if parameter is missing */
140402 ){
140403 const char *z = sqlite3_uri_parameter(zFilename, zParam);
@@ -140400,11 +140425,11 @@
140425
140426 /*
140427 ** Return the filename of the database associated with a database
140428 ** connection.
140429 */
140430 SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName){
140431 Btree *pBt;
140432 #ifdef SQLITE_ENABLE_API_ARMOR
140433 if( !sqlite3SafetyCheckOk(db) ){
140434 (void)SQLITE_MISUSE_BKPT;
140435 return 0;
@@ -140416,11 +140441,11 @@
140441
140442 /*
140443 ** Return 1 if database is read-only or 0 if read/write. Return -1 if
140444 ** no such database exists.
140445 */
140446 SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
140447 Btree *pBt;
140448 #ifdef SQLITE_ENABLE_API_ARMOR
140449 if( !sqlite3SafetyCheckOk(db) ){
140450 (void)SQLITE_MISUSE_BKPT;
140451 return -1;
@@ -140433,11 +140458,11 @@
140458 #ifdef SQLITE_ENABLE_SNAPSHOT
140459 /*
140460 ** Obtain a snapshot handle for the snapshot of database zDb currently
140461 ** being read by handle db.
140462 */
140463 SQLITE_API int sqlite3_snapshot_get(
140464 sqlite3 *db,
140465 const char *zDb,
140466 sqlite3_snapshot **ppSnapshot
140467 ){
140468 int rc = SQLITE_ERROR;
@@ -140468,11 +140493,11 @@
140493 }
140494
140495 /*
140496 ** Open a read-transaction on the snapshot idendified by pSnapshot.
140497 */
140498 SQLITE_API int sqlite3_snapshot_open(
140499 sqlite3 *db,
140500 const char *zDb,
140501 sqlite3_snapshot *pSnapshot
140502 ){
140503 int rc = SQLITE_ERROR;
@@ -140505,11 +140530,11 @@
140530 }
140531
140532 /*
140533 ** Free a snapshot handle obtained from sqlite3_snapshot_get().
140534 */
140535 SQLITE_API void sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){
140536 sqlite3_free(pSnapshot);
140537 }
140538 #endif /* SQLITE_ENABLE_SNAPSHOT */
140539
140540 /************** End of main.c ************************************************/
@@ -140659,11 +140684,11 @@
140684 **
140685 ** Each call to this routine overrides any prior callbacks registered
140686 ** on the same "db". If xNotify==0 then any prior callbacks are immediately
140687 ** cancelled.
140688 */
140689 SQLITE_API int sqlite3_unlock_notify(
140690 sqlite3 *db,
140691 void (*xNotify)(void **, int),
140692 void *pArg
140693 ){
140694 int rc = SQLITE_OK;
@@ -147662,11 +147687,11 @@
147687 ** Initialize API pointer table, if required.
147688 */
147689 #ifdef _WIN32
147690 __declspec(dllexport)
147691 #endif
147692 SQLITE_API int sqlite3_fts3_init(
147693 sqlite3 *db,
147694 char **pzErrMsg,
147695 const sqlite3_api_routines *pApi
147696 ){
147697 SQLITE_EXTENSION_INIT2(pApi)
@@ -163463,11 +163488,11 @@
163488 }
163489
163490 /*
163491 ** Register a new geometry function for use with the r-tree MATCH operator.
163492 */
163493 SQLITE_API int sqlite3_rtree_geometry_callback(
163494 sqlite3 *db, /* Register SQL function on this connection */
163495 const char *zGeom, /* Name of the new SQL function */
163496 int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */
163497 void *pContext /* Extra data associated with the callback */
163498 ){
@@ -163487,11 +163512,11 @@
163512
163513 /*
163514 ** Register a new 2nd-generation geometry function for use with the
163515 ** r-tree MATCH operator.
163516 */
163517 SQLITE_API int sqlite3_rtree_query_callback(
163518 sqlite3 *db, /* Register SQL function on this connection */
163519 const char *zQueryFunc, /* Name of new SQL function */
163520 int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */
163521 void *pContext, /* Extra data passed into the callback */
163522 void (*xDestructor)(void*) /* Destructor for the extra data */
@@ -163512,11 +163537,11 @@
163537
163538 #if !SQLITE_CORE
163539 #ifdef _WIN32
163540 __declspec(dllexport)
163541 #endif
163542 SQLITE_API int sqlite3_rtree_init(
163543 sqlite3 *db,
163544 char **pzErrMsg,
163545 const sqlite3_api_routines *pApi
163546 ){
163547 SQLITE_EXTENSION_INIT2(pApi)
@@ -164063,11 +164088,11 @@
164088
164089 #if !SQLITE_CORE
164090 #ifdef _WIN32
164091 __declspec(dllexport)
164092 #endif
164093 SQLITE_API int sqlite3_icu_init(
164094 sqlite3 *db,
164095 char **pzErrMsg,
164096 const sqlite3_api_routines *pApi
164097 ){
164098 SQLITE_EXTENSION_INIT2(pApi)
@@ -164743,11 +164768,11 @@
164768 ** IMPORTANT NOTE FOR ZIPVFS USERS: The RBU extension works with all of
164769 ** SQLite's built-in VFSs, including the multiplexor VFS. However it does
164770 ** not work out of the box with zipvfs. Refer to the comment describing
164771 ** the zipvfs_create_vfs() API below for details on using RBU with zipvfs.
164772 */
164773 SQLITE_API sqlite3rbu *sqlite3rbu_open(
164774 const char *zTarget,
164775 const char *zRbu,
164776 const char *zState
164777 );
164778
@@ -164776,11 +164801,11 @@
164801 ** As with sqlite3rbu_open(), Zipvfs users should rever to the comment
164802 ** describing the sqlite3rbu_create_vfs() API function below for
164803 ** a description of the complications associated with using RBU with
164804 ** zipvfs databases.
164805 */
164806 SQLITE_API sqlite3rbu *sqlite3rbu_vacuum(
164807 const char *zTarget,
164808 const char *zState
164809 );
164810
164811 /*
@@ -164812,11 +164837,11 @@
164837 ** when sqlite3rbu_close() is called.
164838 **
164839 ** Database handles returned by this function remain valid until the next
164840 ** call to any sqlite3rbu_xxx() function other than sqlite3rbu_db().
164841 */
164842 SQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu*, int bRbu);
164843
164844 /*
164845 ** Do some work towards applying the RBU update to the target db.
164846 **
164847 ** Return SQLITE_DONE if the update has been completely applied, or
@@ -164826,11 +164851,11 @@
164851 **
164852 ** Once a call to sqlite3rbu_step() has returned a value other than
164853 ** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops
164854 ** that immediately return the same value.
164855 */
164856 SQLITE_API int sqlite3rbu_step(sqlite3rbu *pRbu);
164857
164858 /*
164859 ** Force RBU to save its state to disk.
164860 **
164861 ** If a power failure or application crash occurs during an update, following
@@ -164838,11 +164863,11 @@
164863 ** was last saved. In other words, from the most recent successful call to
164864 ** sqlite3rbu_close() or this function.
164865 **
164866 ** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
164867 */
164868 SQLITE_API int sqlite3rbu_savestate(sqlite3rbu *pRbu);
164869
164870 /*
164871 ** Close an RBU handle.
164872 **
164873 ** If the RBU update has been completely applied, mark the RBU database
@@ -164858,18 +164883,18 @@
164883 **
164884 ** Otherwise, if no error occurs, this function returns SQLITE_OK if the
164885 ** update has been partially applied, or SQLITE_DONE if it has been
164886 ** completely applied.
164887 */
164888 SQLITE_API int sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg);
164889
164890 /*
164891 ** Return the total number of key-value operations (inserts, deletes or
164892 ** updates) that have been performed on the target database since the
164893 ** current RBU update was started.
164894 */
164895 SQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu);
164896
164897 /*
164898 ** Obtain permyriadage (permyriadage is to 10000 as percentage is to 100)
164899 ** progress indications for the two stages of an RBU update. This API may
164900 ** be useful for driving GUI progress indicators and similar.
@@ -164907,11 +164932,11 @@
164932 ** permyriadage progress of the same stage. If the rbu_count table does
164933 ** not exist, then (*pnOne) is set to -1 during stage 1. If the rbu_count
164934 ** table exists but is not correctly populated, the value of the *pnOne
164935 ** output variable during stage 1 is undefined.
164936 */
164937 SQLITE_API void sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo);
164938
164939 /*
164940 ** Obtain an indication as to the current stage of an RBU update or vacuum.
164941 ** This function always returns one of the SQLITE_RBU_STATE_XXX constants
164942 ** defined in this file. Return values should be interpreted as follows:
@@ -164945,11 +164970,11 @@
164970 #define SQLITE_RBU_STATE_MOVE 2
164971 #define SQLITE_RBU_STATE_CHECKPOINT 3
164972 #define SQLITE_RBU_STATE_DONE 4
164973 #define SQLITE_RBU_STATE_ERROR 5
164974
164975 SQLITE_API int sqlite3rbu_state(sqlite3rbu *pRbu);
164976
164977 /*
164978 ** Create an RBU VFS named zName that accesses the underlying file-system
164979 ** via existing VFS zParent. Or, if the zParent parameter is passed NULL,
164980 ** then the new RBU VFS uses the default system VFS to access the file-system.
@@ -164989,21 +165014,21 @@
165014 ** The overhead of adding the "rbu" VFS to the system is negligible for
165015 ** non-RBU users. There is no harm in an application accessing the
165016 ** file-system via "rbu" all the time, even if it only uses RBU functionality
165017 ** occasionally.
165018 */
165019 SQLITE_API int sqlite3rbu_create_vfs(const char *zName, const char *zParent);
165020
165021 /*
165022 ** Deregister and destroy an RBU vfs created by an earlier call to
165023 ** sqlite3rbu_create_vfs().
165024 **
165025 ** VFS objects are not reference counted. If a VFS object is destroyed
165026 ** before all database handles that use it have been closed, the results
165027 ** are undefined.
165028 */
165029 SQLITE_API void sqlite3rbu_destroy_vfs(const char *zName);
165030
165031 #if 0
165032 } /* end of the 'extern "C"' block */
165033 #endif
165034
@@ -168093,11 +168118,11 @@
168118 }
168119
168120 /*
168121 ** Step the RBU object.
168122 */
168123 SQLITE_API int sqlite3rbu_step(sqlite3rbu *p){
168124 if( p ){
168125 switch( p->eStage ){
168126 case RBU_STAGE_OAL: {
168127 RbuObjIter *pIter = &p->objiter;
168128
@@ -168535,11 +168560,11 @@
168560 }
168561
168562 /*
168563 ** Open and return a new RBU handle.
168564 */
168565 SQLITE_API sqlite3rbu *sqlite3rbu_open(
168566 const char *zTarget,
168567 const char *zRbu,
168568 const char *zState
168569 ){
168570 /* TODO: Check that zTarget and zRbu are non-NULL */
@@ -168547,11 +168572,11 @@
168572 }
168573
168574 /*
168575 ** Open a handle to begin or resume an RBU VACUUM operation.
168576 */
168577 SQLITE_API sqlite3rbu *sqlite3rbu_vacuum(
168578 const char *zTarget,
168579 const char *zState
168580 ){
168581 /* TODO: Check that both arguments are non-NULL */
168582 return openRbuHandle(0, zTarget, zState);
@@ -168558,11 +168583,11 @@
168583 }
168584
168585 /*
168586 ** Return the database handle used by pRbu.
168587 */
168588 SQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){
168589 sqlite3 *db = 0;
168590 if( pRbu ){
168591 db = (bRbu ? pRbu->dbRbu : pRbu->dbMain);
168592 }
168593 return db;
@@ -168590,11 +168615,11 @@
168615 }
168616
168617 /*
168618 ** Close the RBU handle.
168619 */
168620 SQLITE_API int sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){
168621 int rc;
168622 if( p ){
168623
168624 /* Commit the transaction to the *-oal file. */
168625 if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){
@@ -168641,19 +168666,19 @@
168666 /*
168667 ** Return the total number of key-value operations (inserts, deletes or
168668 ** updates) that have been performed on the target database since the
168669 ** current RBU update was started.
168670 */
168671 SQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu){
168672 return pRbu->nProgress;
168673 }
168674
168675 /*
168676 ** Return permyriadage progress indications for the two main stages of
168677 ** an RBU update.
168678 */
168679 SQLITE_API void sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){
168680 const int MAX_PROGRESS = 10000;
168681 switch( p->eStage ){
168682 case RBU_STAGE_OAL:
168683 if( p->nPhaseOneStep>0 ){
168684 *pnOne = (int)(MAX_PROGRESS * (i64)p->nProgress/(i64)p->nPhaseOneStep);
@@ -168684,11 +168709,11 @@
168709 }
168710
168711 /*
168712 ** Return the current state of the RBU vacuum or update operation.
168713 */
168714 SQLITE_API int sqlite3rbu_state(sqlite3rbu *p){
168715 int aRes[] = {
168716 0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE,
168717 0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE
168718 };
168719
@@ -168712,11 +168737,11 @@
168737 );
168738 return aRes[p->eStage];
168739 }
168740 }
168741
168742 SQLITE_API int sqlite3rbu_savestate(sqlite3rbu *p){
168743 int rc = p->rc;
168744 if( rc==SQLITE_DONE ) return SQLITE_OK;
168745
168746 assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE );
168747 if( p->eStage==RBU_STAGE_OAL ){
@@ -169539,11 +169564,11 @@
169564
169565 /*
169566 ** Deregister and destroy an RBU vfs created by an earlier call to
169567 ** sqlite3rbu_create_vfs().
169568 */
169569 SQLITE_API void sqlite3rbu_destroy_vfs(const char *zName){
169570 sqlite3_vfs *pVfs = sqlite3_vfs_find(zName);
169571 if( pVfs && pVfs->xOpen==rbuVfsOpen ){
169572 sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex);
169573 sqlite3_vfs_unregister(pVfs);
169574 sqlite3_free(pVfs);
@@ -169553,11 +169578,11 @@
169578 /*
169579 ** Create an RBU VFS named zName that accesses the underlying file-system
169580 ** via existing VFS zParent. The new object is registered as a non-default
169581 ** VFS with SQLite before returning.
169582 */
169583 SQLITE_API int sqlite3rbu_create_vfs(const char *zName, const char *zParent){
169584
169585 /* Template for VFS */
169586 static sqlite3_vfs vfs_template = {
169587 1, /* iVersion */
169588 0, /* szOsFile */
@@ -171798,11 +171823,11 @@
171823 }
171824
171825 return rc;
171826 }
171827
171828 SQLITE_API int sqlite3session_diff(
171829 sqlite3_session *pSession,
171830 const char *zFrom,
171831 const char *zTbl,
171832 char **pzErrMsg
171833 ){
@@ -171892,11 +171917,11 @@
171917
171918 /*
171919 ** Create a session object. This session object will record changes to
171920 ** database zDb attached to connection db.
171921 */
171922 SQLITE_API int sqlite3session_create(
171923 sqlite3 *db, /* Database handle */
171924 const char *zDb, /* Name of db (e.g. "main") */
171925 sqlite3_session **ppSession /* OUT: New session object */
171926 ){
171927 sqlite3_session *pNew; /* Newly allocated session object */
@@ -171954,11 +171979,11 @@
171979 }
171980
171981 /*
171982 ** Delete a session object previously allocated using sqlite3session_create().
171983 */
171984 SQLITE_API void sqlite3session_delete(sqlite3_session *pSession){
171985 sqlite3 *db = pSession->db;
171986 sqlite3_session *pHead;
171987 sqlite3_session **pp;
171988
171989 /* Unlink the session from the linked list of sessions attached to the
@@ -171983,11 +172008,11 @@
172008 }
172009
172010 /*
172011 ** Set a table filter on a Session Object.
172012 */
172013 SQLITE_API void sqlite3session_table_filter(
172014 sqlite3_session *pSession,
172015 int(*xFilter)(void*, const char*),
172016 void *pCtx /* First argument passed to xFilter */
172017 ){
172018 pSession->bAutoAttach = 1;
@@ -172001,11 +172026,11 @@
172026 **
172027 ** Only tables that have a PRIMARY KEY defined may be attached. It does
172028 ** not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias)
172029 ** or not.
172030 */
172031 SQLITE_API int sqlite3session_attach(
172032 sqlite3_session *pSession, /* Session object */
172033 const char *zName /* Table name */
172034 ){
172035 int rc = SQLITE_OK;
172036 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
@@ -172691,11 +172716,11 @@
172716 ** session object passed as the first argument.
172717 **
172718 ** It is the responsibility of the caller to eventually free the buffer
172719 ** using sqlite3_free().
172720 */
172721 SQLITE_API int sqlite3session_changeset(
172722 sqlite3_session *pSession, /* Session object */
172723 int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */
172724 void **ppChangeset /* OUT: Buffer containing changeset */
172725 ){
172726 return sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset);
@@ -172702,11 +172727,11 @@
172727 }
172728
172729 /*
172730 ** Streaming version of sqlite3session_changeset().
172731 */
172732 SQLITE_API int sqlite3session_changeset_strm(
172733 sqlite3_session *pSession,
172734 int (*xOutput)(void *pOut, const void *pData, int nData),
172735 void *pOut
172736 ){
172737 return sessionGenerateChangeset(pSession, 0, xOutput, pOut, 0, 0);
@@ -172713,11 +172738,11 @@
172738 }
172739
172740 /*
172741 ** Streaming version of sqlite3session_patchset().
172742 */
172743 SQLITE_API int sqlite3session_patchset_strm(
172744 sqlite3_session *pSession,
172745 int (*xOutput)(void *pOut, const void *pData, int nData),
172746 void *pOut
172747 ){
172748 return sessionGenerateChangeset(pSession, 1, xOutput, pOut, 0, 0);
@@ -172728,11 +172753,11 @@
172753 ** session object passed as the first argument.
172754 **
172755 ** It is the responsibility of the caller to eventually free the buffer
172756 ** using sqlite3_free().
172757 */
172758 SQLITE_API int sqlite3session_patchset(
172759 sqlite3_session *pSession, /* Session object */
172760 int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */
172761 void **ppPatchset /* OUT: Buffer containing changeset */
172762 ){
172763 return sessionGenerateChangeset(pSession, 1, 0, 0, pnPatchset, ppPatchset);
@@ -172739,11 +172764,11 @@
172764 }
172765
172766 /*
172767 ** Enable or disable the session object passed as the first argument.
172768 */
172769 SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable){
172770 int ret;
172771 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172772 if( bEnable>=0 ){
172773 pSession->bEnable = bEnable;
172774 }
@@ -172753,11 +172778,11 @@
172778 }
172779
172780 /*
172781 ** Enable or disable the session object passed as the first argument.
172782 */
172783 SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){
172784 int ret;
172785 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172786 if( bIndirect>=0 ){
172787 pSession->bIndirect = bIndirect;
172788 }
@@ -172768,11 +172793,11 @@
172793
172794 /*
172795 ** Return true if there have been no changes to monitored tables recorded
172796 ** by the session object passed as the only argument.
172797 */
172798 SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession){
172799 int ret = 0;
172800 SessionTable *pTab;
172801
172802 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172803 for(pTab=pSession->pTable; pTab && ret==0; pTab=pTab->pNext){
@@ -172818,11 +172843,11 @@
172843 }
172844
172845 /*
172846 ** Create an iterator used to iterate through the contents of a changeset.
172847 */
172848 SQLITE_API int sqlite3changeset_start(
172849 sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */
172850 int nChangeset, /* Size of buffer pChangeset in bytes */
172851 void *pChangeset /* Pointer to buffer containing changeset */
172852 ){
172853 return sessionChangesetStart(pp, 0, 0, nChangeset, pChangeset);
@@ -172829,11 +172854,11 @@
172854 }
172855
172856 /*
172857 ** Streaming version of sqlite3changeset_start().
172858 */
172859 SQLITE_API int sqlite3changeset_start_strm(
172860 sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */
172861 int (*xInput)(void *pIn, void *pData, int *pnData),
172862 void *pIn
172863 ){
172864 return sessionChangesetStart(pp, xInput, pIn, 0, 0);
@@ -173250,20 +173275,20 @@
173275 ** or SQLITE_CORRUPT.
173276 **
173277 ** This function may not be called on iterators passed to a conflict handler
173278 ** callback by changeset_apply().
173279 */
173280 SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *p){
173281 return sessionChangesetNext(p, 0, 0);
173282 }
173283
173284 /*
173285 ** The following function extracts information on the current change
173286 ** from a changeset iterator. It may only be called after changeset_next()
173287 ** has returned SQLITE_ROW.
173288 */
173289 SQLITE_API int sqlite3changeset_op(
173290 sqlite3_changeset_iter *pIter, /* Iterator handle */
173291 const char **pzTab, /* OUT: Pointer to table name */
173292 int *pnCol, /* OUT: Number of columns in table */
173293 int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */
173294 int *pbIndirect /* OUT: True if change is indirect */
@@ -173279,11 +173304,11 @@
173304 ** Return information regarding the PRIMARY KEY and number of columns in
173305 ** the database table affected by the change that pIter currently points
173306 ** to. This function may only be called after changeset_next() returns
173307 ** SQLITE_ROW.
173308 */
173309 SQLITE_API int sqlite3changeset_pk(
173310 sqlite3_changeset_iter *pIter, /* Iterator object */
173311 unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */
173312 int *pnCol /* OUT: Number of entries in output array */
173313 ){
173314 *pabPK = pIter->abPK;
@@ -173302,11 +173327,11 @@
173327 ** was not modified and is not a PK column), set *ppValue to NULL.
173328 **
173329 ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is
173330 ** not modified. Otherwise, SQLITE_OK.
173331 */
173332 SQLITE_API int sqlite3changeset_old(
173333 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173334 int iVal, /* Index of old.* value to retrieve */
173335 sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */
173336 ){
173337 if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_DELETE ){
@@ -173330,11 +173355,11 @@
173355 ** was not modified), set *ppValue to NULL.
173356 **
173357 ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is
173358 ** not modified. Otherwise, SQLITE_OK.
173359 */
173360 SQLITE_API int sqlite3changeset_new(
173361 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173362 int iVal, /* Index of new.* value to retrieve */
173363 sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */
173364 ){
173365 if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_INSERT ){
@@ -173364,11 +173389,11 @@
173389 ** containing the iVal'th value of the conflicting record.
173390 **
173391 ** If value iVal is out-of-range or some other error occurs, an SQLite error
173392 ** code is returned. Otherwise, SQLITE_OK.
173393 */
173394 SQLITE_API int sqlite3changeset_conflict(
173395 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173396 int iVal, /* Index of conflict record value to fetch */
173397 sqlite3_value **ppValue /* OUT: Value from conflicting row */
173398 ){
173399 if( !pIter->pConflict ){
@@ -173387,11 +173412,11 @@
173412 ** it sets the output variable to the total number of known foreign key
173413 ** violations in the destination database and returns SQLITE_OK.
173414 **
173415 ** In all other cases this function returns SQLITE_MISUSE.
173416 */
173417 SQLITE_API int sqlite3changeset_fk_conflicts(
173418 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173419 int *pnOut /* OUT: Number of FK violations */
173420 ){
173421 if( pIter->pConflict || pIter->apValue ){
173422 return SQLITE_MISUSE;
@@ -173405,11 +173430,11 @@
173430 ** Finalize an iterator allocated with sqlite3changeset_start().
173431 **
173432 ** This function may not be called on iterators passed to a conflict handler
173433 ** callback by changeset_apply().
173434 */
173435 SQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *p){
173436 int rc = SQLITE_OK;
173437 if( p ){
173438 int i; /* Used to iterate through p->apValue[] */
173439 rc = p->rc;
173440 if( p->apValue ){
@@ -173579,11 +173604,11 @@
173604
173605
173606 /*
173607 ** Invert a changeset object.
173608 */
173609 SQLITE_API int sqlite3changeset_invert(
173610 int nChangeset, /* Number of bytes in input */
173611 const void *pChangeset, /* Input changeset */
173612 int *pnInverted, /* OUT: Number of bytes in output changeset */
173613 void **ppInverted /* OUT: Inverse of pChangeset */
173614 ){
@@ -173598,11 +173623,11 @@
173623 }
173624
173625 /*
173626 ** Streaming version of sqlite3changeset_invert().
173627 */
173628 SQLITE_API int sqlite3changeset_invert_strm(
173629 int (*xInput)(void *pIn, void *pData, int *pnData),
173630 void *pIn,
173631 int (*xOutput)(void *pOut, const void *pData, int nData),
173632 void *pOut
173633 ){
@@ -174478,11 +174503,11 @@
174503 /*
174504 ** Apply the changeset passed via pChangeset/nChangeset to the main database
174505 ** attached to handle "db". Invoke the supplied conflict handler callback
174506 ** to resolve any conflicts encountered while applying the change.
174507 */
174508 SQLITE_API int sqlite3changeset_apply(
174509 sqlite3 *db, /* Apply change to "main" db of this handle */
174510 int nChangeset, /* Size of changeset in bytes */
174511 void *pChangeset, /* Changeset blob */
174512 int(*xFilter)(
174513 void *pCtx, /* Copy of sixth arg to _apply() */
@@ -174506,11 +174531,11 @@
174531 /*
174532 ** Apply the changeset passed via xInput/pIn to the main database
174533 ** attached to handle "db". Invoke the supplied conflict handler callback
174534 ** to resolve any conflicts encountered while applying the change.
174535 */
174536 SQLITE_API int sqlite3changeset_apply_strm(
174537 sqlite3 *db, /* Apply change to "main" db of this handle */
174538 int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
174539 void *pIn, /* First arg for xInput */
174540 int(*xFilter)(
174541 void *pCtx, /* Copy of sixth arg to _apply() */
@@ -174841,11 +174866,11 @@
174866 }
174867
174868 /*
174869 ** Allocate a new, empty, sqlite3_changegroup.
174870 */
174871 SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp){
174872 int rc = SQLITE_OK; /* Return code */
174873 sqlite3_changegroup *p; /* New object */
174874 p = (sqlite3_changegroup*)sqlite3_malloc(sizeof(sqlite3_changegroup));
174875 if( p==0 ){
174876 rc = SQLITE_NOMEM;
@@ -174858,11 +174883,11 @@
174883
174884 /*
174885 ** Add the changeset currently stored in buffer pData, size nData bytes,
174886 ** to changeset-group p.
174887 */
174888 SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){
174889 sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */
174890 int rc; /* Return code */
174891
174892 rc = sqlite3changeset_start(&pIter, nData, pData);
174893 if( rc==SQLITE_OK ){
@@ -174874,11 +174899,11 @@
174899
174900 /*
174901 ** Obtain a buffer containing a changeset representing the concatenation
174902 ** of all changesets added to the group so far.
174903 */
174904 SQLITE_API int sqlite3changegroup_output(
174905 sqlite3_changegroup *pGrp,
174906 int *pnData,
174907 void **ppData
174908 ){
174909 return sessionChangegroupOutput(pGrp, 0, 0, pnData, ppData);
@@ -174885,11 +174910,11 @@
174910 }
174911
174912 /*
174913 ** Streaming versions of changegroup_add().
174914 */
174915 SQLITE_API int sqlite3changegroup_add_strm(
174916 sqlite3_changegroup *pGrp,
174917 int (*xInput)(void *pIn, void *pData, int *pnData),
174918 void *pIn
174919 ){
174920 sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */
@@ -174904,11 +174929,11 @@
174929 }
174930
174931 /*
174932 ** Streaming versions of changegroup_output().
174933 */
174934 SQLITE_API int sqlite3changegroup_output_strm(
174935 sqlite3_changegroup *pGrp,
174936 int (*xOutput)(void *pOut, const void *pData, int nData),
174937 void *pOut
174938 ){
174939 return sessionChangegroupOutput(pGrp, xOutput, pOut, 0, 0);
@@ -174915,21 +174940,21 @@
174940 }
174941
174942 /*
174943 ** Delete a changegroup object.
174944 */
174945 SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup *pGrp){
174946 if( pGrp ){
174947 sessionDeleteTable(pGrp->pList);
174948 sqlite3_free(pGrp);
174949 }
174950 }
174951
174952 /*
174953 ** Combine two changesets together.
174954 */
174955 SQLITE_API int sqlite3changeset_concat(
174956 int nLeft, /* Number of bytes in lhs input */
174957 void *pLeft, /* Lhs input changeset */
174958 int nRight /* Number of bytes in rhs input */,
174959 void *pRight, /* Rhs input changeset */
174960 int *pnOut, /* OUT: Number of bytes in output changeset */
@@ -174954,11 +174979,11 @@
174979 }
174980
174981 /*
174982 ** Streaming version of sqlite3changeset_concat().
174983 */
174984 SQLITE_API int sqlite3changeset_concat_strm(
174985 int (*xInputA)(void *pIn, void *pData, int *pnData),
174986 void *pInA,
174987 int (*xInputB)(void *pIn, void *pData, int *pnData),
174988 void *pInB,
174989 int (*xOutput)(void *pOut, const void *pData, int nData),
@@ -177186,11 +177211,11 @@
177211
177212 #ifndef SQLITE_CORE
177213 #ifdef _WIN32
177214 __declspec(dllexport)
177215 #endif
177216 SQLITE_API int sqlite3_json_init(
177217 sqlite3 *db,
177218 char **pzErrMsg,
177219 const sqlite3_api_routines *pApi
177220 ){
177221 SQLITE_EXTENSION_INIT2(pApi);
@@ -194018,11 +194043,11 @@
194043 int nArg, /* Number of args */
194044 sqlite3_value **apUnused /* Function arguments */
194045 ){
194046 assert( nArg==0 );
194047 UNUSED_PARAM2(nArg, apUnused);
194048 sqlite3_result_text(pCtx, "fts5: 2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6", -1, SQLITE_TRANSIENT);
194049 }
194050
194051 static int fts5Init(sqlite3 *db){
194052 static const sqlite3_module fts5Mod = {
194053 /* iVersion */ 2,
@@ -194106,11 +194131,11 @@
194131 */
194132 #ifndef SQLITE_CORE
194133 #ifdef _WIN32
194134 __declspec(dllexport)
194135 #endif
194136 SQLITE_API int sqlite3_fts_init(
194137 sqlite3 *db,
194138 char **pzErrMsg,
194139 const sqlite3_api_routines *pApi
194140 ){
194141 SQLITE_EXTENSION_INIT2(pApi);
@@ -194119,11 +194144,11 @@
194144 }
194145
194146 #ifdef _WIN32
194147 __declspec(dllexport)
194148 #endif
194149 SQLITE_API int sqlite3_fts5_init(
194150 sqlite3 *db,
194151 char **pzErrMsg,
194152 const sqlite3_api_routines *pApi
194153 ){
194154 SQLITE_EXTENSION_INIT2(pApi);
194155
+619 -594
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,17 +1,17 @@
11
/******************************************************************************
22
** This file is an amalgamation of many separate C source files from SQLite
3
-** version 3.14.1. By combining all the individual C code files into this
3
+** version 3.14.2. By combining all the individual C code files into this
44
** single large file, the entire code can be compiled as a single translation
55
** unit. This allows many compilers to do optimizations that would not be
66
** possible if the files were compiled separately. Performance improvements
77
** of 5% or more are commonly seen when SQLite is compiled as a single
88
** translation unit.
99
**
1010
** This file is all you need to compile SQLite. To use SQLite in other
1111
** programs, you need this file and the "sqlite3.h" header file that defines
12
-** the programming interface to the SQLite library. (If you do not have
12
+** the programming interface to the SQLite library. (If you do not have
1313
** the "sqlite3.h" header file at hand, you will find a copy embedded within
1414
** the text of this file. Search for "Begin file sqlite3.h" to find the start
1515
** of the embedded sqlite3.h header file.) Additional code files may be needed
1616
** if you want a wrapper to interface SQLite with your choice of programming
1717
** language. The code for the "sqlite3" command-line shell is also in a
@@ -378,13 +378,13 @@
378378
**
379379
** See also: [sqlite3_libversion()],
380380
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
381381
** [sqlite_version()] and [sqlite_source_id()].
382382
*/
383
-#define SQLITE_VERSION "3.14.1"
384
-#define SQLITE_VERSION_NUMBER 3014001
385
-#define SQLITE_SOURCE_ID "2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b"
383
+#define SQLITE_VERSION "3.14.2"
384
+#define SQLITE_VERSION_NUMBER 3014002
385
+#define SQLITE_SOURCE_ID "2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6"
386386
387387
/*
388388
** CAPI3REF: Run-Time Library Version Numbers
389389
** KEYWORDS: sqlite3_version, sqlite3_sourceid
390390
**
@@ -413,13 +413,13 @@
413413
** [SQLITE_SOURCE_ID] C preprocessor macro.
414414
**
415415
** See also: [sqlite_version()] and [sqlite_source_id()].
416416
*/
417417
SQLITE_API const char sqlite3_version[] = SQLITE_VERSION;
418
-SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void);
419
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void);
420
-SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void);
418
+SQLITE_API const char *sqlite3_libversion(void);
419
+SQLITE_API const char *sqlite3_sourceid(void);
420
+SQLITE_API int sqlite3_libversion_number(void);
421421
422422
/*
423423
** CAPI3REF: Run-Time Library Compilation Options Diagnostics
424424
**
425425
** ^The sqlite3_compileoption_used() function returns 0 or 1
@@ -440,12 +440,12 @@
440440
**
441441
** See also: SQL functions [sqlite_compileoption_used()] and
442442
** [sqlite_compileoption_get()] and the [compile_options pragma].
443443
*/
444444
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
445
-SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName);
446
-SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N);
445
+SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
446
+SQLITE_API const char *sqlite3_compileoption_get(int N);
447447
#endif
448448
449449
/*
450450
** CAPI3REF: Test To See If The Library Is Threadsafe
451451
**
@@ -480,11 +480,11 @@
480480
** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
481481
** is unchanged by calls to sqlite3_config().)^
482482
**
483483
** See the [threading mode] documentation for additional information.
484484
*/
485
-SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void);
485
+SQLITE_API int sqlite3_threadsafe(void);
486486
487487
/*
488488
** CAPI3REF: Database Connection Handle
489489
** KEYWORDS: {database connection} {database connections}
490490
**
@@ -577,12 +577,12 @@
577577
** from [sqlite3_open()], [sqlite3_open16()], or
578578
** [sqlite3_open_v2()], and not previously closed.
579579
** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
580580
** argument is a harmless no-op.
581581
*/
582
-SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*);
583
-SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*);
582
+SQLITE_API int sqlite3_close(sqlite3*);
583
+SQLITE_API int sqlite3_close_v2(sqlite3*);
584584
585585
/*
586586
** The type for a callback function.
587587
** This is legacy and deprecated. It is included for historical
588588
** compatibility and is not documented.
@@ -649,11 +649,11 @@
649649
** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
650650
** <li> The application must not modify the SQL statement text passed into
651651
** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
652652
** </ul>
653653
*/
654
-SQLITE_API int SQLITE_STDCALL sqlite3_exec(
654
+SQLITE_API int sqlite3_exec(
655655
sqlite3*, /* An open database */
656656
const char *sql, /* SQL to be evaluated */
657657
int (*callback)(void*,int,char**,char**), /* Callback function */
658658
void *, /* 1st argument to callback */
659659
char **errmsg /* Error msg written here */
@@ -1648,14 +1648,14 @@
16481648
** sqlite3_os_init() and sqlite3_os_end(). An application-supplied
16491649
** implementation of sqlite3_os_init() or sqlite3_os_end()
16501650
** must return [SQLITE_OK] on success and some other [error code] upon
16511651
** failure.
16521652
*/
1653
-SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void);
1654
-SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void);
1655
-SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void);
1656
-SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void);
1653
+SQLITE_API int sqlite3_initialize(void);
1654
+SQLITE_API int sqlite3_shutdown(void);
1655
+SQLITE_API int sqlite3_os_init(void);
1656
+SQLITE_API int sqlite3_os_end(void);
16571657
16581658
/*
16591659
** CAPI3REF: Configuring The SQLite Library
16601660
**
16611661
** The sqlite3_config() interface is used to make global configuration
@@ -1684,11 +1684,11 @@
16841684
**
16851685
** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
16861686
** ^If the option is unknown or SQLite is unable to set the option
16871687
** then this routine returns a non-zero [error code].
16881688
*/
1689
-SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...);
1689
+SQLITE_API int sqlite3_config(int, ...);
16901690
16911691
/*
16921692
** CAPI3REF: Configure database connections
16931693
** METHOD: sqlite3
16941694
**
@@ -1703,11 +1703,11 @@
17031703
** Subsequent arguments vary depending on the configuration verb.
17041704
**
17051705
** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
17061706
** the call is considered successful.
17071707
*/
1708
-SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...);
1708
+SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
17091709
17101710
/*
17111711
** CAPI3REF: Memory Allocation Routines
17121712
**
17131713
** An instance of this object defines the interface between SQLite
@@ -2244,11 +2244,11 @@
22442244
**
22452245
** ^The sqlite3_extended_result_codes() routine enables or disables the
22462246
** [extended result codes] feature of SQLite. ^The extended result
22472247
** codes are disabled by default for historical compatibility.
22482248
*/
2249
-SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff);
2249
+SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
22502250
22512251
/*
22522252
** CAPI3REF: Last Insert Rowid
22532253
** METHOD: sqlite3
22542254
**
@@ -2296,11 +2296,11 @@
22962296
** function is running and thus changes the last insert [rowid],
22972297
** then the value returned by [sqlite3_last_insert_rowid()] is
22982298
** unpredictable and might not equal either the old or the new
22992299
** last insert [rowid].
23002300
*/
2301
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*);
2301
+SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
23022302
23032303
/*
23042304
** CAPI3REF: Count The Number Of Rows Modified
23052305
** METHOD: sqlite3
23062306
**
@@ -2349,11 +2349,11 @@
23492349
**
23502350
** If a separate thread makes changes on the same database connection
23512351
** while [sqlite3_changes()] is running then the value returned
23522352
** is unpredictable and not meaningful.
23532353
*/
2354
-SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*);
2354
+SQLITE_API int sqlite3_changes(sqlite3*);
23552355
23562356
/*
23572357
** CAPI3REF: Total Number Of Rows Modified
23582358
** METHOD: sqlite3
23592359
**
@@ -2373,11 +2373,11 @@
23732373
**
23742374
** If a separate thread makes changes on the same database connection
23752375
** while [sqlite3_total_changes()] is running then the value
23762376
** returned is unpredictable and not meaningful.
23772377
*/
2378
-SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*);
2378
+SQLITE_API int sqlite3_total_changes(sqlite3*);
23792379
23802380
/*
23812381
** CAPI3REF: Interrupt A Long-Running Query
23822382
** METHOD: sqlite3
23832383
**
@@ -2413,11 +2413,11 @@
24132413
** that are started after the sqlite3_interrupt() call returns.
24142414
**
24152415
** If the database connection closes while [sqlite3_interrupt()]
24162416
** is running then bad things will likely happen.
24172417
*/
2418
-SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*);
2418
+SQLITE_API void sqlite3_interrupt(sqlite3*);
24192419
24202420
/*
24212421
** CAPI3REF: Determine If An SQL Statement Is Complete
24222422
**
24232423
** These routines are useful during command-line input to determine if the
@@ -2448,12 +2448,12 @@
24482448
** UTF-8 string.
24492449
**
24502450
** The input to [sqlite3_complete16()] must be a zero-terminated
24512451
** UTF-16 string in native byte order.
24522452
*/
2453
-SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql);
2454
-SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql);
2453
+SQLITE_API int sqlite3_complete(const char *sql);
2454
+SQLITE_API int sqlite3_complete16(const void *sql);
24552455
24562456
/*
24572457
** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
24582458
** KEYWORDS: {busy-handler callback} {busy handler}
24592459
** METHOD: sqlite3
@@ -2510,11 +2510,11 @@
25102510
** result in undefined behavior.
25112511
**
25122512
** A busy handler must not close the database connection
25132513
** or [prepared statement] that invoked the busy handler.
25142514
*/
2515
-SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2515
+SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
25162516
25172517
/*
25182518
** CAPI3REF: Set A Busy Timeout
25192519
** METHOD: sqlite3
25202520
**
@@ -2533,11 +2533,11 @@
25332533
** was defined (using [sqlite3_busy_handler()]) prior to calling
25342534
** this routine, that other busy handler is cleared.)^
25352535
**
25362536
** See also: [PRAGMA busy_timeout]
25372537
*/
2538
-SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms);
2538
+SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
25392539
25402540
/*
25412541
** CAPI3REF: Convenience Routines For Running Queries
25422542
** METHOD: sqlite3
25432543
**
@@ -2608,19 +2608,19 @@
26082608
** interface defined here. As a consequence, errors that occur in the
26092609
** wrapper layer outside of the internal [sqlite3_exec()] call are not
26102610
** reflected in subsequent calls to [sqlite3_errcode()] or
26112611
** [sqlite3_errmsg()].
26122612
*/
2613
-SQLITE_API int SQLITE_STDCALL sqlite3_get_table(
2613
+SQLITE_API int sqlite3_get_table(
26142614
sqlite3 *db, /* An open database */
26152615
const char *zSql, /* SQL to be evaluated */
26162616
char ***pazResult, /* Results of the query */
26172617
int *pnRow, /* Number of result rows written here */
26182618
int *pnColumn, /* Number of result columns written here */
26192619
char **pzErrmsg /* Error msg written here */
26202620
);
2621
-SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result);
2621
+SQLITE_API void sqlite3_free_table(char **result);
26222622
26232623
/*
26242624
** CAPI3REF: Formatted String Printing Functions
26252625
**
26262626
** These routines are work-alikes of the "printf()" family of functions
@@ -2722,14 +2722,14 @@
27222722
**
27232723
** ^(The "%z" formatting option works like "%s" but with the
27242724
** addition that after the string has been read and copied into
27252725
** the result, [sqlite3_free()] is called on the input string.)^
27262726
*/
2727
-SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...);
2728
-SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list);
2729
-SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...);
2730
-SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list);
2727
+SQLITE_API char *sqlite3_mprintf(const char*,...);
2728
+SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
2729
+SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
2730
+SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
27312731
27322732
/*
27332733
** CAPI3REF: Memory Allocation Subsystem
27342734
**
27352735
** The SQLite core uses these three routines for all of its own
@@ -2815,16 +2815,16 @@
28152815
**
28162816
** The application must not read or write any part of
28172817
** a block of memory after it has been released using
28182818
** [sqlite3_free()] or [sqlite3_realloc()].
28192819
*/
2820
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int);
2821
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64);
2822
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int);
2823
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64);
2824
-SQLITE_API void SQLITE_STDCALL sqlite3_free(void*);
2825
-SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*);
2820
+SQLITE_API void *sqlite3_malloc(int);
2821
+SQLITE_API void *sqlite3_malloc64(sqlite3_uint64);
2822
+SQLITE_API void *sqlite3_realloc(void*, int);
2823
+SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64);
2824
+SQLITE_API void sqlite3_free(void*);
2825
+SQLITE_API sqlite3_uint64 sqlite3_msize(void*);
28262826
28272827
/*
28282828
** CAPI3REF: Memory Allocator Statistics
28292829
**
28302830
** SQLite provides these two interfaces for reporting on the status
@@ -2845,12 +2845,12 @@
28452845
** [sqlite3_memory_used()] if and only if the parameter to
28462846
** [sqlite3_memory_highwater()] is true. ^The value returned
28472847
** by [sqlite3_memory_highwater(1)] is the high-water mark
28482848
** prior to the reset.
28492849
*/
2850
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void);
2851
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag);
2850
+SQLITE_API sqlite3_int64 sqlite3_memory_used(void);
2851
+SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
28522852
28532853
/*
28542854
** CAPI3REF: Pseudo-Random Number Generator
28552855
**
28562856
** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
@@ -2869,11 +2869,11 @@
28692869
** ^If the previous call to this routine had an N of 1 or more and a
28702870
** non-NULL P then the pseudo-randomness is generated
28712871
** internally and without recourse to the [sqlite3_vfs] xRandomness
28722872
** method.
28732873
*/
2874
-SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P);
2874
+SQLITE_API void sqlite3_randomness(int N, void *P);
28752875
28762876
/*
28772877
** CAPI3REF: Compile-Time Authorization Callbacks
28782878
** METHOD: sqlite3
28792879
**
@@ -2952,11 +2952,11 @@
29522952
** [sqlite3_prepare()] or its variants. Authorization is not
29532953
** performed during statement evaluation in [sqlite3_step()], unless
29542954
** as stated in the previous paragraph, sqlite3_step() invokes
29552955
** sqlite3_prepare_v2() to reprepare a statement after a schema change.
29562956
*/
2957
-SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
2957
+SQLITE_API int sqlite3_set_authorizer(
29582958
sqlite3*,
29592959
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
29602960
void *pUserData
29612961
);
29622962
@@ -3060,13 +3060,13 @@
30603060
** digits in the time are meaningless. Future versions of SQLite
30613061
** might provide greater resolution on the profiler callback. The
30623062
** sqlite3_profile() function is considered experimental and is
30633063
** subject to change in future versions of SQLite.
30643064
*/
3065
-SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*,
3065
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,
30663066
void(*xTrace)(void*,const char*), void*);
3067
-SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_profile(sqlite3*,
3067
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
30683068
void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
30693069
30703070
/*
30713071
** CAPI3REF: SQL Trace Event Codes
30723072
** KEYWORDS: SQLITE_TRACE
@@ -3151,11 +3151,11 @@
31513151
**
31523152
** The sqlite3_trace_v2() interface is intended to replace the legacy
31533153
** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
31543154
** are deprecated.
31553155
*/
3156
-SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2(
3156
+SQLITE_API int sqlite3_trace_v2(
31573157
sqlite3*,
31583158
unsigned uMask,
31593159
int(*xCallback)(unsigned,void*,void*,void*),
31603160
void *pCtx
31613161
);
@@ -3190,11 +3190,11 @@
31903190
** the database connection that invoked the progress handler.
31913191
** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
31923192
** database connections for the meaning of "modify" in this paragraph.
31933193
**
31943194
*/
3195
-SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
3195
+SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
31963196
31973197
/*
31983198
** CAPI3REF: Opening A New Database Connection
31993199
** CONSTRUCTOR: sqlite3
32003200
**
@@ -3419,19 +3419,19 @@
34193419
** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
34203420
** features that require the use of temporary files may fail.
34213421
**
34223422
** See also: [sqlite3_temp_directory]
34233423
*/
3424
-SQLITE_API int SQLITE_STDCALL sqlite3_open(
3424
+SQLITE_API int sqlite3_open(
34253425
const char *filename, /* Database filename (UTF-8) */
34263426
sqlite3 **ppDb /* OUT: SQLite db handle */
34273427
);
3428
-SQLITE_API int SQLITE_STDCALL sqlite3_open16(
3428
+SQLITE_API int sqlite3_open16(
34293429
const void *filename, /* Database filename (UTF-16) */
34303430
sqlite3 **ppDb /* OUT: SQLite db handle */
34313431
);
3432
-SQLITE_API int SQLITE_STDCALL sqlite3_open_v2(
3432
+SQLITE_API int sqlite3_open_v2(
34333433
const char *filename, /* Database filename (UTF-8) */
34343434
sqlite3 **ppDb, /* OUT: SQLite db handle */
34353435
int flags, /* Flags */
34363436
const char *zVfs /* Name of VFS module to use */
34373437
);
@@ -3473,13 +3473,13 @@
34733473
** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and
34743474
** is not a database file pathname pointer that SQLite passed into the xOpen
34753475
** VFS method, then the behavior of this routine is undefined and probably
34763476
** undesirable.
34773477
*/
3478
-SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3479
-SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3480
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
3478
+SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3479
+SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3480
+SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
34813481
34823482
34833483
/*
34843484
** CAPI3REF: Error Codes And Messages
34853485
** METHOD: sqlite3
@@ -3519,15 +3519,15 @@
35193519
**
35203520
** If an interface fails with SQLITE_MISUSE, that means the interface
35213521
** was invoked incorrectly by the application. In that case, the
35223522
** error code and message may or may not be set.
35233523
*/
3524
-SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db);
3525
-SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db);
3526
-SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*);
3527
-SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*);
3528
-SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int);
3524
+SQLITE_API int sqlite3_errcode(sqlite3 *db);
3525
+SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
3526
+SQLITE_API const char *sqlite3_errmsg(sqlite3*);
3527
+SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
3528
+SQLITE_API const char *sqlite3_errstr(int);
35293529
35303530
/*
35313531
** CAPI3REF: Prepared Statement Object
35323532
** KEYWORDS: {prepared statement} {prepared statements}
35333533
**
@@ -3591,11 +3591,11 @@
35913591
** created by an untrusted script can be contained using the
35923592
** [max_page_count] [PRAGMA].
35933593
**
35943594
** New run-time limit categories may be added in future releases.
35953595
*/
3596
-SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal);
3596
+SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
35973597
35983598
/*
35993599
** CAPI3REF: Run-Time Limit Categories
36003600
** KEYWORDS: {limit category} {*limit categories}
36013601
**
@@ -3743,32 +3743,32 @@
37433743
** or [GLOB] operator or if the parameter is compared to an indexed column
37443744
** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
37453745
** </li>
37463746
** </ol>
37473747
*/
3748
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare(
3748
+SQLITE_API int sqlite3_prepare(
37493749
sqlite3 *db, /* Database handle */
37503750
const char *zSql, /* SQL statement, UTF-8 encoded */
37513751
int nByte, /* Maximum length of zSql in bytes. */
37523752
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
37533753
const char **pzTail /* OUT: Pointer to unused portion of zSql */
37543754
);
3755
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2(
3755
+SQLITE_API int sqlite3_prepare_v2(
37563756
sqlite3 *db, /* Database handle */
37573757
const char *zSql, /* SQL statement, UTF-8 encoded */
37583758
int nByte, /* Maximum length of zSql in bytes. */
37593759
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
37603760
const char **pzTail /* OUT: Pointer to unused portion of zSql */
37613761
);
3762
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare16(
3762
+SQLITE_API int sqlite3_prepare16(
37633763
sqlite3 *db, /* Database handle */
37643764
const void *zSql, /* SQL statement, UTF-16 encoded */
37653765
int nByte, /* Maximum length of zSql in bytes. */
37663766
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
37673767
const void **pzTail /* OUT: Pointer to unused portion of zSql */
37683768
);
3769
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
3769
+SQLITE_API int sqlite3_prepare16_v2(
37703770
sqlite3 *db, /* Database handle */
37713771
const void *zSql, /* SQL statement, UTF-16 encoded */
37723772
int nByte, /* Maximum length of zSql in bytes. */
37733773
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
37743774
const void **pzTail /* OUT: Pointer to unused portion of zSql */
@@ -3803,12 +3803,12 @@
38033803
** automatically freed when the prepared statement is finalized.
38043804
** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
38053805
** is obtained from [sqlite3_malloc()] and must be free by the application
38063806
** by passing it to [sqlite3_free()].
38073807
*/
3808
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt);
3809
-SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt);
3808
+SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
3809
+SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt);
38103810
38113811
/*
38123812
** CAPI3REF: Determine If An SQL Statement Writes The Database
38133813
** METHOD: sqlite3_stmt
38143814
**
@@ -3836,11 +3836,11 @@
38363836
** database. ^The [ATTACH] and [DETACH] statements also cause
38373837
** sqlite3_stmt_readonly() to return true since, while those statements
38383838
** change the configuration of a database connection, they do not make
38393839
** changes to the content of the database files on disk.
38403840
*/
3841
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
3841
+SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
38423842
38433843
/*
38443844
** CAPI3REF: Determine If A Prepared Statement Has Been Reset
38453845
** METHOD: sqlite3_stmt
38463846
**
@@ -3857,11 +3857,11 @@
38573857
** to locate all prepared statements associated with a database
38583858
** connection that are in need of being reset. This can be used,
38593859
** for example, in diagnostic routines to search for prepared
38603860
** statements that are holding a transaction open.
38613861
*/
3862
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*);
3862
+SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
38633863
38643864
/*
38653865
** CAPI3REF: Dynamically Typed Value Object
38663866
** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
38673867
**
@@ -4021,24 +4021,24 @@
40214021
** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
40224022
**
40234023
** See also: [sqlite3_bind_parameter_count()],
40244024
** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
40254025
*/
4026
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
4027
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
4026
+SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
4027
+SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
40284028
void(*)(void*));
4029
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double);
4030
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int);
4031
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
4032
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int);
4033
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
4034
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
4035
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
4029
+SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
4030
+SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
4031
+SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
4032
+SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
4033
+SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
4034
+SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
4035
+SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
40364036
void(*)(void*), unsigned char encoding);
4037
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
4038
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
4039
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
4037
+SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
4038
+SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
4039
+SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
40404040
40414041
/*
40424042
** CAPI3REF: Number Of SQL Parameters
40434043
** METHOD: sqlite3_stmt
40444044
**
@@ -4055,11 +4055,11 @@
40554055
**
40564056
** See also: [sqlite3_bind_blob|sqlite3_bind()],
40574057
** [sqlite3_bind_parameter_name()], and
40584058
** [sqlite3_bind_parameter_index()].
40594059
*/
4060
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*);
4060
+SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
40614061
40624062
/*
40634063
** CAPI3REF: Name Of A Host Parameter
40644064
** METHOD: sqlite3_stmt
40654065
**
@@ -4083,11 +4083,11 @@
40834083
**
40844084
** See also: [sqlite3_bind_blob|sqlite3_bind()],
40854085
** [sqlite3_bind_parameter_count()], and
40864086
** [sqlite3_bind_parameter_index()].
40874087
*/
4088
-SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int);
4088
+SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
40894089
40904090
/*
40914091
** CAPI3REF: Index Of A Parameter With A Given Name
40924092
** METHOD: sqlite3_stmt
40934093
**
@@ -4100,21 +4100,21 @@
41004100
**
41014101
** See also: [sqlite3_bind_blob|sqlite3_bind()],
41024102
** [sqlite3_bind_parameter_count()], and
41034103
** [sqlite3_bind_parameter_name()].
41044104
*/
4105
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
4105
+SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
41064106
41074107
/*
41084108
** CAPI3REF: Reset All Bindings On A Prepared Statement
41094109
** METHOD: sqlite3_stmt
41104110
**
41114111
** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
41124112
** the [sqlite3_bind_blob | bindings] on a [prepared statement].
41134113
** ^Use this routine to reset all host parameters to NULL.
41144114
*/
4115
-SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*);
4115
+SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
41164116
41174117
/*
41184118
** CAPI3REF: Number Of Columns In A Result Set
41194119
** METHOD: sqlite3_stmt
41204120
**
@@ -4122,11 +4122,11 @@
41224122
** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
41234123
** statement that does not return data (for example an [UPDATE]).
41244124
**
41254125
** See also: [sqlite3_data_count()]
41264126
*/
4127
-SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt);
4127
+SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
41284128
41294129
/*
41304130
** CAPI3REF: Column Names In A Result Set
41314131
** METHOD: sqlite3_stmt
41324132
**
@@ -4151,12 +4151,12 @@
41514151
** ^The name of a result column is the value of the "AS" clause for
41524152
** that column, if there is an AS clause. If there is no AS clause
41534153
** then the name of the column is unspecified and may change from
41544154
** one release of SQLite to the next.
41554155
*/
4156
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N);
4157
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N);
4156
+SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
4157
+SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
41584158
41594159
/*
41604160
** CAPI3REF: Source Of Data In A Query Result
41614161
** METHOD: sqlite3_stmt
41624162
**
@@ -4200,16 +4200,16 @@
42004200
** If two or more threads call one or more
42014201
** [sqlite3_column_database_name | column metadata interfaces]
42024202
** for the same [prepared statement] and result column
42034203
** at the same time then the results are undefined.
42044204
*/
4205
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int);
4206
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int);
4207
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int);
4208
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int);
4209
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int);
4210
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int);
4205
+SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
4206
+SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
4207
+SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
4208
+SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
4209
+SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
4210
+SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
42114211
42124212
/*
42134213
** CAPI3REF: Declared Datatype Of A Query Result
42144214
** METHOD: sqlite3_stmt
42154215
**
@@ -4237,12 +4237,12 @@
42374237
** data stored in that column is of the declared type. SQLite is
42384238
** strongly typed, but the typing is dynamic not static. ^Type
42394239
** is associated with individual values, not with the containers
42404240
** used to hold those values.
42414241
*/
4242
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int);
4243
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int);
4242
+SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
4243
+SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
42444244
42454245
/*
42464246
** CAPI3REF: Evaluate An SQL Statement
42474247
** METHOD: sqlite3_stmt
42484248
**
@@ -4318,11 +4318,11 @@
43184318
** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
43194319
** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
43204320
** then the more specific [error codes] are returned directly
43214321
** by sqlite3_step(). The use of the "v2" interface is recommended.
43224322
*/
4323
-SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*);
4323
+SQLITE_API int sqlite3_step(sqlite3_stmt*);
43244324
43254325
/*
43264326
** CAPI3REF: Number of columns in a result set
43274327
** METHOD: sqlite3_stmt
43284328
**
@@ -4339,11 +4339,11 @@
43394339
** where it always returns zero since each step of that multi-step
43404340
** pragma returns 0 columns of data.
43414341
**
43424342
** See also: [sqlite3_column_count()]
43434343
*/
4344
-SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
4344
+SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
43454345
43464346
/*
43474347
** CAPI3REF: Fundamental Datatypes
43484348
** KEYWORDS: SQLITE_TEXT
43494349
**
@@ -4529,20 +4529,20 @@
45294529
** of these routines, a default value is returned. The default value
45304530
** is either the integer 0, the floating point number 0.0, or a NULL
45314531
** pointer. Subsequent calls to [sqlite3_errcode()] will return
45324532
** [SQLITE_NOMEM].)^
45334533
*/
4534
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol);
4535
-SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4536
-SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4537
-SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol);
4538
-SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol);
4539
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol);
4540
-SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol);
4541
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol);
4542
-SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol);
4543
-SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol);
4534
+SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
4535
+SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4536
+SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4537
+SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
4538
+SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
4539
+SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
4540
+SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
4541
+SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
4542
+SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
4543
+SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
45444544
45454545
/*
45464546
** CAPI3REF: Destroy A Prepared Statement Object
45474547
** DESTRUCTOR: sqlite3_stmt
45484548
**
@@ -4566,11 +4566,11 @@
45664566
** resource leaks. It is a grievous error for the application to try to use
45674567
** a prepared statement after it has been finalized. Any use of a prepared
45684568
** statement after it has been finalized can result in undefined and
45694569
** undesirable behavior such as segfaults and heap corruption.
45704570
*/
4571
-SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt);
4571
+SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
45724572
45734573
/*
45744574
** CAPI3REF: Reset A Prepared Statement Object
45754575
** METHOD: sqlite3_stmt
45764576
**
@@ -4593,11 +4593,11 @@
45934593
** [sqlite3_reset(S)] returns an appropriate [error code].
45944594
**
45954595
** ^The [sqlite3_reset(S)] interface does not change the values
45964596
** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
45974597
*/
4598
-SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt);
4598
+SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
45994599
46004600
/*
46014601
** CAPI3REF: Create Or Redefine SQL Functions
46024602
** KEYWORDS: {function creation routines}
46034603
** KEYWORDS: {application-defined SQL function}
@@ -4693,31 +4693,31 @@
46934693
** ^An application-defined function is permitted to call other
46944694
** SQLite interfaces. However, such calls must not
46954695
** close the database connection nor finalize or reset the prepared
46964696
** statement in which the function is running.
46974697
*/
4698
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function(
4698
+SQLITE_API int sqlite3_create_function(
46994699
sqlite3 *db,
47004700
const char *zFunctionName,
47014701
int nArg,
47024702
int eTextRep,
47034703
void *pApp,
47044704
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
47054705
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
47064706
void (*xFinal)(sqlite3_context*)
47074707
);
4708
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function16(
4708
+SQLITE_API int sqlite3_create_function16(
47094709
sqlite3 *db,
47104710
const void *zFunctionName,
47114711
int nArg,
47124712
int eTextRep,
47134713
void *pApp,
47144714
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
47154715
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
47164716
void (*xFinal)(sqlite3_context*)
47174717
);
4718
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2(
4718
+SQLITE_API int sqlite3_create_function_v2(
47194719
sqlite3 *db,
47204720
const char *zFunctionName,
47214721
int nArg,
47224722
int eTextRep,
47234723
void *pApp,
@@ -4759,16 +4759,16 @@
47594759
** to be supported. However, new applications should avoid
47604760
** the use of these functions. To encourage programmers to avoid
47614761
** these functions, we will not explain what they do.
47624762
*/
47634763
#ifndef SQLITE_OMIT_DEPRECATED
4764
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*);
4765
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*);
4766
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4767
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void);
4768
-SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void);
4769
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
4764
+SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
4765
+SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
4766
+SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4767
+SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
4768
+SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
4769
+SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
47704770
void*,sqlite3_int64);
47714771
#endif
47724772
47734773
/*
47744774
** CAPI3REF: Obtaining SQL Values
@@ -4814,22 +4814,22 @@
48144814
** or [sqlite3_value_text16()].
48154815
**
48164816
** These routines must be called from the same thread as
48174817
** the SQL function that supplied the [sqlite3_value*] parameters.
48184818
*/
4819
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*);
4820
-SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*);
4821
-SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*);
4822
-SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*);
4823
-SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*);
4824
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*);
4825
-SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*);
4826
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*);
4827
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*);
4828
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*);
4829
-SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*);
4830
-SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*);
4819
+SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
4820
+SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
4821
+SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
4822
+SQLITE_API double sqlite3_value_double(sqlite3_value*);
4823
+SQLITE_API int sqlite3_value_int(sqlite3_value*);
4824
+SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
4825
+SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
4826
+SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
4827
+SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
4828
+SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
4829
+SQLITE_API int sqlite3_value_type(sqlite3_value*);
4830
+SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
48314831
48324832
/*
48334833
** CAPI3REF: Finding The Subtype Of SQL Values
48344834
** METHOD: sqlite3_value
48354835
**
@@ -4841,11 +4841,11 @@
48414841
**
48424842
** SQLite makes no use of subtype itself. It merely passes the subtype
48434843
** from the result of one [application-defined SQL function] into the
48444844
** input of another.
48454845
*/
4846
-SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*);
4846
+SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
48474847
48484848
/*
48494849
** CAPI3REF: Copy And Free SQL Values
48504850
** METHOD: sqlite3_value
48514851
**
@@ -4857,12 +4857,12 @@
48574857
**
48584858
** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
48594859
** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
48604860
** then sqlite3_value_free(V) is a harmless no-op.
48614861
*/
4862
-SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*);
4863
-SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*);
4862
+SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*);
4863
+SQLITE_API void sqlite3_value_free(sqlite3_value*);
48644864
48654865
/*
48664866
** CAPI3REF: Obtain Aggregate Function Context
48674867
** METHOD: sqlite3_context
48684868
**
@@ -4903,11 +4903,11 @@
49034903
** function.
49044904
**
49054905
** This routine must be called from the same thread in which
49064906
** the aggregate SQL function is running.
49074907
*/
4908
-SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes);
4908
+SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
49094909
49104910
/*
49114911
** CAPI3REF: User Data For Functions
49124912
** METHOD: sqlite3_context
49134913
**
@@ -4918,11 +4918,11 @@
49184918
** registered the application defined function.
49194919
**
49204920
** This routine must be called from the same thread in which
49214921
** the application-defined function is running.
49224922
*/
4923
-SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*);
4923
+SQLITE_API void *sqlite3_user_data(sqlite3_context*);
49244924
49254925
/*
49264926
** CAPI3REF: Database Connection For Functions
49274927
** METHOD: sqlite3_context
49284928
**
@@ -4930,11 +4930,11 @@
49304930
** the pointer to the [database connection] (the 1st parameter)
49314931
** of the [sqlite3_create_function()]
49324932
** and [sqlite3_create_function16()] routines that originally
49334933
** registered the application defined function.
49344934
*/
4935
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*);
4935
+SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
49364936
49374937
/*
49384938
** CAPI3REF: Function Auxiliary Data
49394939
** METHOD: sqlite3_context
49404940
**
@@ -4984,12 +4984,12 @@
49844984
** values and [parameters] and expressions composed from the same.)^
49854985
**
49864986
** These routines must be called from the same thread in which
49874987
** the SQL function is running.
49884988
*/
4989
-SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N);
4990
-SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
4989
+SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
4990
+SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
49914991
49924992
49934993
/*
49944994
** CAPI3REF: Constants Defining Special Destructor Behavior
49954995
**
@@ -5121,31 +5121,31 @@
51215121
**
51225122
** If these routines are called from within the different thread
51235123
** than the one containing the application-defined function that received
51245124
** the [sqlite3_context] pointer, the results are undefined.
51255125
*/
5126
-SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
5127
-SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*,
5126
+SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
5127
+SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,
51285128
sqlite3_uint64,void(*)(void*));
5129
-SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double);
5130
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int);
5131
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int);
5132
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*);
5133
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*);
5134
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int);
5135
-SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int);
5136
-SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
5137
-SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*);
5138
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
5139
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
5129
+SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
5130
+SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
5131
+SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
5132
+SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
5133
+SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
5134
+SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
5135
+SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
5136
+SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
5137
+SQLITE_API void sqlite3_result_null(sqlite3_context*);
5138
+SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
5139
+SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
51405140
void(*)(void*), unsigned char encoding);
5141
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
5142
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
5143
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
5144
-SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
5145
-SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
5146
-SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
5141
+SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
5142
+SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
5143
+SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
5144
+SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
5145
+SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
5146
+SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
51475147
51485148
51495149
/*
51505150
** CAPI3REF: Setting The Subtype Of An SQL Function
51515151
** METHOD: sqlite3_context
@@ -5156,11 +5156,11 @@
51565156
** of the subtype T are preserved in current versions of SQLite;
51575157
** higher order bits are discarded.
51585158
** The number of subtype bytes preserved by SQLite might increase
51595159
** in future releases of SQLite.
51605160
*/
5161
-SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int);
5161
+SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
51625162
51635163
/*
51645164
** CAPI3REF: Define New Collating Sequences
51655165
** METHOD: sqlite3
51665166
**
@@ -5238,26 +5238,26 @@
52385238
** is unfortunate but cannot be changed without breaking backwards
52395239
** compatibility.
52405240
**
52415241
** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
52425242
*/
5243
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation(
5243
+SQLITE_API int sqlite3_create_collation(
52445244
sqlite3*,
52455245
const char *zName,
52465246
int eTextRep,
52475247
void *pArg,
52485248
int(*xCompare)(void*,int,const void*,int,const void*)
52495249
);
5250
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2(
5250
+SQLITE_API int sqlite3_create_collation_v2(
52515251
sqlite3*,
52525252
const char *zName,
52535253
int eTextRep,
52545254
void *pArg,
52555255
int(*xCompare)(void*,int,const void*,int,const void*),
52565256
void(*xDestroy)(void*)
52575257
);
5258
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16(
5258
+SQLITE_API int sqlite3_create_collation16(
52595259
sqlite3*,
52605260
const void *zName,
52615261
int eTextRep,
52625262
void *pArg,
52635263
int(*xCompare)(void*,int,const void*,int,const void*)
@@ -5288,16 +5288,16 @@
52885288
**
52895289
** The callback function should register the desired collation using
52905290
** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
52915291
** [sqlite3_create_collation_v2()].
52925292
*/
5293
-SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed(
5293
+SQLITE_API int sqlite3_collation_needed(
52945294
sqlite3*,
52955295
void*,
52965296
void(*)(void*,sqlite3*,int eTextRep,const char*)
52975297
);
5298
-SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16(
5298
+SQLITE_API int sqlite3_collation_needed16(
52995299
sqlite3*,
53005300
void*,
53015301
void(*)(void*,sqlite3*,int eTextRep,const void*)
53025302
);
53035303
@@ -5307,15 +5307,15 @@
53075307
** called right after sqlite3_open().
53085308
**
53095309
** The code to implement this API is not available in the public release
53105310
** of SQLite.
53115311
*/
5312
-SQLITE_API int SQLITE_STDCALL sqlite3_key(
5312
+SQLITE_API int sqlite3_key(
53135313
sqlite3 *db, /* Database to be rekeyed */
53145314
const void *pKey, int nKey /* The key */
53155315
);
5316
-SQLITE_API int SQLITE_STDCALL sqlite3_key_v2(
5316
+SQLITE_API int sqlite3_key_v2(
53175317
sqlite3 *db, /* Database to be rekeyed */
53185318
const char *zDbName, /* Name of the database */
53195319
const void *pKey, int nKey /* The key */
53205320
);
53215321
@@ -5325,35 +5325,35 @@
53255325
** database is decrypted.
53265326
**
53275327
** The code to implement this API is not available in the public release
53285328
** of SQLite.
53295329
*/
5330
-SQLITE_API int SQLITE_STDCALL sqlite3_rekey(
5330
+SQLITE_API int sqlite3_rekey(
53315331
sqlite3 *db, /* Database to be rekeyed */
53325332
const void *pKey, int nKey /* The new key */
53335333
);
5334
-SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2(
5334
+SQLITE_API int sqlite3_rekey_v2(
53355335
sqlite3 *db, /* Database to be rekeyed */
53365336
const char *zDbName, /* Name of the database */
53375337
const void *pKey, int nKey /* The new key */
53385338
);
53395339
53405340
/*
53415341
** Specify the activation key for a SEE database. Unless
53425342
** activated, none of the SEE routines will work.
53435343
*/
5344
-SQLITE_API void SQLITE_STDCALL sqlite3_activate_see(
5344
+SQLITE_API void sqlite3_activate_see(
53455345
const char *zPassPhrase /* Activation phrase */
53465346
);
53475347
#endif
53485348
53495349
#ifdef SQLITE_ENABLE_CEROD
53505350
/*
53515351
** Specify the activation key for a CEROD database. Unless
53525352
** activated, none of the CEROD routines will work.
53535353
*/
5354
-SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod(
5354
+SQLITE_API void sqlite3_activate_cerod(
53555355
const char *zPassPhrase /* Activation phrase */
53565356
);
53575357
#endif
53585358
53595359
/*
@@ -5371,11 +5371,11 @@
53715371
** method of the default [sqlite3_vfs] object. If the xSleep() method
53725372
** of the default VFS is not implemented correctly, or not implemented at
53735373
** all, then the behavior of sqlite3_sleep() may deviate from the description
53745374
** in the previous paragraphs.
53755375
*/
5376
-SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int);
5376
+SQLITE_API int sqlite3_sleep(int);
53775377
53785378
/*
53795379
** CAPI3REF: Name Of The Folder Holding Temporary Files
53805380
**
53815381
** ^(If this global variable is made to point to a string which is
@@ -5490,11 +5490,11 @@
54905490
**
54915491
** If another thread changes the autocommit status of the database
54925492
** connection while this routine is running, then the return value
54935493
** is undefined.
54945494
*/
5495
-SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*);
5495
+SQLITE_API int sqlite3_get_autocommit(sqlite3*);
54965496
54975497
/*
54985498
** CAPI3REF: Find The Database Handle Of A Prepared Statement
54995499
** METHOD: sqlite3_stmt
55005500
**
@@ -5503,11 +5503,11 @@
55035503
** returned by sqlite3_db_handle is the same [database connection]
55045504
** that was the first argument
55055505
** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
55065506
** create the statement in the first place.
55075507
*/
5508
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*);
5508
+SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
55095509
55105510
/*
55115511
** CAPI3REF: Return The Filename For A Database Connection
55125512
** METHOD: sqlite3
55135513
**
@@ -5520,21 +5520,21 @@
55205520
** ^The filename returned by this function is the output of the
55215521
** xFullPathname method of the [VFS]. ^In other words, the filename
55225522
** will be an absolute pathname, even if the filename used
55235523
** to open the database originally was a URI or relative pathname.
55245524
*/
5525
-SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName);
5525
+SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);
55265526
55275527
/*
55285528
** CAPI3REF: Determine if a database is read-only
55295529
** METHOD: sqlite3
55305530
**
55315531
** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N
55325532
** of connection D is read-only, 0 if it is read/write, or -1 if N is not
55335533
** the name of a database on connection D.
55345534
*/
5535
-SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
5535
+SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
55365536
55375537
/*
55385538
** CAPI3REF: Find the next prepared statement
55395539
** METHOD: sqlite3
55405540
**
@@ -5546,11 +5546,11 @@
55465546
**
55475547
** The [database connection] pointer D in a call to
55485548
** [sqlite3_next_stmt(D,S)] must refer to an open database
55495549
** connection and in particular must not be a NULL pointer.
55505550
*/
5551
-SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
5551
+SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
55525552
55535553
/*
55545554
** CAPI3REF: Commit And Rollback Notification Callbacks
55555555
** METHOD: sqlite3
55565556
**
@@ -5595,12 +5595,12 @@
55955595
** ^The rollback callback is not invoked if a transaction is
55965596
** automatically rolled back because the database connection is closed.
55975597
**
55985598
** See also the [sqlite3_update_hook()] interface.
55995599
*/
5600
-SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5601
-SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5600
+SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5601
+SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
56025602
56035603
/*
56045604
** CAPI3REF: Data Change Notification Callbacks
56055605
** METHOD: sqlite3
56065606
**
@@ -5647,11 +5647,11 @@
56475647
** the first call on D.
56485648
**
56495649
** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
56505650
** and [sqlite3_preupdate_hook()] interfaces.
56515651
*/
5652
-SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
5652
+SQLITE_API void *sqlite3_update_hook(
56535653
sqlite3*,
56545654
void(*)(void *,int ,char const *,char const *,sqlite3_int64),
56555655
void*
56565656
);
56575657
@@ -5687,11 +5687,11 @@
56875687
** This interface is threadsafe on processors where writing a
56885688
** 32-bit integer is atomic.
56895689
**
56905690
** See Also: [SQLite Shared-Cache Mode]
56915691
*/
5692
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int);
5692
+SQLITE_API int sqlite3_enable_shared_cache(int);
56935693
56945694
/*
56955695
** CAPI3REF: Attempt To Free Heap Memory
56965696
**
56975697
** ^The sqlite3_release_memory() interface attempts to free N bytes
@@ -5703,11 +5703,11 @@
57035703
** ^The sqlite3_release_memory() routine is a no-op returning zero
57045704
** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
57055705
**
57065706
** See also: [sqlite3_db_release_memory()]
57075707
*/
5708
-SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int);
5708
+SQLITE_API int sqlite3_release_memory(int);
57095709
57105710
/*
57115711
** CAPI3REF: Free Memory Used By A Database Connection
57125712
** METHOD: sqlite3
57135713
**
@@ -5717,11 +5717,11 @@
57175717
** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is
57185718
** omitted.
57195719
**
57205720
** See also: [sqlite3_release_memory()]
57215721
*/
5722
-SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*);
5722
+SQLITE_API int sqlite3_db_release_memory(sqlite3*);
57235723
57245724
/*
57255725
** CAPI3REF: Impose A Limit On Heap Size
57265726
**
57275727
** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
@@ -5769,11 +5769,11 @@
57695769
** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT].
57705770
**
57715771
** The circumstances under which SQLite will enforce the soft heap limit may
57725772
** changes in future releases of SQLite.
57735773
*/
5774
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N);
5774
+SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
57755775
57765776
/*
57775777
** CAPI3REF: Deprecated Soft Heap Limit Interface
57785778
** DEPRECATED
57795779
**
@@ -5780,11 +5780,11 @@
57805780
** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
57815781
** interface. This routine is provided for historical compatibility
57825782
** only. All new applications should use the
57835783
** [sqlite3_soft_heap_limit64()] interface rather than this one.
57845784
*/
5785
-SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N);
5785
+SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
57865786
57875787
57885788
/*
57895789
** CAPI3REF: Extract Metadata About A Column Of A Table
57905790
** METHOD: sqlite3
@@ -5850,11 +5850,11 @@
58505850
**
58515851
** ^This function causes all database schemas to be read from disk and
58525852
** parsed, if that has not already been done, and returns an error if
58535853
** any errors are encountered while loading the schema.
58545854
*/
5855
-SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata(
5855
+SQLITE_API int sqlite3_table_column_metadata(
58565856
sqlite3 *db, /* Connection handle */
58575857
const char *zDbName, /* Database name or NULL */
58585858
const char *zTableName, /* Table name */
58595859
const char *zColumnName, /* Column name */
58605860
char const **pzDataType, /* OUTPUT: Declared data type */
@@ -5906,11 +5906,11 @@
59065906
** disabled and prevent SQL injections from giving attackers
59075907
** access to extension loading capabilities.
59085908
**
59095909
** See also the [load_extension() SQL function].
59105910
*/
5911
-SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
5911
+SQLITE_API int sqlite3_load_extension(
59125912
sqlite3 *db, /* Load the extension into this database connection */
59135913
const char *zFile, /* Name of the shared library containing extension */
59145914
const char *zProc, /* Entry point. Derived from zFile if 0 */
59155915
char **pzErrMsg /* Put error message here if not 0 */
59165916
);
@@ -5938,11 +5938,11 @@
59385938
** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
59395939
** rather than this interface, so the [load_extension()] SQL function
59405940
** remains disabled. This will prevent SQL injections from giving attackers
59415941
** access to extension loading capabilities.
59425942
*/
5943
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5943
+SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
59445944
59455945
/*
59465946
** CAPI3REF: Automatically Load Statically Linked Extensions
59475947
**
59485948
** ^This interface causes the xEntryPoint() function to be invoked for
@@ -5976,11 +5976,11 @@
59765976
** will be called more than once for each database connection that is opened.
59775977
**
59785978
** See also: [sqlite3_reset_auto_extension()]
59795979
** and [sqlite3_cancel_auto_extension()]
59805980
*/
5981
-SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void));
5981
+SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
59825982
59835983
/*
59845984
** CAPI3REF: Cancel Automatic Extension Loading
59855985
**
59865986
** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the
@@ -5988,19 +5988,19 @@
59885988
** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)]
59895989
** routine returns 1 if initialization routine X was successfully
59905990
** unregistered and it returns 0 if X was not on the list of initialization
59915991
** routines.
59925992
*/
5993
-SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
5993
+SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
59945994
59955995
/*
59965996
** CAPI3REF: Reset Automatic Extension Loading
59975997
**
59985998
** ^This interface disables all automatic extensions previously
59995999
** registered using [sqlite3_auto_extension()].
60006000
*/
6001
-SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void);
6001
+SQLITE_API void sqlite3_reset_auto_extension(void);
60026002
60036003
/*
60046004
** The interface to the virtual-table mechanism is currently considered
60056005
** to be experimental. The interface might change in incompatible ways.
60066006
** If this is a problem for you, do not use the interface at this time.
@@ -6241,17 +6241,17 @@
62416241
** be invoked if the call to sqlite3_create_module_v2() fails.
62426242
** ^The sqlite3_create_module()
62436243
** interface is equivalent to sqlite3_create_module_v2() with a NULL
62446244
** destructor.
62456245
*/
6246
-SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
6246
+SQLITE_API int sqlite3_create_module(
62476247
sqlite3 *db, /* SQLite connection to register module with */
62486248
const char *zName, /* Name of the module */
62496249
const sqlite3_module *p, /* Methods for the module */
62506250
void *pClientData /* Client data for xCreate/xConnect */
62516251
);
6252
-SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
6252
+SQLITE_API int sqlite3_create_module_v2(
62536253
sqlite3 *db, /* SQLite connection to register module with */
62546254
const char *zName, /* Name of the module */
62556255
const sqlite3_module *p, /* Methods for the module */
62566256
void *pClientData, /* Client data for xCreate/xConnect */
62576257
void(*xDestroy)(void*) /* Module destructor function */
@@ -6310,11 +6310,11 @@
63106310
** ^The [xCreate] and [xConnect] methods of a
63116311
** [virtual table module] call this interface
63126312
** to declare the format (the names and datatypes of the columns) of
63136313
** the virtual tables they implement.
63146314
*/
6315
-SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL);
6315
+SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
63166316
63176317
/*
63186318
** CAPI3REF: Overload A Function For A Virtual Table
63196319
** METHOD: sqlite3
63206320
**
@@ -6329,11 +6329,11 @@
63296329
** of the new function always causes an exception to be thrown. So
63306330
** the new function is not good for anything by itself. Its only
63316331
** purpose is to be a placeholder function that can be overloaded
63326332
** by a [virtual table].
63336333
*/
6334
-SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
6334
+SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
63356335
63366336
/*
63376337
** The interface to the virtual-table mechanism defined above (back up
63386338
** to a comment remarkably similar to this one) is currently considered
63396339
** to be experimental. The interface might change in incompatible ways.
@@ -6428,11 +6428,11 @@
64286428
** zero-filled blob to read or write using the incremental-blob interface.
64296429
**
64306430
** To avoid a resource leak, every open [BLOB handle] should eventually
64316431
** be released by a call to [sqlite3_blob_close()].
64326432
*/
6433
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
6433
+SQLITE_API int sqlite3_blob_open(
64346434
sqlite3*,
64356435
const char *zDb,
64366436
const char *zTable,
64376437
const char *zColumn,
64386438
sqlite3_int64 iRow,
@@ -6461,11 +6461,11 @@
64616461
** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
64626462
** always returns zero.
64636463
**
64646464
** ^This function sets the database handle error code and message.
64656465
*/
6466
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
6466
+SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
64676467
64686468
/*
64696469
** CAPI3REF: Close A BLOB Handle
64706470
** DESTRUCTOR: sqlite3_blob
64716471
**
@@ -6484,11 +6484,11 @@
64846484
** with a null pointer (such as would be returned by a failed call to
64856485
** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
64866486
** is passed a valid open blob handle, the values returned by the
64876487
** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
64886488
*/
6489
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *);
6489
+SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
64906490
64916491
/*
64926492
** CAPI3REF: Return The Size Of An Open BLOB
64936493
** METHOD: sqlite3_blob
64946494
**
@@ -6500,11 +6500,11 @@
65006500
** This routine only works on a [BLOB handle] which has been created
65016501
** by a prior successful call to [sqlite3_blob_open()] and which has not
65026502
** been closed by [sqlite3_blob_close()]. Passing any other pointer in
65036503
** to this routine results in undefined and probably undesirable behavior.
65046504
*/
6505
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *);
6505
+SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
65066506
65076507
/*
65086508
** CAPI3REF: Read Data From A BLOB Incrementally
65096509
** METHOD: sqlite3_blob
65106510
**
@@ -6529,11 +6529,11 @@
65296529
** been closed by [sqlite3_blob_close()]. Passing any other pointer in
65306530
** to this routine results in undefined and probably undesirable behavior.
65316531
**
65326532
** See also: [sqlite3_blob_write()].
65336533
*/
6534
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
6534
+SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
65356535
65366536
/*
65376537
** CAPI3REF: Write Data Into A BLOB Incrementally
65386538
** METHOD: sqlite3_blob
65396539
**
@@ -6571,11 +6571,11 @@
65716571
** been closed by [sqlite3_blob_close()]. Passing any other pointer in
65726572
** to this routine results in undefined and probably undesirable behavior.
65736573
**
65746574
** See also: [sqlite3_blob_read()].
65756575
*/
6576
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
6576
+SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
65776577
65786578
/*
65796579
** CAPI3REF: Virtual File System Objects
65806580
**
65816581
** A virtual filesystem (VFS) is an [sqlite3_vfs] object
@@ -6602,13 +6602,13 @@
66026602
**
66036603
** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
66046604
** ^(If the default VFS is unregistered, another VFS is chosen as
66056605
** the default. The choice for the new VFS is arbitrary.)^
66066606
*/
6607
-SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName);
6608
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6609
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
6607
+SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
6608
+SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6609
+SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
66106610
66116611
/*
66126612
** CAPI3REF: Mutexes
66136613
**
66146614
** The SQLite core uses these routines for thread
@@ -6720,15 +6720,15 @@
67206720
** sqlite3_mutex_leave() is a NULL pointer, then all three routines
67216721
** behave as no-ops.
67226722
**
67236723
** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
67246724
*/
6725
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int);
6726
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*);
6727
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*);
6728
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*);
6729
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*);
6725
+SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
6726
+SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
6727
+SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
6728
+SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
6729
+SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
67306730
67316731
/*
67326732
** CAPI3REF: Mutex Methods Object
67336733
**
67346734
** An instance of this structure defines the low-level routines
@@ -6834,12 +6834,12 @@
68346834
** call to sqlite3_mutex_held() to fail, so a non-zero return is
68356835
** the appropriate thing to do. The sqlite3_mutex_notheld()
68366836
** interface should also return 1 when given a NULL pointer.
68376837
*/
68386838
#ifndef NDEBUG
6839
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*);
6840
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
6839
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
6840
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
68416841
#endif
68426842
68436843
/*
68446844
** CAPI3REF: Mutex Types
68456845
**
@@ -6875,11 +6875,11 @@
68756875
** serializes access to the [database connection] given in the argument
68766876
** when the [threading mode] is Serialized.
68776877
** ^If the [threading mode] is Single-thread or Multi-thread then this
68786878
** routine returns a NULL pointer.
68796879
*/
6880
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*);
6880
+SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
68816881
68826882
/*
68836883
** CAPI3REF: Low-Level Control Of Database Files
68846884
** METHOD: sqlite3
68856885
**
@@ -6910,11 +6910,11 @@
69106910
** an incorrect zDbName and an SQLITE_ERROR return from the underlying
69116911
** xFileControl method.
69126912
**
69136913
** See also: [SQLITE_FCNTL_LOCKSTATE]
69146914
*/
6915
-SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6915
+SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
69166916
69176917
/*
69186918
** CAPI3REF: Testing Interface
69196919
**
69206920
** ^The sqlite3_test_control() interface is used to read out internal
@@ -6929,11 +6929,11 @@
69296929
** The details of the operation codes, their meanings, the parameters
69306930
** they take, and what they do are all subject to change without notice.
69316931
** Unlike most of the SQLite API, this function is not guaranteed to
69326932
** operate consistently from one release to the next.
69336933
*/
6934
-SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
6934
+SQLITE_API int sqlite3_test_control(int op, ...);
69356935
69366936
/*
69376937
** CAPI3REF: Testing Interface Operation Codes
69386938
**
69396939
** These constants are the valid operation code parameters used
@@ -6992,12 +6992,12 @@
69926992
** be represented by a 32-bit integer, then the values returned by
69936993
** sqlite3_status() are undefined.
69946994
**
69956995
** See also: [sqlite3_db_status()]
69966996
*/
6997
-SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6998
-SQLITE_API int SQLITE_STDCALL sqlite3_status64(
6997
+SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6998
+SQLITE_API int sqlite3_status64(
69996999
int op,
70007000
sqlite3_int64 *pCurrent,
70017001
sqlite3_int64 *pHighwater,
70027002
int resetFlag
70037003
);
@@ -7118,11 +7118,11 @@
71187118
** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
71197119
** non-zero [error code] on failure.
71207120
**
71217121
** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
71227122
*/
7123
-SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
7123
+SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
71247124
71257125
/*
71267126
** CAPI3REF: Status Parameters for database connections
71277127
** KEYWORDS: {SQLITE_DBSTATUS options}
71287128
**
@@ -7261,11 +7261,11 @@
72617261
** ^If the resetFlg is true, then the counter is reset to zero after this
72627262
** interface call returns.
72637263
**
72647264
** See also: [sqlite3_status()] and [sqlite3_db_status()].
72657265
*/
7266
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
7266
+SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
72677267
72687268
/*
72697269
** CAPI3REF: Status Parameters for prepared statements
72707270
** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters}
72717271
**
@@ -7730,20 +7730,20 @@
77307730
** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
77317731
** APIs are not strictly speaking threadsafe. If they are invoked at the
77327732
** same time as another thread is invoking sqlite3_backup_step() it is
77337733
** possible that they return invalid values.
77347734
*/
7735
-SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
7735
+SQLITE_API sqlite3_backup *sqlite3_backup_init(
77367736
sqlite3 *pDest, /* Destination database handle */
77377737
const char *zDestName, /* Destination database name */
77387738
sqlite3 *pSource, /* Source database handle */
77397739
const char *zSourceName /* Source database name */
77407740
);
7741
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage);
7742
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p);
7743
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p);
7744
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p);
7741
+SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
7742
+SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
7743
+SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);
7744
+SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
77457745
77467746
/*
77477747
** CAPI3REF: Unlock Notification
77487748
** METHOD: sqlite3
77497749
**
@@ -7856,11 +7856,11 @@
78567856
** by an sqlite3_step() call. ^(If there is a blocking connection, then the
78577857
** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
78587858
** the special "DROP TABLE/INDEX" case, the extended error code is just
78597859
** SQLITE_LOCKED.)^
78607860
*/
7861
-SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify(
7861
+SQLITE_API int sqlite3_unlock_notify(
78627862
sqlite3 *pBlocked, /* Waiting connection */
78637863
void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
78647864
void *pNotifyArg /* Argument to pass to xNotify */
78657865
);
78667866
@@ -7871,12 +7871,12 @@
78717871
** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications
78727872
** and extensions to compare the contents of two buffers containing UTF-8
78737873
** strings in a case-independent fashion, using the same definition of "case
78747874
** independence" that SQLite uses internally when comparing identifiers.
78757875
*/
7876
-SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *);
7877
-SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int);
7876
+SQLITE_API int sqlite3_stricmp(const char *, const char *);
7877
+SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
78787878
78797879
/*
78807880
** CAPI3REF: String Globbing
78817881
*
78827882
** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if
@@ -7889,11 +7889,11 @@
78897889
** Note that this routine returns zero on a match and non-zero if the strings
78907890
** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
78917891
**
78927892
** See also: [sqlite3_strlike()].
78937893
*/
7894
-SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr);
7894
+SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
78957895
78967896
/*
78977897
** CAPI3REF: String LIKE Matching
78987898
*
78997899
** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if
@@ -7912,11 +7912,11 @@
79127912
** Note that this routine returns zero on a match and non-zero if the strings
79137913
** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
79147914
**
79157915
** See also: [sqlite3_strglob()].
79167916
*/
7917
-SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
7917
+SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
79187918
79197919
/*
79207920
** CAPI3REF: Error Logging Interface
79217921
**
79227922
** ^The [sqlite3_log()] interface writes a message into the [error log]
@@ -7935,11 +7935,11 @@
79357935
** will not use dynamically allocated memory. The log message is stored in
79367936
** a fixed-length buffer on the stack. If the log message is longer than
79377937
** a few hundred characters, it will be truncated to the length of the
79387938
** buffer.
79397939
*/
7940
-SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...);
7940
+SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
79417941
79427942
/*
79437943
** CAPI3REF: Write-Ahead Log Commit Hook
79447944
** METHOD: sqlite3
79457945
**
@@ -7971,11 +7971,11 @@
79717971
** previously registered write-ahead log callback. ^Note that the
79727972
** [sqlite3_wal_autocheckpoint()] interface and the
79737973
** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
79747974
** overwrite any prior [sqlite3_wal_hook()] settings.
79757975
*/
7976
-SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook(
7976
+SQLITE_API void *sqlite3_wal_hook(
79777977
sqlite3*,
79787978
int(*)(void *,sqlite3*,const char*,int),
79797979
void*
79807980
);
79817981
@@ -8006,11 +8006,11 @@
80068006
** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
80078007
** pages. The use of this interface
80088008
** is only necessary if the default setting is found to be suboptimal
80098009
** for a particular application.
80108010
*/
8011
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
8011
+SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
80128012
80138013
/*
80148014
** CAPI3REF: Checkpoint a database
80158015
** METHOD: sqlite3
80168016
**
@@ -8028,11 +8028,11 @@
80288028
** interface was added. This interface is retained for backwards
80298029
** compatibility and as a convenience for applications that need to manually
80308030
** start a callback but which do not need the full power (and corresponding
80318031
** complication) of [sqlite3_wal_checkpoint_v2()].
80328032
*/
8033
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
8033
+SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
80348034
80358035
/*
80368036
** CAPI3REF: Checkpoint a database
80378037
** METHOD: sqlite3
80388038
**
@@ -8122,11 +8122,11 @@
81228122
** [sqlite3_errcode()] and [sqlite3_errmsg()].
81238123
**
81248124
** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
81258125
** from SQL.
81268126
*/
8127
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2(
8127
+SQLITE_API int sqlite3_wal_checkpoint_v2(
81288128
sqlite3 *db, /* Database handle */
81298129
const char *zDb, /* Name of attached database (or NULL) */
81308130
int eMode, /* SQLITE_CHECKPOINT_* value */
81318131
int *pnLog, /* OUT: Size of WAL log in frames */
81328132
int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -8158,11 +8158,11 @@
81588158
**
81598159
** At present, there is only one option that may be configured using
81608160
** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
81618161
** may be added in the future.
81628162
*/
8163
-SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...);
8163
+SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
81648164
81658165
/*
81668166
** CAPI3REF: Virtual Table Configuration Options
81678167
**
81688168
** These macros define the various options to the
@@ -8211,11 +8211,11 @@
82118211
** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],
82128212
** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode
82138213
** of the SQL statement that triggered the call to the [xUpdate] method of the
82148214
** [virtual table].
82158215
*/
8216
-SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *);
8216
+SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
82178217
82188218
/*
82198219
** CAPI3REF: Conflict resolution modes
82208220
** KEYWORDS: {conflict resolution mode}
82218221
**
@@ -8316,11 +8316,11 @@
83168316
** as if the loop did not exist - it returns non-zero and leave the variable
83178317
** that pOut points to unchanged.
83188318
**
83198319
** See also: [sqlite3_stmt_scanstatus_reset()]
83208320
*/
8321
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
8321
+SQLITE_API int sqlite3_stmt_scanstatus(
83228322
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
83238323
int idx, /* Index of loop to report on */
83248324
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
83258325
void *pOut /* Result written here */
83268326
);
@@ -8332,11 +8332,11 @@
83328332
** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
83338333
**
83348334
** This API is only available if the library is built with pre-processor
83358335
** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
83368336
*/
8337
-SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
8337
+SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
83388338
83398339
/*
83408340
** CAPI3REF: Flush caches to disk mid-transaction
83418341
**
83428342
** ^If a write-transaction is open on [database connection] D when the
@@ -8364,11 +8364,11 @@
83648364
** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.
83658365
**
83668366
** ^This function does not set the database handle error code or message
83678367
** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
83688368
*/
8369
-SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*);
8369
+SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
83708370
83718371
/*
83728372
** CAPI3REF: The pre-update hook.
83738373
**
83748374
** ^These interfaces are only available if SQLite is compiled using the
@@ -8444,11 +8444,11 @@
84448444
** triggers; or 2 for changes resulting from triggers called by top-level
84458445
** triggers; and so forth.
84468446
**
84478447
** See also: [sqlite3_update_hook()]
84488448
*/
8449
-SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook(
8449
+SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook(
84508450
sqlite3 *db,
84518451
void(*xPreUpdate)(
84528452
void *pCtx, /* Copy of third arg to preupdate_hook() */
84538453
sqlite3 *db, /* Database handle */
84548454
int op, /* SQLITE_UPDATE, DELETE or INSERT */
@@ -8457,14 +8457,14 @@
84578457
sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
84588458
sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
84598459
),
84608460
void*
84618461
);
8462
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8463
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *);
8464
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *);
8465
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
8462
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8463
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_count(sqlite3 *);
8464
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_depth(sqlite3 *);
8465
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
84668466
84678467
/*
84688468
** CAPI3REF: Low-level system error code
84698469
**
84708470
** ^Attempt to return the underlying operating system error code or error
@@ -8472,11 +8472,11 @@
84728472
** The return value is OS-dependent. For example, on unix systems, after
84738473
** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
84748474
** called to get back the underlying "errno" that caused the problem, such
84758475
** as ENOSPC, EAUTH, EISDIR, and so forth.
84768476
*/
8477
-SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*);
8477
+SQLITE_API int sqlite3_system_errno(sqlite3*);
84788478
84798479
/*
84808480
** CAPI3REF: Database Snapshot
84818481
** KEYWORDS: {snapshot}
84828482
** EXPERIMENTAL
@@ -8522,11 +8522,11 @@
85228522
** to avoid a memory leak.
85238523
**
85248524
** The [sqlite3_snapshot_get()] interface is only available when the
85258525
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
85268526
*/
8527
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get(
8527
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
85288528
sqlite3 *db,
85298529
const char *zSchema,
85308530
sqlite3_snapshot **ppSnapshot
85318531
);
85328532
@@ -8560,11 +8560,11 @@
85608560
** database connection in order to make it ready to use snapshots.)
85618561
**
85628562
** The [sqlite3_snapshot_open()] interface is only available when the
85638563
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
85648564
*/
8565
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open(
8565
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
85668566
sqlite3 *db,
85678567
const char *zSchema,
85688568
sqlite3_snapshot *pSnapshot
85698569
);
85708570
@@ -8577,11 +8577,11 @@
85778577
** using this routine to avoid a memory leak.
85788578
**
85798579
** The [sqlite3_snapshot_free()] interface is only available when the
85808580
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
85818581
*/
8582
-SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*);
8582
+SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
85838583
85848584
/*
85858585
** CAPI3REF: Compare the ages of two snapshot handles.
85868586
** EXPERIMENTAL
85878587
**
@@ -8601,11 +8601,11 @@
86018601
**
86028602
** Otherwise, this API returns a negative value if P1 refers to an older
86038603
** snapshot than P2, zero if the two handles refer to the same database
86048604
** snapshot, and a positive value if P1 is a newer snapshot than P2.
86058605
*/
8606
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp(
8606
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
86078607
sqlite3_snapshot *p1,
86088608
sqlite3_snapshot *p2
86098609
);
86108610
86118611
/*
@@ -8659,11 +8659,11 @@
86598659
** Register a geometry callback named zGeom that can be used as part of an
86608660
** R-Tree geometry query as follows:
86618661
**
86628662
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
86638663
*/
8664
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback(
8664
+SQLITE_API int sqlite3_rtree_geometry_callback(
86658665
sqlite3 *db,
86668666
const char *zGeom,
86678667
int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
86688668
void *pContext
86698669
);
@@ -8685,11 +8685,11 @@
86858685
** Register a 2nd-generation geometry callback named zScore that can be
86868686
** used as part of an R-Tree geometry query as follows:
86878687
**
86888688
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
86898689
*/
8690
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback(
8690
+SQLITE_API int sqlite3_rtree_query_callback(
86918691
sqlite3 *db,
86928692
const char *zQueryFunc,
86938693
int (*xQueryFunc)(sqlite3_rtree_query_info*),
86948694
void *pContext,
86958695
void (*xDestructor)(void*)
@@ -11900,12 +11900,12 @@
1190011900
*/
1190111901
#ifdef SQLITE_OMIT_WSD
1190211902
#define SQLITE_WSD const
1190311903
#define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v)))
1190411904
#define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config)
11905
-SQLITE_API int SQLITE_STDCALL sqlite3_wsd_init(int N, int J);
11906
-SQLITE_API void *SQLITE_STDCALL sqlite3_wsd_find(void *K, int L);
11905
+SQLITE_API int sqlite3_wsd_init(int N, int J);
11906
+SQLITE_API void *sqlite3_wsd_find(void *K, int L);
1190711907
#else
1190811908
#define SQLITE_WSD
1190911909
#define GLOBAL(t,v) v
1191011910
#define sqlite3GlobalConfig sqlite3Config
1191111911
#endif
@@ -12559,16 +12559,16 @@
1255912559
#define OP_Found 31 /* synopsis: key=r[P3@P4] */
1256012560
#define OP_SeekRowid 32 /* synopsis: intkey=r[P3] */
1256112561
#define OP_NotExists 33 /* synopsis: intkey=r[P3] */
1256212562
#define OP_IsNull 34 /* same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
1256312563
#define OP_NotNull 35 /* same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
12564
-#define OP_Ne 36 /* same as TK_NE, synopsis: if r[P1]!=r[P3] goto P2 */
12565
-#define OP_Eq 37 /* same as TK_EQ, synopsis: if r[P1]==r[P3] goto P2 */
12566
-#define OP_Gt 38 /* same as TK_GT, synopsis: if r[P1]>r[P3] goto P2 */
12567
-#define OP_Le 39 /* same as TK_LE, synopsis: if r[P1]<=r[P3] goto P2 */
12568
-#define OP_Lt 40 /* same as TK_LT, synopsis: if r[P1]<r[P3] goto P2 */
12569
-#define OP_Ge 41 /* same as TK_GE, synopsis: if r[P1]>=r[P3] goto P2 */
12564
+#define OP_Ne 36 /* same as TK_NE, synopsis: IF r[P3]!=r[P1] */
12565
+#define OP_Eq 37 /* same as TK_EQ, synopsis: IF r[P3]==r[P1] */
12566
+#define OP_Gt 38 /* same as TK_GT, synopsis: IF r[P3]>r[P1] */
12567
+#define OP_Le 39 /* same as TK_LE, synopsis: IF r[P3]<=r[P1] */
12568
+#define OP_Lt 40 /* same as TK_LT, synopsis: IF r[P3]<r[P1] */
12569
+#define OP_Ge 41 /* same as TK_GE, synopsis: IF r[P3]>=r[P1] */
1257012570
#define OP_Last 42
1257112571
#define OP_BitAnd 43 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
1257212572
#define OP_BitOr 44 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
1257312573
#define OP_ShiftLeft 45 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */
1257412574
#define OP_ShiftRight 46 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */
@@ -17561,11 +17561,11 @@
1756117561
** was used and false if not.
1756217562
**
1756317563
** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix
1756417564
** is not required for a match.
1756517565
*/
17566
-SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName){
17566
+SQLITE_API int sqlite3_compileoption_used(const char *zOptName){
1756717567
int i, n;
1756817568
1756917569
#if SQLITE_ENABLE_API_ARMOR
1757017570
if( zOptName==0 ){
1757117571
(void)SQLITE_MISUSE_BKPT;
@@ -17589,11 +17589,11 @@
1758917589
1759017590
/*
1759117591
** Return the N-th compile-time option string. If N is out of range,
1759217592
** return a NULL pointer.
1759317593
*/
17594
-SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N){
17594
+SQLITE_API const char *sqlite3_compileoption_get(int N){
1759517595
if( N>=0 && N<ArraySize(azCompileOpt) ){
1759617596
return azCompileOpt[N];
1759717597
}
1759817598
return 0;
1759917599
}
@@ -18299,11 +18299,11 @@
1829918299
}
1830018300
1830118301
/*
1830218302
** Query status information.
1830318303
*/
18304
-SQLITE_API int SQLITE_STDCALL sqlite3_status64(
18304
+SQLITE_API int sqlite3_status64(
1830518305
int op,
1830618306
sqlite3_int64 *pCurrent,
1830718307
sqlite3_int64 *pHighwater,
1830818308
int resetFlag
1830918309
){
@@ -18324,11 +18324,11 @@
1832418324
}
1832518325
sqlite3_mutex_leave(pMutex);
1832618326
(void)pMutex; /* Prevent warning when SQLITE_THREADSAFE=0 */
1832718327
return SQLITE_OK;
1832818328
}
18329
-SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){
18329
+SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){
1833018330
sqlite3_int64 iCur = 0, iHwtr = 0;
1833118331
int rc;
1833218332
#ifdef SQLITE_ENABLE_API_ARMOR
1833318333
if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT;
1833418334
#endif
@@ -18341,11 +18341,11 @@
1834118341
}
1834218342
1834318343
/*
1834418344
** Query status information for a single database connection
1834518345
*/
18346
-SQLITE_API int SQLITE_STDCALL sqlite3_db_status(
18346
+SQLITE_API int sqlite3_db_status(
1834718347
sqlite3 *db, /* The database connection whose status is desired */
1834818348
int op, /* Status verb */
1834918349
int *pCurrent, /* Write current value here */
1835018350
int *pHighwater, /* Write high-water mark here */
1835118351
int resetFlag /* Reset high-water mark if true */
@@ -20018,11 +20018,11 @@
2001820018
2001920019
/*
2002020020
** Locate a VFS by name. If no name is given, simply return the
2002120021
** first VFS on the list.
2002220022
*/
20023
-SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfs){
20023
+SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){
2002420024
sqlite3_vfs *pVfs = 0;
2002520025
#if SQLITE_THREADSAFE
2002620026
sqlite3_mutex *mutex;
2002720027
#endif
2002820028
#ifndef SQLITE_OMIT_AUTOINIT
@@ -20064,11 +20064,11 @@
2006420064
/*
2006520065
** Register a VFS with the system. It is harmless to register the same
2006620066
** VFS multiple times. The new VFS becomes the default if makeDflt is
2006720067
** true.
2006820068
*/
20069
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
20069
+SQLITE_API int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
2007020070
MUTEX_LOGIC(sqlite3_mutex *mutex;)
2007120071
#ifndef SQLITE_OMIT_AUTOINIT
2007220072
int rc = sqlite3_initialize();
2007320073
if( rc ) return rc;
2007420074
#endif
@@ -20092,11 +20092,11 @@
2009220092
}
2009320093
2009420094
/*
2009520095
** Unregister a VFS so that it is no longer accessible.
2009620096
*/
20097
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
20097
+SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
2009820098
#if SQLITE_THREADSAFE
2009920099
sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
2010020100
#endif
2010120101
sqlite3_mutex_enter(mutex);
2010220102
vfsUnlink(pVfs);
@@ -22443,11 +22443,11 @@
2244322443
}
2244422444
2244522445
/*
2244622446
** Retrieve a pointer to a static mutex or allocate a new dynamic one.
2244722447
*/
22448
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int id){
22448
+SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int id){
2244922449
#ifndef SQLITE_OMIT_AUTOINIT
2245022450
if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0;
2245122451
if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0;
2245222452
#endif
2245322453
assert( sqlite3GlobalConfig.mutex.xMutexAlloc );
@@ -22464,11 +22464,11 @@
2246422464
}
2246522465
2246622466
/*
2246722467
** Free a dynamic mutex.
2246822468
*/
22469
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){
22469
+SQLITE_API void sqlite3_mutex_free(sqlite3_mutex *p){
2247022470
if( p ){
2247122471
assert( sqlite3GlobalConfig.mutex.xMutexFree );
2247222472
sqlite3GlobalConfig.mutex.xMutexFree(p);
2247322473
}
2247422474
}
@@ -22475,11 +22475,11 @@
2247522475
2247622476
/*
2247722477
** Obtain the mutex p. If some other thread already has the mutex, block
2247822478
** until it can be obtained.
2247922479
*/
22480
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){
22480
+SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex *p){
2248122481
if( p ){
2248222482
assert( sqlite3GlobalConfig.mutex.xMutexEnter );
2248322483
sqlite3GlobalConfig.mutex.xMutexEnter(p);
2248422484
}
2248522485
}
@@ -22486,11 +22486,11 @@
2248622486
2248722487
/*
2248822488
** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another
2248922489
** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY.
2249022490
*/
22491
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){
22491
+SQLITE_API int sqlite3_mutex_try(sqlite3_mutex *p){
2249222492
int rc = SQLITE_OK;
2249322493
if( p ){
2249422494
assert( sqlite3GlobalConfig.mutex.xMutexTry );
2249522495
return sqlite3GlobalConfig.mutex.xMutexTry(p);
2249622496
}
@@ -22501,11 +22501,11 @@
2250122501
** The sqlite3_mutex_leave() routine exits a mutex that was previously
2250222502
** entered by the same thread. The behavior is undefined if the mutex
2250322503
** is not currently entered. If a NULL pointer is passed as an argument
2250422504
** this function is a no-op.
2250522505
*/
22506
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){
22506
+SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex *p){
2250722507
if( p ){
2250822508
assert( sqlite3GlobalConfig.mutex.xMutexLeave );
2250922509
sqlite3GlobalConfig.mutex.xMutexLeave(p);
2251022510
}
2251122511
}
@@ -22513,15 +22513,15 @@
2251322513
#ifndef NDEBUG
2251422514
/*
2251522515
** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
2251622516
** intended for use inside assert() statements.
2251722517
*/
22518
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex *p){
22518
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex *p){
2251922519
assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld );
2252022520
return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p);
2252122521
}
22522
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex *p){
22522
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *p){
2252322523
assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld );
2252422524
return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p);
2252522525
}
2252622526
#endif
2252722527
@@ -23549,12 +23549,12 @@
2354923549
** of the sqlite3_initialize() and sqlite3_shutdown() processing, the
2355023550
** "interlocked" magic used here is probably not strictly necessary.
2355123551
*/
2355223552
static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0;
2355323553
23554
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void); /* os_win.c */
23555
-SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */
23554
+SQLITE_API int sqlite3_win32_is_nt(void); /* os_win.c */
23555
+SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */
2355623556
2355723557
static int winMutexInit(void){
2355823558
/* The first to increment to 1 does actual initialization */
2355923559
if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){
2356023560
int i;
@@ -23850,11 +23850,11 @@
2385023850
/*
2385123851
** Attempt to release up to n bytes of non-essential memory currently
2385223852
** held by SQLite. An example of non-essential memory is memory used to
2385323853
** cache database pages that are not currently in use.
2385423854
*/
23855
-SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int n){
23855
+SQLITE_API int sqlite3_release_memory(int n){
2385623856
#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
2385723857
return sqlite3PcacheReleaseMemory(n);
2385823858
#else
2385923859
/* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine
2386023860
** is a no-op returning zero if SQLite is not compiled with
@@ -23909,11 +23909,11 @@
2390923909
/*
2391023910
** Deprecated external interface. It used to set an alarm callback
2391123911
** that was invoked when memory usage grew too large. Now it is a
2391223912
** no-op.
2391323913
*/
23914
-SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm(
23914
+SQLITE_API int sqlite3_memory_alarm(
2391523915
void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
2391623916
void *pArg,
2391723917
sqlite3_int64 iThreshold
2391823918
){
2391923919
(void)xCallback;
@@ -23925,11 +23925,11 @@
2392523925
2392623926
/*
2392723927
** Set the soft heap-size limit for the library. Passing a zero or
2392823928
** negative value indicates no limit.
2392923929
*/
23930
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 n){
23930
+SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 n){
2393123931
sqlite3_int64 priorLimit;
2393223932
sqlite3_int64 excess;
2393323933
sqlite3_int64 nUsed;
2393423934
#ifndef SQLITE_OMIT_AUTOINIT
2393523935
int rc = sqlite3_initialize();
@@ -23947,11 +23947,11 @@
2394723947
sqlite3_mutex_leave(mem0.mutex);
2394823948
excess = sqlite3_memory_used() - n;
2394923949
if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff));
2395023950
return priorLimit;
2395123951
}
23952
-SQLITE_API void SQLITE_STDCALL sqlite3_soft_heap_limit(int n){
23952
+SQLITE_API void sqlite3_soft_heap_limit(int n){
2395323953
if( n<0 ) n = 0;
2395423954
sqlite3_soft_heap_limit64(n);
2395523955
}
2395623956
2395723957
/*
@@ -24016,11 +24016,11 @@
2401624016
}
2401724017
2401824018
/*
2401924019
** Return the amount of memory currently checked out.
2402024020
*/
24021
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){
24021
+SQLITE_API sqlite3_int64 sqlite3_memory_used(void){
2402224022
sqlite3_int64 res, mx;
2402324023
sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0);
2402424024
return res;
2402524025
}
2402624026
@@ -24027,11 +24027,11 @@
2402724027
/*
2402824028
** Return the maximum amount of memory that has ever been
2402924029
** checked out since either the beginning of this process
2403024030
** or since the most recent reset.
2403124031
*/
24032
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag){
24032
+SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag){
2403324033
sqlite3_int64 res, mx;
2403424034
sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag);
2403524035
return mx;
2403624036
}
2403724037
@@ -24107,17 +24107,17 @@
2410724107
/*
2410824108
** This version of the memory allocation is for use by the application.
2410924109
** First make sure the memory subsystem is initialized, then do the
2411024110
** allocation.
2411124111
*/
24112
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int n){
24112
+SQLITE_API void *sqlite3_malloc(int n){
2411324113
#ifndef SQLITE_OMIT_AUTOINIT
2411424114
if( sqlite3_initialize() ) return 0;
2411524115
#endif
2411624116
return n<=0 ? 0 : sqlite3Malloc(n);
2411724117
}
24118
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64 n){
24118
+SQLITE_API void *sqlite3_malloc64(sqlite3_uint64 n){
2411924119
#ifndef SQLITE_OMIT_AUTOINIT
2412024120
if( sqlite3_initialize() ) return 0;
2412124121
#endif
2412224122
return sqlite3Malloc(n);
2412324123
}
@@ -24256,20 +24256,20 @@
2425624256
}else{
2425724257
assert( sqlite3_mutex_held(db->mutex) );
2425824258
return db->lookaside.sz;
2425924259
}
2426024260
}
24261
-SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){
24261
+SQLITE_API sqlite3_uint64 sqlite3_msize(void *p){
2426224262
assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
2426324263
assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
2426424264
return p ? sqlite3GlobalConfig.m.xSize(p) : 0;
2426524265
}
2426624266
2426724267
/*
2426824268
** Free memory previously obtained from sqlite3Malloc().
2426924269
*/
24270
-SQLITE_API void SQLITE_STDCALL sqlite3_free(void *p){
24270
+SQLITE_API void sqlite3_free(void *p){
2427124271
if( p==0 ) return; /* IMP: R-49053-54554 */
2427224272
assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
2427324273
assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
2427424274
if( sqlite3GlobalConfig.bMemstat ){
2427524275
sqlite3_mutex_enter(mem0.mutex);
@@ -24374,18 +24374,18 @@
2437424374
2437524375
/*
2437624376
** The public interface to sqlite3Realloc. Make sure that the memory
2437724377
** subsystem is initialized prior to invoking sqliteRealloc.
2437824378
*/
24379
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void *pOld, int n){
24379
+SQLITE_API void *sqlite3_realloc(void *pOld, int n){
2438024380
#ifndef SQLITE_OMIT_AUTOINIT
2438124381
if( sqlite3_initialize() ) return 0;
2438224382
#endif
2438324383
if( n<0 ) n = 0; /* IMP: R-26507-47431 */
2438424384
return sqlite3Realloc(pOld, n);
2438524385
}
24386
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){
24386
+SQLITE_API void *sqlite3_realloc64(void *pOld, sqlite3_uint64 n){
2438724387
#ifndef SQLITE_OMIT_AUTOINIT
2438824388
if( sqlite3_initialize() ) return 0;
2438924389
#endif
2439024390
return sqlite3Realloc(pOld, n);
2439124391
}
@@ -25608,11 +25608,11 @@
2560825608
2560925609
/*
2561025610
** Print into memory obtained from sqlite3_malloc(). Omit the internal
2561125611
** %-conversion extensions.
2561225612
*/
25613
-SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char *zFormat, va_list ap){
25613
+SQLITE_API char *sqlite3_vmprintf(const char *zFormat, va_list ap){
2561425614
char *z;
2561525615
char zBase[SQLITE_PRINT_BUF_SIZE];
2561625616
StrAccum acc;
2561725617
2561825618
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -25632,11 +25632,11 @@
2563225632
2563325633
/*
2563425634
** Print into memory obtained from sqlite3_malloc()(). Omit the internal
2563525635
** %-conversion extensions.
2563625636
*/
25637
-SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char *zFormat, ...){
25637
+SQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){
2563825638
va_list ap;
2563925639
char *z;
2564025640
#ifndef SQLITE_OMIT_AUTOINIT
2564125641
if( sqlite3_initialize() ) return 0;
2564225642
#endif
@@ -25657,11 +25657,11 @@
2565725657
** this without breaking compatibility, so we just have to live with the
2565825658
** mistake.
2565925659
**
2566025660
** sqlite3_vsnprintf() is the varargs version.
2566125661
*/
25662
-SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
25662
+SQLITE_API char *sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
2566325663
StrAccum acc;
2566425664
if( n<=0 ) return zBuf;
2566525665
#ifdef SQLITE_ENABLE_API_ARMOR
2566625666
if( zBuf==0 || zFormat==0 ) {
2566725667
(void)SQLITE_MISUSE_BKPT;
@@ -25671,11 +25671,11 @@
2567125671
#endif
2567225672
sqlite3StrAccumInit(&acc, 0, zBuf, n, 0);
2567325673
sqlite3VXPrintf(&acc, zFormat, ap);
2567425674
return sqlite3StrAccumFinish(&acc);
2567525675
}
25676
-SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
25676
+SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
2567725677
char *z;
2567825678
va_list ap;
2567925679
va_start(ap,zFormat);
2568025680
z = sqlite3_vsnprintf(n, zBuf, zFormat, ap);
2568125681
va_end(ap);
@@ -25707,11 +25707,11 @@
2570725707
}
2570825708
2570925709
/*
2571025710
** Format and write a message to the log if logging is enabled.
2571125711
*/
25712
-SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...){
25712
+SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...){
2571325713
va_list ap; /* Vararg list */
2571425714
if( sqlite3GlobalConfig.xLog ){
2571525715
va_start(ap, zFormat);
2571625716
renderLogMsg(iErrCode, zFormat, ap);
2571725717
va_end(ap);
@@ -26284,11 +26284,11 @@
2628426284
} sqlite3Prng;
2628526285
2628626286
/*
2628726287
** Return N random bytes.
2628826288
*/
26289
-SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *pBuf){
26289
+SQLITE_API void sqlite3_randomness(int N, void *pBuf){
2629026290
unsigned char t;
2629126291
unsigned char *zBuf = pBuf;
2629226292
2629326293
/* The "wsdPrng" macro will resolve to the pseudo-random number generator
2629426294
** state vector. If writable static data is unsupported on the target,
@@ -27487,11 +27487,11 @@
2748727487
** sqlite3_strnicmp() APIs allow applications and extensions to compare
2748827488
** the contents of two buffers containing UTF-8 strings in a
2748927489
** case-independent fashion, using the same definition of "case
2749027490
** independence" that SQLite uses internally when comparing identifiers.
2749127491
*/
27492
-SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *zLeft, const char *zRight){
27492
+SQLITE_API int sqlite3_stricmp(const char *zLeft, const char *zRight){
2749327493
if( zLeft==0 ){
2749427494
return zRight ? -1 : 0;
2749527495
}else if( zRight==0 ){
2749627496
return 1;
2749727497
}
@@ -27508,11 +27508,11 @@
2750827508
a++;
2750927509
b++;
2751027510
}
2751127511
return c;
2751227512
}
27513
-SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
27513
+SQLITE_API int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
2751427514
register unsigned char *a, *b;
2751527515
if( zLeft==0 ){
2751627516
return zRight ? -1 : 0;
2751727517
}else if( zRight==0 ){
2751827518
return 1;
@@ -28990,16 +28990,16 @@
2899028990
/* 31 */ "Found" OpHelp("key=r[P3@P4]"),
2899128991
/* 32 */ "SeekRowid" OpHelp("intkey=r[P3]"),
2899228992
/* 33 */ "NotExists" OpHelp("intkey=r[P3]"),
2899328993
/* 34 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
2899428994
/* 35 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
28995
- /* 36 */ "Ne" OpHelp("if r[P1]!=r[P3] goto P2"),
28996
- /* 37 */ "Eq" OpHelp("if r[P1]==r[P3] goto P2"),
28997
- /* 38 */ "Gt" OpHelp("if r[P1]>r[P3] goto P2"),
28998
- /* 39 */ "Le" OpHelp("if r[P1]<=r[P3] goto P2"),
28999
- /* 40 */ "Lt" OpHelp("if r[P1]<r[P3] goto P2"),
29000
- /* 41 */ "Ge" OpHelp("if r[P1]>=r[P3] goto P2"),
28995
+ /* 36 */ "Ne" OpHelp("IF r[P3]!=r[P1]"),
28996
+ /* 37 */ "Eq" OpHelp("IF r[P3]==r[P1]"),
28997
+ /* 38 */ "Gt" OpHelp("IF r[P3]>r[P1]"),
28998
+ /* 39 */ "Le" OpHelp("IF r[P3]<=r[P1]"),
28999
+ /* 40 */ "Lt" OpHelp("IF r[P3]<r[P1]"),
29000
+ /* 41 */ "Ge" OpHelp("IF r[P3]>=r[P1]"),
2900129001
/* 42 */ "Last" OpHelp(""),
2900229002
/* 43 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
2900329003
/* 44 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
2900429004
/* 45 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
2900529005
/* 46 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
@@ -36807,11 +36807,11 @@
3680736807
** This routine is called once during SQLite initialization and by a
3680836808
** single thread. The memory allocation and mutex subsystems have not
3680936809
** necessarily been initialized when this routine is called, and so they
3681036810
** should not be used.
3681136811
*/
36812
-SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){
36812
+SQLITE_API int sqlite3_os_init(void){
3681336813
/*
3681436814
** The following macro defines an initializer for an sqlite3_vfs object.
3681536815
** The name of the VFS is NAME. The pAppData is a pointer to a pointer
3681636816
** to the "finder" function. (pAppData is a pointer to a pointer because
3681736817
** silly C90 rules prohibit a void* from being cast to a function pointer
@@ -36906,11 +36906,11 @@
3690636906
**
3690736907
** Some operating systems might need to do some cleanup in this routine,
3690836908
** to release dynamically allocated objects. But not on unix.
3690936909
** This routine is a no-op for unix.
3691036910
*/
36911
-SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){
36911
+SQLITE_API int sqlite3_os_end(void){
3691236912
return SQLITE_OK;
3691336913
}
3691436914
3691536915
#endif /* SQLITE_OS_UNIX */
3691636916
@@ -38341,11 +38341,11 @@
3834138341
** compact it. Upon success, SQLITE_OK will be returned. Upon failure, one
3834238342
** of SQLITE_NOMEM, SQLITE_ERROR, or SQLITE_NOTFOUND will be returned. The
3834338343
** "pnLargest" argument, if non-zero, will be used to return the size of the
3834438344
** largest committed free block in the heap, in bytes.
3834538345
*/
38346
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){
38346
+SQLITE_API int sqlite3_win32_compact_heap(LPUINT pnLargest){
3834738347
int rc = SQLITE_OK;
3834838348
UINT nLargest = 0;
3834938349
HANDLE hHeap;
3835038350
3835138351
winMemAssertMagic();
@@ -38381,11 +38381,11 @@
3838138381
** If a Win32 native heap has been configured, this function will attempt to
3838238382
** destroy and recreate it. If the Win32 native heap is not isolated and/or
3838338383
** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will
3838438384
** be returned and no changes will be made to the Win32 native heap.
3838538385
*/
38386
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_reset_heap(){
38386
+SQLITE_API int sqlite3_win32_reset_heap(){
3838738387
int rc;
3838838388
MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
3838938389
MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */
3839038390
MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); )
3839138391
MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); )
@@ -38426,11 +38426,11 @@
3842638426
/*
3842738427
** This function outputs the specified (ANSI) string to the Win32 debugger
3842838428
** (if available).
3842938429
*/
3843038430
38431
-SQLITE_API void SQLITE_STDCALL sqlite3_win32_write_debug(const char *zBuf, int nBuf){
38431
+SQLITE_API void sqlite3_win32_write_debug(const char *zBuf, int nBuf){
3843238432
char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE];
3843338433
int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */
3843438434
if( nMin<-1 ) nMin = -1; /* all negative values become -1. */
3843538435
assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE );
3843638436
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -38472,11 +38472,11 @@
3847238472
*/
3847338473
#if SQLITE_OS_WINRT
3847438474
static HANDLE sleepObj = NULL;
3847538475
#endif
3847638476
38477
-SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds){
38477
+SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds){
3847838478
#if SQLITE_OS_WINRT
3847938479
if ( sleepObj==NULL ){
3848038480
sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET,
3848138481
SYNCHRONIZE);
3848238482
}
@@ -38521,11 +38521,11 @@
3852138521
3852238522
/*
3852338523
** This function determines if the machine is running a version of Windows
3852438524
** based on the NT kernel.
3852538525
*/
38526
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void){
38526
+SQLITE_API int sqlite3_win32_is_nt(void){
3852738527
#if SQLITE_OS_WINRT
3852838528
/*
3852938529
** NOTE: The WinRT sub-platform is always assumed to be based on the NT
3853038530
** kernel.
3853138531
*/
@@ -38909,11 +38909,11 @@
3890938909
}
3891038910
3891138911
/*
3891238912
** This is a public wrapper for the winUtf8ToUnicode() function.
3891338913
*/
38914
-SQLITE_API LPWSTR SQLITE_STDCALL sqlite3_win32_utf8_to_unicode(const char *zText){
38914
+SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char *zText){
3891538915
#ifdef SQLITE_ENABLE_API_ARMOR
3891638916
if( !zText ){
3891738917
(void)SQLITE_MISUSE_BKPT;
3891838918
return 0;
3891938919
}
@@ -38925,11 +38925,11 @@
3892538925
}
3892638926
3892738927
/*
3892838928
** This is a public wrapper for the winUnicodeToUtf8() function.
3892938929
*/
38930
-SQLITE_API char *SQLITE_STDCALL sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){
38930
+SQLITE_API char *sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){
3893138931
#ifdef SQLITE_ENABLE_API_ARMOR
3893238932
if( !zWideText ){
3893338933
(void)SQLITE_MISUSE_BKPT;
3893438934
return 0;
3893538935
}
@@ -38941,11 +38941,11 @@
3894138941
}
3894238942
3894338943
/*
3894438944
** This is a public wrapper for the winMbcsToUtf8() function.
3894538945
*/
38946
-SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8(const char *zText){
38946
+SQLITE_API char *sqlite3_win32_mbcs_to_utf8(const char *zText){
3894738947
#ifdef SQLITE_ENABLE_API_ARMOR
3894838948
if( !zText ){
3894938949
(void)SQLITE_MISUSE_BKPT;
3895038950
return 0;
3895138951
}
@@ -38957,11 +38957,11 @@
3895738957
}
3895838958
3895938959
/*
3896038960
** This is a public wrapper for the winMbcsToUtf8() function.
3896138961
*/
38962
-SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){
38962
+SQLITE_API char *sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){
3896338963
#ifdef SQLITE_ENABLE_API_ARMOR
3896438964
if( !zText ){
3896538965
(void)SQLITE_MISUSE_BKPT;
3896638966
return 0;
3896738967
}
@@ -38973,11 +38973,11 @@
3897338973
}
3897438974
3897538975
/*
3897638976
** This is a public wrapper for the winUtf8ToMbcs() function.
3897738977
*/
38978
-SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs(const char *zText){
38978
+SQLITE_API char *sqlite3_win32_utf8_to_mbcs(const char *zText){
3897938979
#ifdef SQLITE_ENABLE_API_ARMOR
3898038980
if( !zText ){
3898138981
(void)SQLITE_MISUSE_BKPT;
3898238982
return 0;
3898338983
}
@@ -38989,11 +38989,11 @@
3898938989
}
3899038990
3899138991
/*
3899238992
** This is a public wrapper for the winUtf8ToMbcs() function.
3899338993
*/
38994
-SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){
38994
+SQLITE_API char *sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){
3899538995
#ifdef SQLITE_ENABLE_API_ARMOR
3899638996
if( !zText ){
3899738997
(void)SQLITE_MISUSE_BKPT;
3899838998
return 0;
3899938999
}
@@ -39009,11 +39009,11 @@
3900939009
** the provided arguments. The type argument must be 1 in order to set the
3901039010
** data directory or 2 in order to set the temporary directory. The zValue
3901139011
** argument is the name of the directory to use. The return value will be
3901239012
** SQLITE_OK if successful.
3901339013
*/
39014
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){
39014
+SQLITE_API int sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){
3901539015
char **ppDirectory = 0;
3901639016
#ifndef SQLITE_OMIT_AUTOINIT
3901739017
int rc = sqlite3_initialize();
3901839018
if( rc ) return rc;
3901939019
#endif
@@ -42927,11 +42927,11 @@
4292742927
}
4292842928
4292942929
/*
4293042930
** Initialize and deinitialize the operating system interface.
4293142931
*/
42932
-SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){
42932
+SQLITE_API int sqlite3_os_init(void){
4293342933
static sqlite3_vfs winVfs = {
4293442934
3, /* iVersion */
4293542935
sizeof(winFile), /* szOsFile */
4293642936
SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */
4293742937
0, /* pNext */
@@ -43058,11 +43058,11 @@
4305843058
#endif
4305943059
4306043060
return SQLITE_OK;
4306143061
}
4306243062
43063
-SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){
43063
+SQLITE_API int sqlite3_os_end(void){
4306443064
#if SQLITE_OS_WINRT
4306543065
if( sleepObj!=NULL ){
4306643066
osCloseHandle(sleepObj);
4306743067
sleepObj = NULL;
4306843068
}
@@ -57083,11 +57083,11 @@
5708357083
5708457084
/*
5708557085
** Return a +ve value if snapshot p1 is newer than p2. A -ve value if
5708657086
** p1 is older than p2 and zero if p1 and p2 are the same snapshot.
5708757087
*/
57088
-SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){
57088
+SQLITE_API int sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){
5708957089
WalIndexHdr *pHdr1 = (WalIndexHdr*)p1;
5709057090
WalIndexHdr *pHdr2 = (WalIndexHdr*)p2;
5709157091
5709257092
/* aSalt[0] is a copy of the value stored in the wal file header. It
5709357093
** is incremented each time the wal file is restarted. */
@@ -58220,11 +58220,11 @@
5822058220
**
5822158221
** This routine has no effect on existing database connections.
5822258222
** The shared cache setting effects only future calls to
5822358223
** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().
5822458224
*/
58225
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int enable){
58225
+SQLITE_API int sqlite3_enable_shared_cache(int enable){
5822658226
sqlite3GlobalConfig.sharedCacheEnabled = enable;
5822758227
return SQLITE_OK;
5822858228
}
5822958229
#endif
5823058230
@@ -67993,11 +67993,11 @@
6799367993
** a pointer to the new sqlite3_backup object.
6799467994
**
6799567995
** If an error occurs, NULL is returned and an error code and error message
6799667996
** stored in database handle pDestDb.
6799767997
*/
67998
-SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
67998
+SQLITE_API sqlite3_backup *sqlite3_backup_init(
6799967999
sqlite3* pDestDb, /* Database to write to */
6800068000
const char *zDestDb, /* Name of database within pDestDb */
6800168001
sqlite3* pSrcDb, /* Database connection to read from */
6800268002
const char *zSrcDb /* Name of database within pSrcDb */
6800368003
){
@@ -68201,11 +68201,11 @@
6820168201
}
6820268202
6820368203
/*
6820468204
** Copy nPage pages from the source b-tree to the destination.
6820568205
*/
68206
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){
68206
+SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){
6820768207
int rc;
6820868208
int destMode; /* Destination journal mode */
6820968209
int pgszSrc = 0; /* Source page size */
6821068210
int pgszDest = 0; /* Destination page size */
6821168211
@@ -68445,11 +68445,11 @@
6844568445
}
6844668446
6844768447
/*
6844868448
** Release all resources associated with an sqlite3_backup* handle.
6844968449
*/
68450
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p){
68450
+SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p){
6845168451
sqlite3_backup **pp; /* Ptr to head of pagers backup list */
6845268452
sqlite3 *pSrcDb; /* Source database connection */
6845368453
int rc; /* Value to return */
6845468454
6845568455
/* Enter the mutexes */
@@ -68497,11 +68497,11 @@
6849768497
6849868498
/*
6849968499
** Return the number of pages still to be backed up as of the most recent
6850068500
** call to sqlite3_backup_step().
6850168501
*/
68502
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p){
68502
+SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p){
6850368503
#ifdef SQLITE_ENABLE_API_ARMOR
6850468504
if( p==0 ){
6850568505
(void)SQLITE_MISUSE_BKPT;
6850668506
return 0;
6850768507
}
@@ -68511,11 +68511,11 @@
6851168511
6851268512
/*
6851368513
** Return the total number of pages in the source database as of the most
6851468514
** recent call to sqlite3_backup_step().
6851568515
*/
68516
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p){
68516
+SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p){
6851768517
#ifdef SQLITE_ENABLE_API_ARMOR
6851868518
if( p==0 ){
6851968519
(void)SQLITE_MISUSE_BKPT;
6852068520
return 0;
6852168521
}
@@ -71450,16 +71450,25 @@
7145071450
){
7145171451
const char *zOpName;
7145271452
const char *zSynopsis;
7145371453
int nOpName;
7145471454
int ii, jj;
71455
+ char zAlt[50];
7145571456
zOpName = sqlite3OpcodeName(pOp->opcode);
7145671457
nOpName = sqlite3Strlen30(zOpName);
7145771458
if( zOpName[nOpName+1] ){
7145871459
int seenCom = 0;
7145971460
char c;
7146071461
zSynopsis = zOpName += nOpName + 1;
71462
+ if( strncmp(zSynopsis,"IF ",3)==0 ){
71463
+ if( pOp->p5 & SQLITE_STOREP2 ){
71464
+ sqlite3_snprintf(sizeof(zAlt), zAlt, "r[P2] = (%s)", zSynopsis+3);
71465
+ }else{
71466
+ sqlite3_snprintf(sizeof(zAlt), zAlt, "if %s goto P2", zSynopsis+3);
71467
+ }
71468
+ zSynopsis = zAlt;
71469
+ }
7146171470
for(ii=jj=0; jj<nTemp-1 && (c = zSynopsis[ii])!=0; ii++){
7146271471
if( c=='P' ){
7146371472
c = zSynopsis[++ii];
7146471473
if( c=='4' ){
7146571474
sqlite3_snprintf(nTemp-jj, zTemp+jj, "%s", zP4);
@@ -74967,11 +74976,11 @@
7496774976
** execution environment changes in a way that would alter the program
7496874977
** that sqlite3_prepare() generates. For example, if new functions or
7496974978
** collating sequences are registered or if an authorizer function is
7497074979
** added or changed.
7497174980
*/
74972
-SQLITE_API int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt *pStmt){
74981
+SQLITE_API int sqlite3_expired(sqlite3_stmt *pStmt){
7497374982
Vdbe *p = (Vdbe*)pStmt;
7497474983
return p==0 || p->expired;
7497574984
}
7497674985
#endif
7497774986
@@ -75036,11 +75045,11 @@
7503675045
** machine.
7503775046
**
7503875047
** This routine sets the error code and string returned by
7503975048
** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
7504075049
*/
75041
-SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt){
75050
+SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt){
7504275051
int rc;
7504375052
if( pStmt==0 ){
7504475053
/* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL
7504575054
** pointer is a harmless no-op. */
7504675055
rc = SQLITE_OK;
@@ -75063,11 +75072,11 @@
7506375072
** the prior execution is returned.
7506475073
**
7506575074
** This routine sets the error code and string returned by
7506675075
** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
7506775076
*/
75068
-SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt){
75077
+SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt){
7506975078
int rc;
7507075079
if( pStmt==0 ){
7507175080
rc = SQLITE_OK;
7507275081
}else{
7507375082
Vdbe *v = (Vdbe*)pStmt;
@@ -75084,11 +75093,11 @@
7508475093
}
7508575094
7508675095
/*
7508775096
** Set all the parameters in the compiled SQL statement to NULL.
7508875097
*/
75089
-SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){
75098
+SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *pStmt){
7509075099
int i;
7509175100
int rc = SQLITE_OK;
7509275101
Vdbe *p = (Vdbe*)pStmt;
7509375102
#if SQLITE_THREADSAFE
7509475103
sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
@@ -75108,11 +75117,11 @@
7510875117
7510975118
/**************************** sqlite3_value_ *******************************
7511075119
** The following routines extract information from a Mem or sqlite3_value
7511175120
** structure.
7511275121
*/
75113
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){
75122
+SQLITE_API const void *sqlite3_value_blob(sqlite3_value *pVal){
7511475123
Mem *p = (Mem*)pVal;
7511575124
if( p->flags & (MEM_Blob|MEM_Str) ){
7511675125
if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){
7511775126
assert( p->flags==MEM_Null && p->z==0 );
7511875127
return 0;
@@ -75121,48 +75130,48 @@
7512175130
return p->n ? p->z : 0;
7512275131
}else{
7512375132
return sqlite3_value_text(pVal);
7512475133
}
7512575134
}
75126
-SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value *pVal){
75135
+SQLITE_API int sqlite3_value_bytes(sqlite3_value *pVal){
7512775136
return sqlite3ValueBytes(pVal, SQLITE_UTF8);
7512875137
}
75129
-SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value *pVal){
75138
+SQLITE_API int sqlite3_value_bytes16(sqlite3_value *pVal){
7513075139
return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE);
7513175140
}
75132
-SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value *pVal){
75141
+SQLITE_API double sqlite3_value_double(sqlite3_value *pVal){
7513375142
return sqlite3VdbeRealValue((Mem*)pVal);
7513475143
}
75135
-SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value *pVal){
75144
+SQLITE_API int sqlite3_value_int(sqlite3_value *pVal){
7513675145
return (int)sqlite3VdbeIntValue((Mem*)pVal);
7513775146
}
75138
-SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value *pVal){
75147
+SQLITE_API sqlite_int64 sqlite3_value_int64(sqlite3_value *pVal){
7513975148
return sqlite3VdbeIntValue((Mem*)pVal);
7514075149
}
75141
-SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value *pVal){
75150
+SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value *pVal){
7514275151
Mem *pMem = (Mem*)pVal;
7514375152
return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0);
7514475153
}
75145
-SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value *pVal){
75154
+SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value *pVal){
7514675155
return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8);
7514775156
}
7514875157
#ifndef SQLITE_OMIT_UTF16
75149
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value* pVal){
75158
+SQLITE_API const void *sqlite3_value_text16(sqlite3_value* pVal){
7515075159
return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE);
7515175160
}
75152
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value *pVal){
75161
+SQLITE_API const void *sqlite3_value_text16be(sqlite3_value *pVal){
7515375162
return sqlite3ValueText(pVal, SQLITE_UTF16BE);
7515475163
}
75155
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value *pVal){
75164
+SQLITE_API const void *sqlite3_value_text16le(sqlite3_value *pVal){
7515675165
return sqlite3ValueText(pVal, SQLITE_UTF16LE);
7515775166
}
7515875167
#endif /* SQLITE_OMIT_UTF16 */
7515975168
/* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five
7516075169
** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating
7516175170
** point number string BLOB NULL
7516275171
*/
75163
-SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value* pVal){
75172
+SQLITE_API int sqlite3_value_type(sqlite3_value* pVal){
7516475173
static const u8 aType[] = {
7516575174
SQLITE_BLOB, /* 0x00 */
7516675175
SQLITE_NULL, /* 0x01 */
7516775176
SQLITE_TEXT, /* 0x02 */
7516875177
SQLITE_NULL, /* 0x03 */
@@ -75198,11 +75207,11 @@
7519875207
return aType[pVal->flags&MEM_AffMask];
7519975208
}
7520075209
7520175210
/* Make a copy of an sqlite3_value object
7520275211
*/
75203
-SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value *pOrig){
75212
+SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value *pOrig){
7520475213
sqlite3_value *pNew;
7520575214
if( pOrig==0 ) return 0;
7520675215
pNew = sqlite3_malloc( sizeof(*pNew) );
7520775216
if( pNew==0 ) return 0;
7520875217
memset(pNew, 0, sizeof(*pNew));
@@ -75221,11 +75230,11 @@
7522175230
}
7522275231
7522375232
/* Destroy an sqlite3_value object previously obtained from
7522475233
** sqlite3_value_dup().
7522575234
*/
75226
-SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value *pOld){
75235
+SQLITE_API void sqlite3_value_free(sqlite3_value *pOld){
7522775236
sqlite3ValueFree(pOld);
7522875237
}
7522975238
7523075239
7523175240
/**************************** sqlite3_result_ *******************************
@@ -75264,21 +75273,21 @@
7526475273
xDel((void*)p);
7526575274
}
7526675275
if( pCtx ) sqlite3_result_error_toobig(pCtx);
7526775276
return SQLITE_TOOBIG;
7526875277
}
75269
-SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(
75278
+SQLITE_API void sqlite3_result_blob(
7527075279
sqlite3_context *pCtx,
7527175280
const void *z,
7527275281
int n,
7527375282
void (*xDel)(void *)
7527475283
){
7527575284
assert( n>=0 );
7527675285
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7527775286
setResultStrOrError(pCtx, z, n, 0, xDel);
7527875287
}
75279
-SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(
75288
+SQLITE_API void sqlite3_result_blob64(
7528075289
sqlite3_context *pCtx,
7528175290
const void *z,
7528275291
sqlite3_uint64 n,
7528375292
void (*xDel)(void *)
7528475293
){
@@ -75288,56 +75297,56 @@
7528875297
(void)invokeValueDestructor(z, xDel, pCtx);
7528975298
}else{
7529075299
setResultStrOrError(pCtx, z, (int)n, 0, xDel);
7529175300
}
7529275301
}
75293
-SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context *pCtx, double rVal){
75302
+SQLITE_API void sqlite3_result_double(sqlite3_context *pCtx, double rVal){
7529475303
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7529575304
sqlite3VdbeMemSetDouble(pCtx->pOut, rVal);
7529675305
}
75297
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
75306
+SQLITE_API void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
7529875307
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7529975308
pCtx->isError = SQLITE_ERROR;
7530075309
pCtx->fErrorOrAux = 1;
7530175310
sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
7530275311
}
7530375312
#ifndef SQLITE_OMIT_UTF16
75304
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
75313
+SQLITE_API void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
7530575314
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7530675315
pCtx->isError = SQLITE_ERROR;
7530775316
pCtx->fErrorOrAux = 1;
7530875317
sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
7530975318
}
7531075319
#endif
75311
-SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context *pCtx, int iVal){
75320
+SQLITE_API void sqlite3_result_int(sqlite3_context *pCtx, int iVal){
7531275321
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7531375322
sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal);
7531475323
}
75315
-SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){
75324
+SQLITE_API void sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){
7531675325
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7531775326
sqlite3VdbeMemSetInt64(pCtx->pOut, iVal);
7531875327
}
75319
-SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context *pCtx){
75328
+SQLITE_API void sqlite3_result_null(sqlite3_context *pCtx){
7532075329
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7532175330
sqlite3VdbeMemSetNull(pCtx->pOut);
7532275331
}
75323
-SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){
75332
+SQLITE_API void sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){
7532475333
Mem *pOut = pCtx->pOut;
7532575334
assert( sqlite3_mutex_held(pOut->db->mutex) );
7532675335
pOut->eSubtype = eSubtype & 0xff;
7532775336
pOut->flags |= MEM_Subtype;
7532875337
}
75329
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text(
75338
+SQLITE_API void sqlite3_result_text(
7533075339
sqlite3_context *pCtx,
7533175340
const char *z,
7533275341
int n,
7533375342
void (*xDel)(void *)
7533475343
){
7533575344
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7533675345
setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel);
7533775346
}
75338
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(
75347
+SQLITE_API void sqlite3_result_text64(
7533975348
sqlite3_context *pCtx,
7534075349
const char *z,
7534175350
sqlite3_uint64 n,
7534275351
void (*xDel)(void *),
7534375352
unsigned char enc
@@ -75350,56 +75359,56 @@
7535075359
}else{
7535175360
setResultStrOrError(pCtx, z, (int)n, enc, xDel);
7535275361
}
7535375362
}
7535475363
#ifndef SQLITE_OMIT_UTF16
75355
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(
75364
+SQLITE_API void sqlite3_result_text16(
7535675365
sqlite3_context *pCtx,
7535775366
const void *z,
7535875367
int n,
7535975368
void (*xDel)(void *)
7536075369
){
7536175370
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7536275371
setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel);
7536375372
}
75364
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(
75373
+SQLITE_API void sqlite3_result_text16be(
7536575374
sqlite3_context *pCtx,
7536675375
const void *z,
7536775376
int n,
7536875377
void (*xDel)(void *)
7536975378
){
7537075379
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7537175380
setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel);
7537275381
}
75373
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(
75382
+SQLITE_API void sqlite3_result_text16le(
7537475383
sqlite3_context *pCtx,
7537575384
const void *z,
7537675385
int n,
7537775386
void (*xDel)(void *)
7537875387
){
7537975388
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7538075389
setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel);
7538175390
}
7538275391
#endif /* SQLITE_OMIT_UTF16 */
75383
-SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){
75392
+SQLITE_API void sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){
7538475393
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7538575394
sqlite3VdbeMemCopy(pCtx->pOut, pValue);
7538675395
}
75387
-SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){
75396
+SQLITE_API void sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){
7538875397
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7538975398
sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n);
7539075399
}
75391
-SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){
75400
+SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){
7539275401
Mem *pOut = pCtx->pOut;
7539375402
assert( sqlite3_mutex_held(pOut->db->mutex) );
7539475403
if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){
7539575404
return SQLITE_TOOBIG;
7539675405
}
7539775406
sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n);
7539875407
return SQLITE_OK;
7539975408
}
75400
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
75409
+SQLITE_API void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
7540175410
pCtx->isError = errCode;
7540275411
pCtx->fErrorOrAux = 1;
7540375412
#ifdef SQLITE_DEBUG
7540475413
if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode;
7540575414
#endif
@@ -75408,20 +75417,20 @@
7540875417
SQLITE_UTF8, SQLITE_STATIC);
7540975418
}
7541075419
}
7541175420
7541275421
/* Force an SQLITE_TOOBIG error. */
75413
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context *pCtx){
75422
+SQLITE_API void sqlite3_result_error_toobig(sqlite3_context *pCtx){
7541475423
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7541575424
pCtx->isError = SQLITE_TOOBIG;
7541675425
pCtx->fErrorOrAux = 1;
7541775426
sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1,
7541875427
SQLITE_UTF8, SQLITE_STATIC);
7541975428
}
7542075429
7542175430
/* An SQLITE_NOMEM error. */
75422
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context *pCtx){
75431
+SQLITE_API void sqlite3_result_error_nomem(sqlite3_context *pCtx){
7542375432
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7542475433
sqlite3VdbeMemSetNull(pCtx->pOut);
7542575434
pCtx->isError = SQLITE_NOMEM_BKPT;
7542675435
pCtx->fErrorOrAux = 1;
7542775436
sqlite3OomFault(pCtx->pOut->db);
@@ -75589,11 +75598,11 @@
7558975598
/*
7559075599
** This is the top-level implementation of sqlite3_step(). Call
7559175600
** sqlite3Step() to do most of the work. If a schema error occurs,
7559275601
** call sqlite3Reprepare() and try again.
7559375602
*/
75594
-SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt *pStmt){
75603
+SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){
7559575604
int rc = SQLITE_OK; /* Result from sqlite3Step() */
7559675605
int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */
7559775606
Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */
7559875607
int cnt = 0; /* Counter to prevent infinite loop of reprepares */
7559975608
sqlite3 *db; /* The database connection */
@@ -75640,11 +75649,11 @@
7564075649
7564175650
/*
7564275651
** Extract the user data from a sqlite3_context structure and return a
7564375652
** pointer to it.
7564475653
*/
75645
-SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context *p){
75654
+SQLITE_API void *sqlite3_user_data(sqlite3_context *p){
7564675655
assert( p && p->pFunc );
7564775656
return p->pFunc->pUserData;
7564875657
}
7564975658
7565075659
/*
@@ -75655,11 +75664,11 @@
7565575664
** returns a copy of the pointer to the database connection (the 1st
7565675665
** parameter) of the sqlite3_create_function() and
7565775666
** sqlite3_create_function16() routines that originally registered the
7565875667
** application defined function.
7565975668
*/
75660
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context *p){
75669
+SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){
7566175670
assert( p && p->pOut );
7566275671
return p->pOut->db;
7566375672
}
7566475673
7566575674
/*
@@ -75731,11 +75740,11 @@
7573175740
/*
7573275741
** Allocate or return the aggregate context for a user function. A new
7573375742
** context is allocated on the first call. Subsequent calls return the
7573475743
** same context that was returned on prior calls.
7573575744
*/
75736
-SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context *p, int nByte){
75745
+SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *p, int nByte){
7573775746
assert( p && p->pFunc && p->pFunc->xFinalize );
7573875747
assert( sqlite3_mutex_held(p->pOut->db->mutex) );
7573975748
testcase( nByte<0 );
7574075749
if( (p->pMem->flags & MEM_Agg)==0 ){
7574175750
return createAggContext(p, nByte);
@@ -75746,11 +75755,11 @@
7574675755
7574775756
/*
7574875757
** Return the auxiliary data pointer, if any, for the iArg'th argument to
7574975758
** the user-function defined by pCtx.
7575075759
*/
75751
-SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){
75760
+SQLITE_API void *sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){
7575275761
AuxData *pAuxData;
7575375762
7575475763
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
7575575764
#if SQLITE_ENABLE_STAT3_OR_STAT4
7575675765
if( pCtx->pVdbe==0 ) return 0;
@@ -75767,11 +75776,11 @@
7576775776
/*
7576875777
** Set the auxiliary data pointer and delete function, for the iArg'th
7576975778
** argument to the user-function defined by pCtx. Any previous value is
7577075779
** deleted by calling the delete function specified when it was set.
7577175780
*/
75772
-SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(
75781
+SQLITE_API void sqlite3_set_auxdata(
7577375782
sqlite3_context *pCtx,
7577475783
int iArg,
7577575784
void *pAux,
7577675785
void (*xDelete)(void*)
7577775786
){
@@ -75822,29 +75831,29 @@
7582275831
** This function is deprecated. Do not use it for new code. It is
7582375832
** provide only to avoid breaking legacy code. New aggregate function
7582475833
** implementations should keep their own counts within their aggregate
7582575834
** context.
7582675835
*/
75827
-SQLITE_API int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context *p){
75836
+SQLITE_API int sqlite3_aggregate_count(sqlite3_context *p){
7582875837
assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize );
7582975838
return p->pMem->n;
7583075839
}
7583175840
#endif
7583275841
7583375842
/*
7583475843
** Return the number of columns in the result set for the statement pStmt.
7583575844
*/
75836
-SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt){
75845
+SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt){
7583775846
Vdbe *pVm = (Vdbe *)pStmt;
7583875847
return pVm ? pVm->nResColumn : 0;
7583975848
}
7584075849
7584175850
/*
7584275851
** Return the number of values available from the current row of the
7584375852
** currently executing statement pStmt.
7584475853
*/
75845
-SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt){
75854
+SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt){
7584675855
Vdbe *pVm = (Vdbe *)pStmt;
7584775856
if( pVm==0 || pVm->pResultSet==0 ) return 0;
7584875857
return pVm->nResColumn;
7584975858
}
7585075859
@@ -75943,67 +75952,67 @@
7594375952
7594475953
/**************************** sqlite3_column_ *******************************
7594575954
** The following routines are used to access elements of the current row
7594675955
** in the result set.
7594775956
*/
75948
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt *pStmt, int i){
75957
+SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt *pStmt, int i){
7594975958
const void *val;
7595075959
val = sqlite3_value_blob( columnMem(pStmt,i) );
7595175960
/* Even though there is no encoding conversion, value_blob() might
7595275961
** need to call malloc() to expand the result of a zeroblob()
7595375962
** expression.
7595475963
*/
7595575964
columnMallocFailure(pStmt);
7595675965
return val;
7595775966
}
75958
-SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){
75967
+SQLITE_API int sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){
7595975968
int val = sqlite3_value_bytes( columnMem(pStmt,i) );
7596075969
columnMallocFailure(pStmt);
7596175970
return val;
7596275971
}
75963
-SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){
75972
+SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){
7596475973
int val = sqlite3_value_bytes16( columnMem(pStmt,i) );
7596575974
columnMallocFailure(pStmt);
7596675975
return val;
7596775976
}
75968
-SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt *pStmt, int i){
75977
+SQLITE_API double sqlite3_column_double(sqlite3_stmt *pStmt, int i){
7596975978
double val = sqlite3_value_double( columnMem(pStmt,i) );
7597075979
columnMallocFailure(pStmt);
7597175980
return val;
7597275981
}
75973
-SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt *pStmt, int i){
75982
+SQLITE_API int sqlite3_column_int(sqlite3_stmt *pStmt, int i){
7597475983
int val = sqlite3_value_int( columnMem(pStmt,i) );
7597575984
columnMallocFailure(pStmt);
7597675985
return val;
7597775986
}
75978
-SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt *pStmt, int i){
75987
+SQLITE_API sqlite_int64 sqlite3_column_int64(sqlite3_stmt *pStmt, int i){
7597975988
sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) );
7598075989
columnMallocFailure(pStmt);
7598175990
return val;
7598275991
}
75983
-SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt *pStmt, int i){
75992
+SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt *pStmt, int i){
7598475993
const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) );
7598575994
columnMallocFailure(pStmt);
7598675995
return val;
7598775996
}
75988
-SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt *pStmt, int i){
75997
+SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt *pStmt, int i){
7598975998
Mem *pOut = columnMem(pStmt, i);
7599075999
if( pOut->flags&MEM_Static ){
7599176000
pOut->flags &= ~MEM_Static;
7599276001
pOut->flags |= MEM_Ephem;
7599376002
}
7599476003
columnMallocFailure(pStmt);
7599576004
return (sqlite3_value *)pOut;
7599676005
}
7599776006
#ifndef SQLITE_OMIT_UTF16
75998
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt *pStmt, int i){
76007
+SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt *pStmt, int i){
7599976008
const void *val = sqlite3_value_text16( columnMem(pStmt,i) );
7600076009
columnMallocFailure(pStmt);
7600176010
return val;
7600276011
}
7600376012
#endif /* SQLITE_OMIT_UTF16 */
76004
-SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt *pStmt, int i){
76013
+SQLITE_API int sqlite3_column_type(sqlite3_stmt *pStmt, int i){
7600576014
int iType = sqlite3_value_type( columnMem(pStmt,i) );
7600676015
columnMallocFailure(pStmt);
7600776016
return iType;
7600876017
}
7600976018
@@ -76063,16 +76072,16 @@
7606376072
7606476073
/*
7606576074
** Return the name of the Nth column of the result set returned by SQL
7606676075
** statement pStmt.
7606776076
*/
76068
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt *pStmt, int N){
76077
+SQLITE_API const char *sqlite3_column_name(sqlite3_stmt *pStmt, int N){
7606976078
return columnName(
7607076079
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME);
7607176080
}
7607276081
#ifndef SQLITE_OMIT_UTF16
76073
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt *pStmt, int N){
76082
+SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt *pStmt, int N){
7607476083
return columnName(
7607576084
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME);
7607676085
}
7607776086
#endif
7607876087
@@ -76088,16 +76097,16 @@
7608876097
#ifndef SQLITE_OMIT_DECLTYPE
7608976098
/*
7609076099
** Return the column declaration type (if applicable) of the 'i'th column
7609176100
** of the result set of SQL statement pStmt.
7609276101
*/
76093
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){
76102
+SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){
7609476103
return columnName(
7609576104
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE);
7609676105
}
7609776106
#ifndef SQLITE_OMIT_UTF16
76098
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){
76107
+SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){
7609976108
return columnName(
7610076109
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE);
7610176110
}
7610276111
#endif /* SQLITE_OMIT_UTF16 */
7610376112
#endif /* SQLITE_OMIT_DECLTYPE */
@@ -76106,16 +76115,16 @@
7610676115
/*
7610776116
** Return the name of the database from which a result column derives.
7610876117
** NULL is returned if the result column is an expression or constant or
7610976118
** anything else which is not an unambiguous reference to a database column.
7611076119
*/
76111
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){
76120
+SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){
7611276121
return columnName(
7611376122
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE);
7611476123
}
7611576124
#ifndef SQLITE_OMIT_UTF16
76116
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){
76125
+SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){
7611776126
return columnName(
7611876127
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE);
7611976128
}
7612076129
#endif /* SQLITE_OMIT_UTF16 */
7612176130
@@ -76122,16 +76131,16 @@
7612276131
/*
7612376132
** Return the name of the table from which a result column derives.
7612476133
** NULL is returned if the result column is an expression or constant or
7612576134
** anything else which is not an unambiguous reference to a database column.
7612676135
*/
76127
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){
76136
+SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){
7612876137
return columnName(
7612976138
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE);
7613076139
}
7613176140
#ifndef SQLITE_OMIT_UTF16
76132
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){
76141
+SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){
7613376142
return columnName(
7613476143
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE);
7613576144
}
7613676145
#endif /* SQLITE_OMIT_UTF16 */
7613776146
@@ -76138,16 +76147,16 @@
7613876147
/*
7613976148
** Return the name of the table column from which a result column derives.
7614076149
** NULL is returned if the result column is an expression or constant or
7614176150
** anything else which is not an unambiguous reference to a database column.
7614276151
*/
76143
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){
76152
+SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){
7614476153
return columnName(
7614576154
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN);
7614676155
}
7614776156
#ifndef SQLITE_OMIT_UTF16
76148
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){
76157
+SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){
7614976158
return columnName(
7615076159
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN);
7615176160
}
7615276161
#endif /* SQLITE_OMIT_UTF16 */
7615376162
#endif /* SQLITE_ENABLE_COLUMN_METADATA */
@@ -76244,11 +76253,11 @@
7624476253
7624576254
7624676255
/*
7624776256
** Bind a blob value to an SQL statement variable.
7624876257
*/
76249
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(
76258
+SQLITE_API int sqlite3_bind_blob(
7625076259
sqlite3_stmt *pStmt,
7625176260
int i,
7625276261
const void *zData,
7625376262
int nData,
7625476263
void (*xDel)(void*)
@@ -76256,11 +76265,11 @@
7625676265
#ifdef SQLITE_ENABLE_API_ARMOR
7625776266
if( nData<0 ) return SQLITE_MISUSE_BKPT;
7625876267
#endif
7625976268
return bindText(pStmt, i, zData, nData, xDel, 0);
7626076269
}
76261
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(
76270
+SQLITE_API int sqlite3_bind_blob64(
7626276271
sqlite3_stmt *pStmt,
7626376272
int i,
7626476273
const void *zData,
7626576274
sqlite3_uint64 nData,
7626676275
void (*xDel)(void*)
@@ -76270,52 +76279,52 @@
7627076279
return invokeValueDestructor(zData, xDel, 0);
7627176280
}else{
7627276281
return bindText(pStmt, i, zData, (int)nData, xDel, 0);
7627376282
}
7627476283
}
76275
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
76284
+SQLITE_API int sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
7627676285
int rc;
7627776286
Vdbe *p = (Vdbe *)pStmt;
7627876287
rc = vdbeUnbind(p, i);
7627976288
if( rc==SQLITE_OK ){
7628076289
sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue);
7628176290
sqlite3_mutex_leave(p->db->mutex);
7628276291
}
7628376292
return rc;
7628476293
}
76285
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){
76294
+SQLITE_API int sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){
7628676295
return sqlite3_bind_int64(p, i, (i64)iValue);
7628776296
}
76288
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
76297
+SQLITE_API int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
7628976298
int rc;
7629076299
Vdbe *p = (Vdbe *)pStmt;
7629176300
rc = vdbeUnbind(p, i);
7629276301
if( rc==SQLITE_OK ){
7629376302
sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue);
7629476303
sqlite3_mutex_leave(p->db->mutex);
7629576304
}
7629676305
return rc;
7629776306
}
76298
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
76307
+SQLITE_API int sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
7629976308
int rc;
7630076309
Vdbe *p = (Vdbe*)pStmt;
7630176310
rc = vdbeUnbind(p, i);
7630276311
if( rc==SQLITE_OK ){
7630376312
sqlite3_mutex_leave(p->db->mutex);
7630476313
}
7630576314
return rc;
7630676315
}
76307
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(
76316
+SQLITE_API int sqlite3_bind_text(
7630876317
sqlite3_stmt *pStmt,
7630976318
int i,
7631076319
const char *zData,
7631176320
int nData,
7631276321
void (*xDel)(void*)
7631376322
){
7631476323
return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8);
7631576324
}
76316
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(
76325
+SQLITE_API int sqlite3_bind_text64(
7631776326
sqlite3_stmt *pStmt,
7631876327
int i,
7631976328
const char *zData,
7632076329
sqlite3_uint64 nData,
7632176330
void (*xDel)(void*),
@@ -76328,21 +76337,21 @@
7632876337
if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE;
7632976338
return bindText(pStmt, i, zData, (int)nData, xDel, enc);
7633076339
}
7633176340
}
7633276341
#ifndef SQLITE_OMIT_UTF16
76333
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(
76342
+SQLITE_API int sqlite3_bind_text16(
7633476343
sqlite3_stmt *pStmt,
7633576344
int i,
7633676345
const void *zData,
7633776346
int nData,
7633876347
void (*xDel)(void*)
7633976348
){
7634076349
return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE);
7634176350
}
7634276351
#endif /* SQLITE_OMIT_UTF16 */
76343
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
76352
+SQLITE_API int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
7634476353
int rc;
7634576354
switch( sqlite3_value_type((sqlite3_value*)pValue) ){
7634676355
case SQLITE_INTEGER: {
7634776356
rc = sqlite3_bind_int64(pStmt, i, pValue->u.i);
7634876357
break;
@@ -76369,21 +76378,21 @@
7636976378
break;
7637076379
}
7637176380
}
7637276381
return rc;
7637376382
}
76374
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){
76383
+SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){
7637576384
int rc;
7637676385
Vdbe *p = (Vdbe *)pStmt;
7637776386
rc = vdbeUnbind(p, i);
7637876387
if( rc==SQLITE_OK ){
7637976388
sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);
7638076389
sqlite3_mutex_leave(p->db->mutex);
7638176390
}
7638276391
return rc;
7638376392
}
76384
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){
76393
+SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){
7638576394
int rc;
7638676395
Vdbe *p = (Vdbe *)pStmt;
7638776396
sqlite3_mutex_enter(p->db->mutex);
7638876397
if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){
7638976398
rc = SQLITE_TOOBIG;
@@ -76398,11 +76407,11 @@
7639876407
7639976408
/*
7640076409
** Return the number of wildcards that can be potentially bound to.
7640176410
** This routine is added to support DBD::SQLite.
7640276411
*/
76403
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){
76412
+SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){
7640476413
Vdbe *p = (Vdbe*)pStmt;
7640576414
return p ? p->nVar : 0;
7640676415
}
7640776416
7640876417
/*
@@ -76409,11 +76418,11 @@
7640976418
** Return the name of a wildcard parameter. Return NULL if the index
7641076419
** is out of range or if the wildcard is unnamed.
7641176420
**
7641276421
** The result is always UTF-8.
7641376422
*/
76414
-SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){
76423
+SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){
7641576424
Vdbe *p = (Vdbe*)pStmt;
7641676425
if( p==0 || i<1 || i>p->nzVar ){
7641776426
return 0;
7641876427
}
7641976428
return p->azVar[i-1];
@@ -76437,11 +76446,11 @@
7643776446
}
7643876447
}
7643976448
}
7644076449
return 0;
7644176450
}
76442
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
76451
+SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
7644376452
return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName));
7644476453
}
7644576454
7644676455
/*
7644776456
** Transfer all bindings from the first statement over to the second.
@@ -76471,11 +76480,11 @@
7647176480
**
7647276481
** If the two statements contain a different number of bindings, then
7647376482
** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise
7647476483
** SQLITE_OK is returned.
7647576484
*/
76476
-SQLITE_API int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
76485
+SQLITE_API int sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
7647776486
Vdbe *pFrom = (Vdbe*)pFromStmt;
7647876487
Vdbe *pTo = (Vdbe*)pToStmt;
7647976488
if( pFrom->nVar!=pTo->nVar ){
7648076489
return SQLITE_ERROR;
7648176490
}
@@ -76493,26 +76502,26 @@
7649376502
** Return the sqlite3* database handle to which the prepared statement given
7649476503
** in the argument belongs. This is the same database handle that was
7649576504
** the first argument to the sqlite3_prepare() that was used to create
7649676505
** the statement in the first place.
7649776506
*/
76498
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt *pStmt){
76507
+SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *pStmt){
7649976508
return pStmt ? ((Vdbe*)pStmt)->db : 0;
7650076509
}
7650176510
7650276511
/*
7650376512
** Return true if the prepared statement is guaranteed to not modify the
7650476513
** database.
7650576514
*/
76506
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt){
76515
+SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt){
7650776516
return pStmt ? ((Vdbe*)pStmt)->readOnly : 1;
7650876517
}
7650976518
7651076519
/*
7651176520
** Return true if the prepared statement is in need of being reset.
7651276521
*/
76513
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){
76522
+SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt *pStmt){
7651476523
Vdbe *v = (Vdbe*)pStmt;
7651576524
return v!=0 && v->pc>=0 && v->magic==VDBE_MAGIC_RUN;
7651676525
}
7651776526
7651876527
/*
@@ -76519,11 +76528,11 @@
7651976528
** Return a pointer to the next prepared statement after pStmt associated
7652076529
** with database connection pDb. If pStmt is NULL, return the first
7652176530
** prepared statement for the database connection. Return NULL if there
7652276531
** are no more.
7652376532
*/
76524
-SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
76533
+SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
7652576534
sqlite3_stmt *pNext;
7652676535
#ifdef SQLITE_ENABLE_API_ARMOR
7652776536
if( !sqlite3SafetyCheckOk(pDb) ){
7652876537
(void)SQLITE_MISUSE_BKPT;
7652976538
return 0;
@@ -76540,11 +76549,11 @@
7654076549
}
7654176550
7654276551
/*
7654376552
** Return the value of a status counter for a prepared statement
7654476553
*/
76545
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
76554
+SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
7654676555
Vdbe *pVdbe = (Vdbe*)pStmt;
7654776556
u32 v;
7654876557
#ifdef SQLITE_ENABLE_API_ARMOR
7654976558
if( !pStmt ){
7655076559
(void)SQLITE_MISUSE_BKPT;
@@ -76557,11 +76566,11 @@
7655776566
}
7655876567
7655976568
/*
7656076569
** Return the SQL associated with a prepared statement
7656176570
*/
76562
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt){
76571
+SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt){
7656376572
Vdbe *p = (Vdbe *)pStmt;
7656476573
return p ? p->zSql : 0;
7656576574
}
7656676575
7656776576
/*
@@ -76571,11 +76580,11 @@
7657176580
** freeing the returned string by passing it to sqlite3_free().
7657276581
**
7657376582
** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of
7657476583
** expanded bound parameters.
7657576584
*/
76576
-SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt){
76585
+SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt){
7657776586
#ifdef SQLITE_OMIT_TRACE
7657876587
return 0;
7657976588
#else
7658076589
char *z = 0;
7658176590
const char *zSql = sqlite3_sql(pStmt);
@@ -76613,11 +76622,11 @@
7661376622
7661476623
/*
7661576624
** This function is called from within a pre-update callback to retrieve
7661676625
** a field of the row currently being updated or deleted.
7661776626
*/
76618
-SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
76627
+SQLITE_API int sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
7661976628
PreUpdate *p = db->pPreUpdate;
7662076629
int rc = SQLITE_OK;
7662176630
7662276631
/* Test that this call is being made from within an SQLITE_DELETE or
7662376632
** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */
@@ -76668,11 +76677,11 @@
7666876677
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
7666976678
/*
7667076679
** This function is called from within a pre-update callback to retrieve
7667176680
** the number of columns in the row being updated, deleted or inserted.
7667276681
*/
76673
-SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *db){
76682
+SQLITE_API int sqlite3_preupdate_count(sqlite3 *db){
7667476683
PreUpdate *p = db->pPreUpdate;
7667576684
return (p ? p->keyinfo.nField : 0);
7667676685
}
7667776686
#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
7667876687
@@ -76686,11 +76695,11 @@
7668676695
** top-level trigger etc.).
7668776696
**
7668876697
** For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL
7668976698
** or SET DEFAULT action is considered a trigger.
7669076699
*/
76691
-SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *db){
76700
+SQLITE_API int sqlite3_preupdate_depth(sqlite3 *db){
7669276701
PreUpdate *p = db->pPreUpdate;
7669376702
return (p ? p->v->nFrame : 0);
7669476703
}
7669576704
#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
7669676705
@@ -76697,11 +76706,11 @@
7669776706
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
7669876707
/*
7669976708
** This function is called from within a pre-update callback to retrieve
7670076709
** a field of the row currently being updated or inserted.
7670176710
*/
76702
-SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
76711
+SQLITE_API int sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
7670376712
PreUpdate *p = db->pPreUpdate;
7670476713
int rc = SQLITE_OK;
7670576714
Mem *pMem;
7670676715
7670776716
if( !p || p->op==SQLITE_DELETE ){
@@ -76771,11 +76780,11 @@
7677176780
7677276781
#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
7677376782
/*
7677476783
** Return status data for a single loop within query pStmt.
7677576784
*/
76776
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
76785
+SQLITE_API int sqlite3_stmt_scanstatus(
7677776786
sqlite3_stmt *pStmt, /* Prepared statement being queried */
7677876787
int idx, /* Index of loop to report on */
7677976788
int iScanStatusOp, /* Which metric to return */
7678076789
void *pOut /* OUT: Write the answer here */
7678176790
){
@@ -76830,11 +76839,11 @@
7683076839
}
7683176840
7683276841
/*
7683376842
** Zero all counters associated with the sqlite3_stmt_scanstatus() data.
7683476843
*/
76835
-SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){
76844
+SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){
7683676845
Vdbe *p = (Vdbe*)pStmt;
7683776846
memset(p->anExec, 0, p->nOp * sizeof(i64));
7683876847
}
7683976848
#endif /* SQLITE_ENABLE_STMT_SCANSTATUS */
7684076849
@@ -77357,11 +77366,11 @@
7735777366
** Try to convert the type of a function argument or a result column
7735877367
** into a numeric representation. Use either INTEGER or REAL whichever
7735977368
** is appropriate. But only do the conversion if it is possible without
7736077369
** loss of information and return the revised type of the argument.
7736177370
*/
77362
-SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value *pVal){
77371
+SQLITE_API int sqlite3_value_numeric_type(sqlite3_value *pVal){
7736377372
int eType = sqlite3_value_type(pVal);
7736477373
if( eType==SQLITE_TEXT ){
7736577374
Mem *pMem = (Mem*)pVal;
7736677375
applyNumericAffinity(pMem, 0);
7736777376
eType = sqlite3_value_type(pVal);
@@ -79007,11 +79016,11 @@
7900779016
break;
7900879017
}
7900979018
#endif /* SQLITE_OMIT_CAST */
7901079019
7901179020
/* Opcode: Lt P1 P2 P3 P4 P5
79012
-** Synopsis: if r[P1]<r[P3] goto P2
79021
+** Synopsis: IF r[P3]<r[P1]
7901379022
**
7901479023
** Compare the values in register P1 and P3. If reg(P3)<reg(P1) then
7901579024
** jump to address P2.
7901679025
**
7901779026
** If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or
@@ -79042,11 +79051,11 @@
7904279051
** If the SQLITE_NULLEQ bit is set in P5, then NULL values are considered
7904379052
** equal to one another, provided that they do not have their MEM_Cleared
7904479053
** bit set.
7904579054
*/
7904679055
/* Opcode: Ne P1 P2 P3 P4 P5
79047
-** Synopsis: if r[P1]!=r[P3] goto P2
79056
+** Synopsis: IF r[P3]!=r[P1]
7904879057
**
7904979058
** This works just like the Lt opcode except that the jump is taken if
7905079059
** the operands in registers P1 and P3 are not equal. See the Lt opcode for
7905179060
** additional information.
7905279061
**
@@ -79055,11 +79064,11 @@
7905579064
** of comparison is false. If either operand is NULL then the result is true.
7905679065
** If neither operand is NULL the result is the same as it would be if
7905779066
** the SQLITE_NULLEQ flag were omitted from P5.
7905879067
*/
7905979068
/* Opcode: Eq P1 P2 P3 P4 P5
79060
-** Synopsis: if r[P1]==r[P3] goto P2
79069
+** Synopsis: IF r[P3]==r[P1]
7906179070
**
7906279071
** This works just like the Lt opcode except that the jump is taken if
7906379072
** the operands in registers P1 and P3 are equal.
7906479073
** See the Lt opcode for additional information.
7906579074
**
@@ -79068,25 +79077,25 @@
7906879077
** of comparison is true. If either operand is NULL then the result is false.
7906979078
** If neither operand is NULL the result is the same as it would be if
7907079079
** the SQLITE_NULLEQ flag were omitted from P5.
7907179080
*/
7907279081
/* Opcode: Le P1 P2 P3 P4 P5
79073
-** Synopsis: if r[P1]<=r[P3] goto P2
79082
+** Synopsis: IF r[P3]<=r[P1]
7907479083
**
7907579084
** This works just like the Lt opcode except that the jump is taken if
7907679085
** the content of register P3 is less than or equal to the content of
7907779086
** register P1. See the Lt opcode for additional information.
7907879087
*/
7907979088
/* Opcode: Gt P1 P2 P3 P4 P5
79080
-** Synopsis: if r[P1]>r[P3] goto P2
79089
+** Synopsis: IF r[P3]>r[P1]
7908179090
**
7908279091
** This works just like the Lt opcode except that the jump is taken if
7908379092
** the content of register P3 is greater than the content of
7908479093
** register P1. See the Lt opcode for additional information.
7908579094
*/
7908679095
/* Opcode: Ge P1 P2 P3 P4 P5
79087
-** Synopsis: if r[P1]>=r[P3] goto P2
79096
+** Synopsis: IF r[P3]>=r[P1]
7908879097
**
7908979098
** This works just like the Lt opcode except that the jump is taken if
7909079099
** the content of register P3 is greater than or equal to the content of
7909179100
** register P1. See the Lt opcode for additional information.
7909279101
*/
@@ -84209,11 +84218,11 @@
8420984218
}
8421084219
8421184220
/*
8421284221
** Open a blob handle.
8421384222
*/
84214
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
84223
+SQLITE_API int sqlite3_blob_open(
8421584224
sqlite3* db, /* The database connection */
8421684225
const char *zDb, /* The attached database containing the blob */
8421784226
const char *zTable, /* The table containing the blob */
8421884227
const char *zColumn, /* The column containing the blob */
8421984228
sqlite_int64 iRow, /* The row containing the glob */
@@ -84450,11 +84459,11 @@
8445084459
8445184460
/*
8445284461
** Close a blob handle that was previously created using
8445384462
** sqlite3_blob_open().
8445484463
*/
84455
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *pBlob){
84464
+SQLITE_API int sqlite3_blob_close(sqlite3_blob *pBlob){
8445684465
Incrblob *p = (Incrblob *)pBlob;
8445784466
int rc;
8445884467
sqlite3 *db;
8445984468
8446084469
if( p ){
@@ -84543,28 +84552,28 @@
8454384552
}
8454484553
8454584554
/*
8454684555
** Read data from a blob handle.
8454784556
*/
84548
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){
84557
+SQLITE_API int sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){
8454984558
return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData);
8455084559
}
8455184560
8455284561
/*
8455384562
** Write data to a blob handle.
8455484563
*/
84555
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){
84564
+SQLITE_API int sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){
8455684565
return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData);
8455784566
}
8455884567
8455984568
/*
8456084569
** Query a blob handle for the size of the data.
8456184570
**
8456284571
** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
8456384572
** so no mutex is required for access.
8456484573
*/
84565
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *pBlob){
84574
+SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *pBlob){
8456684575
Incrblob *p = (Incrblob *)pBlob;
8456784576
return (p && p->pStmt) ? p->nByte : 0;
8456884577
}
8456984578
8457084579
/*
@@ -84575,11 +84584,11 @@
8457584584
** contain a blob or text value, then an error code is returned and the
8457684585
** database handle error code and message set. If this happens, then all
8457784586
** subsequent calls to sqlite3_blob_xxx() functions (except blob_close())
8457884587
** immediately return SQLITE_ABORT.
8457984588
*/
84580
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){
84589
+SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){
8458184590
int rc;
8458284591
Incrblob *p = (Incrblob *)pBlob;
8458384592
sqlite3 *db;
8458484593
8458584594
if( p==0 ) return SQLITE_MISUSE_BKPT;
@@ -97188,11 +97197,11 @@
9718897197
** and attempts to write the column will be ignored.
9718997198
**
9719097199
** Setting the auth function to NULL disables this hook. The default
9719197200
** setting of the auth function is NULL.
9719297201
*/
97193
-SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
97202
+SQLITE_API int sqlite3_set_authorizer(
9719497203
sqlite3 *db,
9719597204
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
9719697205
void *pArg
9719797206
){
9719897207
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -103958,18 +103967,18 @@
103958103967
}
103959103968
103960103969
/*
103961103970
** The sqlite3_strglob() interface.
103962103971
*/
103963
-SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlobPattern, const char *zString){
103972
+SQLITE_API int sqlite3_strglob(const char *zGlobPattern, const char *zString){
103964103973
return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, '[')==0;
103965103974
}
103966103975
103967103976
/*
103968103977
** The sqlite3_strlike() interface.
103969103978
*/
103970
-SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){
103979
+SQLITE_API int sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){
103971103980
return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc)==0;
103972103981
}
103973103982
103974103983
/*
103975103984
** Count the number of times that the LIKE operator (or GLOB which is
@@ -108244,19 +108253,19 @@
108244108253
}
108245108254
if( piIdxCur ) *piIdxCur = iBase;
108246108255
for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
108247108256
int iIdxCur = iBase++;
108248108257
assert( pIdx->pSchema==pTab->pSchema );
108258
+ if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){
108259
+ if( piDataCur ) *piDataCur = iIdxCur;
108260
+ p5 = 0;
108261
+ }
108249108262
if( aToOpen==0 || aToOpen[i+1] ){
108250108263
sqlite3VdbeAddOp3(v, op, iIdxCur, pIdx->tnum, iDb);
108251108264
sqlite3VdbeSetP4KeyInfo(pParse, pIdx);
108252
- VdbeComment((v, "%s", pIdx->zName));
108253
- }
108254
- if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){
108255
- if( piDataCur ) *piDataCur = iIdxCur;
108256
- }else{
108257108265
sqlite3VdbeChangeP5(v, p5);
108266
+ VdbeComment((v, "%s", pIdx->zName));
108258108267
}
108259108268
}
108260108269
if( iBase>pParse->nTab ) pParse->nTab = iBase;
108261108270
return i;
108262108271
}
@@ -108684,11 +108693,11 @@
108684108693
** If the SQL is a query, then for each row in the query result
108685108694
** the xCallback() function is called. pArg becomes the first
108686108695
** argument to xCallback(). If xCallback=NULL then no callback
108687108696
** is invoked, even for queries.
108688108697
*/
108689
-SQLITE_API int SQLITE_STDCALL sqlite3_exec(
108698
+SQLITE_API int sqlite3_exec(
108690108699
sqlite3 *db, /* The database on which the SQL executes */
108691108700
const char *zSql, /* The SQL to be executed */
108692108701
sqlite3_callback xCallback, /* Invoke this callback routine */
108693108702
void *pArg, /* First argument to xCallback() */
108694108703
char **pzErrMsg /* Write error messages here */
@@ -109946,11 +109955,11 @@
109946109955
db->aExtension = aHandle;
109947109956
109948109957
db->aExtension[db->nExtension++] = handle;
109949109958
return SQLITE_OK;
109950109959
}
109951
-SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
109960
+SQLITE_API int sqlite3_load_extension(
109952109961
sqlite3 *db, /* Load the extension into this database connection */
109953109962
const char *zFile, /* Name of the shared library containing extension */
109954109963
const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */
109955109964
char **pzErrMsg /* Put error message here if not 0 */
109956109965
){
@@ -109977,11 +109986,11 @@
109977109986
109978109987
/*
109979109988
** Enable or disable extension loading. Extension loading is disabled by
109980109989
** default so as not to open security holes in older applications.
109981109990
*/
109982
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff){
109991
+SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){
109983109992
sqlite3_mutex_enter(db->mutex);
109984109993
if( onoff ){
109985109994
db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc;
109986109995
}else{
109987109996
db->flags &= ~(SQLITE_LoadExtension|SQLITE_LoadExtFunc);
@@ -110034,11 +110043,11 @@
110034110043
110035110044
/*
110036110045
** Register a statically linked extension that is automatically
110037110046
** loaded by every new database connection.
110038110047
*/
110039
-SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(
110048
+SQLITE_API int sqlite3_auto_extension(
110040110049
void (*xInit)(void)
110041110050
){
110042110051
int rc = SQLITE_OK;
110043110052
#ifndef SQLITE_OMIT_AUTOINIT
110044110053
rc = sqlite3_initialize();
@@ -110081,11 +110090,11 @@
110081110090
** routine is a no-op.
110082110091
**
110083110092
** Return 1 if xInit was found on the list and removed. Return 0 if xInit
110084110093
** was not on the list.
110085110094
*/
110086
-SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(
110095
+SQLITE_API int sqlite3_cancel_auto_extension(
110087110096
void (*xInit)(void)
110088110097
){
110089110098
#if SQLITE_THREADSAFE
110090110099
sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
110091110100
#endif
@@ -110106,11 +110115,11 @@
110106110115
}
110107110116
110108110117
/*
110109110118
** Reset the automatic extension loading mechanism.
110110110119
*/
110111
-SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void){
110120
+SQLITE_API void sqlite3_reset_auto_extension(void){
110112110121
#ifndef SQLITE_OMIT_AUTOINIT
110113110122
if( sqlite3_initialize()==SQLITE_OK )
110114110123
#endif
110115110124
{
110116110125
#if SQLITE_THREADSAFE
@@ -113367,11 +113376,11 @@
113367113376
** and so if a schema change occurs, SQLITE_SCHEMA is returned by
113368113377
** sqlite3_step(). In the new version, the original SQL text is retained
113369113378
** and the statement is automatically recompiled if an schema change
113370113379
** occurs.
113371113380
*/
113372
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare(
113381
+SQLITE_API int sqlite3_prepare(
113373113382
sqlite3 *db, /* Database handle. */
113374113383
const char *zSql, /* UTF-8 encoded SQL statement. */
113375113384
int nBytes, /* Length of zSql in bytes. */
113376113385
sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113377113386
const char **pzTail /* OUT: End of parsed string */
@@ -113379,11 +113388,11 @@
113379113388
int rc;
113380113389
rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail);
113381113390
assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
113382113391
return rc;
113383113392
}
113384
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2(
113393
+SQLITE_API int sqlite3_prepare_v2(
113385113394
sqlite3 *db, /* Database handle. */
113386113395
const char *zSql, /* UTF-8 encoded SQL statement. */
113387113396
int nBytes, /* Length of zSql in bytes. */
113388113397
sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113389113398
const char **pzTail /* OUT: End of parsed string */
@@ -113455,11 +113464,11 @@
113455113464
** and so if a schema change occurs, SQLITE_SCHEMA is returned by
113456113465
** sqlite3_step(). In the new version, the original SQL text is retained
113457113466
** and the statement is automatically recompiled if an schema change
113458113467
** occurs.
113459113468
*/
113460
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare16(
113469
+SQLITE_API int sqlite3_prepare16(
113461113470
sqlite3 *db, /* Database handle. */
113462113471
const void *zSql, /* UTF-16 encoded SQL statement. */
113463113472
int nBytes, /* Length of zSql in bytes. */
113464113473
sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113465113474
const void **pzTail /* OUT: End of parsed string */
@@ -113467,11 +113476,11 @@
113467113476
int rc;
113468113477
rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail);
113469113478
assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
113470113479
return rc;
113471113480
}
113472
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
113481
+SQLITE_API int sqlite3_prepare16_v2(
113473113482
sqlite3 *db, /* Database handle. */
113474113483
const void *zSql, /* UTF-16 encoded SQL statement. */
113475113484
int nBytes, /* Length of zSql in bytes. */
113476113485
sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113477113486
const void **pzTail /* OUT: End of parsed string */
@@ -119310,11 +119319,11 @@
119310119319
** The result that is written to ***pazResult is held in memory obtained
119311119320
** from malloc(). But the caller cannot free this memory directly.
119312119321
** Instead, the entire table should be passed to sqlite3_free_table() when
119313119322
** the calling procedure is finished using it.
119314119323
*/
119315
-SQLITE_API int SQLITE_STDCALL sqlite3_get_table(
119324
+SQLITE_API int sqlite3_get_table(
119316119325
sqlite3 *db, /* The database on which the SQL executes */
119317119326
const char *zSql, /* The SQL to be executed */
119318119327
char ***pazResult, /* Write the result table here */
119319119328
int *pnRow, /* Write the number of rows in the result here */
119320119329
int *pnColumn, /* Write the number of columns of result here */
@@ -119379,11 +119388,11 @@
119379119388
}
119380119389
119381119390
/*
119382119391
** This routine frees the space the sqlite3_get_table() malloced.
119383119392
*/
119384
-SQLITE_API void SQLITE_STDCALL sqlite3_free_table(
119393
+SQLITE_API void sqlite3_free_table(
119385119394
char **azResult /* Result returned from sqlite3_get_table() */
119386119395
){
119387119396
if( azResult ){
119388119397
int i, n;
119389119398
azResult--;
@@ -121789,11 +121798,11 @@
121789121798
121790121799
121791121800
/*
121792121801
** External API function used to create a new virtual-table module.
121793121802
*/
121794
-SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
121803
+SQLITE_API int sqlite3_create_module(
121795121804
sqlite3 *db, /* Database in which module is registered */
121796121805
const char *zName, /* Name assigned to this module */
121797121806
const sqlite3_module *pModule, /* The definition of the module */
121798121807
void *pAux /* Context pointer for xCreate/xConnect */
121799121808
){
@@ -121804,11 +121813,11 @@
121804121813
}
121805121814
121806121815
/*
121807121816
** External API function used to create a new virtual-table module.
121808121817
*/
121809
-SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
121818
+SQLITE_API int sqlite3_create_module_v2(
121810121819
sqlite3 *db, /* Database in which module is registered */
121811121820
const char *zName, /* Name assigned to this module */
121812121821
const sqlite3_module *pModule, /* The definition of the module */
121813121822
void *pAux, /* Context pointer for xCreate/xConnect */
121814121823
void (*xDestroy)(void *) /* Module destructor function */
@@ -122428,11 +122437,11 @@
122428122437
/*
122429122438
** This function is used to set the schema of a virtual table. It is only
122430122439
** valid to call this function from within the xCreate() or xConnect() of a
122431122440
** virtual table module.
122432122441
*/
122433
-SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
122442
+SQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
122434122443
VtabCtx *pCtx;
122435122444
Parse *pParse;
122436122445
int rc = SQLITE_OK;
122437122446
Table *pTab;
122438122447
char *zErr = 0;
@@ -122885,11 +122894,11 @@
122885122894
** table update operation currently in progress.
122886122895
**
122887122896
** The results of this routine are undefined unless it is called from
122888122897
** within an xUpdate method.
122889122898
*/
122890
-SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *db){
122899
+SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *db){
122891122900
static const unsigned char aMap[] = {
122892122901
SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE
122893122902
};
122894122903
#ifdef SQLITE_ENABLE_API_ARMOR
122895122904
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -122903,11 +122912,11 @@
122903122912
/*
122904122913
** Call from within the xCreate() or xConnect() methods to provide
122905122914
** the SQLite core with additional information about the behavior
122906122915
** of the virtual table being implemented.
122907122916
*/
122908
-SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3 *db, int op, ...){
122917
+SQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){
122909122918
va_list ap;
122910122919
int rc = SQLITE_OK;
122911122920
122912122921
#ifdef SQLITE_ENABLE_API_ARMOR
122913122922
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -124028,13 +124037,19 @@
124028124037
regBase = r1;
124029124038
}else{
124030124039
sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j);
124031124040
}
124032124041
}
124033
- testcase( pTerm->eOperator & WO_ISNULL );
124034
- testcase( pTerm->eOperator & WO_IN );
124035
- if( (pTerm->eOperator & (WO_ISNULL|WO_IN))==0 ){
124042
+ if( (pTerm->eOperator & WO_IN)!=0 ){
124043
+ if( pTerm->pExpr->flags & EP_xIsSelect ){
124044
+ /* No affinity ever needs to be (or should be) applied to a value
124045
+ ** from the RHS of an "? IN (SELECT ...)" expression. The
124046
+ ** sqlite3FindInIndex() routine has already ensured that the
124047
+ ** affinity of the comparison has been applied to the value. */
124048
+ if( zAff ) zAff[j] = SQLITE_AFF_BLOB;
124049
+ }
124050
+ }else if( (pTerm->eOperator & WO_ISNULL)==0 ){
124036124051
Expr *pRight = pTerm->pExpr->pRight;
124037124052
if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){
124038124053
sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
124039124054
VdbeCoverage(v);
124040124055
}
@@ -130105,10 +130120,18 @@
130105130120
if( pOBExpr->op!=TK_COLUMN ) continue;
130106130121
if( pOBExpr->iTable!=iCur ) continue;
130107130122
pTerm = sqlite3WhereFindTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn,
130108130123
~ready, eqOpMask, 0);
130109130124
if( pTerm==0 ) continue;
130125
+ if( pTerm->eOperator==WO_IN ){
130126
+ /* IN terms are only valid for sorting in the ORDER BY LIMIT
130127
+ ** optimization, and then only if they are actually used
130128
+ ** by the query plan */
130129
+ assert( wctrlFlags & WHERE_ORDERBY_LIMIT );
130130
+ for(j=0; j<pLoop->nLTerm && pTerm!=pLoop->aLTerm[j]; j++){}
130131
+ if( j>=pLoop->nLTerm ) continue;
130132
+ }
130110130133
if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0 && pOBExpr->iColumn>=0 ){
130111130134
const char *z1, *z2;
130112130135
pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
130113130136
if( !pColl ) pColl = db->pDfltColl;
130114130137
z1 = pColl->zName;
@@ -136210,11 +136233,11 @@
136210136233
**
136211136234
** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed
136212136235
** to recognize the end of a trigger can be omitted. All we have to do
136213136236
** is look for a semicolon that is not part of an string or comment.
136214136237
*/
136215
-SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *zSql){
136238
+SQLITE_API int sqlite3_complete(const char *zSql){
136216136239
u8 state = 0; /* Current state, using numbers defined in header comment */
136217136240
u8 token; /* Value of the next token */
136218136241
136219136242
#ifndef SQLITE_OMIT_TRIGGER
136220136243
/* A complex statement machine used to detect the end of a CREATE TRIGGER
@@ -136375,11 +136398,11 @@
136375136398
/*
136376136399
** This routine is the same as the sqlite3_complete() routine described
136377136400
** above, except that the parameter is required to be UTF-16 encoded, not
136378136401
** UTF-8.
136379136402
*/
136380
-SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *zSql){
136403
+SQLITE_API int sqlite3_complete16(const void *zSql){
136381136404
sqlite3_value *pVal;
136382136405
char const *zSql8;
136383136406
int rc;
136384136407
136385136408
#ifndef SQLITE_OMIT_AUTOINIT
@@ -136535,28 +136558,28 @@
136535136558
#endif
136536136559
136537136560
/* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns
136538136561
** a pointer to the to the sqlite3_version[] string constant.
136539136562
*/
136540
-SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void){ return sqlite3_version; }
136563
+SQLITE_API const char *sqlite3_libversion(void){ return sqlite3_version; }
136541136564
136542136565
/* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a
136543136566
** pointer to a string constant whose value is the same as the
136544136567
** SQLITE_SOURCE_ID C preprocessor macro.
136545136568
*/
136546
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
136569
+SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
136547136570
136548136571
/* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function
136549136572
** returns an integer equal to SQLITE_VERSION_NUMBER.
136550136573
*/
136551
-SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
136574
+SQLITE_API int sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
136552136575
136553136576
/* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns
136554136577
** zero if and only if SQLite was compiled with mutexing code omitted due to
136555136578
** the SQLITE_THREADSAFE compile-time option being set to 0.
136556136579
*/
136557
-SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
136580
+SQLITE_API int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
136558136581
136559136582
/*
136560136583
** When compiling the test fixture or with debugging enabled (on Win32),
136561136584
** this variable being set to non-zero will cause OSTRACE macros to emit
136562136585
** extra diagnostic information.
@@ -136625,11 +136648,11 @@
136625136648
** call by X completes.
136626136649
**
136627136650
** * Recursive calls to this routine from thread X return immediately
136628136651
** without blocking.
136629136652
*/
136630
-SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void){
136653
+SQLITE_API int sqlite3_initialize(void){
136631136654
MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
136632136655
int rc; /* Result code */
136633136656
#ifdef SQLITE_EXTRA_INIT
136634136657
int bRunExtraInit = 0; /* Extra initialization needed */
136635136658
#endif
@@ -136791,11 +136814,11 @@
136791136814
** while any part of SQLite is otherwise in use in any thread. This
136792136815
** routine is not threadsafe. But it is safe to invoke this routine
136793136816
** on when SQLite is already shut down. If SQLite is already shut down
136794136817
** when this routine is invoked, then this routine is a harmless no-op.
136795136818
*/
136796
-SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void){
136819
+SQLITE_API int sqlite3_shutdown(void){
136797136820
#ifdef SQLITE_OMIT_WSD
136798136821
int rc = sqlite3_wsd_init(4096, 24);
136799136822
if( rc!=SQLITE_OK ){
136800136823
return rc;
136801136824
}
@@ -136845,11 +136868,11 @@
136845136868
** This routine should only be called when there are no outstanding
136846136869
** database connections or memory allocations. This routine is not
136847136870
** threadsafe. Failure to heed these warnings can lead to unpredictable
136848136871
** behavior.
136849136872
*/
136850
-SQLITE_API int SQLITE_CDECL sqlite3_config(int op, ...){
136873
+SQLITE_API int sqlite3_config(int op, ...){
136851136874
va_list ap;
136852136875
int rc = SQLITE_OK;
136853136876
136854136877
/* sqlite3_config() shall return SQLITE_MISUSE if it is invoked while
136855136878
** the SQLite library is in use. */
@@ -137210,11 +137233,11 @@
137210137233
}
137211137234
137212137235
/*
137213137236
** Return the mutex associated with a database connection.
137214137237
*/
137215
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3 *db){
137238
+SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){
137216137239
#ifdef SQLITE_ENABLE_API_ARMOR
137217137240
if( !sqlite3SafetyCheckOk(db) ){
137218137241
(void)SQLITE_MISUSE_BKPT;
137219137242
return 0;
137220137243
}
@@ -137224,11 +137247,11 @@
137224137247
137225137248
/*
137226137249
** Free up as much memory as we can from the given database
137227137250
** connection.
137228137251
*/
137229
-SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3 *db){
137252
+SQLITE_API int sqlite3_db_release_memory(sqlite3 *db){
137230137253
int i;
137231137254
137232137255
#ifdef SQLITE_ENABLE_API_ARMOR
137233137256
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
137234137257
#endif
@@ -137248,11 +137271,11 @@
137248137271
137249137272
/*
137250137273
** Flush any dirty pages in the pager-cache for any attached database
137251137274
** to disk.
137252137275
*/
137253
-SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3 *db){
137276
+SQLITE_API int sqlite3_db_cacheflush(sqlite3 *db){
137254137277
int i;
137255137278
int rc = SQLITE_OK;
137256137279
int bSeenBusy = 0;
137257137280
137258137281
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -137277,11 +137300,11 @@
137277137300
}
137278137301
137279137302
/*
137280137303
** Configuration settings for an individual database connection
137281137304
*/
137282
-SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3 *db, int op, ...){
137305
+SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){
137283137306
va_list ap;
137284137307
int rc;
137285137308
va_start(ap, op);
137286137309
switch( op ){
137287137310
case SQLITE_DBCONFIG_LOOKASIDE: {
@@ -137398,11 +137421,11 @@
137398137421
}
137399137422
137400137423
/*
137401137424
** Return the ROWID of the most recent insert
137402137425
*/
137403
-SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3 *db){
137426
+SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){
137404137427
#ifdef SQLITE_ENABLE_API_ARMOR
137405137428
if( !sqlite3SafetyCheckOk(db) ){
137406137429
(void)SQLITE_MISUSE_BKPT;
137407137430
return 0;
137408137431
}
@@ -137411,11 +137434,11 @@
137411137434
}
137412137435
137413137436
/*
137414137437
** Return the number of changes in the most recent call to sqlite3_exec().
137415137438
*/
137416
-SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3 *db){
137439
+SQLITE_API int sqlite3_changes(sqlite3 *db){
137417137440
#ifdef SQLITE_ENABLE_API_ARMOR
137418137441
if( !sqlite3SafetyCheckOk(db) ){
137419137442
(void)SQLITE_MISUSE_BKPT;
137420137443
return 0;
137421137444
}
@@ -137424,11 +137447,11 @@
137424137447
}
137425137448
137426137449
/*
137427137450
** Return the number of changes since the database handle was opened.
137428137451
*/
137429
-SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3 *db){
137452
+SQLITE_API int sqlite3_total_changes(sqlite3 *db){
137430137453
#ifdef SQLITE_ENABLE_API_ARMOR
137431137454
if( !sqlite3SafetyCheckOk(db) ){
137432137455
(void)SQLITE_MISUSE_BKPT;
137433137456
return 0;
137434137457
}
@@ -137575,12 +137598,12 @@
137575137598
** statements or unfinished sqlite3_backups. The sqlite3_close_v2()
137576137599
** version forces the connection to become a zombie if there are
137577137600
** unclosed resources, and arranges for deallocation when the last
137578137601
** prepare statement or sqlite3_backup closes.
137579137602
*/
137580
-SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); }
137581
-SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); }
137603
+SQLITE_API int sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); }
137604
+SQLITE_API int sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); }
137582137605
137583137606
137584137607
/*
137585137608
** Close the mutex on database connection db.
137586137609
**
@@ -137983,11 +138006,11 @@
137983138006
137984138007
/*
137985138008
** This routine sets the busy callback for an Sqlite database to the
137986138009
** given callback function with the given argument.
137987138010
*/
137988
-SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(
138011
+SQLITE_API int sqlite3_busy_handler(
137989138012
sqlite3 *db,
137990138013
int (*xBusy)(void*,int),
137991138014
void *pArg
137992138015
){
137993138016
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -138006,11 +138029,11 @@
138006138029
/*
138007138030
** This routine sets the progress callback for an Sqlite database to the
138008138031
** given callback function with the given argument. The progress callback will
138009138032
** be invoked every nOps opcodes.
138010138033
*/
138011
-SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(
138034
+SQLITE_API void sqlite3_progress_handler(
138012138035
sqlite3 *db,
138013138036
int nOps,
138014138037
int (*xProgress)(void*),
138015138038
void *pArg
138016138039
){
@@ -138037,11 +138060,11 @@
138037138060
138038138061
/*
138039138062
** This routine installs a default busy handler that waits for the
138040138063
** specified number of milliseconds before returning 0.
138041138064
*/
138042
-SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3 *db, int ms){
138065
+SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){
138043138066
#ifdef SQLITE_ENABLE_API_ARMOR
138044138067
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
138045138068
#endif
138046138069
if( ms>0 ){
138047138070
sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db);
@@ -138053,11 +138076,11 @@
138053138076
}
138054138077
138055138078
/*
138056138079
** Cause any pending operation to stop at its earliest opportunity.
138057138080
*/
138058
-SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3 *db){
138081
+SQLITE_API void sqlite3_interrupt(sqlite3 *db){
138059138082
#ifdef SQLITE_ENABLE_API_ARMOR
138060138083
if( !sqlite3SafetyCheckOk(db) ){
138061138084
(void)SQLITE_MISUSE_BKPT;
138062138085
return;
138063138086
}
@@ -138169,11 +138192,11 @@
138169138192
}
138170138193
138171138194
/*
138172138195
** Create new user functions.
138173138196
*/
138174
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function(
138197
+SQLITE_API int sqlite3_create_function(
138175138198
sqlite3 *db,
138176138199
const char *zFunc,
138177138200
int nArg,
138178138201
int enc,
138179138202
void *p,
@@ -138183,11 +138206,11 @@
138183138206
){
138184138207
return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xSFunc, xStep,
138185138208
xFinal, 0);
138186138209
}
138187138210
138188
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2(
138211
+SQLITE_API int sqlite3_create_function_v2(
138189138212
sqlite3 *db,
138190138213
const char *zFunc,
138191138214
int nArg,
138192138215
int enc,
138193138216
void *p,
@@ -138226,11 +138249,11 @@
138226138249
sqlite3_mutex_leave(db->mutex);
138227138250
return rc;
138228138251
}
138229138252
138230138253
#ifndef SQLITE_OMIT_UTF16
138231
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function16(
138254
+SQLITE_API int sqlite3_create_function16(
138232138255
sqlite3 *db,
138233138256
const void *zFunctionName,
138234138257
int nArg,
138235138258
int eTextRep,
138236138259
void *p,
@@ -138266,11 +138289,11 @@
138266138289
** When virtual tables intend to provide an overloaded function, they
138267138290
** should call this routine to make sure the global function exists.
138268138291
** A global function must exist in order for name resolution to work
138269138292
** properly.
138270138293
*/
138271
-SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(
138294
+SQLITE_API int sqlite3_overload_function(
138272138295
sqlite3 *db,
138273138296
const char *zName,
138274138297
int nArg
138275138298
){
138276138299
int rc = SQLITE_OK;
@@ -138298,11 +138321,11 @@
138298138321
** A NULL trace function means that no tracing is executes. A non-NULL
138299138322
** trace is a pointer to a function that is invoked at the start of each
138300138323
** SQL statement.
138301138324
*/
138302138325
#ifndef SQLITE_OMIT_DEPRECATED
138303
-SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){
138326
+SQLITE_API void *sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){
138304138327
void *pOld;
138305138328
138306138329
#ifdef SQLITE_ENABLE_API_ARMOR
138307138330
if( !sqlite3SafetyCheckOk(db) ){
138308138331
(void)SQLITE_MISUSE_BKPT;
@@ -138319,11 +138342,11 @@
138319138342
}
138320138343
#endif /* SQLITE_OMIT_DEPRECATED */
138321138344
138322138345
/* Register a trace callback using the version-2 interface.
138323138346
*/
138324
-SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2(
138347
+SQLITE_API int sqlite3_trace_v2(
138325138348
sqlite3 *db, /* Trace this connection */
138326138349
unsigned mTrace, /* Mask of events to be traced */
138327138350
int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */
138328138351
void *pArg /* Context */
138329138352
){
@@ -138331,10 +138354,12 @@
138331138354
if( !sqlite3SafetyCheckOk(db) ){
138332138355
return SQLITE_MISUSE_BKPT;
138333138356
}
138334138357
#endif
138335138358
sqlite3_mutex_enter(db->mutex);
138359
+ if( mTrace==0 ) xTrace = 0;
138360
+ if( xTrace==0 ) mTrace = 0;
138336138361
db->mTrace = mTrace;
138337138362
db->xTrace = xTrace;
138338138363
db->pTraceArg = pArg;
138339138364
sqlite3_mutex_leave(db->mutex);
138340138365
return SQLITE_OK;
@@ -138347,11 +138372,11 @@
138347138372
**
138348138373
** A NULL profile function means that no profiling is executes. A non-NULL
138349138374
** profile is a pointer to a function that is invoked at the conclusion of
138350138375
** each SQL statement that is run.
138351138376
*/
138352
-SQLITE_API void *SQLITE_STDCALL sqlite3_profile(
138377
+SQLITE_API void *sqlite3_profile(
138353138378
sqlite3 *db,
138354138379
void (*xProfile)(void*,const char*,sqlite_uint64),
138355138380
void *pArg
138356138381
){
138357138382
void *pOld;
@@ -138375,11 +138400,11 @@
138375138400
/*
138376138401
** Register a function to be invoked when a transaction commits.
138377138402
** If the invoked function returns non-zero, then the commit becomes a
138378138403
** rollback.
138379138404
*/
138380
-SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(
138405
+SQLITE_API void *sqlite3_commit_hook(
138381138406
sqlite3 *db, /* Attach the hook to this database */
138382138407
int (*xCallback)(void*), /* Function to invoke on each commit */
138383138408
void *pArg /* Argument to the function */
138384138409
){
138385138410
void *pOld;
@@ -138400,11 +138425,11 @@
138400138425
138401138426
/*
138402138427
** Register a callback to be invoked each time a row is updated,
138403138428
** inserted or deleted using this database connection.
138404138429
*/
138405
-SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
138430
+SQLITE_API void *sqlite3_update_hook(
138406138431
sqlite3 *db, /* Attach the hook to this database */
138407138432
void (*xCallback)(void*,int,char const *,char const *,sqlite_int64),
138408138433
void *pArg /* Argument to the function */
138409138434
){
138410138435
void *pRet;
@@ -138425,11 +138450,11 @@
138425138450
138426138451
/*
138427138452
** Register a callback to be invoked each time a transaction is rolled
138428138453
** back by this database connection.
138429138454
*/
138430
-SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(
138455
+SQLITE_API void *sqlite3_rollback_hook(
138431138456
sqlite3 *db, /* Attach the hook to this database */
138432138457
void (*xCallback)(void*), /* Callback function */
138433138458
void *pArg /* Argument to the function */
138434138459
){
138435138460
void *pRet;
@@ -138451,11 +138476,11 @@
138451138476
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
138452138477
/*
138453138478
** Register a callback to be invoked each time a row is updated,
138454138479
** inserted or deleted using this database connection.
138455138480
*/
138456
-SQLITE_API void *SQLITE_STDCALL sqlite3_preupdate_hook(
138481
+SQLITE_API void *sqlite3_preupdate_hook(
138457138482
sqlite3 *db, /* Attach the hook to this database */
138458138483
void(*xCallback)( /* Callback function */
138459138484
void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64),
138460138485
void *pArg /* First callback argument */
138461138486
){
@@ -138500,11 +138525,11 @@
138500138525
** The callback registered by this function replaces any existing callback
138501138526
** registered using sqlite3_wal_hook(). Likewise, registering a callback
138502138527
** using sqlite3_wal_hook() disables the automatic checkpoint mechanism
138503138528
** configured by this function.
138504138529
*/
138505
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){
138530
+SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){
138506138531
#ifdef SQLITE_OMIT_WAL
138507138532
UNUSED_PARAMETER(db);
138508138533
UNUSED_PARAMETER(nFrame);
138509138534
#else
138510138535
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -138521,11 +138546,11 @@
138521138546
138522138547
/*
138523138548
** Register a callback to be invoked each time a transaction is written
138524138549
** into the write-ahead-log by this database connection.
138525138550
*/
138526
-SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook(
138551
+SQLITE_API void *sqlite3_wal_hook(
138527138552
sqlite3 *db, /* Attach the hook to this db handle */
138528138553
int(*xCallback)(void *, sqlite3*, const char*, int),
138529138554
void *pArg /* First argument passed to xCallback() */
138530138555
){
138531138556
#ifndef SQLITE_OMIT_WAL
@@ -138548,11 +138573,11 @@
138548138573
}
138549138574
138550138575
/*
138551138576
** Checkpoint database zDb.
138552138577
*/
138553
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2(
138578
+SQLITE_API int sqlite3_wal_checkpoint_v2(
138554138579
sqlite3 *db, /* Database handle */
138555138580
const char *zDb, /* Name of attached database (or NULL) */
138556138581
int eMode, /* SQLITE_CHECKPOINT_* value */
138557138582
int *pnLog, /* OUT: Size of WAL log in frames */
138558138583
int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -138603,11 +138628,11 @@
138603138628
/*
138604138629
** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points
138605138630
** to contains a zero-length string, all attached databases are
138606138631
** checkpointed.
138607138632
*/
138608
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){
138633
+SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){
138609138634
/* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to
138610138635
** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */
138611138636
return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0);
138612138637
}
138613138638
@@ -138694,11 +138719,11 @@
138694138719
138695138720
/*
138696138721
** Return UTF-8 encoded English language explanation of the most recent
138697138722
** error.
138698138723
*/
138699
-SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3 *db){
138724
+SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){
138700138725
const char *z;
138701138726
if( !db ){
138702138727
return sqlite3ErrStr(SQLITE_NOMEM_BKPT);
138703138728
}
138704138729
if( !sqlite3SafetyCheckSickOrOk(db) ){
@@ -138722,11 +138747,11 @@
138722138747
#ifndef SQLITE_OMIT_UTF16
138723138748
/*
138724138749
** Return UTF-16 encoded English language explanation of the most recent
138725138750
** error.
138726138751
*/
138727
-SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3 *db){
138752
+SQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){
138728138753
static const u16 outOfMem[] = {
138729138754
'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0
138730138755
};
138731138756
static const u16 misuse[] = {
138732138757
'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ',
@@ -138767,38 +138792,38 @@
138767138792
138768138793
/*
138769138794
** Return the most recent error code generated by an SQLite routine. If NULL is
138770138795
** passed to this function, we assume a malloc() failed during sqlite3_open().
138771138796
*/
138772
-SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db){
138797
+SQLITE_API int sqlite3_errcode(sqlite3 *db){
138773138798
if( db && !sqlite3SafetyCheckSickOrOk(db) ){
138774138799
return SQLITE_MISUSE_BKPT;
138775138800
}
138776138801
if( !db || db->mallocFailed ){
138777138802
return SQLITE_NOMEM_BKPT;
138778138803
}
138779138804
return db->errCode & db->errMask;
138780138805
}
138781
-SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db){
138806
+SQLITE_API int sqlite3_extended_errcode(sqlite3 *db){
138782138807
if( db && !sqlite3SafetyCheckSickOrOk(db) ){
138783138808
return SQLITE_MISUSE_BKPT;
138784138809
}
138785138810
if( !db || db->mallocFailed ){
138786138811
return SQLITE_NOMEM_BKPT;
138787138812
}
138788138813
return db->errCode;
138789138814
}
138790
-SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3 *db){
138815
+SQLITE_API int sqlite3_system_errno(sqlite3 *db){
138791138816
return db ? db->iSysErrno : 0;
138792138817
}
138793138818
138794138819
/*
138795138820
** Return a string that describes the kind of error specified in the
138796138821
** argument. For now, this simply calls the internal sqlite3ErrStr()
138797138822
** function.
138798138823
*/
138799
-SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int rc){
138824
+SQLITE_API const char *sqlite3_errstr(int rc){
138800138825
return sqlite3ErrStr(rc);
138801138826
}
138802138827
138803138828
/*
138804138829
** Create a new collating function for database "db". The name is zName
@@ -138942,11 +138967,11 @@
138942138967
**
138943138968
** A new lower limit does not shrink existing constructs.
138944138969
** It merely prevents new constructs that exceed the limit
138945138970
** from forming.
138946138971
*/
138947
-SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
138972
+SQLITE_API int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
138948138973
int oldLimit;
138949138974
138950138975
#ifdef SQLITE_ENABLE_API_ARMOR
138951138976
if( !sqlite3SafetyCheckOk(db) ){
138952138977
(void)SQLITE_MISUSE_BKPT;
@@ -139566,18 +139591,18 @@
139566139591
}
139567139592
139568139593
/*
139569139594
** Open a new database handle.
139570139595
*/
139571
-SQLITE_API int SQLITE_STDCALL sqlite3_open(
139596
+SQLITE_API int sqlite3_open(
139572139597
const char *zFilename,
139573139598
sqlite3 **ppDb
139574139599
){
139575139600
return openDatabase(zFilename, ppDb,
139576139601
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);
139577139602
}
139578
-SQLITE_API int SQLITE_STDCALL sqlite3_open_v2(
139603
+SQLITE_API int sqlite3_open_v2(
139579139604
const char *filename, /* Database filename (UTF-8) */
139580139605
sqlite3 **ppDb, /* OUT: SQLite db handle */
139581139606
int flags, /* Flags */
139582139607
const char *zVfs /* Name of VFS module to use */
139583139608
){
@@ -139586,11 +139611,11 @@
139586139611
139587139612
#ifndef SQLITE_OMIT_UTF16
139588139613
/*
139589139614
** Open a new database handle.
139590139615
*/
139591
-SQLITE_API int SQLITE_STDCALL sqlite3_open16(
139616
+SQLITE_API int sqlite3_open16(
139592139617
const void *zFilename,
139593139618
sqlite3 **ppDb
139594139619
){
139595139620
char const *zFilename8; /* zFilename encoded in UTF-8 instead of UTF-16 */
139596139621
sqlite3_value *pVal;
@@ -139625,11 +139650,11 @@
139625139650
#endif /* SQLITE_OMIT_UTF16 */
139626139651
139627139652
/*
139628139653
** Register a new collation sequence with the database handle db.
139629139654
*/
139630
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation(
139655
+SQLITE_API int sqlite3_create_collation(
139631139656
sqlite3* db,
139632139657
const char *zName,
139633139658
int enc,
139634139659
void* pCtx,
139635139660
int(*xCompare)(void*,int,const void*,int,const void*)
@@ -139638,11 +139663,11 @@
139638139663
}
139639139664
139640139665
/*
139641139666
** Register a new collation sequence with the database handle db.
139642139667
*/
139643
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2(
139668
+SQLITE_API int sqlite3_create_collation_v2(
139644139669
sqlite3* db,
139645139670
const char *zName,
139646139671
int enc,
139647139672
void* pCtx,
139648139673
int(*xCompare)(void*,int,const void*,int,const void*),
@@ -139663,11 +139688,11 @@
139663139688
139664139689
#ifndef SQLITE_OMIT_UTF16
139665139690
/*
139666139691
** Register a new collation sequence with the database handle db.
139667139692
*/
139668
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16(
139693
+SQLITE_API int sqlite3_create_collation16(
139669139694
sqlite3* db,
139670139695
const void *zName,
139671139696
int enc,
139672139697
void* pCtx,
139673139698
int(*xCompare)(void*,int,const void*,int,const void*)
@@ -139693,11 +139718,11 @@
139693139718
139694139719
/*
139695139720
** Register a collation sequence factory callback with the database handle
139696139721
** db. Replace any previously installed collation sequence factory.
139697139722
*/
139698
-SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed(
139723
+SQLITE_API int sqlite3_collation_needed(
139699139724
sqlite3 *db,
139700139725
void *pCollNeededArg,
139701139726
void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)
139702139727
){
139703139728
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -139714,11 +139739,11 @@
139714139739
#ifndef SQLITE_OMIT_UTF16
139715139740
/*
139716139741
** Register a collation sequence factory callback with the database handle
139717139742
** db. Replace any previously installed collation sequence factory.
139718139743
*/
139719
-SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16(
139744
+SQLITE_API int sqlite3_collation_needed16(
139720139745
sqlite3 *db,
139721139746
void *pCollNeededArg,
139722139747
void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)
139723139748
){
139724139749
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -139736,11 +139761,11 @@
139736139761
#ifndef SQLITE_OMIT_DEPRECATED
139737139762
/*
139738139763
** This function is now an anachronism. It used to be used to recover from a
139739139764
** malloc() failure, but SQLite now does this automatically.
139740139765
*/
139741
-SQLITE_API int SQLITE_STDCALL sqlite3_global_recover(void){
139766
+SQLITE_API int sqlite3_global_recover(void){
139742139767
return SQLITE_OK;
139743139768
}
139744139769
#endif
139745139770
139746139771
/*
@@ -139747,11 +139772,11 @@
139747139772
** Test to see whether or not the database connection is in autocommit
139748139773
** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on
139749139774
** by default. Autocommit is disabled by a BEGIN statement and reenabled
139750139775
** by the next COMMIT or ROLLBACK.
139751139776
*/
139752
-SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3 *db){
139777
+SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){
139753139778
#ifdef SQLITE_ENABLE_API_ARMOR
139754139779
if( !sqlite3SafetyCheckOk(db) ){
139755139780
(void)SQLITE_MISUSE_BKPT;
139756139781
return 0;
139757139782
}
@@ -139804,19 +139829,19 @@
139804139829
** data for this thread has been deallocated.
139805139830
**
139806139831
** SQLite no longer uses thread-specific data so this routine is now a
139807139832
** no-op. It is retained for historical compatibility.
139808139833
*/
139809
-SQLITE_API void SQLITE_STDCALL sqlite3_thread_cleanup(void){
139834
+SQLITE_API void sqlite3_thread_cleanup(void){
139810139835
}
139811139836
#endif
139812139837
139813139838
/*
139814139839
** Return meta information about a specific column of a database table.
139815139840
** See comment in sqlite3.h (sqlite.h.in) for details.
139816139841
*/
139817
-SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata(
139842
+SQLITE_API int sqlite3_table_column_metadata(
139818139843
sqlite3 *db, /* Connection handle */
139819139844
const char *zDbName, /* Database name or NULL */
139820139845
const char *zTableName, /* Table name */
139821139846
const char *zColumnName, /* Column name */
139822139847
char const **pzDataType, /* OUTPUT: Declared data type */
@@ -139930,11 +139955,11 @@
139930139955
}
139931139956
139932139957
/*
139933139958
** Sleep for a little while. Return the amount of time slept.
139934139959
*/
139935
-SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int ms){
139960
+SQLITE_API int sqlite3_sleep(int ms){
139936139961
sqlite3_vfs *pVfs;
139937139962
int rc;
139938139963
pVfs = sqlite3_vfs_find(0);
139939139964
if( pVfs==0 ) return 0;
139940139965
@@ -139946,11 +139971,11 @@
139946139971
}
139947139972
139948139973
/*
139949139974
** Enable or disable the extended result codes.
139950139975
*/
139951
-SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3 *db, int onoff){
139976
+SQLITE_API int sqlite3_extended_result_codes(sqlite3 *db, int onoff){
139952139977
#ifdef SQLITE_ENABLE_API_ARMOR
139953139978
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
139954139979
#endif
139955139980
sqlite3_mutex_enter(db->mutex);
139956139981
db->errMask = onoff ? 0xffffffff : 0xff;
@@ -139959,11 +139984,11 @@
139959139984
}
139960139985
139961139986
/*
139962139987
** Invoke the xFileControl method on a particular database.
139963139988
*/
139964
-SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
139989
+SQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
139965139990
int rc = SQLITE_ERROR;
139966139991
Btree *pBtree;
139967139992
139968139993
#ifdef SQLITE_ENABLE_API_ARMOR
139969139994
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -139999,11 +140024,11 @@
139999140024
}
140000140025
140001140026
/*
140002140027
** Interface to the testing logic.
140003140028
*/
140004
-SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...){
140029
+SQLITE_API int sqlite3_test_control(int op, ...){
140005140030
int rc = 0;
140006140031
#ifdef SQLITE_OMIT_BUILTIN_TEST
140007140032
UNUSED_PARAMETER(op);
140008140033
#else
140009140034
va_list ap;
@@ -140344,11 +140369,11 @@
140344140369
** method of a VFS implementation. The zParam argument is the name of the
140345140370
** query parameter we seek. This routine returns the value of the zParam
140346140371
** parameter if it exists. If the parameter does not exist, this routine
140347140372
** returns a NULL pointer.
140348140373
*/
140349
-SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam){
140374
+SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam){
140350140375
if( zFilename==0 || zParam==0 ) return 0;
140351140376
zFilename += sqlite3Strlen30(zFilename) + 1;
140352140377
while( zFilename[0] ){
140353140378
int x = strcmp(zFilename, zParam);
140354140379
zFilename += sqlite3Strlen30(zFilename) + 1;
@@ -140359,20 +140384,20 @@
140359140384
}
140360140385
140361140386
/*
140362140387
** Return a boolean value for a query parameter.
140363140388
*/
140364
-SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){
140389
+SQLITE_API int sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){
140365140390
const char *z = sqlite3_uri_parameter(zFilename, zParam);
140366140391
bDflt = bDflt!=0;
140367140392
return z ? sqlite3GetBoolean(z, bDflt) : bDflt;
140368140393
}
140369140394
140370140395
/*
140371140396
** Return a 64-bit integer value for a query parameter.
140372140397
*/
140373
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(
140398
+SQLITE_API sqlite3_int64 sqlite3_uri_int64(
140374140399
const char *zFilename, /* Filename as passed to xOpen */
140375140400
const char *zParam, /* URI parameter sought */
140376140401
sqlite3_int64 bDflt /* return if parameter is missing */
140377140402
){
140378140403
const char *z = sqlite3_uri_parameter(zFilename, zParam);
@@ -140400,11 +140425,11 @@
140400140425
140401140426
/*
140402140427
** Return the filename of the database associated with a database
140403140428
** connection.
140404140429
*/
140405
-SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName){
140430
+SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName){
140406140431
Btree *pBt;
140407140432
#ifdef SQLITE_ENABLE_API_ARMOR
140408140433
if( !sqlite3SafetyCheckOk(db) ){
140409140434
(void)SQLITE_MISUSE_BKPT;
140410140435
return 0;
@@ -140416,11 +140441,11 @@
140416140441
140417140442
/*
140418140443
** Return 1 if database is read-only or 0 if read/write. Return -1 if
140419140444
** no such database exists.
140420140445
*/
140421
-SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
140446
+SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
140422140447
Btree *pBt;
140423140448
#ifdef SQLITE_ENABLE_API_ARMOR
140424140449
if( !sqlite3SafetyCheckOk(db) ){
140425140450
(void)SQLITE_MISUSE_BKPT;
140426140451
return -1;
@@ -140433,11 +140458,11 @@
140433140458
#ifdef SQLITE_ENABLE_SNAPSHOT
140434140459
/*
140435140460
** Obtain a snapshot handle for the snapshot of database zDb currently
140436140461
** being read by handle db.
140437140462
*/
140438
-SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_get(
140463
+SQLITE_API int sqlite3_snapshot_get(
140439140464
sqlite3 *db,
140440140465
const char *zDb,
140441140466
sqlite3_snapshot **ppSnapshot
140442140467
){
140443140468
int rc = SQLITE_ERROR;
@@ -140468,11 +140493,11 @@
140468140493
}
140469140494
140470140495
/*
140471140496
** Open a read-transaction on the snapshot idendified by pSnapshot.
140472140497
*/
140473
-SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_open(
140498
+SQLITE_API int sqlite3_snapshot_open(
140474140499
sqlite3 *db,
140475140500
const char *zDb,
140476140501
sqlite3_snapshot *pSnapshot
140477140502
){
140478140503
int rc = SQLITE_ERROR;
@@ -140505,11 +140530,11 @@
140505140530
}
140506140531
140507140532
/*
140508140533
** Free a snapshot handle obtained from sqlite3_snapshot_get().
140509140534
*/
140510
-SQLITE_API void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){
140535
+SQLITE_API void sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){
140511140536
sqlite3_free(pSnapshot);
140512140537
}
140513140538
#endif /* SQLITE_ENABLE_SNAPSHOT */
140514140539
140515140540
/************** End of main.c ************************************************/
@@ -140659,11 +140684,11 @@
140659140684
**
140660140685
** Each call to this routine overrides any prior callbacks registered
140661140686
** on the same "db". If xNotify==0 then any prior callbacks are immediately
140662140687
** cancelled.
140663140688
*/
140664
-SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify(
140689
+SQLITE_API int sqlite3_unlock_notify(
140665140690
sqlite3 *db,
140666140691
void (*xNotify)(void **, int),
140667140692
void *pArg
140668140693
){
140669140694
int rc = SQLITE_OK;
@@ -147662,11 +147687,11 @@
147662147687
** Initialize API pointer table, if required.
147663147688
*/
147664147689
#ifdef _WIN32
147665147690
__declspec(dllexport)
147666147691
#endif
147667
-SQLITE_API int SQLITE_STDCALL sqlite3_fts3_init(
147692
+SQLITE_API int sqlite3_fts3_init(
147668147693
sqlite3 *db,
147669147694
char **pzErrMsg,
147670147695
const sqlite3_api_routines *pApi
147671147696
){
147672147697
SQLITE_EXTENSION_INIT2(pApi)
@@ -163463,11 +163488,11 @@
163463163488
}
163464163489
163465163490
/*
163466163491
** Register a new geometry function for use with the r-tree MATCH operator.
163467163492
*/
163468
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback(
163493
+SQLITE_API int sqlite3_rtree_geometry_callback(
163469163494
sqlite3 *db, /* Register SQL function on this connection */
163470163495
const char *zGeom, /* Name of the new SQL function */
163471163496
int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */
163472163497
void *pContext /* Extra data associated with the callback */
163473163498
){
@@ -163487,11 +163512,11 @@
163487163512
163488163513
/*
163489163514
** Register a new 2nd-generation geometry function for use with the
163490163515
** r-tree MATCH operator.
163491163516
*/
163492
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback(
163517
+SQLITE_API int sqlite3_rtree_query_callback(
163493163518
sqlite3 *db, /* Register SQL function on this connection */
163494163519
const char *zQueryFunc, /* Name of new SQL function */
163495163520
int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */
163496163521
void *pContext, /* Extra data passed into the callback */
163497163522
void (*xDestructor)(void*) /* Destructor for the extra data */
@@ -163512,11 +163537,11 @@
163512163537
163513163538
#if !SQLITE_CORE
163514163539
#ifdef _WIN32
163515163540
__declspec(dllexport)
163516163541
#endif
163517
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_init(
163542
+SQLITE_API int sqlite3_rtree_init(
163518163543
sqlite3 *db,
163519163544
char **pzErrMsg,
163520163545
const sqlite3_api_routines *pApi
163521163546
){
163522163547
SQLITE_EXTENSION_INIT2(pApi)
@@ -164063,11 +164088,11 @@
164063164088
164064164089
#if !SQLITE_CORE
164065164090
#ifdef _WIN32
164066164091
__declspec(dllexport)
164067164092
#endif
164068
-SQLITE_API int SQLITE_STDCALL sqlite3_icu_init(
164093
+SQLITE_API int sqlite3_icu_init(
164069164094
sqlite3 *db,
164070164095
char **pzErrMsg,
164071164096
const sqlite3_api_routines *pApi
164072164097
){
164073164098
SQLITE_EXTENSION_INIT2(pApi)
@@ -164743,11 +164768,11 @@
164743164768
** IMPORTANT NOTE FOR ZIPVFS USERS: The RBU extension works with all of
164744164769
** SQLite's built-in VFSs, including the multiplexor VFS. However it does
164745164770
** not work out of the box with zipvfs. Refer to the comment describing
164746164771
** the zipvfs_create_vfs() API below for details on using RBU with zipvfs.
164747164772
*/
164748
-SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open(
164773
+SQLITE_API sqlite3rbu *sqlite3rbu_open(
164749164774
const char *zTarget,
164750164775
const char *zRbu,
164751164776
const char *zState
164752164777
);
164753164778
@@ -164776,11 +164801,11 @@
164776164801
** As with sqlite3rbu_open(), Zipvfs users should rever to the comment
164777164802
** describing the sqlite3rbu_create_vfs() API function below for
164778164803
** a description of the complications associated with using RBU with
164779164804
** zipvfs databases.
164780164805
*/
164781
-SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum(
164806
+SQLITE_API sqlite3rbu *sqlite3rbu_vacuum(
164782164807
const char *zTarget,
164783164808
const char *zState
164784164809
);
164785164810
164786164811
/*
@@ -164812,11 +164837,11 @@
164812164837
** when sqlite3rbu_close() is called.
164813164838
**
164814164839
** Database handles returned by this function remain valid until the next
164815164840
** call to any sqlite3rbu_xxx() function other than sqlite3rbu_db().
164816164841
*/
164817
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu*, int bRbu);
164842
+SQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu*, int bRbu);
164818164843
164819164844
/*
164820164845
** Do some work towards applying the RBU update to the target db.
164821164846
**
164822164847
** Return SQLITE_DONE if the update has been completely applied, or
@@ -164826,11 +164851,11 @@
164826164851
**
164827164852
** Once a call to sqlite3rbu_step() has returned a value other than
164828164853
** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops
164829164854
** that immediately return the same value.
164830164855
*/
164831
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *pRbu);
164856
+SQLITE_API int sqlite3rbu_step(sqlite3rbu *pRbu);
164832164857
164833164858
/*
164834164859
** Force RBU to save its state to disk.
164835164860
**
164836164861
** If a power failure or application crash occurs during an update, following
@@ -164838,11 +164863,11 @@
164838164863
** was last saved. In other words, from the most recent successful call to
164839164864
** sqlite3rbu_close() or this function.
164840164865
**
164841164866
** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
164842164867
*/
164843
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *pRbu);
164868
+SQLITE_API int sqlite3rbu_savestate(sqlite3rbu *pRbu);
164844164869
164845164870
/*
164846164871
** Close an RBU handle.
164847164872
**
164848164873
** If the RBU update has been completely applied, mark the RBU database
@@ -164858,18 +164883,18 @@
164858164883
**
164859164884
** Otherwise, if no error occurs, this function returns SQLITE_OK if the
164860164885
** update has been partially applied, or SQLITE_DONE if it has been
164861164886
** completely applied.
164862164887
*/
164863
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg);
164888
+SQLITE_API int sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg);
164864164889
164865164890
/*
164866164891
** Return the total number of key-value operations (inserts, deletes or
164867164892
** updates) that have been performed on the target database since the
164868164893
** current RBU update was started.
164869164894
*/
164870
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu);
164895
+SQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu);
164871164896
164872164897
/*
164873164898
** Obtain permyriadage (permyriadage is to 10000 as percentage is to 100)
164874164899
** progress indications for the two stages of an RBU update. This API may
164875164900
** be useful for driving GUI progress indicators and similar.
@@ -164907,11 +164932,11 @@
164907164932
** permyriadage progress of the same stage. If the rbu_count table does
164908164933
** not exist, then (*pnOne) is set to -1 during stage 1. If the rbu_count
164909164934
** table exists but is not correctly populated, the value of the *pnOne
164910164935
** output variable during stage 1 is undefined.
164911164936
*/
164912
-SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo);
164937
+SQLITE_API void sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo);
164913164938
164914164939
/*
164915164940
** Obtain an indication as to the current stage of an RBU update or vacuum.
164916164941
** This function always returns one of the SQLITE_RBU_STATE_XXX constants
164917164942
** defined in this file. Return values should be interpreted as follows:
@@ -164945,11 +164970,11 @@
164945164970
#define SQLITE_RBU_STATE_MOVE 2
164946164971
#define SQLITE_RBU_STATE_CHECKPOINT 3
164947164972
#define SQLITE_RBU_STATE_DONE 4
164948164973
#define SQLITE_RBU_STATE_ERROR 5
164949164974
164950
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *pRbu);
164975
+SQLITE_API int sqlite3rbu_state(sqlite3rbu *pRbu);
164951164976
164952164977
/*
164953164978
** Create an RBU VFS named zName that accesses the underlying file-system
164954164979
** via existing VFS zParent. Or, if the zParent parameter is passed NULL,
164955164980
** then the new RBU VFS uses the default system VFS to access the file-system.
@@ -164989,21 +165014,21 @@
164989165014
** The overhead of adding the "rbu" VFS to the system is negligible for
164990165015
** non-RBU users. There is no harm in an application accessing the
164991165016
** file-system via "rbu" all the time, even if it only uses RBU functionality
164992165017
** occasionally.
164993165018
*/
164994
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent);
165019
+SQLITE_API int sqlite3rbu_create_vfs(const char *zName, const char *zParent);
164995165020
164996165021
/*
164997165022
** Deregister and destroy an RBU vfs created by an earlier call to
164998165023
** sqlite3rbu_create_vfs().
164999165024
**
165000165025
** VFS objects are not reference counted. If a VFS object is destroyed
165001165026
** before all database handles that use it have been closed, the results
165002165027
** are undefined.
165003165028
*/
165004
-SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName);
165029
+SQLITE_API void sqlite3rbu_destroy_vfs(const char *zName);
165005165030
165006165031
#if 0
165007165032
} /* end of the 'extern "C"' block */
165008165033
#endif
165009165034
@@ -168093,11 +168118,11 @@
168093168118
}
168094168119
168095168120
/*
168096168121
** Step the RBU object.
168097168122
*/
168098
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *p){
168123
+SQLITE_API int sqlite3rbu_step(sqlite3rbu *p){
168099168124
if( p ){
168100168125
switch( p->eStage ){
168101168126
case RBU_STAGE_OAL: {
168102168127
RbuObjIter *pIter = &p->objiter;
168103168128
@@ -168535,11 +168560,11 @@
168535168560
}
168536168561
168537168562
/*
168538168563
** Open and return a new RBU handle.
168539168564
*/
168540
-SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open(
168565
+SQLITE_API sqlite3rbu *sqlite3rbu_open(
168541168566
const char *zTarget,
168542168567
const char *zRbu,
168543168568
const char *zState
168544168569
){
168545168570
/* TODO: Check that zTarget and zRbu are non-NULL */
@@ -168547,11 +168572,11 @@
168547168572
}
168548168573
168549168574
/*
168550168575
** Open a handle to begin or resume an RBU VACUUM operation.
168551168576
*/
168552
-SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum(
168577
+SQLITE_API sqlite3rbu *sqlite3rbu_vacuum(
168553168578
const char *zTarget,
168554168579
const char *zState
168555168580
){
168556168581
/* TODO: Check that both arguments are non-NULL */
168557168582
return openRbuHandle(0, zTarget, zState);
@@ -168558,11 +168583,11 @@
168558168583
}
168559168584
168560168585
/*
168561168586
** Return the database handle used by pRbu.
168562168587
*/
168563
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){
168588
+SQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){
168564168589
sqlite3 *db = 0;
168565168590
if( pRbu ){
168566168591
db = (bRbu ? pRbu->dbRbu : pRbu->dbMain);
168567168592
}
168568168593
return db;
@@ -168590,11 +168615,11 @@
168590168615
}
168591168616
168592168617
/*
168593168618
** Close the RBU handle.
168594168619
*/
168595
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){
168620
+SQLITE_API int sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){
168596168621
int rc;
168597168622
if( p ){
168598168623
168599168624
/* Commit the transaction to the *-oal file. */
168600168625
if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){
@@ -168641,19 +168666,19 @@
168641168666
/*
168642168667
** Return the total number of key-value operations (inserts, deletes or
168643168668
** updates) that have been performed on the target database since the
168644168669
** current RBU update was started.
168645168670
*/
168646
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu){
168671
+SQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu){
168647168672
return pRbu->nProgress;
168648168673
}
168649168674
168650168675
/*
168651168676
** Return permyriadage progress indications for the two main stages of
168652168677
** an RBU update.
168653168678
*/
168654
-SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){
168679
+SQLITE_API void sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){
168655168680
const int MAX_PROGRESS = 10000;
168656168681
switch( p->eStage ){
168657168682
case RBU_STAGE_OAL:
168658168683
if( p->nPhaseOneStep>0 ){
168659168684
*pnOne = (int)(MAX_PROGRESS * (i64)p->nProgress/(i64)p->nPhaseOneStep);
@@ -168684,11 +168709,11 @@
168684168709
}
168685168710
168686168711
/*
168687168712
** Return the current state of the RBU vacuum or update operation.
168688168713
*/
168689
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *p){
168714
+SQLITE_API int sqlite3rbu_state(sqlite3rbu *p){
168690168715
int aRes[] = {
168691168716
0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE,
168692168717
0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE
168693168718
};
168694168719
@@ -168712,11 +168737,11 @@
168712168737
);
168713168738
return aRes[p->eStage];
168714168739
}
168715168740
}
168716168741
168717
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *p){
168742
+SQLITE_API int sqlite3rbu_savestate(sqlite3rbu *p){
168718168743
int rc = p->rc;
168719168744
if( rc==SQLITE_DONE ) return SQLITE_OK;
168720168745
168721168746
assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE );
168722168747
if( p->eStage==RBU_STAGE_OAL ){
@@ -169539,11 +169564,11 @@
169539169564
169540169565
/*
169541169566
** Deregister and destroy an RBU vfs created by an earlier call to
169542169567
** sqlite3rbu_create_vfs().
169543169568
*/
169544
-SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName){
169569
+SQLITE_API void sqlite3rbu_destroy_vfs(const char *zName){
169545169570
sqlite3_vfs *pVfs = sqlite3_vfs_find(zName);
169546169571
if( pVfs && pVfs->xOpen==rbuVfsOpen ){
169547169572
sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex);
169548169573
sqlite3_vfs_unregister(pVfs);
169549169574
sqlite3_free(pVfs);
@@ -169553,11 +169578,11 @@
169553169578
/*
169554169579
** Create an RBU VFS named zName that accesses the underlying file-system
169555169580
** via existing VFS zParent. The new object is registered as a non-default
169556169581
** VFS with SQLite before returning.
169557169582
*/
169558
-SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent){
169583
+SQLITE_API int sqlite3rbu_create_vfs(const char *zName, const char *zParent){
169559169584
169560169585
/* Template for VFS */
169561169586
static sqlite3_vfs vfs_template = {
169562169587
1, /* iVersion */
169563169588
0, /* szOsFile */
@@ -171798,11 +171823,11 @@
171798171823
}
171799171824
171800171825
return rc;
171801171826
}
171802171827
171803
-SQLITE_API int SQLITE_STDCALL sqlite3session_diff(
171828
+SQLITE_API int sqlite3session_diff(
171804171829
sqlite3_session *pSession,
171805171830
const char *zFrom,
171806171831
const char *zTbl,
171807171832
char **pzErrMsg
171808171833
){
@@ -171892,11 +171917,11 @@
171892171917
171893171918
/*
171894171919
** Create a session object. This session object will record changes to
171895171920
** database zDb attached to connection db.
171896171921
*/
171897
-SQLITE_API int SQLITE_STDCALL sqlite3session_create(
171922
+SQLITE_API int sqlite3session_create(
171898171923
sqlite3 *db, /* Database handle */
171899171924
const char *zDb, /* Name of db (e.g. "main") */
171900171925
sqlite3_session **ppSession /* OUT: New session object */
171901171926
){
171902171927
sqlite3_session *pNew; /* Newly allocated session object */
@@ -171954,11 +171979,11 @@
171954171979
}
171955171980
171956171981
/*
171957171982
** Delete a session object previously allocated using sqlite3session_create().
171958171983
*/
171959
-SQLITE_API void SQLITE_STDCALL sqlite3session_delete(sqlite3_session *pSession){
171984
+SQLITE_API void sqlite3session_delete(sqlite3_session *pSession){
171960171985
sqlite3 *db = pSession->db;
171961171986
sqlite3_session *pHead;
171962171987
sqlite3_session **pp;
171963171988
171964171989
/* Unlink the session from the linked list of sessions attached to the
@@ -171983,11 +172008,11 @@
171983172008
}
171984172009
171985172010
/*
171986172011
** Set a table filter on a Session Object.
171987172012
*/
171988
-SQLITE_API void SQLITE_STDCALL sqlite3session_table_filter(
172013
+SQLITE_API void sqlite3session_table_filter(
171989172014
sqlite3_session *pSession,
171990172015
int(*xFilter)(void*, const char*),
171991172016
void *pCtx /* First argument passed to xFilter */
171992172017
){
171993172018
pSession->bAutoAttach = 1;
@@ -172001,11 +172026,11 @@
172001172026
**
172002172027
** Only tables that have a PRIMARY KEY defined may be attached. It does
172003172028
** not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias)
172004172029
** or not.
172005172030
*/
172006
-SQLITE_API int SQLITE_STDCALL sqlite3session_attach(
172031
+SQLITE_API int sqlite3session_attach(
172007172032
sqlite3_session *pSession, /* Session object */
172008172033
const char *zName /* Table name */
172009172034
){
172010172035
int rc = SQLITE_OK;
172011172036
sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
@@ -172691,11 +172716,11 @@
172691172716
** session object passed as the first argument.
172692172717
**
172693172718
** It is the responsibility of the caller to eventually free the buffer
172694172719
** using sqlite3_free().
172695172720
*/
172696
-SQLITE_API int SQLITE_STDCALL sqlite3session_changeset(
172721
+SQLITE_API int sqlite3session_changeset(
172697172722
sqlite3_session *pSession, /* Session object */
172698172723
int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */
172699172724
void **ppChangeset /* OUT: Buffer containing changeset */
172700172725
){
172701172726
return sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset);
@@ -172702,11 +172727,11 @@
172702172727
}
172703172728
172704172729
/*
172705172730
** Streaming version of sqlite3session_changeset().
172706172731
*/
172707
-SQLITE_API int SQLITE_STDCALL sqlite3session_changeset_strm(
172732
+SQLITE_API int sqlite3session_changeset_strm(
172708172733
sqlite3_session *pSession,
172709172734
int (*xOutput)(void *pOut, const void *pData, int nData),
172710172735
void *pOut
172711172736
){
172712172737
return sessionGenerateChangeset(pSession, 0, xOutput, pOut, 0, 0);
@@ -172713,11 +172738,11 @@
172713172738
}
172714172739
172715172740
/*
172716172741
** Streaming version of sqlite3session_patchset().
172717172742
*/
172718
-SQLITE_API int SQLITE_STDCALL sqlite3session_patchset_strm(
172743
+SQLITE_API int sqlite3session_patchset_strm(
172719172744
sqlite3_session *pSession,
172720172745
int (*xOutput)(void *pOut, const void *pData, int nData),
172721172746
void *pOut
172722172747
){
172723172748
return sessionGenerateChangeset(pSession, 1, xOutput, pOut, 0, 0);
@@ -172728,11 +172753,11 @@
172728172753
** session object passed as the first argument.
172729172754
**
172730172755
** It is the responsibility of the caller to eventually free the buffer
172731172756
** using sqlite3_free().
172732172757
*/
172733
-SQLITE_API int SQLITE_STDCALL sqlite3session_patchset(
172758
+SQLITE_API int sqlite3session_patchset(
172734172759
sqlite3_session *pSession, /* Session object */
172735172760
int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */
172736172761
void **ppPatchset /* OUT: Buffer containing changeset */
172737172762
){
172738172763
return sessionGenerateChangeset(pSession, 1, 0, 0, pnPatchset, ppPatchset);
@@ -172739,11 +172764,11 @@
172739172764
}
172740172765
172741172766
/*
172742172767
** Enable or disable the session object passed as the first argument.
172743172768
*/
172744
-SQLITE_API int SQLITE_STDCALL sqlite3session_enable(sqlite3_session *pSession, int bEnable){
172769
+SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable){
172745172770
int ret;
172746172771
sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172747172772
if( bEnable>=0 ){
172748172773
pSession->bEnable = bEnable;
172749172774
}
@@ -172753,11 +172778,11 @@
172753172778
}
172754172779
172755172780
/*
172756172781
** Enable or disable the session object passed as the first argument.
172757172782
*/
172758
-SQLITE_API int SQLITE_STDCALL sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){
172783
+SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){
172759172784
int ret;
172760172785
sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172761172786
if( bIndirect>=0 ){
172762172787
pSession->bIndirect = bIndirect;
172763172788
}
@@ -172768,11 +172793,11 @@
172768172793
172769172794
/*
172770172795
** Return true if there have been no changes to monitored tables recorded
172771172796
** by the session object passed as the only argument.
172772172797
*/
172773
-SQLITE_API int SQLITE_STDCALL sqlite3session_isempty(sqlite3_session *pSession){
172798
+SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession){
172774172799
int ret = 0;
172775172800
SessionTable *pTab;
172776172801
172777172802
sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172778172803
for(pTab=pSession->pTable; pTab && ret==0; pTab=pTab->pNext){
@@ -172818,11 +172843,11 @@
172818172843
}
172819172844
172820172845
/*
172821172846
** Create an iterator used to iterate through the contents of a changeset.
172822172847
*/
172823
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_start(
172848
+SQLITE_API int sqlite3changeset_start(
172824172849
sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */
172825172850
int nChangeset, /* Size of buffer pChangeset in bytes */
172826172851
void *pChangeset /* Pointer to buffer containing changeset */
172827172852
){
172828172853
return sessionChangesetStart(pp, 0, 0, nChangeset, pChangeset);
@@ -172829,11 +172854,11 @@
172829172854
}
172830172855
172831172856
/*
172832172857
** Streaming version of sqlite3changeset_start().
172833172858
*/
172834
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_start_strm(
172859
+SQLITE_API int sqlite3changeset_start_strm(
172835172860
sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */
172836172861
int (*xInput)(void *pIn, void *pData, int *pnData),
172837172862
void *pIn
172838172863
){
172839172864
return sessionChangesetStart(pp, xInput, pIn, 0, 0);
@@ -173250,20 +173275,20 @@
173250173275
** or SQLITE_CORRUPT.
173251173276
**
173252173277
** This function may not be called on iterators passed to a conflict handler
173253173278
** callback by changeset_apply().
173254173279
*/
173255
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_next(sqlite3_changeset_iter *p){
173280
+SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *p){
173256173281
return sessionChangesetNext(p, 0, 0);
173257173282
}
173258173283
173259173284
/*
173260173285
** The following function extracts information on the current change
173261173286
** from a changeset iterator. It may only be called after changeset_next()
173262173287
** has returned SQLITE_ROW.
173263173288
*/
173264
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_op(
173289
+SQLITE_API int sqlite3changeset_op(
173265173290
sqlite3_changeset_iter *pIter, /* Iterator handle */
173266173291
const char **pzTab, /* OUT: Pointer to table name */
173267173292
int *pnCol, /* OUT: Number of columns in table */
173268173293
int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */
173269173294
int *pbIndirect /* OUT: True if change is indirect */
@@ -173279,11 +173304,11 @@
173279173304
** Return information regarding the PRIMARY KEY and number of columns in
173280173305
** the database table affected by the change that pIter currently points
173281173306
** to. This function may only be called after changeset_next() returns
173282173307
** SQLITE_ROW.
173283173308
*/
173284
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_pk(
173309
+SQLITE_API int sqlite3changeset_pk(
173285173310
sqlite3_changeset_iter *pIter, /* Iterator object */
173286173311
unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */
173287173312
int *pnCol /* OUT: Number of entries in output array */
173288173313
){
173289173314
*pabPK = pIter->abPK;
@@ -173302,11 +173327,11 @@
173302173327
** was not modified and is not a PK column), set *ppValue to NULL.
173303173328
**
173304173329
** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is
173305173330
** not modified. Otherwise, SQLITE_OK.
173306173331
*/
173307
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_old(
173332
+SQLITE_API int sqlite3changeset_old(
173308173333
sqlite3_changeset_iter *pIter, /* Changeset iterator */
173309173334
int iVal, /* Index of old.* value to retrieve */
173310173335
sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */
173311173336
){
173312173337
if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_DELETE ){
@@ -173330,11 +173355,11 @@
173330173355
** was not modified), set *ppValue to NULL.
173331173356
**
173332173357
** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is
173333173358
** not modified. Otherwise, SQLITE_OK.
173334173359
*/
173335
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_new(
173360
+SQLITE_API int sqlite3changeset_new(
173336173361
sqlite3_changeset_iter *pIter, /* Changeset iterator */
173337173362
int iVal, /* Index of new.* value to retrieve */
173338173363
sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */
173339173364
){
173340173365
if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_INSERT ){
@@ -173364,11 +173389,11 @@
173364173389
** containing the iVal'th value of the conflicting record.
173365173390
**
173366173391
** If value iVal is out-of-range or some other error occurs, an SQLite error
173367173392
** code is returned. Otherwise, SQLITE_OK.
173368173393
*/
173369
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_conflict(
173394
+SQLITE_API int sqlite3changeset_conflict(
173370173395
sqlite3_changeset_iter *pIter, /* Changeset iterator */
173371173396
int iVal, /* Index of conflict record value to fetch */
173372173397
sqlite3_value **ppValue /* OUT: Value from conflicting row */
173373173398
){
173374173399
if( !pIter->pConflict ){
@@ -173387,11 +173412,11 @@
173387173412
** it sets the output variable to the total number of known foreign key
173388173413
** violations in the destination database and returns SQLITE_OK.
173389173414
**
173390173415
** In all other cases this function returns SQLITE_MISUSE.
173391173416
*/
173392
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_fk_conflicts(
173417
+SQLITE_API int sqlite3changeset_fk_conflicts(
173393173418
sqlite3_changeset_iter *pIter, /* Changeset iterator */
173394173419
int *pnOut /* OUT: Number of FK violations */
173395173420
){
173396173421
if( pIter->pConflict || pIter->apValue ){
173397173422
return SQLITE_MISUSE;
@@ -173405,11 +173430,11 @@
173405173430
** Finalize an iterator allocated with sqlite3changeset_start().
173406173431
**
173407173432
** This function may not be called on iterators passed to a conflict handler
173408173433
** callback by changeset_apply().
173409173434
*/
173410
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_finalize(sqlite3_changeset_iter *p){
173435
+SQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *p){
173411173436
int rc = SQLITE_OK;
173412173437
if( p ){
173413173438
int i; /* Used to iterate through p->apValue[] */
173414173439
rc = p->rc;
173415173440
if( p->apValue ){
@@ -173579,11 +173604,11 @@
173579173604
173580173605
173581173606
/*
173582173607
** Invert a changeset object.
173583173608
*/
173584
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert(
173609
+SQLITE_API int sqlite3changeset_invert(
173585173610
int nChangeset, /* Number of bytes in input */
173586173611
const void *pChangeset, /* Input changeset */
173587173612
int *pnInverted, /* OUT: Number of bytes in output changeset */
173588173613
void **ppInverted /* OUT: Inverse of pChangeset */
173589173614
){
@@ -173598,11 +173623,11 @@
173598173623
}
173599173624
173600173625
/*
173601173626
** Streaming version of sqlite3changeset_invert().
173602173627
*/
173603
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert_strm(
173628
+SQLITE_API int sqlite3changeset_invert_strm(
173604173629
int (*xInput)(void *pIn, void *pData, int *pnData),
173605173630
void *pIn,
173606173631
int (*xOutput)(void *pOut, const void *pData, int nData),
173607173632
void *pOut
173608173633
){
@@ -174478,11 +174503,11 @@
174478174503
/*
174479174504
** Apply the changeset passed via pChangeset/nChangeset to the main database
174480174505
** attached to handle "db". Invoke the supplied conflict handler callback
174481174506
** to resolve any conflicts encountered while applying the change.
174482174507
*/
174483
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply(
174508
+SQLITE_API int sqlite3changeset_apply(
174484174509
sqlite3 *db, /* Apply change to "main" db of this handle */
174485174510
int nChangeset, /* Size of changeset in bytes */
174486174511
void *pChangeset, /* Changeset blob */
174487174512
int(*xFilter)(
174488174513
void *pCtx, /* Copy of sixth arg to _apply() */
@@ -174506,11 +174531,11 @@
174506174531
/*
174507174532
** Apply the changeset passed via xInput/pIn to the main database
174508174533
** attached to handle "db". Invoke the supplied conflict handler callback
174509174534
** to resolve any conflicts encountered while applying the change.
174510174535
*/
174511
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply_strm(
174536
+SQLITE_API int sqlite3changeset_apply_strm(
174512174537
sqlite3 *db, /* Apply change to "main" db of this handle */
174513174538
int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
174514174539
void *pIn, /* First arg for xInput */
174515174540
int(*xFilter)(
174516174541
void *pCtx, /* Copy of sixth arg to _apply() */
@@ -174841,11 +174866,11 @@
174841174866
}
174842174867
174843174868
/*
174844174869
** Allocate a new, empty, sqlite3_changegroup.
174845174870
*/
174846
-SQLITE_API int SQLITE_STDCALL sqlite3changegroup_new(sqlite3_changegroup **pp){
174871
+SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp){
174847174872
int rc = SQLITE_OK; /* Return code */
174848174873
sqlite3_changegroup *p; /* New object */
174849174874
p = (sqlite3_changegroup*)sqlite3_malloc(sizeof(sqlite3_changegroup));
174850174875
if( p==0 ){
174851174876
rc = SQLITE_NOMEM;
@@ -174858,11 +174883,11 @@
174858174883
174859174884
/*
174860174885
** Add the changeset currently stored in buffer pData, size nData bytes,
174861174886
** to changeset-group p.
174862174887
*/
174863
-SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){
174888
+SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){
174864174889
sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */
174865174890
int rc; /* Return code */
174866174891
174867174892
rc = sqlite3changeset_start(&pIter, nData, pData);
174868174893
if( rc==SQLITE_OK ){
@@ -174874,11 +174899,11 @@
174874174899
174875174900
/*
174876174901
** Obtain a buffer containing a changeset representing the concatenation
174877174902
** of all changesets added to the group so far.
174878174903
*/
174879
-SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output(
174904
+SQLITE_API int sqlite3changegroup_output(
174880174905
sqlite3_changegroup *pGrp,
174881174906
int *pnData,
174882174907
void **ppData
174883174908
){
174884174909
return sessionChangegroupOutput(pGrp, 0, 0, pnData, ppData);
@@ -174885,11 +174910,11 @@
174885174910
}
174886174911
174887174912
/*
174888174913
** Streaming versions of changegroup_add().
174889174914
*/
174890
-SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add_strm(
174915
+SQLITE_API int sqlite3changegroup_add_strm(
174891174916
sqlite3_changegroup *pGrp,
174892174917
int (*xInput)(void *pIn, void *pData, int *pnData),
174893174918
void *pIn
174894174919
){
174895174920
sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */
@@ -174904,11 +174929,11 @@
174904174929
}
174905174930
174906174931
/*
174907174932
** Streaming versions of changegroup_output().
174908174933
*/
174909
-SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output_strm(
174934
+SQLITE_API int sqlite3changegroup_output_strm(
174910174935
sqlite3_changegroup *pGrp,
174911174936
int (*xOutput)(void *pOut, const void *pData, int nData),
174912174937
void *pOut
174913174938
){
174914174939
return sessionChangegroupOutput(pGrp, xOutput, pOut, 0, 0);
@@ -174915,21 +174940,21 @@
174915174940
}
174916174941
174917174942
/*
174918174943
** Delete a changegroup object.
174919174944
*/
174920
-SQLITE_API void SQLITE_STDCALL sqlite3changegroup_delete(sqlite3_changegroup *pGrp){
174945
+SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup *pGrp){
174921174946
if( pGrp ){
174922174947
sessionDeleteTable(pGrp->pList);
174923174948
sqlite3_free(pGrp);
174924174949
}
174925174950
}
174926174951
174927174952
/*
174928174953
** Combine two changesets together.
174929174954
*/
174930
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat(
174955
+SQLITE_API int sqlite3changeset_concat(
174931174956
int nLeft, /* Number of bytes in lhs input */
174932174957
void *pLeft, /* Lhs input changeset */
174933174958
int nRight /* Number of bytes in rhs input */,
174934174959
void *pRight, /* Rhs input changeset */
174935174960
int *pnOut, /* OUT: Number of bytes in output changeset */
@@ -174954,11 +174979,11 @@
174954174979
}
174955174980
174956174981
/*
174957174982
** Streaming version of sqlite3changeset_concat().
174958174983
*/
174959
-SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat_strm(
174984
+SQLITE_API int sqlite3changeset_concat_strm(
174960174985
int (*xInputA)(void *pIn, void *pData, int *pnData),
174961174986
void *pInA,
174962174987
int (*xInputB)(void *pIn, void *pData, int *pnData),
174963174988
void *pInB,
174964174989
int (*xOutput)(void *pOut, const void *pData, int nData),
@@ -177186,11 +177211,11 @@
177186177211
177187177212
#ifndef SQLITE_CORE
177188177213
#ifdef _WIN32
177189177214
__declspec(dllexport)
177190177215
#endif
177191
-SQLITE_API int SQLITE_STDCALL sqlite3_json_init(
177216
+SQLITE_API int sqlite3_json_init(
177192177217
sqlite3 *db,
177193177218
char **pzErrMsg,
177194177219
const sqlite3_api_routines *pApi
177195177220
){
177196177221
SQLITE_EXTENSION_INIT2(pApi);
@@ -194018,11 +194043,11 @@
194018194043
int nArg, /* Number of args */
194019194044
sqlite3_value **apUnused /* Function arguments */
194020194045
){
194021194046
assert( nArg==0 );
194022194047
UNUSED_PARAM2(nArg, apUnused);
194023
- sqlite3_result_text(pCtx, "fts5: 2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b", -1, SQLITE_TRANSIENT);
194048
+ sqlite3_result_text(pCtx, "fts5: 2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6", -1, SQLITE_TRANSIENT);
194024194049
}
194025194050
194026194051
static int fts5Init(sqlite3 *db){
194027194052
static const sqlite3_module fts5Mod = {
194028194053
/* iVersion */ 2,
@@ -194106,11 +194131,11 @@
194106194131
*/
194107194132
#ifndef SQLITE_CORE
194108194133
#ifdef _WIN32
194109194134
__declspec(dllexport)
194110194135
#endif
194111
-SQLITE_API int SQLITE_STDCALL sqlite3_fts_init(
194136
+SQLITE_API int sqlite3_fts_init(
194112194137
sqlite3 *db,
194113194138
char **pzErrMsg,
194114194139
const sqlite3_api_routines *pApi
194115194140
){
194116194141
SQLITE_EXTENSION_INIT2(pApi);
@@ -194119,11 +194144,11 @@
194119194144
}
194120194145
194121194146
#ifdef _WIN32
194122194147
__declspec(dllexport)
194123194148
#endif
194124
-SQLITE_API int SQLITE_STDCALL sqlite3_fts5_init(
194149
+SQLITE_API int sqlite3_fts5_init(
194125194150
sqlite3 *db,
194126194151
char **pzErrMsg,
194127194152
const sqlite3_api_routines *pApi
194128194153
){
194129194154
SQLITE_EXTENSION_INIT2(pApi);
194130194155
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,17 +1,17 @@
1 /******************************************************************************
2 ** This file is an amalgamation of many separate C source files from SQLite
3 ** version 3.14.1. By combining all the individual C code files into this
4 ** single large file, the entire code can be compiled as a single translation
5 ** unit. This allows many compilers to do optimizations that would not be
6 ** possible if the files were compiled separately. Performance improvements
7 ** of 5% or more are commonly seen when SQLite is compiled as a single
8 ** translation unit.
9 **
10 ** This file is all you need to compile SQLite. To use SQLite in other
11 ** programs, you need this file and the "sqlite3.h" header file that defines
12 ** the programming interface to the SQLite library. (If you do not have
13 ** the "sqlite3.h" header file at hand, you will find a copy embedded within
14 ** the text of this file. Search for "Begin file sqlite3.h" to find the start
15 ** of the embedded sqlite3.h header file.) Additional code files may be needed
16 ** if you want a wrapper to interface SQLite with your choice of programming
17 ** language. The code for the "sqlite3" command-line shell is also in a
@@ -378,13 +378,13 @@
378 **
379 ** See also: [sqlite3_libversion()],
380 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
381 ** [sqlite_version()] and [sqlite_source_id()].
382 */
383 #define SQLITE_VERSION "3.14.1"
384 #define SQLITE_VERSION_NUMBER 3014001
385 #define SQLITE_SOURCE_ID "2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b"
386
387 /*
388 ** CAPI3REF: Run-Time Library Version Numbers
389 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
390 **
@@ -413,13 +413,13 @@
413 ** [SQLITE_SOURCE_ID] C preprocessor macro.
414 **
415 ** See also: [sqlite_version()] and [sqlite_source_id()].
416 */
417 SQLITE_API const char sqlite3_version[] = SQLITE_VERSION;
418 SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void);
419 SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void);
420 SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void);
421
422 /*
423 ** CAPI3REF: Run-Time Library Compilation Options Diagnostics
424 **
425 ** ^The sqlite3_compileoption_used() function returns 0 or 1
@@ -440,12 +440,12 @@
440 **
441 ** See also: SQL functions [sqlite_compileoption_used()] and
442 ** [sqlite_compileoption_get()] and the [compile_options pragma].
443 */
444 #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
445 SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName);
446 SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N);
447 #endif
448
449 /*
450 ** CAPI3REF: Test To See If The Library Is Threadsafe
451 **
@@ -480,11 +480,11 @@
480 ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
481 ** is unchanged by calls to sqlite3_config().)^
482 **
483 ** See the [threading mode] documentation for additional information.
484 */
485 SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void);
486
487 /*
488 ** CAPI3REF: Database Connection Handle
489 ** KEYWORDS: {database connection} {database connections}
490 **
@@ -577,12 +577,12 @@
577 ** from [sqlite3_open()], [sqlite3_open16()], or
578 ** [sqlite3_open_v2()], and not previously closed.
579 ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
580 ** argument is a harmless no-op.
581 */
582 SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*);
583 SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*);
584
585 /*
586 ** The type for a callback function.
587 ** This is legacy and deprecated. It is included for historical
588 ** compatibility and is not documented.
@@ -649,11 +649,11 @@
649 ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
650 ** <li> The application must not modify the SQL statement text passed into
651 ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
652 ** </ul>
653 */
654 SQLITE_API int SQLITE_STDCALL sqlite3_exec(
655 sqlite3*, /* An open database */
656 const char *sql, /* SQL to be evaluated */
657 int (*callback)(void*,int,char**,char**), /* Callback function */
658 void *, /* 1st argument to callback */
659 char **errmsg /* Error msg written here */
@@ -1648,14 +1648,14 @@
1648 ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied
1649 ** implementation of sqlite3_os_init() or sqlite3_os_end()
1650 ** must return [SQLITE_OK] on success and some other [error code] upon
1651 ** failure.
1652 */
1653 SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void);
1654 SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void);
1655 SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void);
1656 SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void);
1657
1658 /*
1659 ** CAPI3REF: Configuring The SQLite Library
1660 **
1661 ** The sqlite3_config() interface is used to make global configuration
@@ -1684,11 +1684,11 @@
1684 **
1685 ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
1686 ** ^If the option is unknown or SQLite is unable to set the option
1687 ** then this routine returns a non-zero [error code].
1688 */
1689 SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...);
1690
1691 /*
1692 ** CAPI3REF: Configure database connections
1693 ** METHOD: sqlite3
1694 **
@@ -1703,11 +1703,11 @@
1703 ** Subsequent arguments vary depending on the configuration verb.
1704 **
1705 ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
1706 ** the call is considered successful.
1707 */
1708 SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...);
1709
1710 /*
1711 ** CAPI3REF: Memory Allocation Routines
1712 **
1713 ** An instance of this object defines the interface between SQLite
@@ -2244,11 +2244,11 @@
2244 **
2245 ** ^The sqlite3_extended_result_codes() routine enables or disables the
2246 ** [extended result codes] feature of SQLite. ^The extended result
2247 ** codes are disabled by default for historical compatibility.
2248 */
2249 SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff);
2250
2251 /*
2252 ** CAPI3REF: Last Insert Rowid
2253 ** METHOD: sqlite3
2254 **
@@ -2296,11 +2296,11 @@
2296 ** function is running and thus changes the last insert [rowid],
2297 ** then the value returned by [sqlite3_last_insert_rowid()] is
2298 ** unpredictable and might not equal either the old or the new
2299 ** last insert [rowid].
2300 */
2301 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*);
2302
2303 /*
2304 ** CAPI3REF: Count The Number Of Rows Modified
2305 ** METHOD: sqlite3
2306 **
@@ -2349,11 +2349,11 @@
2349 **
2350 ** If a separate thread makes changes on the same database connection
2351 ** while [sqlite3_changes()] is running then the value returned
2352 ** is unpredictable and not meaningful.
2353 */
2354 SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*);
2355
2356 /*
2357 ** CAPI3REF: Total Number Of Rows Modified
2358 ** METHOD: sqlite3
2359 **
@@ -2373,11 +2373,11 @@
2373 **
2374 ** If a separate thread makes changes on the same database connection
2375 ** while [sqlite3_total_changes()] is running then the value
2376 ** returned is unpredictable and not meaningful.
2377 */
2378 SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*);
2379
2380 /*
2381 ** CAPI3REF: Interrupt A Long-Running Query
2382 ** METHOD: sqlite3
2383 **
@@ -2413,11 +2413,11 @@
2413 ** that are started after the sqlite3_interrupt() call returns.
2414 **
2415 ** If the database connection closes while [sqlite3_interrupt()]
2416 ** is running then bad things will likely happen.
2417 */
2418 SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*);
2419
2420 /*
2421 ** CAPI3REF: Determine If An SQL Statement Is Complete
2422 **
2423 ** These routines are useful during command-line input to determine if the
@@ -2448,12 +2448,12 @@
2448 ** UTF-8 string.
2449 **
2450 ** The input to [sqlite3_complete16()] must be a zero-terminated
2451 ** UTF-16 string in native byte order.
2452 */
2453 SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql);
2454 SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql);
2455
2456 /*
2457 ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
2458 ** KEYWORDS: {busy-handler callback} {busy handler}
2459 ** METHOD: sqlite3
@@ -2510,11 +2510,11 @@
2510 ** result in undefined behavior.
2511 **
2512 ** A busy handler must not close the database connection
2513 ** or [prepared statement] that invoked the busy handler.
2514 */
2515 SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2516
2517 /*
2518 ** CAPI3REF: Set A Busy Timeout
2519 ** METHOD: sqlite3
2520 **
@@ -2533,11 +2533,11 @@
2533 ** was defined (using [sqlite3_busy_handler()]) prior to calling
2534 ** this routine, that other busy handler is cleared.)^
2535 **
2536 ** See also: [PRAGMA busy_timeout]
2537 */
2538 SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms);
2539
2540 /*
2541 ** CAPI3REF: Convenience Routines For Running Queries
2542 ** METHOD: sqlite3
2543 **
@@ -2608,19 +2608,19 @@
2608 ** interface defined here. As a consequence, errors that occur in the
2609 ** wrapper layer outside of the internal [sqlite3_exec()] call are not
2610 ** reflected in subsequent calls to [sqlite3_errcode()] or
2611 ** [sqlite3_errmsg()].
2612 */
2613 SQLITE_API int SQLITE_STDCALL sqlite3_get_table(
2614 sqlite3 *db, /* An open database */
2615 const char *zSql, /* SQL to be evaluated */
2616 char ***pazResult, /* Results of the query */
2617 int *pnRow, /* Number of result rows written here */
2618 int *pnColumn, /* Number of result columns written here */
2619 char **pzErrmsg /* Error msg written here */
2620 );
2621 SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result);
2622
2623 /*
2624 ** CAPI3REF: Formatted String Printing Functions
2625 **
2626 ** These routines are work-alikes of the "printf()" family of functions
@@ -2722,14 +2722,14 @@
2722 **
2723 ** ^(The "%z" formatting option works like "%s" but with the
2724 ** addition that after the string has been read and copied into
2725 ** the result, [sqlite3_free()] is called on the input string.)^
2726 */
2727 SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...);
2728 SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list);
2729 SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...);
2730 SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list);
2731
2732 /*
2733 ** CAPI3REF: Memory Allocation Subsystem
2734 **
2735 ** The SQLite core uses these three routines for all of its own
@@ -2815,16 +2815,16 @@
2815 **
2816 ** The application must not read or write any part of
2817 ** a block of memory after it has been released using
2818 ** [sqlite3_free()] or [sqlite3_realloc()].
2819 */
2820 SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int);
2821 SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64);
2822 SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int);
2823 SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64);
2824 SQLITE_API void SQLITE_STDCALL sqlite3_free(void*);
2825 SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*);
2826
2827 /*
2828 ** CAPI3REF: Memory Allocator Statistics
2829 **
2830 ** SQLite provides these two interfaces for reporting on the status
@@ -2845,12 +2845,12 @@
2845 ** [sqlite3_memory_used()] if and only if the parameter to
2846 ** [sqlite3_memory_highwater()] is true. ^The value returned
2847 ** by [sqlite3_memory_highwater(1)] is the high-water mark
2848 ** prior to the reset.
2849 */
2850 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void);
2851 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag);
2852
2853 /*
2854 ** CAPI3REF: Pseudo-Random Number Generator
2855 **
2856 ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
@@ -2869,11 +2869,11 @@
2869 ** ^If the previous call to this routine had an N of 1 or more and a
2870 ** non-NULL P then the pseudo-randomness is generated
2871 ** internally and without recourse to the [sqlite3_vfs] xRandomness
2872 ** method.
2873 */
2874 SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P);
2875
2876 /*
2877 ** CAPI3REF: Compile-Time Authorization Callbacks
2878 ** METHOD: sqlite3
2879 **
@@ -2952,11 +2952,11 @@
2952 ** [sqlite3_prepare()] or its variants. Authorization is not
2953 ** performed during statement evaluation in [sqlite3_step()], unless
2954 ** as stated in the previous paragraph, sqlite3_step() invokes
2955 ** sqlite3_prepare_v2() to reprepare a statement after a schema change.
2956 */
2957 SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
2958 sqlite3*,
2959 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
2960 void *pUserData
2961 );
2962
@@ -3060,13 +3060,13 @@
3060 ** digits in the time are meaningless. Future versions of SQLite
3061 ** might provide greater resolution on the profiler callback. The
3062 ** sqlite3_profile() function is considered experimental and is
3063 ** subject to change in future versions of SQLite.
3064 */
3065 SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*,
3066 void(*xTrace)(void*,const char*), void*);
3067 SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_profile(sqlite3*,
3068 void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
3069
3070 /*
3071 ** CAPI3REF: SQL Trace Event Codes
3072 ** KEYWORDS: SQLITE_TRACE
@@ -3151,11 +3151,11 @@
3151 **
3152 ** The sqlite3_trace_v2() interface is intended to replace the legacy
3153 ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
3154 ** are deprecated.
3155 */
3156 SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2(
3157 sqlite3*,
3158 unsigned uMask,
3159 int(*xCallback)(unsigned,void*,void*,void*),
3160 void *pCtx
3161 );
@@ -3190,11 +3190,11 @@
3190 ** the database connection that invoked the progress handler.
3191 ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
3192 ** database connections for the meaning of "modify" in this paragraph.
3193 **
3194 */
3195 SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
3196
3197 /*
3198 ** CAPI3REF: Opening A New Database Connection
3199 ** CONSTRUCTOR: sqlite3
3200 **
@@ -3419,19 +3419,19 @@
3419 ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
3420 ** features that require the use of temporary files may fail.
3421 **
3422 ** See also: [sqlite3_temp_directory]
3423 */
3424 SQLITE_API int SQLITE_STDCALL sqlite3_open(
3425 const char *filename, /* Database filename (UTF-8) */
3426 sqlite3 **ppDb /* OUT: SQLite db handle */
3427 );
3428 SQLITE_API int SQLITE_STDCALL sqlite3_open16(
3429 const void *filename, /* Database filename (UTF-16) */
3430 sqlite3 **ppDb /* OUT: SQLite db handle */
3431 );
3432 SQLITE_API int SQLITE_STDCALL sqlite3_open_v2(
3433 const char *filename, /* Database filename (UTF-8) */
3434 sqlite3 **ppDb, /* OUT: SQLite db handle */
3435 int flags, /* Flags */
3436 const char *zVfs /* Name of VFS module to use */
3437 );
@@ -3473,13 +3473,13 @@
3473 ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and
3474 ** is not a database file pathname pointer that SQLite passed into the xOpen
3475 ** VFS method, then the behavior of this routine is undefined and probably
3476 ** undesirable.
3477 */
3478 SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3479 SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3480 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
3481
3482
3483 /*
3484 ** CAPI3REF: Error Codes And Messages
3485 ** METHOD: sqlite3
@@ -3519,15 +3519,15 @@
3519 **
3520 ** If an interface fails with SQLITE_MISUSE, that means the interface
3521 ** was invoked incorrectly by the application. In that case, the
3522 ** error code and message may or may not be set.
3523 */
3524 SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db);
3525 SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db);
3526 SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*);
3527 SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*);
3528 SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int);
3529
3530 /*
3531 ** CAPI3REF: Prepared Statement Object
3532 ** KEYWORDS: {prepared statement} {prepared statements}
3533 **
@@ -3591,11 +3591,11 @@
3591 ** created by an untrusted script can be contained using the
3592 ** [max_page_count] [PRAGMA].
3593 **
3594 ** New run-time limit categories may be added in future releases.
3595 */
3596 SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal);
3597
3598 /*
3599 ** CAPI3REF: Run-Time Limit Categories
3600 ** KEYWORDS: {limit category} {*limit categories}
3601 **
@@ -3743,32 +3743,32 @@
3743 ** or [GLOB] operator or if the parameter is compared to an indexed column
3744 ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
3745 ** </li>
3746 ** </ol>
3747 */
3748 SQLITE_API int SQLITE_STDCALL sqlite3_prepare(
3749 sqlite3 *db, /* Database handle */
3750 const char *zSql, /* SQL statement, UTF-8 encoded */
3751 int nByte, /* Maximum length of zSql in bytes. */
3752 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3753 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3754 );
3755 SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2(
3756 sqlite3 *db, /* Database handle */
3757 const char *zSql, /* SQL statement, UTF-8 encoded */
3758 int nByte, /* Maximum length of zSql in bytes. */
3759 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3760 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3761 );
3762 SQLITE_API int SQLITE_STDCALL sqlite3_prepare16(
3763 sqlite3 *db, /* Database handle */
3764 const void *zSql, /* SQL statement, UTF-16 encoded */
3765 int nByte, /* Maximum length of zSql in bytes. */
3766 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3767 const void **pzTail /* OUT: Pointer to unused portion of zSql */
3768 );
3769 SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
3770 sqlite3 *db, /* Database handle */
3771 const void *zSql, /* SQL statement, UTF-16 encoded */
3772 int nByte, /* Maximum length of zSql in bytes. */
3773 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3774 const void **pzTail /* OUT: Pointer to unused portion of zSql */
@@ -3803,12 +3803,12 @@
3803 ** automatically freed when the prepared statement is finalized.
3804 ** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
3805 ** is obtained from [sqlite3_malloc()] and must be free by the application
3806 ** by passing it to [sqlite3_free()].
3807 */
3808 SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt);
3809 SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt);
3810
3811 /*
3812 ** CAPI3REF: Determine If An SQL Statement Writes The Database
3813 ** METHOD: sqlite3_stmt
3814 **
@@ -3836,11 +3836,11 @@
3836 ** database. ^The [ATTACH] and [DETACH] statements also cause
3837 ** sqlite3_stmt_readonly() to return true since, while those statements
3838 ** change the configuration of a database connection, they do not make
3839 ** changes to the content of the database files on disk.
3840 */
3841 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
3842
3843 /*
3844 ** CAPI3REF: Determine If A Prepared Statement Has Been Reset
3845 ** METHOD: sqlite3_stmt
3846 **
@@ -3857,11 +3857,11 @@
3857 ** to locate all prepared statements associated with a database
3858 ** connection that are in need of being reset. This can be used,
3859 ** for example, in diagnostic routines to search for prepared
3860 ** statements that are holding a transaction open.
3861 */
3862 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*);
3863
3864 /*
3865 ** CAPI3REF: Dynamically Typed Value Object
3866 ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
3867 **
@@ -4021,24 +4021,24 @@
4021 ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
4022 **
4023 ** See also: [sqlite3_bind_parameter_count()],
4024 ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
4025 */
4026 SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
4027 SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
4028 void(*)(void*));
4029 SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double);
4030 SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int);
4031 SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
4032 SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int);
4033 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
4034 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
4035 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
4036 void(*)(void*), unsigned char encoding);
4037 SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
4038 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
4039 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
4040
4041 /*
4042 ** CAPI3REF: Number Of SQL Parameters
4043 ** METHOD: sqlite3_stmt
4044 **
@@ -4055,11 +4055,11 @@
4055 **
4056 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
4057 ** [sqlite3_bind_parameter_name()], and
4058 ** [sqlite3_bind_parameter_index()].
4059 */
4060 SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*);
4061
4062 /*
4063 ** CAPI3REF: Name Of A Host Parameter
4064 ** METHOD: sqlite3_stmt
4065 **
@@ -4083,11 +4083,11 @@
4083 **
4084 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
4085 ** [sqlite3_bind_parameter_count()], and
4086 ** [sqlite3_bind_parameter_index()].
4087 */
4088 SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int);
4089
4090 /*
4091 ** CAPI3REF: Index Of A Parameter With A Given Name
4092 ** METHOD: sqlite3_stmt
4093 **
@@ -4100,21 +4100,21 @@
4100 **
4101 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
4102 ** [sqlite3_bind_parameter_count()], and
4103 ** [sqlite3_bind_parameter_name()].
4104 */
4105 SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
4106
4107 /*
4108 ** CAPI3REF: Reset All Bindings On A Prepared Statement
4109 ** METHOD: sqlite3_stmt
4110 **
4111 ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
4112 ** the [sqlite3_bind_blob | bindings] on a [prepared statement].
4113 ** ^Use this routine to reset all host parameters to NULL.
4114 */
4115 SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*);
4116
4117 /*
4118 ** CAPI3REF: Number Of Columns In A Result Set
4119 ** METHOD: sqlite3_stmt
4120 **
@@ -4122,11 +4122,11 @@
4122 ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
4123 ** statement that does not return data (for example an [UPDATE]).
4124 **
4125 ** See also: [sqlite3_data_count()]
4126 */
4127 SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt);
4128
4129 /*
4130 ** CAPI3REF: Column Names In A Result Set
4131 ** METHOD: sqlite3_stmt
4132 **
@@ -4151,12 +4151,12 @@
4151 ** ^The name of a result column is the value of the "AS" clause for
4152 ** that column, if there is an AS clause. If there is no AS clause
4153 ** then the name of the column is unspecified and may change from
4154 ** one release of SQLite to the next.
4155 */
4156 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N);
4157 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N);
4158
4159 /*
4160 ** CAPI3REF: Source Of Data In A Query Result
4161 ** METHOD: sqlite3_stmt
4162 **
@@ -4200,16 +4200,16 @@
4200 ** If two or more threads call one or more
4201 ** [sqlite3_column_database_name | column metadata interfaces]
4202 ** for the same [prepared statement] and result column
4203 ** at the same time then the results are undefined.
4204 */
4205 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int);
4206 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int);
4207 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int);
4208 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int);
4209 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int);
4210 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int);
4211
4212 /*
4213 ** CAPI3REF: Declared Datatype Of A Query Result
4214 ** METHOD: sqlite3_stmt
4215 **
@@ -4237,12 +4237,12 @@
4237 ** data stored in that column is of the declared type. SQLite is
4238 ** strongly typed, but the typing is dynamic not static. ^Type
4239 ** is associated with individual values, not with the containers
4240 ** used to hold those values.
4241 */
4242 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int);
4243 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int);
4244
4245 /*
4246 ** CAPI3REF: Evaluate An SQL Statement
4247 ** METHOD: sqlite3_stmt
4248 **
@@ -4318,11 +4318,11 @@
4318 ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
4319 ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
4320 ** then the more specific [error codes] are returned directly
4321 ** by sqlite3_step(). The use of the "v2" interface is recommended.
4322 */
4323 SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*);
4324
4325 /*
4326 ** CAPI3REF: Number of columns in a result set
4327 ** METHOD: sqlite3_stmt
4328 **
@@ -4339,11 +4339,11 @@
4339 ** where it always returns zero since each step of that multi-step
4340 ** pragma returns 0 columns of data.
4341 **
4342 ** See also: [sqlite3_column_count()]
4343 */
4344 SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
4345
4346 /*
4347 ** CAPI3REF: Fundamental Datatypes
4348 ** KEYWORDS: SQLITE_TEXT
4349 **
@@ -4529,20 +4529,20 @@
4529 ** of these routines, a default value is returned. The default value
4530 ** is either the integer 0, the floating point number 0.0, or a NULL
4531 ** pointer. Subsequent calls to [sqlite3_errcode()] will return
4532 ** [SQLITE_NOMEM].)^
4533 */
4534 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol);
4535 SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4536 SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4537 SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol);
4538 SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol);
4539 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol);
4540 SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol);
4541 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol);
4542 SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol);
4543 SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol);
4544
4545 /*
4546 ** CAPI3REF: Destroy A Prepared Statement Object
4547 ** DESTRUCTOR: sqlite3_stmt
4548 **
@@ -4566,11 +4566,11 @@
4566 ** resource leaks. It is a grievous error for the application to try to use
4567 ** a prepared statement after it has been finalized. Any use of a prepared
4568 ** statement after it has been finalized can result in undefined and
4569 ** undesirable behavior such as segfaults and heap corruption.
4570 */
4571 SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt);
4572
4573 /*
4574 ** CAPI3REF: Reset A Prepared Statement Object
4575 ** METHOD: sqlite3_stmt
4576 **
@@ -4593,11 +4593,11 @@
4593 ** [sqlite3_reset(S)] returns an appropriate [error code].
4594 **
4595 ** ^The [sqlite3_reset(S)] interface does not change the values
4596 ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
4597 */
4598 SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt);
4599
4600 /*
4601 ** CAPI3REF: Create Or Redefine SQL Functions
4602 ** KEYWORDS: {function creation routines}
4603 ** KEYWORDS: {application-defined SQL function}
@@ -4693,31 +4693,31 @@
4693 ** ^An application-defined function is permitted to call other
4694 ** SQLite interfaces. However, such calls must not
4695 ** close the database connection nor finalize or reset the prepared
4696 ** statement in which the function is running.
4697 */
4698 SQLITE_API int SQLITE_STDCALL sqlite3_create_function(
4699 sqlite3 *db,
4700 const char *zFunctionName,
4701 int nArg,
4702 int eTextRep,
4703 void *pApp,
4704 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4705 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4706 void (*xFinal)(sqlite3_context*)
4707 );
4708 SQLITE_API int SQLITE_STDCALL sqlite3_create_function16(
4709 sqlite3 *db,
4710 const void *zFunctionName,
4711 int nArg,
4712 int eTextRep,
4713 void *pApp,
4714 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4715 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4716 void (*xFinal)(sqlite3_context*)
4717 );
4718 SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2(
4719 sqlite3 *db,
4720 const char *zFunctionName,
4721 int nArg,
4722 int eTextRep,
4723 void *pApp,
@@ -4759,16 +4759,16 @@
4759 ** to be supported. However, new applications should avoid
4760 ** the use of these functions. To encourage programmers to avoid
4761 ** these functions, we will not explain what they do.
4762 */
4763 #ifndef SQLITE_OMIT_DEPRECATED
4764 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*);
4765 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*);
4766 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4767 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void);
4768 SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void);
4769 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
4770 void*,sqlite3_int64);
4771 #endif
4772
4773 /*
4774 ** CAPI3REF: Obtaining SQL Values
@@ -4814,22 +4814,22 @@
4814 ** or [sqlite3_value_text16()].
4815 **
4816 ** These routines must be called from the same thread as
4817 ** the SQL function that supplied the [sqlite3_value*] parameters.
4818 */
4819 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*);
4820 SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*);
4821 SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*);
4822 SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*);
4823 SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*);
4824 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*);
4825 SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*);
4826 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*);
4827 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*);
4828 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*);
4829 SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*);
4830 SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*);
4831
4832 /*
4833 ** CAPI3REF: Finding The Subtype Of SQL Values
4834 ** METHOD: sqlite3_value
4835 **
@@ -4841,11 +4841,11 @@
4841 **
4842 ** SQLite makes no use of subtype itself. It merely passes the subtype
4843 ** from the result of one [application-defined SQL function] into the
4844 ** input of another.
4845 */
4846 SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*);
4847
4848 /*
4849 ** CAPI3REF: Copy And Free SQL Values
4850 ** METHOD: sqlite3_value
4851 **
@@ -4857,12 +4857,12 @@
4857 **
4858 ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
4859 ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
4860 ** then sqlite3_value_free(V) is a harmless no-op.
4861 */
4862 SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*);
4863 SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*);
4864
4865 /*
4866 ** CAPI3REF: Obtain Aggregate Function Context
4867 ** METHOD: sqlite3_context
4868 **
@@ -4903,11 +4903,11 @@
4903 ** function.
4904 **
4905 ** This routine must be called from the same thread in which
4906 ** the aggregate SQL function is running.
4907 */
4908 SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes);
4909
4910 /*
4911 ** CAPI3REF: User Data For Functions
4912 ** METHOD: sqlite3_context
4913 **
@@ -4918,11 +4918,11 @@
4918 ** registered the application defined function.
4919 **
4920 ** This routine must be called from the same thread in which
4921 ** the application-defined function is running.
4922 */
4923 SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*);
4924
4925 /*
4926 ** CAPI3REF: Database Connection For Functions
4927 ** METHOD: sqlite3_context
4928 **
@@ -4930,11 +4930,11 @@
4930 ** the pointer to the [database connection] (the 1st parameter)
4931 ** of the [sqlite3_create_function()]
4932 ** and [sqlite3_create_function16()] routines that originally
4933 ** registered the application defined function.
4934 */
4935 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*);
4936
4937 /*
4938 ** CAPI3REF: Function Auxiliary Data
4939 ** METHOD: sqlite3_context
4940 **
@@ -4984,12 +4984,12 @@
4984 ** values and [parameters] and expressions composed from the same.)^
4985 **
4986 ** These routines must be called from the same thread in which
4987 ** the SQL function is running.
4988 */
4989 SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N);
4990 SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
4991
4992
4993 /*
4994 ** CAPI3REF: Constants Defining Special Destructor Behavior
4995 **
@@ -5121,31 +5121,31 @@
5121 **
5122 ** If these routines are called from within the different thread
5123 ** than the one containing the application-defined function that received
5124 ** the [sqlite3_context] pointer, the results are undefined.
5125 */
5126 SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
5127 SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*,
5128 sqlite3_uint64,void(*)(void*));
5129 SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double);
5130 SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int);
5131 SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int);
5132 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*);
5133 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*);
5134 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int);
5135 SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int);
5136 SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
5137 SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*);
5138 SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
5139 SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
5140 void(*)(void*), unsigned char encoding);
5141 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
5142 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
5143 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
5144 SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
5145 SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
5146 SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
5147
5148
5149 /*
5150 ** CAPI3REF: Setting The Subtype Of An SQL Function
5151 ** METHOD: sqlite3_context
@@ -5156,11 +5156,11 @@
5156 ** of the subtype T are preserved in current versions of SQLite;
5157 ** higher order bits are discarded.
5158 ** The number of subtype bytes preserved by SQLite might increase
5159 ** in future releases of SQLite.
5160 */
5161 SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int);
5162
5163 /*
5164 ** CAPI3REF: Define New Collating Sequences
5165 ** METHOD: sqlite3
5166 **
@@ -5238,26 +5238,26 @@
5238 ** is unfortunate but cannot be changed without breaking backwards
5239 ** compatibility.
5240 **
5241 ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
5242 */
5243 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation(
5244 sqlite3*,
5245 const char *zName,
5246 int eTextRep,
5247 void *pArg,
5248 int(*xCompare)(void*,int,const void*,int,const void*)
5249 );
5250 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2(
5251 sqlite3*,
5252 const char *zName,
5253 int eTextRep,
5254 void *pArg,
5255 int(*xCompare)(void*,int,const void*,int,const void*),
5256 void(*xDestroy)(void*)
5257 );
5258 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16(
5259 sqlite3*,
5260 const void *zName,
5261 int eTextRep,
5262 void *pArg,
5263 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -5288,16 +5288,16 @@
5288 **
5289 ** The callback function should register the desired collation using
5290 ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
5291 ** [sqlite3_create_collation_v2()].
5292 */
5293 SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed(
5294 sqlite3*,
5295 void*,
5296 void(*)(void*,sqlite3*,int eTextRep,const char*)
5297 );
5298 SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16(
5299 sqlite3*,
5300 void*,
5301 void(*)(void*,sqlite3*,int eTextRep,const void*)
5302 );
5303
@@ -5307,15 +5307,15 @@
5307 ** called right after sqlite3_open().
5308 **
5309 ** The code to implement this API is not available in the public release
5310 ** of SQLite.
5311 */
5312 SQLITE_API int SQLITE_STDCALL sqlite3_key(
5313 sqlite3 *db, /* Database to be rekeyed */
5314 const void *pKey, int nKey /* The key */
5315 );
5316 SQLITE_API int SQLITE_STDCALL sqlite3_key_v2(
5317 sqlite3 *db, /* Database to be rekeyed */
5318 const char *zDbName, /* Name of the database */
5319 const void *pKey, int nKey /* The key */
5320 );
5321
@@ -5325,35 +5325,35 @@
5325 ** database is decrypted.
5326 **
5327 ** The code to implement this API is not available in the public release
5328 ** of SQLite.
5329 */
5330 SQLITE_API int SQLITE_STDCALL sqlite3_rekey(
5331 sqlite3 *db, /* Database to be rekeyed */
5332 const void *pKey, int nKey /* The new key */
5333 );
5334 SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2(
5335 sqlite3 *db, /* Database to be rekeyed */
5336 const char *zDbName, /* Name of the database */
5337 const void *pKey, int nKey /* The new key */
5338 );
5339
5340 /*
5341 ** Specify the activation key for a SEE database. Unless
5342 ** activated, none of the SEE routines will work.
5343 */
5344 SQLITE_API void SQLITE_STDCALL sqlite3_activate_see(
5345 const char *zPassPhrase /* Activation phrase */
5346 );
5347 #endif
5348
5349 #ifdef SQLITE_ENABLE_CEROD
5350 /*
5351 ** Specify the activation key for a CEROD database. Unless
5352 ** activated, none of the CEROD routines will work.
5353 */
5354 SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod(
5355 const char *zPassPhrase /* Activation phrase */
5356 );
5357 #endif
5358
5359 /*
@@ -5371,11 +5371,11 @@
5371 ** method of the default [sqlite3_vfs] object. If the xSleep() method
5372 ** of the default VFS is not implemented correctly, or not implemented at
5373 ** all, then the behavior of sqlite3_sleep() may deviate from the description
5374 ** in the previous paragraphs.
5375 */
5376 SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int);
5377
5378 /*
5379 ** CAPI3REF: Name Of The Folder Holding Temporary Files
5380 **
5381 ** ^(If this global variable is made to point to a string which is
@@ -5490,11 +5490,11 @@
5490 **
5491 ** If another thread changes the autocommit status of the database
5492 ** connection while this routine is running, then the return value
5493 ** is undefined.
5494 */
5495 SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*);
5496
5497 /*
5498 ** CAPI3REF: Find The Database Handle Of A Prepared Statement
5499 ** METHOD: sqlite3_stmt
5500 **
@@ -5503,11 +5503,11 @@
5503 ** returned by sqlite3_db_handle is the same [database connection]
5504 ** that was the first argument
5505 ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
5506 ** create the statement in the first place.
5507 */
5508 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*);
5509
5510 /*
5511 ** CAPI3REF: Return The Filename For A Database Connection
5512 ** METHOD: sqlite3
5513 **
@@ -5520,21 +5520,21 @@
5520 ** ^The filename returned by this function is the output of the
5521 ** xFullPathname method of the [VFS]. ^In other words, the filename
5522 ** will be an absolute pathname, even if the filename used
5523 ** to open the database originally was a URI or relative pathname.
5524 */
5525 SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName);
5526
5527 /*
5528 ** CAPI3REF: Determine if a database is read-only
5529 ** METHOD: sqlite3
5530 **
5531 ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N
5532 ** of connection D is read-only, 0 if it is read/write, or -1 if N is not
5533 ** the name of a database on connection D.
5534 */
5535 SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
5536
5537 /*
5538 ** CAPI3REF: Find the next prepared statement
5539 ** METHOD: sqlite3
5540 **
@@ -5546,11 +5546,11 @@
5546 **
5547 ** The [database connection] pointer D in a call to
5548 ** [sqlite3_next_stmt(D,S)] must refer to an open database
5549 ** connection and in particular must not be a NULL pointer.
5550 */
5551 SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
5552
5553 /*
5554 ** CAPI3REF: Commit And Rollback Notification Callbacks
5555 ** METHOD: sqlite3
5556 **
@@ -5595,12 +5595,12 @@
5595 ** ^The rollback callback is not invoked if a transaction is
5596 ** automatically rolled back because the database connection is closed.
5597 **
5598 ** See also the [sqlite3_update_hook()] interface.
5599 */
5600 SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5601 SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5602
5603 /*
5604 ** CAPI3REF: Data Change Notification Callbacks
5605 ** METHOD: sqlite3
5606 **
@@ -5647,11 +5647,11 @@
5647 ** the first call on D.
5648 **
5649 ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
5650 ** and [sqlite3_preupdate_hook()] interfaces.
5651 */
5652 SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
5653 sqlite3*,
5654 void(*)(void *,int ,char const *,char const *,sqlite3_int64),
5655 void*
5656 );
5657
@@ -5687,11 +5687,11 @@
5687 ** This interface is threadsafe on processors where writing a
5688 ** 32-bit integer is atomic.
5689 **
5690 ** See Also: [SQLite Shared-Cache Mode]
5691 */
5692 SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int);
5693
5694 /*
5695 ** CAPI3REF: Attempt To Free Heap Memory
5696 **
5697 ** ^The sqlite3_release_memory() interface attempts to free N bytes
@@ -5703,11 +5703,11 @@
5703 ** ^The sqlite3_release_memory() routine is a no-op returning zero
5704 ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5705 **
5706 ** See also: [sqlite3_db_release_memory()]
5707 */
5708 SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int);
5709
5710 /*
5711 ** CAPI3REF: Free Memory Used By A Database Connection
5712 ** METHOD: sqlite3
5713 **
@@ -5717,11 +5717,11 @@
5717 ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is
5718 ** omitted.
5719 **
5720 ** See also: [sqlite3_release_memory()]
5721 */
5722 SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*);
5723
5724 /*
5725 ** CAPI3REF: Impose A Limit On Heap Size
5726 **
5727 ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
@@ -5769,11 +5769,11 @@
5769 ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5770 **
5771 ** The circumstances under which SQLite will enforce the soft heap limit may
5772 ** changes in future releases of SQLite.
5773 */
5774 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N);
5775
5776 /*
5777 ** CAPI3REF: Deprecated Soft Heap Limit Interface
5778 ** DEPRECATED
5779 **
@@ -5780,11 +5780,11 @@
5780 ** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
5781 ** interface. This routine is provided for historical compatibility
5782 ** only. All new applications should use the
5783 ** [sqlite3_soft_heap_limit64()] interface rather than this one.
5784 */
5785 SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N);
5786
5787
5788 /*
5789 ** CAPI3REF: Extract Metadata About A Column Of A Table
5790 ** METHOD: sqlite3
@@ -5850,11 +5850,11 @@
5850 **
5851 ** ^This function causes all database schemas to be read from disk and
5852 ** parsed, if that has not already been done, and returns an error if
5853 ** any errors are encountered while loading the schema.
5854 */
5855 SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata(
5856 sqlite3 *db, /* Connection handle */
5857 const char *zDbName, /* Database name or NULL */
5858 const char *zTableName, /* Table name */
5859 const char *zColumnName, /* Column name */
5860 char const **pzDataType, /* OUTPUT: Declared data type */
@@ -5906,11 +5906,11 @@
5906 ** disabled and prevent SQL injections from giving attackers
5907 ** access to extension loading capabilities.
5908 **
5909 ** See also the [load_extension() SQL function].
5910 */
5911 SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
5912 sqlite3 *db, /* Load the extension into this database connection */
5913 const char *zFile, /* Name of the shared library containing extension */
5914 const char *zProc, /* Entry point. Derived from zFile if 0 */
5915 char **pzErrMsg /* Put error message here if not 0 */
5916 );
@@ -5938,11 +5938,11 @@
5938 ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
5939 ** rather than this interface, so the [load_extension()] SQL function
5940 ** remains disabled. This will prevent SQL injections from giving attackers
5941 ** access to extension loading capabilities.
5942 */
5943 SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5944
5945 /*
5946 ** CAPI3REF: Automatically Load Statically Linked Extensions
5947 **
5948 ** ^This interface causes the xEntryPoint() function to be invoked for
@@ -5976,11 +5976,11 @@
5976 ** will be called more than once for each database connection that is opened.
5977 **
5978 ** See also: [sqlite3_reset_auto_extension()]
5979 ** and [sqlite3_cancel_auto_extension()]
5980 */
5981 SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void));
5982
5983 /*
5984 ** CAPI3REF: Cancel Automatic Extension Loading
5985 **
5986 ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the
@@ -5988,19 +5988,19 @@
5988 ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)]
5989 ** routine returns 1 if initialization routine X was successfully
5990 ** unregistered and it returns 0 if X was not on the list of initialization
5991 ** routines.
5992 */
5993 SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
5994
5995 /*
5996 ** CAPI3REF: Reset Automatic Extension Loading
5997 **
5998 ** ^This interface disables all automatic extensions previously
5999 ** registered using [sqlite3_auto_extension()].
6000 */
6001 SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void);
6002
6003 /*
6004 ** The interface to the virtual-table mechanism is currently considered
6005 ** to be experimental. The interface might change in incompatible ways.
6006 ** If this is a problem for you, do not use the interface at this time.
@@ -6241,17 +6241,17 @@
6241 ** be invoked if the call to sqlite3_create_module_v2() fails.
6242 ** ^The sqlite3_create_module()
6243 ** interface is equivalent to sqlite3_create_module_v2() with a NULL
6244 ** destructor.
6245 */
6246 SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
6247 sqlite3 *db, /* SQLite connection to register module with */
6248 const char *zName, /* Name of the module */
6249 const sqlite3_module *p, /* Methods for the module */
6250 void *pClientData /* Client data for xCreate/xConnect */
6251 );
6252 SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
6253 sqlite3 *db, /* SQLite connection to register module with */
6254 const char *zName, /* Name of the module */
6255 const sqlite3_module *p, /* Methods for the module */
6256 void *pClientData, /* Client data for xCreate/xConnect */
6257 void(*xDestroy)(void*) /* Module destructor function */
@@ -6310,11 +6310,11 @@
6310 ** ^The [xCreate] and [xConnect] methods of a
6311 ** [virtual table module] call this interface
6312 ** to declare the format (the names and datatypes of the columns) of
6313 ** the virtual tables they implement.
6314 */
6315 SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL);
6316
6317 /*
6318 ** CAPI3REF: Overload A Function For A Virtual Table
6319 ** METHOD: sqlite3
6320 **
@@ -6329,11 +6329,11 @@
6329 ** of the new function always causes an exception to be thrown. So
6330 ** the new function is not good for anything by itself. Its only
6331 ** purpose is to be a placeholder function that can be overloaded
6332 ** by a [virtual table].
6333 */
6334 SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
6335
6336 /*
6337 ** The interface to the virtual-table mechanism defined above (back up
6338 ** to a comment remarkably similar to this one) is currently considered
6339 ** to be experimental. The interface might change in incompatible ways.
@@ -6428,11 +6428,11 @@
6428 ** zero-filled blob to read or write using the incremental-blob interface.
6429 **
6430 ** To avoid a resource leak, every open [BLOB handle] should eventually
6431 ** be released by a call to [sqlite3_blob_close()].
6432 */
6433 SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
6434 sqlite3*,
6435 const char *zDb,
6436 const char *zTable,
6437 const char *zColumn,
6438 sqlite3_int64 iRow,
@@ -6461,11 +6461,11 @@
6461 ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
6462 ** always returns zero.
6463 **
6464 ** ^This function sets the database handle error code and message.
6465 */
6466 SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
6467
6468 /*
6469 ** CAPI3REF: Close A BLOB Handle
6470 ** DESTRUCTOR: sqlite3_blob
6471 **
@@ -6484,11 +6484,11 @@
6484 ** with a null pointer (such as would be returned by a failed call to
6485 ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
6486 ** is passed a valid open blob handle, the values returned by the
6487 ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
6488 */
6489 SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *);
6490
6491 /*
6492 ** CAPI3REF: Return The Size Of An Open BLOB
6493 ** METHOD: sqlite3_blob
6494 **
@@ -6500,11 +6500,11 @@
6500 ** This routine only works on a [BLOB handle] which has been created
6501 ** by a prior successful call to [sqlite3_blob_open()] and which has not
6502 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6503 ** to this routine results in undefined and probably undesirable behavior.
6504 */
6505 SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *);
6506
6507 /*
6508 ** CAPI3REF: Read Data From A BLOB Incrementally
6509 ** METHOD: sqlite3_blob
6510 **
@@ -6529,11 +6529,11 @@
6529 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6530 ** to this routine results in undefined and probably undesirable behavior.
6531 **
6532 ** See also: [sqlite3_blob_write()].
6533 */
6534 SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
6535
6536 /*
6537 ** CAPI3REF: Write Data Into A BLOB Incrementally
6538 ** METHOD: sqlite3_blob
6539 **
@@ -6571,11 +6571,11 @@
6571 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6572 ** to this routine results in undefined and probably undesirable behavior.
6573 **
6574 ** See also: [sqlite3_blob_read()].
6575 */
6576 SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
6577
6578 /*
6579 ** CAPI3REF: Virtual File System Objects
6580 **
6581 ** A virtual filesystem (VFS) is an [sqlite3_vfs] object
@@ -6602,13 +6602,13 @@
6602 **
6603 ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
6604 ** ^(If the default VFS is unregistered, another VFS is chosen as
6605 ** the default. The choice for the new VFS is arbitrary.)^
6606 */
6607 SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName);
6608 SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6609 SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
6610
6611 /*
6612 ** CAPI3REF: Mutexes
6613 **
6614 ** The SQLite core uses these routines for thread
@@ -6720,15 +6720,15 @@
6720 ** sqlite3_mutex_leave() is a NULL pointer, then all three routines
6721 ** behave as no-ops.
6722 **
6723 ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
6724 */
6725 SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int);
6726 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*);
6727 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*);
6728 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*);
6729 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*);
6730
6731 /*
6732 ** CAPI3REF: Mutex Methods Object
6733 **
6734 ** An instance of this structure defines the low-level routines
@@ -6834,12 +6834,12 @@
6834 ** call to sqlite3_mutex_held() to fail, so a non-zero return is
6835 ** the appropriate thing to do. The sqlite3_mutex_notheld()
6836 ** interface should also return 1 when given a NULL pointer.
6837 */
6838 #ifndef NDEBUG
6839 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*);
6840 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
6841 #endif
6842
6843 /*
6844 ** CAPI3REF: Mutex Types
6845 **
@@ -6875,11 +6875,11 @@
6875 ** serializes access to the [database connection] given in the argument
6876 ** when the [threading mode] is Serialized.
6877 ** ^If the [threading mode] is Single-thread or Multi-thread then this
6878 ** routine returns a NULL pointer.
6879 */
6880 SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*);
6881
6882 /*
6883 ** CAPI3REF: Low-Level Control Of Database Files
6884 ** METHOD: sqlite3
6885 **
@@ -6910,11 +6910,11 @@
6910 ** an incorrect zDbName and an SQLITE_ERROR return from the underlying
6911 ** xFileControl method.
6912 **
6913 ** See also: [SQLITE_FCNTL_LOCKSTATE]
6914 */
6915 SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6916
6917 /*
6918 ** CAPI3REF: Testing Interface
6919 **
6920 ** ^The sqlite3_test_control() interface is used to read out internal
@@ -6929,11 +6929,11 @@
6929 ** The details of the operation codes, their meanings, the parameters
6930 ** they take, and what they do are all subject to change without notice.
6931 ** Unlike most of the SQLite API, this function is not guaranteed to
6932 ** operate consistently from one release to the next.
6933 */
6934 SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
6935
6936 /*
6937 ** CAPI3REF: Testing Interface Operation Codes
6938 **
6939 ** These constants are the valid operation code parameters used
@@ -6992,12 +6992,12 @@
6992 ** be represented by a 32-bit integer, then the values returned by
6993 ** sqlite3_status() are undefined.
6994 **
6995 ** See also: [sqlite3_db_status()]
6996 */
6997 SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6998 SQLITE_API int SQLITE_STDCALL sqlite3_status64(
6999 int op,
7000 sqlite3_int64 *pCurrent,
7001 sqlite3_int64 *pHighwater,
7002 int resetFlag
7003 );
@@ -7118,11 +7118,11 @@
7118 ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
7119 ** non-zero [error code] on failure.
7120 **
7121 ** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
7122 */
7123 SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
7124
7125 /*
7126 ** CAPI3REF: Status Parameters for database connections
7127 ** KEYWORDS: {SQLITE_DBSTATUS options}
7128 **
@@ -7261,11 +7261,11 @@
7261 ** ^If the resetFlg is true, then the counter is reset to zero after this
7262 ** interface call returns.
7263 **
7264 ** See also: [sqlite3_status()] and [sqlite3_db_status()].
7265 */
7266 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
7267
7268 /*
7269 ** CAPI3REF: Status Parameters for prepared statements
7270 ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters}
7271 **
@@ -7730,20 +7730,20 @@
7730 ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
7731 ** APIs are not strictly speaking threadsafe. If they are invoked at the
7732 ** same time as another thread is invoking sqlite3_backup_step() it is
7733 ** possible that they return invalid values.
7734 */
7735 SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
7736 sqlite3 *pDest, /* Destination database handle */
7737 const char *zDestName, /* Destination database name */
7738 sqlite3 *pSource, /* Source database handle */
7739 const char *zSourceName /* Source database name */
7740 );
7741 SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage);
7742 SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p);
7743 SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p);
7744 SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p);
7745
7746 /*
7747 ** CAPI3REF: Unlock Notification
7748 ** METHOD: sqlite3
7749 **
@@ -7856,11 +7856,11 @@
7856 ** by an sqlite3_step() call. ^(If there is a blocking connection, then the
7857 ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
7858 ** the special "DROP TABLE/INDEX" case, the extended error code is just
7859 ** SQLITE_LOCKED.)^
7860 */
7861 SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify(
7862 sqlite3 *pBlocked, /* Waiting connection */
7863 void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
7864 void *pNotifyArg /* Argument to pass to xNotify */
7865 );
7866
@@ -7871,12 +7871,12 @@
7871 ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications
7872 ** and extensions to compare the contents of two buffers containing UTF-8
7873 ** strings in a case-independent fashion, using the same definition of "case
7874 ** independence" that SQLite uses internally when comparing identifiers.
7875 */
7876 SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *);
7877 SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int);
7878
7879 /*
7880 ** CAPI3REF: String Globbing
7881 *
7882 ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if
@@ -7889,11 +7889,11 @@
7889 ** Note that this routine returns zero on a match and non-zero if the strings
7890 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7891 **
7892 ** See also: [sqlite3_strlike()].
7893 */
7894 SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr);
7895
7896 /*
7897 ** CAPI3REF: String LIKE Matching
7898 *
7899 ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if
@@ -7912,11 +7912,11 @@
7912 ** Note that this routine returns zero on a match and non-zero if the strings
7913 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7914 **
7915 ** See also: [sqlite3_strglob()].
7916 */
7917 SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
7918
7919 /*
7920 ** CAPI3REF: Error Logging Interface
7921 **
7922 ** ^The [sqlite3_log()] interface writes a message into the [error log]
@@ -7935,11 +7935,11 @@
7935 ** will not use dynamically allocated memory. The log message is stored in
7936 ** a fixed-length buffer on the stack. If the log message is longer than
7937 ** a few hundred characters, it will be truncated to the length of the
7938 ** buffer.
7939 */
7940 SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...);
7941
7942 /*
7943 ** CAPI3REF: Write-Ahead Log Commit Hook
7944 ** METHOD: sqlite3
7945 **
@@ -7971,11 +7971,11 @@
7971 ** previously registered write-ahead log callback. ^Note that the
7972 ** [sqlite3_wal_autocheckpoint()] interface and the
7973 ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
7974 ** overwrite any prior [sqlite3_wal_hook()] settings.
7975 */
7976 SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook(
7977 sqlite3*,
7978 int(*)(void *,sqlite3*,const char*,int),
7979 void*
7980 );
7981
@@ -8006,11 +8006,11 @@
8006 ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
8007 ** pages. The use of this interface
8008 ** is only necessary if the default setting is found to be suboptimal
8009 ** for a particular application.
8010 */
8011 SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
8012
8013 /*
8014 ** CAPI3REF: Checkpoint a database
8015 ** METHOD: sqlite3
8016 **
@@ -8028,11 +8028,11 @@
8028 ** interface was added. This interface is retained for backwards
8029 ** compatibility and as a convenience for applications that need to manually
8030 ** start a callback but which do not need the full power (and corresponding
8031 ** complication) of [sqlite3_wal_checkpoint_v2()].
8032 */
8033 SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
8034
8035 /*
8036 ** CAPI3REF: Checkpoint a database
8037 ** METHOD: sqlite3
8038 **
@@ -8122,11 +8122,11 @@
8122 ** [sqlite3_errcode()] and [sqlite3_errmsg()].
8123 **
8124 ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
8125 ** from SQL.
8126 */
8127 SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2(
8128 sqlite3 *db, /* Database handle */
8129 const char *zDb, /* Name of attached database (or NULL) */
8130 int eMode, /* SQLITE_CHECKPOINT_* value */
8131 int *pnLog, /* OUT: Size of WAL log in frames */
8132 int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -8158,11 +8158,11 @@
8158 **
8159 ** At present, there is only one option that may be configured using
8160 ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
8161 ** may be added in the future.
8162 */
8163 SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...);
8164
8165 /*
8166 ** CAPI3REF: Virtual Table Configuration Options
8167 **
8168 ** These macros define the various options to the
@@ -8211,11 +8211,11 @@
8211 ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],
8212 ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode
8213 ** of the SQL statement that triggered the call to the [xUpdate] method of the
8214 ** [virtual table].
8215 */
8216 SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *);
8217
8218 /*
8219 ** CAPI3REF: Conflict resolution modes
8220 ** KEYWORDS: {conflict resolution mode}
8221 **
@@ -8316,11 +8316,11 @@
8316 ** as if the loop did not exist - it returns non-zero and leave the variable
8317 ** that pOut points to unchanged.
8318 **
8319 ** See also: [sqlite3_stmt_scanstatus_reset()]
8320 */
8321 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
8322 sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
8323 int idx, /* Index of loop to report on */
8324 int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
8325 void *pOut /* Result written here */
8326 );
@@ -8332,11 +8332,11 @@
8332 ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
8333 **
8334 ** This API is only available if the library is built with pre-processor
8335 ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
8336 */
8337 SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
8338
8339 /*
8340 ** CAPI3REF: Flush caches to disk mid-transaction
8341 **
8342 ** ^If a write-transaction is open on [database connection] D when the
@@ -8364,11 +8364,11 @@
8364 ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.
8365 **
8366 ** ^This function does not set the database handle error code or message
8367 ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
8368 */
8369 SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*);
8370
8371 /*
8372 ** CAPI3REF: The pre-update hook.
8373 **
8374 ** ^These interfaces are only available if SQLite is compiled using the
@@ -8444,11 +8444,11 @@
8444 ** triggers; or 2 for changes resulting from triggers called by top-level
8445 ** triggers; and so forth.
8446 **
8447 ** See also: [sqlite3_update_hook()]
8448 */
8449 SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook(
8450 sqlite3 *db,
8451 void(*xPreUpdate)(
8452 void *pCtx, /* Copy of third arg to preupdate_hook() */
8453 sqlite3 *db, /* Database handle */
8454 int op, /* SQLITE_UPDATE, DELETE or INSERT */
@@ -8457,14 +8457,14 @@
8457 sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
8458 sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
8459 ),
8460 void*
8461 );
8462 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8463 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *);
8464 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *);
8465 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
8466
8467 /*
8468 ** CAPI3REF: Low-level system error code
8469 **
8470 ** ^Attempt to return the underlying operating system error code or error
@@ -8472,11 +8472,11 @@
8472 ** The return value is OS-dependent. For example, on unix systems, after
8473 ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
8474 ** called to get back the underlying "errno" that caused the problem, such
8475 ** as ENOSPC, EAUTH, EISDIR, and so forth.
8476 */
8477 SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*);
8478
8479 /*
8480 ** CAPI3REF: Database Snapshot
8481 ** KEYWORDS: {snapshot}
8482 ** EXPERIMENTAL
@@ -8522,11 +8522,11 @@
8522 ** to avoid a memory leak.
8523 **
8524 ** The [sqlite3_snapshot_get()] interface is only available when the
8525 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8526 */
8527 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get(
8528 sqlite3 *db,
8529 const char *zSchema,
8530 sqlite3_snapshot **ppSnapshot
8531 );
8532
@@ -8560,11 +8560,11 @@
8560 ** database connection in order to make it ready to use snapshots.)
8561 **
8562 ** The [sqlite3_snapshot_open()] interface is only available when the
8563 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8564 */
8565 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open(
8566 sqlite3 *db,
8567 const char *zSchema,
8568 sqlite3_snapshot *pSnapshot
8569 );
8570
@@ -8577,11 +8577,11 @@
8577 ** using this routine to avoid a memory leak.
8578 **
8579 ** The [sqlite3_snapshot_free()] interface is only available when the
8580 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8581 */
8582 SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*);
8583
8584 /*
8585 ** CAPI3REF: Compare the ages of two snapshot handles.
8586 ** EXPERIMENTAL
8587 **
@@ -8601,11 +8601,11 @@
8601 **
8602 ** Otherwise, this API returns a negative value if P1 refers to an older
8603 ** snapshot than P2, zero if the two handles refer to the same database
8604 ** snapshot, and a positive value if P1 is a newer snapshot than P2.
8605 */
8606 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp(
8607 sqlite3_snapshot *p1,
8608 sqlite3_snapshot *p2
8609 );
8610
8611 /*
@@ -8659,11 +8659,11 @@
8659 ** Register a geometry callback named zGeom that can be used as part of an
8660 ** R-Tree geometry query as follows:
8661 **
8662 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
8663 */
8664 SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback(
8665 sqlite3 *db,
8666 const char *zGeom,
8667 int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
8668 void *pContext
8669 );
@@ -8685,11 +8685,11 @@
8685 ** Register a 2nd-generation geometry callback named zScore that can be
8686 ** used as part of an R-Tree geometry query as follows:
8687 **
8688 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
8689 */
8690 SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback(
8691 sqlite3 *db,
8692 const char *zQueryFunc,
8693 int (*xQueryFunc)(sqlite3_rtree_query_info*),
8694 void *pContext,
8695 void (*xDestructor)(void*)
@@ -11900,12 +11900,12 @@
11900 */
11901 #ifdef SQLITE_OMIT_WSD
11902 #define SQLITE_WSD const
11903 #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v)))
11904 #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config)
11905 SQLITE_API int SQLITE_STDCALL sqlite3_wsd_init(int N, int J);
11906 SQLITE_API void *SQLITE_STDCALL sqlite3_wsd_find(void *K, int L);
11907 #else
11908 #define SQLITE_WSD
11909 #define GLOBAL(t,v) v
11910 #define sqlite3GlobalConfig sqlite3Config
11911 #endif
@@ -12559,16 +12559,16 @@
12559 #define OP_Found 31 /* synopsis: key=r[P3@P4] */
12560 #define OP_SeekRowid 32 /* synopsis: intkey=r[P3] */
12561 #define OP_NotExists 33 /* synopsis: intkey=r[P3] */
12562 #define OP_IsNull 34 /* same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
12563 #define OP_NotNull 35 /* same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
12564 #define OP_Ne 36 /* same as TK_NE, synopsis: if r[P1]!=r[P3] goto P2 */
12565 #define OP_Eq 37 /* same as TK_EQ, synopsis: if r[P1]==r[P3] goto P2 */
12566 #define OP_Gt 38 /* same as TK_GT, synopsis: if r[P1]>r[P3] goto P2 */
12567 #define OP_Le 39 /* same as TK_LE, synopsis: if r[P1]<=r[P3] goto P2 */
12568 #define OP_Lt 40 /* same as TK_LT, synopsis: if r[P1]<r[P3] goto P2 */
12569 #define OP_Ge 41 /* same as TK_GE, synopsis: if r[P1]>=r[P3] goto P2 */
12570 #define OP_Last 42
12571 #define OP_BitAnd 43 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
12572 #define OP_BitOr 44 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
12573 #define OP_ShiftLeft 45 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */
12574 #define OP_ShiftRight 46 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */
@@ -17561,11 +17561,11 @@
17561 ** was used and false if not.
17562 **
17563 ** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix
17564 ** is not required for a match.
17565 */
17566 SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName){
17567 int i, n;
17568
17569 #if SQLITE_ENABLE_API_ARMOR
17570 if( zOptName==0 ){
17571 (void)SQLITE_MISUSE_BKPT;
@@ -17589,11 +17589,11 @@
17589
17590 /*
17591 ** Return the N-th compile-time option string. If N is out of range,
17592 ** return a NULL pointer.
17593 */
17594 SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N){
17595 if( N>=0 && N<ArraySize(azCompileOpt) ){
17596 return azCompileOpt[N];
17597 }
17598 return 0;
17599 }
@@ -18299,11 +18299,11 @@
18299 }
18300
18301 /*
18302 ** Query status information.
18303 */
18304 SQLITE_API int SQLITE_STDCALL sqlite3_status64(
18305 int op,
18306 sqlite3_int64 *pCurrent,
18307 sqlite3_int64 *pHighwater,
18308 int resetFlag
18309 ){
@@ -18324,11 +18324,11 @@
18324 }
18325 sqlite3_mutex_leave(pMutex);
18326 (void)pMutex; /* Prevent warning when SQLITE_THREADSAFE=0 */
18327 return SQLITE_OK;
18328 }
18329 SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){
18330 sqlite3_int64 iCur = 0, iHwtr = 0;
18331 int rc;
18332 #ifdef SQLITE_ENABLE_API_ARMOR
18333 if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT;
18334 #endif
@@ -18341,11 +18341,11 @@
18341 }
18342
18343 /*
18344 ** Query status information for a single database connection
18345 */
18346 SQLITE_API int SQLITE_STDCALL sqlite3_db_status(
18347 sqlite3 *db, /* The database connection whose status is desired */
18348 int op, /* Status verb */
18349 int *pCurrent, /* Write current value here */
18350 int *pHighwater, /* Write high-water mark here */
18351 int resetFlag /* Reset high-water mark if true */
@@ -20018,11 +20018,11 @@
20018
20019 /*
20020 ** Locate a VFS by name. If no name is given, simply return the
20021 ** first VFS on the list.
20022 */
20023 SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfs){
20024 sqlite3_vfs *pVfs = 0;
20025 #if SQLITE_THREADSAFE
20026 sqlite3_mutex *mutex;
20027 #endif
20028 #ifndef SQLITE_OMIT_AUTOINIT
@@ -20064,11 +20064,11 @@
20064 /*
20065 ** Register a VFS with the system. It is harmless to register the same
20066 ** VFS multiple times. The new VFS becomes the default if makeDflt is
20067 ** true.
20068 */
20069 SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
20070 MUTEX_LOGIC(sqlite3_mutex *mutex;)
20071 #ifndef SQLITE_OMIT_AUTOINIT
20072 int rc = sqlite3_initialize();
20073 if( rc ) return rc;
20074 #endif
@@ -20092,11 +20092,11 @@
20092 }
20093
20094 /*
20095 ** Unregister a VFS so that it is no longer accessible.
20096 */
20097 SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
20098 #if SQLITE_THREADSAFE
20099 sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
20100 #endif
20101 sqlite3_mutex_enter(mutex);
20102 vfsUnlink(pVfs);
@@ -22443,11 +22443,11 @@
22443 }
22444
22445 /*
22446 ** Retrieve a pointer to a static mutex or allocate a new dynamic one.
22447 */
22448 SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int id){
22449 #ifndef SQLITE_OMIT_AUTOINIT
22450 if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0;
22451 if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0;
22452 #endif
22453 assert( sqlite3GlobalConfig.mutex.xMutexAlloc );
@@ -22464,11 +22464,11 @@
22464 }
22465
22466 /*
22467 ** Free a dynamic mutex.
22468 */
22469 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){
22470 if( p ){
22471 assert( sqlite3GlobalConfig.mutex.xMutexFree );
22472 sqlite3GlobalConfig.mutex.xMutexFree(p);
22473 }
22474 }
@@ -22475,11 +22475,11 @@
22475
22476 /*
22477 ** Obtain the mutex p. If some other thread already has the mutex, block
22478 ** until it can be obtained.
22479 */
22480 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){
22481 if( p ){
22482 assert( sqlite3GlobalConfig.mutex.xMutexEnter );
22483 sqlite3GlobalConfig.mutex.xMutexEnter(p);
22484 }
22485 }
@@ -22486,11 +22486,11 @@
22486
22487 /*
22488 ** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another
22489 ** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY.
22490 */
22491 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){
22492 int rc = SQLITE_OK;
22493 if( p ){
22494 assert( sqlite3GlobalConfig.mutex.xMutexTry );
22495 return sqlite3GlobalConfig.mutex.xMutexTry(p);
22496 }
@@ -22501,11 +22501,11 @@
22501 ** The sqlite3_mutex_leave() routine exits a mutex that was previously
22502 ** entered by the same thread. The behavior is undefined if the mutex
22503 ** is not currently entered. If a NULL pointer is passed as an argument
22504 ** this function is a no-op.
22505 */
22506 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){
22507 if( p ){
22508 assert( sqlite3GlobalConfig.mutex.xMutexLeave );
22509 sqlite3GlobalConfig.mutex.xMutexLeave(p);
22510 }
22511 }
@@ -22513,15 +22513,15 @@
22513 #ifndef NDEBUG
22514 /*
22515 ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
22516 ** intended for use inside assert() statements.
22517 */
22518 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex *p){
22519 assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld );
22520 return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p);
22521 }
22522 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex *p){
22523 assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld );
22524 return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p);
22525 }
22526 #endif
22527
@@ -23549,12 +23549,12 @@
23549 ** of the sqlite3_initialize() and sqlite3_shutdown() processing, the
23550 ** "interlocked" magic used here is probably not strictly necessary.
23551 */
23552 static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0;
23553
23554 SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void); /* os_win.c */
23555 SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */
23556
23557 static int winMutexInit(void){
23558 /* The first to increment to 1 does actual initialization */
23559 if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){
23560 int i;
@@ -23850,11 +23850,11 @@
23850 /*
23851 ** Attempt to release up to n bytes of non-essential memory currently
23852 ** held by SQLite. An example of non-essential memory is memory used to
23853 ** cache database pages that are not currently in use.
23854 */
23855 SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int n){
23856 #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
23857 return sqlite3PcacheReleaseMemory(n);
23858 #else
23859 /* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine
23860 ** is a no-op returning zero if SQLite is not compiled with
@@ -23909,11 +23909,11 @@
23909 /*
23910 ** Deprecated external interface. It used to set an alarm callback
23911 ** that was invoked when memory usage grew too large. Now it is a
23912 ** no-op.
23913 */
23914 SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm(
23915 void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
23916 void *pArg,
23917 sqlite3_int64 iThreshold
23918 ){
23919 (void)xCallback;
@@ -23925,11 +23925,11 @@
23925
23926 /*
23927 ** Set the soft heap-size limit for the library. Passing a zero or
23928 ** negative value indicates no limit.
23929 */
23930 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 n){
23931 sqlite3_int64 priorLimit;
23932 sqlite3_int64 excess;
23933 sqlite3_int64 nUsed;
23934 #ifndef SQLITE_OMIT_AUTOINIT
23935 int rc = sqlite3_initialize();
@@ -23947,11 +23947,11 @@
23947 sqlite3_mutex_leave(mem0.mutex);
23948 excess = sqlite3_memory_used() - n;
23949 if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff));
23950 return priorLimit;
23951 }
23952 SQLITE_API void SQLITE_STDCALL sqlite3_soft_heap_limit(int n){
23953 if( n<0 ) n = 0;
23954 sqlite3_soft_heap_limit64(n);
23955 }
23956
23957 /*
@@ -24016,11 +24016,11 @@
24016 }
24017
24018 /*
24019 ** Return the amount of memory currently checked out.
24020 */
24021 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){
24022 sqlite3_int64 res, mx;
24023 sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0);
24024 return res;
24025 }
24026
@@ -24027,11 +24027,11 @@
24027 /*
24028 ** Return the maximum amount of memory that has ever been
24029 ** checked out since either the beginning of this process
24030 ** or since the most recent reset.
24031 */
24032 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag){
24033 sqlite3_int64 res, mx;
24034 sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag);
24035 return mx;
24036 }
24037
@@ -24107,17 +24107,17 @@
24107 /*
24108 ** This version of the memory allocation is for use by the application.
24109 ** First make sure the memory subsystem is initialized, then do the
24110 ** allocation.
24111 */
24112 SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int n){
24113 #ifndef SQLITE_OMIT_AUTOINIT
24114 if( sqlite3_initialize() ) return 0;
24115 #endif
24116 return n<=0 ? 0 : sqlite3Malloc(n);
24117 }
24118 SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64 n){
24119 #ifndef SQLITE_OMIT_AUTOINIT
24120 if( sqlite3_initialize() ) return 0;
24121 #endif
24122 return sqlite3Malloc(n);
24123 }
@@ -24256,20 +24256,20 @@
24256 }else{
24257 assert( sqlite3_mutex_held(db->mutex) );
24258 return db->lookaside.sz;
24259 }
24260 }
24261 SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){
24262 assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
24263 assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
24264 return p ? sqlite3GlobalConfig.m.xSize(p) : 0;
24265 }
24266
24267 /*
24268 ** Free memory previously obtained from sqlite3Malloc().
24269 */
24270 SQLITE_API void SQLITE_STDCALL sqlite3_free(void *p){
24271 if( p==0 ) return; /* IMP: R-49053-54554 */
24272 assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
24273 assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
24274 if( sqlite3GlobalConfig.bMemstat ){
24275 sqlite3_mutex_enter(mem0.mutex);
@@ -24374,18 +24374,18 @@
24374
24375 /*
24376 ** The public interface to sqlite3Realloc. Make sure that the memory
24377 ** subsystem is initialized prior to invoking sqliteRealloc.
24378 */
24379 SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void *pOld, int n){
24380 #ifndef SQLITE_OMIT_AUTOINIT
24381 if( sqlite3_initialize() ) return 0;
24382 #endif
24383 if( n<0 ) n = 0; /* IMP: R-26507-47431 */
24384 return sqlite3Realloc(pOld, n);
24385 }
24386 SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){
24387 #ifndef SQLITE_OMIT_AUTOINIT
24388 if( sqlite3_initialize() ) return 0;
24389 #endif
24390 return sqlite3Realloc(pOld, n);
24391 }
@@ -25608,11 +25608,11 @@
25608
25609 /*
25610 ** Print into memory obtained from sqlite3_malloc(). Omit the internal
25611 ** %-conversion extensions.
25612 */
25613 SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char *zFormat, va_list ap){
25614 char *z;
25615 char zBase[SQLITE_PRINT_BUF_SIZE];
25616 StrAccum acc;
25617
25618 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -25632,11 +25632,11 @@
25632
25633 /*
25634 ** Print into memory obtained from sqlite3_malloc()(). Omit the internal
25635 ** %-conversion extensions.
25636 */
25637 SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char *zFormat, ...){
25638 va_list ap;
25639 char *z;
25640 #ifndef SQLITE_OMIT_AUTOINIT
25641 if( sqlite3_initialize() ) return 0;
25642 #endif
@@ -25657,11 +25657,11 @@
25657 ** this without breaking compatibility, so we just have to live with the
25658 ** mistake.
25659 **
25660 ** sqlite3_vsnprintf() is the varargs version.
25661 */
25662 SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
25663 StrAccum acc;
25664 if( n<=0 ) return zBuf;
25665 #ifdef SQLITE_ENABLE_API_ARMOR
25666 if( zBuf==0 || zFormat==0 ) {
25667 (void)SQLITE_MISUSE_BKPT;
@@ -25671,11 +25671,11 @@
25671 #endif
25672 sqlite3StrAccumInit(&acc, 0, zBuf, n, 0);
25673 sqlite3VXPrintf(&acc, zFormat, ap);
25674 return sqlite3StrAccumFinish(&acc);
25675 }
25676 SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
25677 char *z;
25678 va_list ap;
25679 va_start(ap,zFormat);
25680 z = sqlite3_vsnprintf(n, zBuf, zFormat, ap);
25681 va_end(ap);
@@ -25707,11 +25707,11 @@
25707 }
25708
25709 /*
25710 ** Format and write a message to the log if logging is enabled.
25711 */
25712 SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...){
25713 va_list ap; /* Vararg list */
25714 if( sqlite3GlobalConfig.xLog ){
25715 va_start(ap, zFormat);
25716 renderLogMsg(iErrCode, zFormat, ap);
25717 va_end(ap);
@@ -26284,11 +26284,11 @@
26284 } sqlite3Prng;
26285
26286 /*
26287 ** Return N random bytes.
26288 */
26289 SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *pBuf){
26290 unsigned char t;
26291 unsigned char *zBuf = pBuf;
26292
26293 /* The "wsdPrng" macro will resolve to the pseudo-random number generator
26294 ** state vector. If writable static data is unsupported on the target,
@@ -27487,11 +27487,11 @@
27487 ** sqlite3_strnicmp() APIs allow applications and extensions to compare
27488 ** the contents of two buffers containing UTF-8 strings in a
27489 ** case-independent fashion, using the same definition of "case
27490 ** independence" that SQLite uses internally when comparing identifiers.
27491 */
27492 SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *zLeft, const char *zRight){
27493 if( zLeft==0 ){
27494 return zRight ? -1 : 0;
27495 }else if( zRight==0 ){
27496 return 1;
27497 }
@@ -27508,11 +27508,11 @@
27508 a++;
27509 b++;
27510 }
27511 return c;
27512 }
27513 SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
27514 register unsigned char *a, *b;
27515 if( zLeft==0 ){
27516 return zRight ? -1 : 0;
27517 }else if( zRight==0 ){
27518 return 1;
@@ -28990,16 +28990,16 @@
28990 /* 31 */ "Found" OpHelp("key=r[P3@P4]"),
28991 /* 32 */ "SeekRowid" OpHelp("intkey=r[P3]"),
28992 /* 33 */ "NotExists" OpHelp("intkey=r[P3]"),
28993 /* 34 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
28994 /* 35 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
28995 /* 36 */ "Ne" OpHelp("if r[P1]!=r[P3] goto P2"),
28996 /* 37 */ "Eq" OpHelp("if r[P1]==r[P3] goto P2"),
28997 /* 38 */ "Gt" OpHelp("if r[P1]>r[P3] goto P2"),
28998 /* 39 */ "Le" OpHelp("if r[P1]<=r[P3] goto P2"),
28999 /* 40 */ "Lt" OpHelp("if r[P1]<r[P3] goto P2"),
29000 /* 41 */ "Ge" OpHelp("if r[P1]>=r[P3] goto P2"),
29001 /* 42 */ "Last" OpHelp(""),
29002 /* 43 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
29003 /* 44 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
29004 /* 45 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
29005 /* 46 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
@@ -36807,11 +36807,11 @@
36807 ** This routine is called once during SQLite initialization and by a
36808 ** single thread. The memory allocation and mutex subsystems have not
36809 ** necessarily been initialized when this routine is called, and so they
36810 ** should not be used.
36811 */
36812 SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){
36813 /*
36814 ** The following macro defines an initializer for an sqlite3_vfs object.
36815 ** The name of the VFS is NAME. The pAppData is a pointer to a pointer
36816 ** to the "finder" function. (pAppData is a pointer to a pointer because
36817 ** silly C90 rules prohibit a void* from being cast to a function pointer
@@ -36906,11 +36906,11 @@
36906 **
36907 ** Some operating systems might need to do some cleanup in this routine,
36908 ** to release dynamically allocated objects. But not on unix.
36909 ** This routine is a no-op for unix.
36910 */
36911 SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){
36912 return SQLITE_OK;
36913 }
36914
36915 #endif /* SQLITE_OS_UNIX */
36916
@@ -38341,11 +38341,11 @@
38341 ** compact it. Upon success, SQLITE_OK will be returned. Upon failure, one
38342 ** of SQLITE_NOMEM, SQLITE_ERROR, or SQLITE_NOTFOUND will be returned. The
38343 ** "pnLargest" argument, if non-zero, will be used to return the size of the
38344 ** largest committed free block in the heap, in bytes.
38345 */
38346 SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){
38347 int rc = SQLITE_OK;
38348 UINT nLargest = 0;
38349 HANDLE hHeap;
38350
38351 winMemAssertMagic();
@@ -38381,11 +38381,11 @@
38381 ** If a Win32 native heap has been configured, this function will attempt to
38382 ** destroy and recreate it. If the Win32 native heap is not isolated and/or
38383 ** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will
38384 ** be returned and no changes will be made to the Win32 native heap.
38385 */
38386 SQLITE_API int SQLITE_STDCALL sqlite3_win32_reset_heap(){
38387 int rc;
38388 MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
38389 MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */
38390 MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); )
38391 MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); )
@@ -38426,11 +38426,11 @@
38426 /*
38427 ** This function outputs the specified (ANSI) string to the Win32 debugger
38428 ** (if available).
38429 */
38430
38431 SQLITE_API void SQLITE_STDCALL sqlite3_win32_write_debug(const char *zBuf, int nBuf){
38432 char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE];
38433 int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */
38434 if( nMin<-1 ) nMin = -1; /* all negative values become -1. */
38435 assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE );
38436 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -38472,11 +38472,11 @@
38472 */
38473 #if SQLITE_OS_WINRT
38474 static HANDLE sleepObj = NULL;
38475 #endif
38476
38477 SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds){
38478 #if SQLITE_OS_WINRT
38479 if ( sleepObj==NULL ){
38480 sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET,
38481 SYNCHRONIZE);
38482 }
@@ -38521,11 +38521,11 @@
38521
38522 /*
38523 ** This function determines if the machine is running a version of Windows
38524 ** based on the NT kernel.
38525 */
38526 SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void){
38527 #if SQLITE_OS_WINRT
38528 /*
38529 ** NOTE: The WinRT sub-platform is always assumed to be based on the NT
38530 ** kernel.
38531 */
@@ -38909,11 +38909,11 @@
38909 }
38910
38911 /*
38912 ** This is a public wrapper for the winUtf8ToUnicode() function.
38913 */
38914 SQLITE_API LPWSTR SQLITE_STDCALL sqlite3_win32_utf8_to_unicode(const char *zText){
38915 #ifdef SQLITE_ENABLE_API_ARMOR
38916 if( !zText ){
38917 (void)SQLITE_MISUSE_BKPT;
38918 return 0;
38919 }
@@ -38925,11 +38925,11 @@
38925 }
38926
38927 /*
38928 ** This is a public wrapper for the winUnicodeToUtf8() function.
38929 */
38930 SQLITE_API char *SQLITE_STDCALL sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){
38931 #ifdef SQLITE_ENABLE_API_ARMOR
38932 if( !zWideText ){
38933 (void)SQLITE_MISUSE_BKPT;
38934 return 0;
38935 }
@@ -38941,11 +38941,11 @@
38941 }
38942
38943 /*
38944 ** This is a public wrapper for the winMbcsToUtf8() function.
38945 */
38946 SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8(const char *zText){
38947 #ifdef SQLITE_ENABLE_API_ARMOR
38948 if( !zText ){
38949 (void)SQLITE_MISUSE_BKPT;
38950 return 0;
38951 }
@@ -38957,11 +38957,11 @@
38957 }
38958
38959 /*
38960 ** This is a public wrapper for the winMbcsToUtf8() function.
38961 */
38962 SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){
38963 #ifdef SQLITE_ENABLE_API_ARMOR
38964 if( !zText ){
38965 (void)SQLITE_MISUSE_BKPT;
38966 return 0;
38967 }
@@ -38973,11 +38973,11 @@
38973 }
38974
38975 /*
38976 ** This is a public wrapper for the winUtf8ToMbcs() function.
38977 */
38978 SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs(const char *zText){
38979 #ifdef SQLITE_ENABLE_API_ARMOR
38980 if( !zText ){
38981 (void)SQLITE_MISUSE_BKPT;
38982 return 0;
38983 }
@@ -38989,11 +38989,11 @@
38989 }
38990
38991 /*
38992 ** This is a public wrapper for the winUtf8ToMbcs() function.
38993 */
38994 SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){
38995 #ifdef SQLITE_ENABLE_API_ARMOR
38996 if( !zText ){
38997 (void)SQLITE_MISUSE_BKPT;
38998 return 0;
38999 }
@@ -39009,11 +39009,11 @@
39009 ** the provided arguments. The type argument must be 1 in order to set the
39010 ** data directory or 2 in order to set the temporary directory. The zValue
39011 ** argument is the name of the directory to use. The return value will be
39012 ** SQLITE_OK if successful.
39013 */
39014 SQLITE_API int SQLITE_STDCALL sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){
39015 char **ppDirectory = 0;
39016 #ifndef SQLITE_OMIT_AUTOINIT
39017 int rc = sqlite3_initialize();
39018 if( rc ) return rc;
39019 #endif
@@ -42927,11 +42927,11 @@
42927 }
42928
42929 /*
42930 ** Initialize and deinitialize the operating system interface.
42931 */
42932 SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){
42933 static sqlite3_vfs winVfs = {
42934 3, /* iVersion */
42935 sizeof(winFile), /* szOsFile */
42936 SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */
42937 0, /* pNext */
@@ -43058,11 +43058,11 @@
43058 #endif
43059
43060 return SQLITE_OK;
43061 }
43062
43063 SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){
43064 #if SQLITE_OS_WINRT
43065 if( sleepObj!=NULL ){
43066 osCloseHandle(sleepObj);
43067 sleepObj = NULL;
43068 }
@@ -57083,11 +57083,11 @@
57083
57084 /*
57085 ** Return a +ve value if snapshot p1 is newer than p2. A -ve value if
57086 ** p1 is older than p2 and zero if p1 and p2 are the same snapshot.
57087 */
57088 SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){
57089 WalIndexHdr *pHdr1 = (WalIndexHdr*)p1;
57090 WalIndexHdr *pHdr2 = (WalIndexHdr*)p2;
57091
57092 /* aSalt[0] is a copy of the value stored in the wal file header. It
57093 ** is incremented each time the wal file is restarted. */
@@ -58220,11 +58220,11 @@
58220 **
58221 ** This routine has no effect on existing database connections.
58222 ** The shared cache setting effects only future calls to
58223 ** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().
58224 */
58225 SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int enable){
58226 sqlite3GlobalConfig.sharedCacheEnabled = enable;
58227 return SQLITE_OK;
58228 }
58229 #endif
58230
@@ -67993,11 +67993,11 @@
67993 ** a pointer to the new sqlite3_backup object.
67994 **
67995 ** If an error occurs, NULL is returned and an error code and error message
67996 ** stored in database handle pDestDb.
67997 */
67998 SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
67999 sqlite3* pDestDb, /* Database to write to */
68000 const char *zDestDb, /* Name of database within pDestDb */
68001 sqlite3* pSrcDb, /* Database connection to read from */
68002 const char *zSrcDb /* Name of database within pSrcDb */
68003 ){
@@ -68201,11 +68201,11 @@
68201 }
68202
68203 /*
68204 ** Copy nPage pages from the source b-tree to the destination.
68205 */
68206 SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){
68207 int rc;
68208 int destMode; /* Destination journal mode */
68209 int pgszSrc = 0; /* Source page size */
68210 int pgszDest = 0; /* Destination page size */
68211
@@ -68445,11 +68445,11 @@
68445 }
68446
68447 /*
68448 ** Release all resources associated with an sqlite3_backup* handle.
68449 */
68450 SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p){
68451 sqlite3_backup **pp; /* Ptr to head of pagers backup list */
68452 sqlite3 *pSrcDb; /* Source database connection */
68453 int rc; /* Value to return */
68454
68455 /* Enter the mutexes */
@@ -68497,11 +68497,11 @@
68497
68498 /*
68499 ** Return the number of pages still to be backed up as of the most recent
68500 ** call to sqlite3_backup_step().
68501 */
68502 SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p){
68503 #ifdef SQLITE_ENABLE_API_ARMOR
68504 if( p==0 ){
68505 (void)SQLITE_MISUSE_BKPT;
68506 return 0;
68507 }
@@ -68511,11 +68511,11 @@
68511
68512 /*
68513 ** Return the total number of pages in the source database as of the most
68514 ** recent call to sqlite3_backup_step().
68515 */
68516 SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p){
68517 #ifdef SQLITE_ENABLE_API_ARMOR
68518 if( p==0 ){
68519 (void)SQLITE_MISUSE_BKPT;
68520 return 0;
68521 }
@@ -71450,16 +71450,25 @@
71450 ){
71451 const char *zOpName;
71452 const char *zSynopsis;
71453 int nOpName;
71454 int ii, jj;
 
71455 zOpName = sqlite3OpcodeName(pOp->opcode);
71456 nOpName = sqlite3Strlen30(zOpName);
71457 if( zOpName[nOpName+1] ){
71458 int seenCom = 0;
71459 char c;
71460 zSynopsis = zOpName += nOpName + 1;
 
 
 
 
 
 
 
 
71461 for(ii=jj=0; jj<nTemp-1 && (c = zSynopsis[ii])!=0; ii++){
71462 if( c=='P' ){
71463 c = zSynopsis[++ii];
71464 if( c=='4' ){
71465 sqlite3_snprintf(nTemp-jj, zTemp+jj, "%s", zP4);
@@ -74967,11 +74976,11 @@
74967 ** execution environment changes in a way that would alter the program
74968 ** that sqlite3_prepare() generates. For example, if new functions or
74969 ** collating sequences are registered or if an authorizer function is
74970 ** added or changed.
74971 */
74972 SQLITE_API int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt *pStmt){
74973 Vdbe *p = (Vdbe*)pStmt;
74974 return p==0 || p->expired;
74975 }
74976 #endif
74977
@@ -75036,11 +75045,11 @@
75036 ** machine.
75037 **
75038 ** This routine sets the error code and string returned by
75039 ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
75040 */
75041 SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt){
75042 int rc;
75043 if( pStmt==0 ){
75044 /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL
75045 ** pointer is a harmless no-op. */
75046 rc = SQLITE_OK;
@@ -75063,11 +75072,11 @@
75063 ** the prior execution is returned.
75064 **
75065 ** This routine sets the error code and string returned by
75066 ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
75067 */
75068 SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt){
75069 int rc;
75070 if( pStmt==0 ){
75071 rc = SQLITE_OK;
75072 }else{
75073 Vdbe *v = (Vdbe*)pStmt;
@@ -75084,11 +75093,11 @@
75084 }
75085
75086 /*
75087 ** Set all the parameters in the compiled SQL statement to NULL.
75088 */
75089 SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){
75090 int i;
75091 int rc = SQLITE_OK;
75092 Vdbe *p = (Vdbe*)pStmt;
75093 #if SQLITE_THREADSAFE
75094 sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
@@ -75108,11 +75117,11 @@
75108
75109 /**************************** sqlite3_value_ *******************************
75110 ** The following routines extract information from a Mem or sqlite3_value
75111 ** structure.
75112 */
75113 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){
75114 Mem *p = (Mem*)pVal;
75115 if( p->flags & (MEM_Blob|MEM_Str) ){
75116 if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){
75117 assert( p->flags==MEM_Null && p->z==0 );
75118 return 0;
@@ -75121,48 +75130,48 @@
75121 return p->n ? p->z : 0;
75122 }else{
75123 return sqlite3_value_text(pVal);
75124 }
75125 }
75126 SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value *pVal){
75127 return sqlite3ValueBytes(pVal, SQLITE_UTF8);
75128 }
75129 SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value *pVal){
75130 return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE);
75131 }
75132 SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value *pVal){
75133 return sqlite3VdbeRealValue((Mem*)pVal);
75134 }
75135 SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value *pVal){
75136 return (int)sqlite3VdbeIntValue((Mem*)pVal);
75137 }
75138 SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value *pVal){
75139 return sqlite3VdbeIntValue((Mem*)pVal);
75140 }
75141 SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value *pVal){
75142 Mem *pMem = (Mem*)pVal;
75143 return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0);
75144 }
75145 SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value *pVal){
75146 return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8);
75147 }
75148 #ifndef SQLITE_OMIT_UTF16
75149 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value* pVal){
75150 return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE);
75151 }
75152 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value *pVal){
75153 return sqlite3ValueText(pVal, SQLITE_UTF16BE);
75154 }
75155 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value *pVal){
75156 return sqlite3ValueText(pVal, SQLITE_UTF16LE);
75157 }
75158 #endif /* SQLITE_OMIT_UTF16 */
75159 /* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five
75160 ** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating
75161 ** point number string BLOB NULL
75162 */
75163 SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value* pVal){
75164 static const u8 aType[] = {
75165 SQLITE_BLOB, /* 0x00 */
75166 SQLITE_NULL, /* 0x01 */
75167 SQLITE_TEXT, /* 0x02 */
75168 SQLITE_NULL, /* 0x03 */
@@ -75198,11 +75207,11 @@
75198 return aType[pVal->flags&MEM_AffMask];
75199 }
75200
75201 /* Make a copy of an sqlite3_value object
75202 */
75203 SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value *pOrig){
75204 sqlite3_value *pNew;
75205 if( pOrig==0 ) return 0;
75206 pNew = sqlite3_malloc( sizeof(*pNew) );
75207 if( pNew==0 ) return 0;
75208 memset(pNew, 0, sizeof(*pNew));
@@ -75221,11 +75230,11 @@
75221 }
75222
75223 /* Destroy an sqlite3_value object previously obtained from
75224 ** sqlite3_value_dup().
75225 */
75226 SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value *pOld){
75227 sqlite3ValueFree(pOld);
75228 }
75229
75230
75231 /**************************** sqlite3_result_ *******************************
@@ -75264,21 +75273,21 @@
75264 xDel((void*)p);
75265 }
75266 if( pCtx ) sqlite3_result_error_toobig(pCtx);
75267 return SQLITE_TOOBIG;
75268 }
75269 SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(
75270 sqlite3_context *pCtx,
75271 const void *z,
75272 int n,
75273 void (*xDel)(void *)
75274 ){
75275 assert( n>=0 );
75276 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75277 setResultStrOrError(pCtx, z, n, 0, xDel);
75278 }
75279 SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(
75280 sqlite3_context *pCtx,
75281 const void *z,
75282 sqlite3_uint64 n,
75283 void (*xDel)(void *)
75284 ){
@@ -75288,56 +75297,56 @@
75288 (void)invokeValueDestructor(z, xDel, pCtx);
75289 }else{
75290 setResultStrOrError(pCtx, z, (int)n, 0, xDel);
75291 }
75292 }
75293 SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context *pCtx, double rVal){
75294 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75295 sqlite3VdbeMemSetDouble(pCtx->pOut, rVal);
75296 }
75297 SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
75298 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75299 pCtx->isError = SQLITE_ERROR;
75300 pCtx->fErrorOrAux = 1;
75301 sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
75302 }
75303 #ifndef SQLITE_OMIT_UTF16
75304 SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
75305 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75306 pCtx->isError = SQLITE_ERROR;
75307 pCtx->fErrorOrAux = 1;
75308 sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
75309 }
75310 #endif
75311 SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context *pCtx, int iVal){
75312 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75313 sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal);
75314 }
75315 SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){
75316 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75317 sqlite3VdbeMemSetInt64(pCtx->pOut, iVal);
75318 }
75319 SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context *pCtx){
75320 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75321 sqlite3VdbeMemSetNull(pCtx->pOut);
75322 }
75323 SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){
75324 Mem *pOut = pCtx->pOut;
75325 assert( sqlite3_mutex_held(pOut->db->mutex) );
75326 pOut->eSubtype = eSubtype & 0xff;
75327 pOut->flags |= MEM_Subtype;
75328 }
75329 SQLITE_API void SQLITE_STDCALL sqlite3_result_text(
75330 sqlite3_context *pCtx,
75331 const char *z,
75332 int n,
75333 void (*xDel)(void *)
75334 ){
75335 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75336 setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel);
75337 }
75338 SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(
75339 sqlite3_context *pCtx,
75340 const char *z,
75341 sqlite3_uint64 n,
75342 void (*xDel)(void *),
75343 unsigned char enc
@@ -75350,56 +75359,56 @@
75350 }else{
75351 setResultStrOrError(pCtx, z, (int)n, enc, xDel);
75352 }
75353 }
75354 #ifndef SQLITE_OMIT_UTF16
75355 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(
75356 sqlite3_context *pCtx,
75357 const void *z,
75358 int n,
75359 void (*xDel)(void *)
75360 ){
75361 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75362 setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel);
75363 }
75364 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(
75365 sqlite3_context *pCtx,
75366 const void *z,
75367 int n,
75368 void (*xDel)(void *)
75369 ){
75370 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75371 setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel);
75372 }
75373 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(
75374 sqlite3_context *pCtx,
75375 const void *z,
75376 int n,
75377 void (*xDel)(void *)
75378 ){
75379 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75380 setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel);
75381 }
75382 #endif /* SQLITE_OMIT_UTF16 */
75383 SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){
75384 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75385 sqlite3VdbeMemCopy(pCtx->pOut, pValue);
75386 }
75387 SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){
75388 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75389 sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n);
75390 }
75391 SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){
75392 Mem *pOut = pCtx->pOut;
75393 assert( sqlite3_mutex_held(pOut->db->mutex) );
75394 if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){
75395 return SQLITE_TOOBIG;
75396 }
75397 sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n);
75398 return SQLITE_OK;
75399 }
75400 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
75401 pCtx->isError = errCode;
75402 pCtx->fErrorOrAux = 1;
75403 #ifdef SQLITE_DEBUG
75404 if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode;
75405 #endif
@@ -75408,20 +75417,20 @@
75408 SQLITE_UTF8, SQLITE_STATIC);
75409 }
75410 }
75411
75412 /* Force an SQLITE_TOOBIG error. */
75413 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context *pCtx){
75414 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75415 pCtx->isError = SQLITE_TOOBIG;
75416 pCtx->fErrorOrAux = 1;
75417 sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1,
75418 SQLITE_UTF8, SQLITE_STATIC);
75419 }
75420
75421 /* An SQLITE_NOMEM error. */
75422 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context *pCtx){
75423 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75424 sqlite3VdbeMemSetNull(pCtx->pOut);
75425 pCtx->isError = SQLITE_NOMEM_BKPT;
75426 pCtx->fErrorOrAux = 1;
75427 sqlite3OomFault(pCtx->pOut->db);
@@ -75589,11 +75598,11 @@
75589 /*
75590 ** This is the top-level implementation of sqlite3_step(). Call
75591 ** sqlite3Step() to do most of the work. If a schema error occurs,
75592 ** call sqlite3Reprepare() and try again.
75593 */
75594 SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt *pStmt){
75595 int rc = SQLITE_OK; /* Result from sqlite3Step() */
75596 int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */
75597 Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */
75598 int cnt = 0; /* Counter to prevent infinite loop of reprepares */
75599 sqlite3 *db; /* The database connection */
@@ -75640,11 +75649,11 @@
75640
75641 /*
75642 ** Extract the user data from a sqlite3_context structure and return a
75643 ** pointer to it.
75644 */
75645 SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context *p){
75646 assert( p && p->pFunc );
75647 return p->pFunc->pUserData;
75648 }
75649
75650 /*
@@ -75655,11 +75664,11 @@
75655 ** returns a copy of the pointer to the database connection (the 1st
75656 ** parameter) of the sqlite3_create_function() and
75657 ** sqlite3_create_function16() routines that originally registered the
75658 ** application defined function.
75659 */
75660 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context *p){
75661 assert( p && p->pOut );
75662 return p->pOut->db;
75663 }
75664
75665 /*
@@ -75731,11 +75740,11 @@
75731 /*
75732 ** Allocate or return the aggregate context for a user function. A new
75733 ** context is allocated on the first call. Subsequent calls return the
75734 ** same context that was returned on prior calls.
75735 */
75736 SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context *p, int nByte){
75737 assert( p && p->pFunc && p->pFunc->xFinalize );
75738 assert( sqlite3_mutex_held(p->pOut->db->mutex) );
75739 testcase( nByte<0 );
75740 if( (p->pMem->flags & MEM_Agg)==0 ){
75741 return createAggContext(p, nByte);
@@ -75746,11 +75755,11 @@
75746
75747 /*
75748 ** Return the auxiliary data pointer, if any, for the iArg'th argument to
75749 ** the user-function defined by pCtx.
75750 */
75751 SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){
75752 AuxData *pAuxData;
75753
75754 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75755 #if SQLITE_ENABLE_STAT3_OR_STAT4
75756 if( pCtx->pVdbe==0 ) return 0;
@@ -75767,11 +75776,11 @@
75767 /*
75768 ** Set the auxiliary data pointer and delete function, for the iArg'th
75769 ** argument to the user-function defined by pCtx. Any previous value is
75770 ** deleted by calling the delete function specified when it was set.
75771 */
75772 SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(
75773 sqlite3_context *pCtx,
75774 int iArg,
75775 void *pAux,
75776 void (*xDelete)(void*)
75777 ){
@@ -75822,29 +75831,29 @@
75822 ** This function is deprecated. Do not use it for new code. It is
75823 ** provide only to avoid breaking legacy code. New aggregate function
75824 ** implementations should keep their own counts within their aggregate
75825 ** context.
75826 */
75827 SQLITE_API int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context *p){
75828 assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize );
75829 return p->pMem->n;
75830 }
75831 #endif
75832
75833 /*
75834 ** Return the number of columns in the result set for the statement pStmt.
75835 */
75836 SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt){
75837 Vdbe *pVm = (Vdbe *)pStmt;
75838 return pVm ? pVm->nResColumn : 0;
75839 }
75840
75841 /*
75842 ** Return the number of values available from the current row of the
75843 ** currently executing statement pStmt.
75844 */
75845 SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt){
75846 Vdbe *pVm = (Vdbe *)pStmt;
75847 if( pVm==0 || pVm->pResultSet==0 ) return 0;
75848 return pVm->nResColumn;
75849 }
75850
@@ -75943,67 +75952,67 @@
75943
75944 /**************************** sqlite3_column_ *******************************
75945 ** The following routines are used to access elements of the current row
75946 ** in the result set.
75947 */
75948 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt *pStmt, int i){
75949 const void *val;
75950 val = sqlite3_value_blob( columnMem(pStmt,i) );
75951 /* Even though there is no encoding conversion, value_blob() might
75952 ** need to call malloc() to expand the result of a zeroblob()
75953 ** expression.
75954 */
75955 columnMallocFailure(pStmt);
75956 return val;
75957 }
75958 SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){
75959 int val = sqlite3_value_bytes( columnMem(pStmt,i) );
75960 columnMallocFailure(pStmt);
75961 return val;
75962 }
75963 SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){
75964 int val = sqlite3_value_bytes16( columnMem(pStmt,i) );
75965 columnMallocFailure(pStmt);
75966 return val;
75967 }
75968 SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt *pStmt, int i){
75969 double val = sqlite3_value_double( columnMem(pStmt,i) );
75970 columnMallocFailure(pStmt);
75971 return val;
75972 }
75973 SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt *pStmt, int i){
75974 int val = sqlite3_value_int( columnMem(pStmt,i) );
75975 columnMallocFailure(pStmt);
75976 return val;
75977 }
75978 SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt *pStmt, int i){
75979 sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) );
75980 columnMallocFailure(pStmt);
75981 return val;
75982 }
75983 SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt *pStmt, int i){
75984 const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) );
75985 columnMallocFailure(pStmt);
75986 return val;
75987 }
75988 SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt *pStmt, int i){
75989 Mem *pOut = columnMem(pStmt, i);
75990 if( pOut->flags&MEM_Static ){
75991 pOut->flags &= ~MEM_Static;
75992 pOut->flags |= MEM_Ephem;
75993 }
75994 columnMallocFailure(pStmt);
75995 return (sqlite3_value *)pOut;
75996 }
75997 #ifndef SQLITE_OMIT_UTF16
75998 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt *pStmt, int i){
75999 const void *val = sqlite3_value_text16( columnMem(pStmt,i) );
76000 columnMallocFailure(pStmt);
76001 return val;
76002 }
76003 #endif /* SQLITE_OMIT_UTF16 */
76004 SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt *pStmt, int i){
76005 int iType = sqlite3_value_type( columnMem(pStmt,i) );
76006 columnMallocFailure(pStmt);
76007 return iType;
76008 }
76009
@@ -76063,16 +76072,16 @@
76063
76064 /*
76065 ** Return the name of the Nth column of the result set returned by SQL
76066 ** statement pStmt.
76067 */
76068 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt *pStmt, int N){
76069 return columnName(
76070 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME);
76071 }
76072 #ifndef SQLITE_OMIT_UTF16
76073 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt *pStmt, int N){
76074 return columnName(
76075 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME);
76076 }
76077 #endif
76078
@@ -76088,16 +76097,16 @@
76088 #ifndef SQLITE_OMIT_DECLTYPE
76089 /*
76090 ** Return the column declaration type (if applicable) of the 'i'th column
76091 ** of the result set of SQL statement pStmt.
76092 */
76093 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){
76094 return columnName(
76095 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE);
76096 }
76097 #ifndef SQLITE_OMIT_UTF16
76098 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){
76099 return columnName(
76100 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE);
76101 }
76102 #endif /* SQLITE_OMIT_UTF16 */
76103 #endif /* SQLITE_OMIT_DECLTYPE */
@@ -76106,16 +76115,16 @@
76106 /*
76107 ** Return the name of the database from which a result column derives.
76108 ** NULL is returned if the result column is an expression or constant or
76109 ** anything else which is not an unambiguous reference to a database column.
76110 */
76111 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){
76112 return columnName(
76113 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE);
76114 }
76115 #ifndef SQLITE_OMIT_UTF16
76116 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){
76117 return columnName(
76118 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE);
76119 }
76120 #endif /* SQLITE_OMIT_UTF16 */
76121
@@ -76122,16 +76131,16 @@
76122 /*
76123 ** Return the name of the table from which a result column derives.
76124 ** NULL is returned if the result column is an expression or constant or
76125 ** anything else which is not an unambiguous reference to a database column.
76126 */
76127 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){
76128 return columnName(
76129 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE);
76130 }
76131 #ifndef SQLITE_OMIT_UTF16
76132 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){
76133 return columnName(
76134 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE);
76135 }
76136 #endif /* SQLITE_OMIT_UTF16 */
76137
@@ -76138,16 +76147,16 @@
76138 /*
76139 ** Return the name of the table column from which a result column derives.
76140 ** NULL is returned if the result column is an expression or constant or
76141 ** anything else which is not an unambiguous reference to a database column.
76142 */
76143 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){
76144 return columnName(
76145 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN);
76146 }
76147 #ifndef SQLITE_OMIT_UTF16
76148 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){
76149 return columnName(
76150 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN);
76151 }
76152 #endif /* SQLITE_OMIT_UTF16 */
76153 #endif /* SQLITE_ENABLE_COLUMN_METADATA */
@@ -76244,11 +76253,11 @@
76244
76245
76246 /*
76247 ** Bind a blob value to an SQL statement variable.
76248 */
76249 SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(
76250 sqlite3_stmt *pStmt,
76251 int i,
76252 const void *zData,
76253 int nData,
76254 void (*xDel)(void*)
@@ -76256,11 +76265,11 @@
76256 #ifdef SQLITE_ENABLE_API_ARMOR
76257 if( nData<0 ) return SQLITE_MISUSE_BKPT;
76258 #endif
76259 return bindText(pStmt, i, zData, nData, xDel, 0);
76260 }
76261 SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(
76262 sqlite3_stmt *pStmt,
76263 int i,
76264 const void *zData,
76265 sqlite3_uint64 nData,
76266 void (*xDel)(void*)
@@ -76270,52 +76279,52 @@
76270 return invokeValueDestructor(zData, xDel, 0);
76271 }else{
76272 return bindText(pStmt, i, zData, (int)nData, xDel, 0);
76273 }
76274 }
76275 SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
76276 int rc;
76277 Vdbe *p = (Vdbe *)pStmt;
76278 rc = vdbeUnbind(p, i);
76279 if( rc==SQLITE_OK ){
76280 sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue);
76281 sqlite3_mutex_leave(p->db->mutex);
76282 }
76283 return rc;
76284 }
76285 SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){
76286 return sqlite3_bind_int64(p, i, (i64)iValue);
76287 }
76288 SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
76289 int rc;
76290 Vdbe *p = (Vdbe *)pStmt;
76291 rc = vdbeUnbind(p, i);
76292 if( rc==SQLITE_OK ){
76293 sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue);
76294 sqlite3_mutex_leave(p->db->mutex);
76295 }
76296 return rc;
76297 }
76298 SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
76299 int rc;
76300 Vdbe *p = (Vdbe*)pStmt;
76301 rc = vdbeUnbind(p, i);
76302 if( rc==SQLITE_OK ){
76303 sqlite3_mutex_leave(p->db->mutex);
76304 }
76305 return rc;
76306 }
76307 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(
76308 sqlite3_stmt *pStmt,
76309 int i,
76310 const char *zData,
76311 int nData,
76312 void (*xDel)(void*)
76313 ){
76314 return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8);
76315 }
76316 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(
76317 sqlite3_stmt *pStmt,
76318 int i,
76319 const char *zData,
76320 sqlite3_uint64 nData,
76321 void (*xDel)(void*),
@@ -76328,21 +76337,21 @@
76328 if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE;
76329 return bindText(pStmt, i, zData, (int)nData, xDel, enc);
76330 }
76331 }
76332 #ifndef SQLITE_OMIT_UTF16
76333 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(
76334 sqlite3_stmt *pStmt,
76335 int i,
76336 const void *zData,
76337 int nData,
76338 void (*xDel)(void*)
76339 ){
76340 return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE);
76341 }
76342 #endif /* SQLITE_OMIT_UTF16 */
76343 SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
76344 int rc;
76345 switch( sqlite3_value_type((sqlite3_value*)pValue) ){
76346 case SQLITE_INTEGER: {
76347 rc = sqlite3_bind_int64(pStmt, i, pValue->u.i);
76348 break;
@@ -76369,21 +76378,21 @@
76369 break;
76370 }
76371 }
76372 return rc;
76373 }
76374 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){
76375 int rc;
76376 Vdbe *p = (Vdbe *)pStmt;
76377 rc = vdbeUnbind(p, i);
76378 if( rc==SQLITE_OK ){
76379 sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);
76380 sqlite3_mutex_leave(p->db->mutex);
76381 }
76382 return rc;
76383 }
76384 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){
76385 int rc;
76386 Vdbe *p = (Vdbe *)pStmt;
76387 sqlite3_mutex_enter(p->db->mutex);
76388 if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){
76389 rc = SQLITE_TOOBIG;
@@ -76398,11 +76407,11 @@
76398
76399 /*
76400 ** Return the number of wildcards that can be potentially bound to.
76401 ** This routine is added to support DBD::SQLite.
76402 */
76403 SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){
76404 Vdbe *p = (Vdbe*)pStmt;
76405 return p ? p->nVar : 0;
76406 }
76407
76408 /*
@@ -76409,11 +76418,11 @@
76409 ** Return the name of a wildcard parameter. Return NULL if the index
76410 ** is out of range or if the wildcard is unnamed.
76411 **
76412 ** The result is always UTF-8.
76413 */
76414 SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){
76415 Vdbe *p = (Vdbe*)pStmt;
76416 if( p==0 || i<1 || i>p->nzVar ){
76417 return 0;
76418 }
76419 return p->azVar[i-1];
@@ -76437,11 +76446,11 @@
76437 }
76438 }
76439 }
76440 return 0;
76441 }
76442 SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
76443 return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName));
76444 }
76445
76446 /*
76447 ** Transfer all bindings from the first statement over to the second.
@@ -76471,11 +76480,11 @@
76471 **
76472 ** If the two statements contain a different number of bindings, then
76473 ** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise
76474 ** SQLITE_OK is returned.
76475 */
76476 SQLITE_API int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
76477 Vdbe *pFrom = (Vdbe*)pFromStmt;
76478 Vdbe *pTo = (Vdbe*)pToStmt;
76479 if( pFrom->nVar!=pTo->nVar ){
76480 return SQLITE_ERROR;
76481 }
@@ -76493,26 +76502,26 @@
76493 ** Return the sqlite3* database handle to which the prepared statement given
76494 ** in the argument belongs. This is the same database handle that was
76495 ** the first argument to the sqlite3_prepare() that was used to create
76496 ** the statement in the first place.
76497 */
76498 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt *pStmt){
76499 return pStmt ? ((Vdbe*)pStmt)->db : 0;
76500 }
76501
76502 /*
76503 ** Return true if the prepared statement is guaranteed to not modify the
76504 ** database.
76505 */
76506 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt){
76507 return pStmt ? ((Vdbe*)pStmt)->readOnly : 1;
76508 }
76509
76510 /*
76511 ** Return true if the prepared statement is in need of being reset.
76512 */
76513 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){
76514 Vdbe *v = (Vdbe*)pStmt;
76515 return v!=0 && v->pc>=0 && v->magic==VDBE_MAGIC_RUN;
76516 }
76517
76518 /*
@@ -76519,11 +76528,11 @@
76519 ** Return a pointer to the next prepared statement after pStmt associated
76520 ** with database connection pDb. If pStmt is NULL, return the first
76521 ** prepared statement for the database connection. Return NULL if there
76522 ** are no more.
76523 */
76524 SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
76525 sqlite3_stmt *pNext;
76526 #ifdef SQLITE_ENABLE_API_ARMOR
76527 if( !sqlite3SafetyCheckOk(pDb) ){
76528 (void)SQLITE_MISUSE_BKPT;
76529 return 0;
@@ -76540,11 +76549,11 @@
76540 }
76541
76542 /*
76543 ** Return the value of a status counter for a prepared statement
76544 */
76545 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
76546 Vdbe *pVdbe = (Vdbe*)pStmt;
76547 u32 v;
76548 #ifdef SQLITE_ENABLE_API_ARMOR
76549 if( !pStmt ){
76550 (void)SQLITE_MISUSE_BKPT;
@@ -76557,11 +76566,11 @@
76557 }
76558
76559 /*
76560 ** Return the SQL associated with a prepared statement
76561 */
76562 SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt){
76563 Vdbe *p = (Vdbe *)pStmt;
76564 return p ? p->zSql : 0;
76565 }
76566
76567 /*
@@ -76571,11 +76580,11 @@
76571 ** freeing the returned string by passing it to sqlite3_free().
76572 **
76573 ** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of
76574 ** expanded bound parameters.
76575 */
76576 SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt){
76577 #ifdef SQLITE_OMIT_TRACE
76578 return 0;
76579 #else
76580 char *z = 0;
76581 const char *zSql = sqlite3_sql(pStmt);
@@ -76613,11 +76622,11 @@
76613
76614 /*
76615 ** This function is called from within a pre-update callback to retrieve
76616 ** a field of the row currently being updated or deleted.
76617 */
76618 SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
76619 PreUpdate *p = db->pPreUpdate;
76620 int rc = SQLITE_OK;
76621
76622 /* Test that this call is being made from within an SQLITE_DELETE or
76623 ** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */
@@ -76668,11 +76677,11 @@
76668 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
76669 /*
76670 ** This function is called from within a pre-update callback to retrieve
76671 ** the number of columns in the row being updated, deleted or inserted.
76672 */
76673 SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *db){
76674 PreUpdate *p = db->pPreUpdate;
76675 return (p ? p->keyinfo.nField : 0);
76676 }
76677 #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
76678
@@ -76686,11 +76695,11 @@
76686 ** top-level trigger etc.).
76687 **
76688 ** For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL
76689 ** or SET DEFAULT action is considered a trigger.
76690 */
76691 SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *db){
76692 PreUpdate *p = db->pPreUpdate;
76693 return (p ? p->v->nFrame : 0);
76694 }
76695 #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
76696
@@ -76697,11 +76706,11 @@
76697 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
76698 /*
76699 ** This function is called from within a pre-update callback to retrieve
76700 ** a field of the row currently being updated or inserted.
76701 */
76702 SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
76703 PreUpdate *p = db->pPreUpdate;
76704 int rc = SQLITE_OK;
76705 Mem *pMem;
76706
76707 if( !p || p->op==SQLITE_DELETE ){
@@ -76771,11 +76780,11 @@
76771
76772 #ifdef SQLITE_ENABLE_STMT_SCANSTATUS
76773 /*
76774 ** Return status data for a single loop within query pStmt.
76775 */
76776 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
76777 sqlite3_stmt *pStmt, /* Prepared statement being queried */
76778 int idx, /* Index of loop to report on */
76779 int iScanStatusOp, /* Which metric to return */
76780 void *pOut /* OUT: Write the answer here */
76781 ){
@@ -76830,11 +76839,11 @@
76830 }
76831
76832 /*
76833 ** Zero all counters associated with the sqlite3_stmt_scanstatus() data.
76834 */
76835 SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){
76836 Vdbe *p = (Vdbe*)pStmt;
76837 memset(p->anExec, 0, p->nOp * sizeof(i64));
76838 }
76839 #endif /* SQLITE_ENABLE_STMT_SCANSTATUS */
76840
@@ -77357,11 +77366,11 @@
77357 ** Try to convert the type of a function argument or a result column
77358 ** into a numeric representation. Use either INTEGER or REAL whichever
77359 ** is appropriate. But only do the conversion if it is possible without
77360 ** loss of information and return the revised type of the argument.
77361 */
77362 SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value *pVal){
77363 int eType = sqlite3_value_type(pVal);
77364 if( eType==SQLITE_TEXT ){
77365 Mem *pMem = (Mem*)pVal;
77366 applyNumericAffinity(pMem, 0);
77367 eType = sqlite3_value_type(pVal);
@@ -79007,11 +79016,11 @@
79007 break;
79008 }
79009 #endif /* SQLITE_OMIT_CAST */
79010
79011 /* Opcode: Lt P1 P2 P3 P4 P5
79012 ** Synopsis: if r[P1]<r[P3] goto P2
79013 **
79014 ** Compare the values in register P1 and P3. If reg(P3)<reg(P1) then
79015 ** jump to address P2.
79016 **
79017 ** If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or
@@ -79042,11 +79051,11 @@
79042 ** If the SQLITE_NULLEQ bit is set in P5, then NULL values are considered
79043 ** equal to one another, provided that they do not have their MEM_Cleared
79044 ** bit set.
79045 */
79046 /* Opcode: Ne P1 P2 P3 P4 P5
79047 ** Synopsis: if r[P1]!=r[P3] goto P2
79048 **
79049 ** This works just like the Lt opcode except that the jump is taken if
79050 ** the operands in registers P1 and P3 are not equal. See the Lt opcode for
79051 ** additional information.
79052 **
@@ -79055,11 +79064,11 @@
79055 ** of comparison is false. If either operand is NULL then the result is true.
79056 ** If neither operand is NULL the result is the same as it would be if
79057 ** the SQLITE_NULLEQ flag were omitted from P5.
79058 */
79059 /* Opcode: Eq P1 P2 P3 P4 P5
79060 ** Synopsis: if r[P1]==r[P3] goto P2
79061 **
79062 ** This works just like the Lt opcode except that the jump is taken if
79063 ** the operands in registers P1 and P3 are equal.
79064 ** See the Lt opcode for additional information.
79065 **
@@ -79068,25 +79077,25 @@
79068 ** of comparison is true. If either operand is NULL then the result is false.
79069 ** If neither operand is NULL the result is the same as it would be if
79070 ** the SQLITE_NULLEQ flag were omitted from P5.
79071 */
79072 /* Opcode: Le P1 P2 P3 P4 P5
79073 ** Synopsis: if r[P1]<=r[P3] goto P2
79074 **
79075 ** This works just like the Lt opcode except that the jump is taken if
79076 ** the content of register P3 is less than or equal to the content of
79077 ** register P1. See the Lt opcode for additional information.
79078 */
79079 /* Opcode: Gt P1 P2 P3 P4 P5
79080 ** Synopsis: if r[P1]>r[P3] goto P2
79081 **
79082 ** This works just like the Lt opcode except that the jump is taken if
79083 ** the content of register P3 is greater than the content of
79084 ** register P1. See the Lt opcode for additional information.
79085 */
79086 /* Opcode: Ge P1 P2 P3 P4 P5
79087 ** Synopsis: if r[P1]>=r[P3] goto P2
79088 **
79089 ** This works just like the Lt opcode except that the jump is taken if
79090 ** the content of register P3 is greater than or equal to the content of
79091 ** register P1. See the Lt opcode for additional information.
79092 */
@@ -84209,11 +84218,11 @@
84209 }
84210
84211 /*
84212 ** Open a blob handle.
84213 */
84214 SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
84215 sqlite3* db, /* The database connection */
84216 const char *zDb, /* The attached database containing the blob */
84217 const char *zTable, /* The table containing the blob */
84218 const char *zColumn, /* The column containing the blob */
84219 sqlite_int64 iRow, /* The row containing the glob */
@@ -84450,11 +84459,11 @@
84450
84451 /*
84452 ** Close a blob handle that was previously created using
84453 ** sqlite3_blob_open().
84454 */
84455 SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *pBlob){
84456 Incrblob *p = (Incrblob *)pBlob;
84457 int rc;
84458 sqlite3 *db;
84459
84460 if( p ){
@@ -84543,28 +84552,28 @@
84543 }
84544
84545 /*
84546 ** Read data from a blob handle.
84547 */
84548 SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){
84549 return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData);
84550 }
84551
84552 /*
84553 ** Write data to a blob handle.
84554 */
84555 SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){
84556 return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData);
84557 }
84558
84559 /*
84560 ** Query a blob handle for the size of the data.
84561 **
84562 ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
84563 ** so no mutex is required for access.
84564 */
84565 SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *pBlob){
84566 Incrblob *p = (Incrblob *)pBlob;
84567 return (p && p->pStmt) ? p->nByte : 0;
84568 }
84569
84570 /*
@@ -84575,11 +84584,11 @@
84575 ** contain a blob or text value, then an error code is returned and the
84576 ** database handle error code and message set. If this happens, then all
84577 ** subsequent calls to sqlite3_blob_xxx() functions (except blob_close())
84578 ** immediately return SQLITE_ABORT.
84579 */
84580 SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){
84581 int rc;
84582 Incrblob *p = (Incrblob *)pBlob;
84583 sqlite3 *db;
84584
84585 if( p==0 ) return SQLITE_MISUSE_BKPT;
@@ -97188,11 +97197,11 @@
97188 ** and attempts to write the column will be ignored.
97189 **
97190 ** Setting the auth function to NULL disables this hook. The default
97191 ** setting of the auth function is NULL.
97192 */
97193 SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
97194 sqlite3 *db,
97195 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
97196 void *pArg
97197 ){
97198 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -103958,18 +103967,18 @@
103958 }
103959
103960 /*
103961 ** The sqlite3_strglob() interface.
103962 */
103963 SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlobPattern, const char *zString){
103964 return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, '[')==0;
103965 }
103966
103967 /*
103968 ** The sqlite3_strlike() interface.
103969 */
103970 SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){
103971 return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc)==0;
103972 }
103973
103974 /*
103975 ** Count the number of times that the LIKE operator (or GLOB which is
@@ -108244,19 +108253,19 @@
108244 }
108245 if( piIdxCur ) *piIdxCur = iBase;
108246 for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
108247 int iIdxCur = iBase++;
108248 assert( pIdx->pSchema==pTab->pSchema );
 
 
 
 
108249 if( aToOpen==0 || aToOpen[i+1] ){
108250 sqlite3VdbeAddOp3(v, op, iIdxCur, pIdx->tnum, iDb);
108251 sqlite3VdbeSetP4KeyInfo(pParse, pIdx);
108252 VdbeComment((v, "%s", pIdx->zName));
108253 }
108254 if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){
108255 if( piDataCur ) *piDataCur = iIdxCur;
108256 }else{
108257 sqlite3VdbeChangeP5(v, p5);
 
108258 }
108259 }
108260 if( iBase>pParse->nTab ) pParse->nTab = iBase;
108261 return i;
108262 }
@@ -108684,11 +108693,11 @@
108684 ** If the SQL is a query, then for each row in the query result
108685 ** the xCallback() function is called. pArg becomes the first
108686 ** argument to xCallback(). If xCallback=NULL then no callback
108687 ** is invoked, even for queries.
108688 */
108689 SQLITE_API int SQLITE_STDCALL sqlite3_exec(
108690 sqlite3 *db, /* The database on which the SQL executes */
108691 const char *zSql, /* The SQL to be executed */
108692 sqlite3_callback xCallback, /* Invoke this callback routine */
108693 void *pArg, /* First argument to xCallback() */
108694 char **pzErrMsg /* Write error messages here */
@@ -109946,11 +109955,11 @@
109946 db->aExtension = aHandle;
109947
109948 db->aExtension[db->nExtension++] = handle;
109949 return SQLITE_OK;
109950 }
109951 SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
109952 sqlite3 *db, /* Load the extension into this database connection */
109953 const char *zFile, /* Name of the shared library containing extension */
109954 const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */
109955 char **pzErrMsg /* Put error message here if not 0 */
109956 ){
@@ -109977,11 +109986,11 @@
109977
109978 /*
109979 ** Enable or disable extension loading. Extension loading is disabled by
109980 ** default so as not to open security holes in older applications.
109981 */
109982 SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff){
109983 sqlite3_mutex_enter(db->mutex);
109984 if( onoff ){
109985 db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc;
109986 }else{
109987 db->flags &= ~(SQLITE_LoadExtension|SQLITE_LoadExtFunc);
@@ -110034,11 +110043,11 @@
110034
110035 /*
110036 ** Register a statically linked extension that is automatically
110037 ** loaded by every new database connection.
110038 */
110039 SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(
110040 void (*xInit)(void)
110041 ){
110042 int rc = SQLITE_OK;
110043 #ifndef SQLITE_OMIT_AUTOINIT
110044 rc = sqlite3_initialize();
@@ -110081,11 +110090,11 @@
110081 ** routine is a no-op.
110082 **
110083 ** Return 1 if xInit was found on the list and removed. Return 0 if xInit
110084 ** was not on the list.
110085 */
110086 SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(
110087 void (*xInit)(void)
110088 ){
110089 #if SQLITE_THREADSAFE
110090 sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
110091 #endif
@@ -110106,11 +110115,11 @@
110106 }
110107
110108 /*
110109 ** Reset the automatic extension loading mechanism.
110110 */
110111 SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void){
110112 #ifndef SQLITE_OMIT_AUTOINIT
110113 if( sqlite3_initialize()==SQLITE_OK )
110114 #endif
110115 {
110116 #if SQLITE_THREADSAFE
@@ -113367,11 +113376,11 @@
113367 ** and so if a schema change occurs, SQLITE_SCHEMA is returned by
113368 ** sqlite3_step(). In the new version, the original SQL text is retained
113369 ** and the statement is automatically recompiled if an schema change
113370 ** occurs.
113371 */
113372 SQLITE_API int SQLITE_STDCALL sqlite3_prepare(
113373 sqlite3 *db, /* Database handle. */
113374 const char *zSql, /* UTF-8 encoded SQL statement. */
113375 int nBytes, /* Length of zSql in bytes. */
113376 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113377 const char **pzTail /* OUT: End of parsed string */
@@ -113379,11 +113388,11 @@
113379 int rc;
113380 rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail);
113381 assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
113382 return rc;
113383 }
113384 SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2(
113385 sqlite3 *db, /* Database handle. */
113386 const char *zSql, /* UTF-8 encoded SQL statement. */
113387 int nBytes, /* Length of zSql in bytes. */
113388 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113389 const char **pzTail /* OUT: End of parsed string */
@@ -113455,11 +113464,11 @@
113455 ** and so if a schema change occurs, SQLITE_SCHEMA is returned by
113456 ** sqlite3_step(). In the new version, the original SQL text is retained
113457 ** and the statement is automatically recompiled if an schema change
113458 ** occurs.
113459 */
113460 SQLITE_API int SQLITE_STDCALL sqlite3_prepare16(
113461 sqlite3 *db, /* Database handle. */
113462 const void *zSql, /* UTF-16 encoded SQL statement. */
113463 int nBytes, /* Length of zSql in bytes. */
113464 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113465 const void **pzTail /* OUT: End of parsed string */
@@ -113467,11 +113476,11 @@
113467 int rc;
113468 rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail);
113469 assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
113470 return rc;
113471 }
113472 SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
113473 sqlite3 *db, /* Database handle. */
113474 const void *zSql, /* UTF-16 encoded SQL statement. */
113475 int nBytes, /* Length of zSql in bytes. */
113476 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113477 const void **pzTail /* OUT: End of parsed string */
@@ -119310,11 +119319,11 @@
119310 ** The result that is written to ***pazResult is held in memory obtained
119311 ** from malloc(). But the caller cannot free this memory directly.
119312 ** Instead, the entire table should be passed to sqlite3_free_table() when
119313 ** the calling procedure is finished using it.
119314 */
119315 SQLITE_API int SQLITE_STDCALL sqlite3_get_table(
119316 sqlite3 *db, /* The database on which the SQL executes */
119317 const char *zSql, /* The SQL to be executed */
119318 char ***pazResult, /* Write the result table here */
119319 int *pnRow, /* Write the number of rows in the result here */
119320 int *pnColumn, /* Write the number of columns of result here */
@@ -119379,11 +119388,11 @@
119379 }
119380
119381 /*
119382 ** This routine frees the space the sqlite3_get_table() malloced.
119383 */
119384 SQLITE_API void SQLITE_STDCALL sqlite3_free_table(
119385 char **azResult /* Result returned from sqlite3_get_table() */
119386 ){
119387 if( azResult ){
119388 int i, n;
119389 azResult--;
@@ -121789,11 +121798,11 @@
121789
121790
121791 /*
121792 ** External API function used to create a new virtual-table module.
121793 */
121794 SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
121795 sqlite3 *db, /* Database in which module is registered */
121796 const char *zName, /* Name assigned to this module */
121797 const sqlite3_module *pModule, /* The definition of the module */
121798 void *pAux /* Context pointer for xCreate/xConnect */
121799 ){
@@ -121804,11 +121813,11 @@
121804 }
121805
121806 /*
121807 ** External API function used to create a new virtual-table module.
121808 */
121809 SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
121810 sqlite3 *db, /* Database in which module is registered */
121811 const char *zName, /* Name assigned to this module */
121812 const sqlite3_module *pModule, /* The definition of the module */
121813 void *pAux, /* Context pointer for xCreate/xConnect */
121814 void (*xDestroy)(void *) /* Module destructor function */
@@ -122428,11 +122437,11 @@
122428 /*
122429 ** This function is used to set the schema of a virtual table. It is only
122430 ** valid to call this function from within the xCreate() or xConnect() of a
122431 ** virtual table module.
122432 */
122433 SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
122434 VtabCtx *pCtx;
122435 Parse *pParse;
122436 int rc = SQLITE_OK;
122437 Table *pTab;
122438 char *zErr = 0;
@@ -122885,11 +122894,11 @@
122885 ** table update operation currently in progress.
122886 **
122887 ** The results of this routine are undefined unless it is called from
122888 ** within an xUpdate method.
122889 */
122890 SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *db){
122891 static const unsigned char aMap[] = {
122892 SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE
122893 };
122894 #ifdef SQLITE_ENABLE_API_ARMOR
122895 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -122903,11 +122912,11 @@
122903 /*
122904 ** Call from within the xCreate() or xConnect() methods to provide
122905 ** the SQLite core with additional information about the behavior
122906 ** of the virtual table being implemented.
122907 */
122908 SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3 *db, int op, ...){
122909 va_list ap;
122910 int rc = SQLITE_OK;
122911
122912 #ifdef SQLITE_ENABLE_API_ARMOR
122913 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -124028,13 +124037,19 @@
124028 regBase = r1;
124029 }else{
124030 sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j);
124031 }
124032 }
124033 testcase( pTerm->eOperator & WO_ISNULL );
124034 testcase( pTerm->eOperator & WO_IN );
124035 if( (pTerm->eOperator & (WO_ISNULL|WO_IN))==0 ){
 
 
 
 
 
 
124036 Expr *pRight = pTerm->pExpr->pRight;
124037 if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){
124038 sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
124039 VdbeCoverage(v);
124040 }
@@ -130105,10 +130120,18 @@
130105 if( pOBExpr->op!=TK_COLUMN ) continue;
130106 if( pOBExpr->iTable!=iCur ) continue;
130107 pTerm = sqlite3WhereFindTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn,
130108 ~ready, eqOpMask, 0);
130109 if( pTerm==0 ) continue;
 
 
 
 
 
 
 
 
130110 if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0 && pOBExpr->iColumn>=0 ){
130111 const char *z1, *z2;
130112 pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
130113 if( !pColl ) pColl = db->pDfltColl;
130114 z1 = pColl->zName;
@@ -136210,11 +136233,11 @@
136210 **
136211 ** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed
136212 ** to recognize the end of a trigger can be omitted. All we have to do
136213 ** is look for a semicolon that is not part of an string or comment.
136214 */
136215 SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *zSql){
136216 u8 state = 0; /* Current state, using numbers defined in header comment */
136217 u8 token; /* Value of the next token */
136218
136219 #ifndef SQLITE_OMIT_TRIGGER
136220 /* A complex statement machine used to detect the end of a CREATE TRIGGER
@@ -136375,11 +136398,11 @@
136375 /*
136376 ** This routine is the same as the sqlite3_complete() routine described
136377 ** above, except that the parameter is required to be UTF-16 encoded, not
136378 ** UTF-8.
136379 */
136380 SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *zSql){
136381 sqlite3_value *pVal;
136382 char const *zSql8;
136383 int rc;
136384
136385 #ifndef SQLITE_OMIT_AUTOINIT
@@ -136535,28 +136558,28 @@
136535 #endif
136536
136537 /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns
136538 ** a pointer to the to the sqlite3_version[] string constant.
136539 */
136540 SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void){ return sqlite3_version; }
136541
136542 /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a
136543 ** pointer to a string constant whose value is the same as the
136544 ** SQLITE_SOURCE_ID C preprocessor macro.
136545 */
136546 SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
136547
136548 /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function
136549 ** returns an integer equal to SQLITE_VERSION_NUMBER.
136550 */
136551 SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
136552
136553 /* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns
136554 ** zero if and only if SQLite was compiled with mutexing code omitted due to
136555 ** the SQLITE_THREADSAFE compile-time option being set to 0.
136556 */
136557 SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
136558
136559 /*
136560 ** When compiling the test fixture or with debugging enabled (on Win32),
136561 ** this variable being set to non-zero will cause OSTRACE macros to emit
136562 ** extra diagnostic information.
@@ -136625,11 +136648,11 @@
136625 ** call by X completes.
136626 **
136627 ** * Recursive calls to this routine from thread X return immediately
136628 ** without blocking.
136629 */
136630 SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void){
136631 MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
136632 int rc; /* Result code */
136633 #ifdef SQLITE_EXTRA_INIT
136634 int bRunExtraInit = 0; /* Extra initialization needed */
136635 #endif
@@ -136791,11 +136814,11 @@
136791 ** while any part of SQLite is otherwise in use in any thread. This
136792 ** routine is not threadsafe. But it is safe to invoke this routine
136793 ** on when SQLite is already shut down. If SQLite is already shut down
136794 ** when this routine is invoked, then this routine is a harmless no-op.
136795 */
136796 SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void){
136797 #ifdef SQLITE_OMIT_WSD
136798 int rc = sqlite3_wsd_init(4096, 24);
136799 if( rc!=SQLITE_OK ){
136800 return rc;
136801 }
@@ -136845,11 +136868,11 @@
136845 ** This routine should only be called when there are no outstanding
136846 ** database connections or memory allocations. This routine is not
136847 ** threadsafe. Failure to heed these warnings can lead to unpredictable
136848 ** behavior.
136849 */
136850 SQLITE_API int SQLITE_CDECL sqlite3_config(int op, ...){
136851 va_list ap;
136852 int rc = SQLITE_OK;
136853
136854 /* sqlite3_config() shall return SQLITE_MISUSE if it is invoked while
136855 ** the SQLite library is in use. */
@@ -137210,11 +137233,11 @@
137210 }
137211
137212 /*
137213 ** Return the mutex associated with a database connection.
137214 */
137215 SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3 *db){
137216 #ifdef SQLITE_ENABLE_API_ARMOR
137217 if( !sqlite3SafetyCheckOk(db) ){
137218 (void)SQLITE_MISUSE_BKPT;
137219 return 0;
137220 }
@@ -137224,11 +137247,11 @@
137224
137225 /*
137226 ** Free up as much memory as we can from the given database
137227 ** connection.
137228 */
137229 SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3 *db){
137230 int i;
137231
137232 #ifdef SQLITE_ENABLE_API_ARMOR
137233 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
137234 #endif
@@ -137248,11 +137271,11 @@
137248
137249 /*
137250 ** Flush any dirty pages in the pager-cache for any attached database
137251 ** to disk.
137252 */
137253 SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3 *db){
137254 int i;
137255 int rc = SQLITE_OK;
137256 int bSeenBusy = 0;
137257
137258 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -137277,11 +137300,11 @@
137277 }
137278
137279 /*
137280 ** Configuration settings for an individual database connection
137281 */
137282 SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3 *db, int op, ...){
137283 va_list ap;
137284 int rc;
137285 va_start(ap, op);
137286 switch( op ){
137287 case SQLITE_DBCONFIG_LOOKASIDE: {
@@ -137398,11 +137421,11 @@
137398 }
137399
137400 /*
137401 ** Return the ROWID of the most recent insert
137402 */
137403 SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3 *db){
137404 #ifdef SQLITE_ENABLE_API_ARMOR
137405 if( !sqlite3SafetyCheckOk(db) ){
137406 (void)SQLITE_MISUSE_BKPT;
137407 return 0;
137408 }
@@ -137411,11 +137434,11 @@
137411 }
137412
137413 /*
137414 ** Return the number of changes in the most recent call to sqlite3_exec().
137415 */
137416 SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3 *db){
137417 #ifdef SQLITE_ENABLE_API_ARMOR
137418 if( !sqlite3SafetyCheckOk(db) ){
137419 (void)SQLITE_MISUSE_BKPT;
137420 return 0;
137421 }
@@ -137424,11 +137447,11 @@
137424 }
137425
137426 /*
137427 ** Return the number of changes since the database handle was opened.
137428 */
137429 SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3 *db){
137430 #ifdef SQLITE_ENABLE_API_ARMOR
137431 if( !sqlite3SafetyCheckOk(db) ){
137432 (void)SQLITE_MISUSE_BKPT;
137433 return 0;
137434 }
@@ -137575,12 +137598,12 @@
137575 ** statements or unfinished sqlite3_backups. The sqlite3_close_v2()
137576 ** version forces the connection to become a zombie if there are
137577 ** unclosed resources, and arranges for deallocation when the last
137578 ** prepare statement or sqlite3_backup closes.
137579 */
137580 SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); }
137581 SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); }
137582
137583
137584 /*
137585 ** Close the mutex on database connection db.
137586 **
@@ -137983,11 +138006,11 @@
137983
137984 /*
137985 ** This routine sets the busy callback for an Sqlite database to the
137986 ** given callback function with the given argument.
137987 */
137988 SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(
137989 sqlite3 *db,
137990 int (*xBusy)(void*,int),
137991 void *pArg
137992 ){
137993 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -138006,11 +138029,11 @@
138006 /*
138007 ** This routine sets the progress callback for an Sqlite database to the
138008 ** given callback function with the given argument. The progress callback will
138009 ** be invoked every nOps opcodes.
138010 */
138011 SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(
138012 sqlite3 *db,
138013 int nOps,
138014 int (*xProgress)(void*),
138015 void *pArg
138016 ){
@@ -138037,11 +138060,11 @@
138037
138038 /*
138039 ** This routine installs a default busy handler that waits for the
138040 ** specified number of milliseconds before returning 0.
138041 */
138042 SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3 *db, int ms){
138043 #ifdef SQLITE_ENABLE_API_ARMOR
138044 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
138045 #endif
138046 if( ms>0 ){
138047 sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db);
@@ -138053,11 +138076,11 @@
138053 }
138054
138055 /*
138056 ** Cause any pending operation to stop at its earliest opportunity.
138057 */
138058 SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3 *db){
138059 #ifdef SQLITE_ENABLE_API_ARMOR
138060 if( !sqlite3SafetyCheckOk(db) ){
138061 (void)SQLITE_MISUSE_BKPT;
138062 return;
138063 }
@@ -138169,11 +138192,11 @@
138169 }
138170
138171 /*
138172 ** Create new user functions.
138173 */
138174 SQLITE_API int SQLITE_STDCALL sqlite3_create_function(
138175 sqlite3 *db,
138176 const char *zFunc,
138177 int nArg,
138178 int enc,
138179 void *p,
@@ -138183,11 +138206,11 @@
138183 ){
138184 return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xSFunc, xStep,
138185 xFinal, 0);
138186 }
138187
138188 SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2(
138189 sqlite3 *db,
138190 const char *zFunc,
138191 int nArg,
138192 int enc,
138193 void *p,
@@ -138226,11 +138249,11 @@
138226 sqlite3_mutex_leave(db->mutex);
138227 return rc;
138228 }
138229
138230 #ifndef SQLITE_OMIT_UTF16
138231 SQLITE_API int SQLITE_STDCALL sqlite3_create_function16(
138232 sqlite3 *db,
138233 const void *zFunctionName,
138234 int nArg,
138235 int eTextRep,
138236 void *p,
@@ -138266,11 +138289,11 @@
138266 ** When virtual tables intend to provide an overloaded function, they
138267 ** should call this routine to make sure the global function exists.
138268 ** A global function must exist in order for name resolution to work
138269 ** properly.
138270 */
138271 SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(
138272 sqlite3 *db,
138273 const char *zName,
138274 int nArg
138275 ){
138276 int rc = SQLITE_OK;
@@ -138298,11 +138321,11 @@
138298 ** A NULL trace function means that no tracing is executes. A non-NULL
138299 ** trace is a pointer to a function that is invoked at the start of each
138300 ** SQL statement.
138301 */
138302 #ifndef SQLITE_OMIT_DEPRECATED
138303 SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){
138304 void *pOld;
138305
138306 #ifdef SQLITE_ENABLE_API_ARMOR
138307 if( !sqlite3SafetyCheckOk(db) ){
138308 (void)SQLITE_MISUSE_BKPT;
@@ -138319,11 +138342,11 @@
138319 }
138320 #endif /* SQLITE_OMIT_DEPRECATED */
138321
138322 /* Register a trace callback using the version-2 interface.
138323 */
138324 SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2(
138325 sqlite3 *db, /* Trace this connection */
138326 unsigned mTrace, /* Mask of events to be traced */
138327 int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */
138328 void *pArg /* Context */
138329 ){
@@ -138331,10 +138354,12 @@
138331 if( !sqlite3SafetyCheckOk(db) ){
138332 return SQLITE_MISUSE_BKPT;
138333 }
138334 #endif
138335 sqlite3_mutex_enter(db->mutex);
 
 
138336 db->mTrace = mTrace;
138337 db->xTrace = xTrace;
138338 db->pTraceArg = pArg;
138339 sqlite3_mutex_leave(db->mutex);
138340 return SQLITE_OK;
@@ -138347,11 +138372,11 @@
138347 **
138348 ** A NULL profile function means that no profiling is executes. A non-NULL
138349 ** profile is a pointer to a function that is invoked at the conclusion of
138350 ** each SQL statement that is run.
138351 */
138352 SQLITE_API void *SQLITE_STDCALL sqlite3_profile(
138353 sqlite3 *db,
138354 void (*xProfile)(void*,const char*,sqlite_uint64),
138355 void *pArg
138356 ){
138357 void *pOld;
@@ -138375,11 +138400,11 @@
138375 /*
138376 ** Register a function to be invoked when a transaction commits.
138377 ** If the invoked function returns non-zero, then the commit becomes a
138378 ** rollback.
138379 */
138380 SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(
138381 sqlite3 *db, /* Attach the hook to this database */
138382 int (*xCallback)(void*), /* Function to invoke on each commit */
138383 void *pArg /* Argument to the function */
138384 ){
138385 void *pOld;
@@ -138400,11 +138425,11 @@
138400
138401 /*
138402 ** Register a callback to be invoked each time a row is updated,
138403 ** inserted or deleted using this database connection.
138404 */
138405 SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
138406 sqlite3 *db, /* Attach the hook to this database */
138407 void (*xCallback)(void*,int,char const *,char const *,sqlite_int64),
138408 void *pArg /* Argument to the function */
138409 ){
138410 void *pRet;
@@ -138425,11 +138450,11 @@
138425
138426 /*
138427 ** Register a callback to be invoked each time a transaction is rolled
138428 ** back by this database connection.
138429 */
138430 SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(
138431 sqlite3 *db, /* Attach the hook to this database */
138432 void (*xCallback)(void*), /* Callback function */
138433 void *pArg /* Argument to the function */
138434 ){
138435 void *pRet;
@@ -138451,11 +138476,11 @@
138451 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
138452 /*
138453 ** Register a callback to be invoked each time a row is updated,
138454 ** inserted or deleted using this database connection.
138455 */
138456 SQLITE_API void *SQLITE_STDCALL sqlite3_preupdate_hook(
138457 sqlite3 *db, /* Attach the hook to this database */
138458 void(*xCallback)( /* Callback function */
138459 void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64),
138460 void *pArg /* First callback argument */
138461 ){
@@ -138500,11 +138525,11 @@
138500 ** The callback registered by this function replaces any existing callback
138501 ** registered using sqlite3_wal_hook(). Likewise, registering a callback
138502 ** using sqlite3_wal_hook() disables the automatic checkpoint mechanism
138503 ** configured by this function.
138504 */
138505 SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){
138506 #ifdef SQLITE_OMIT_WAL
138507 UNUSED_PARAMETER(db);
138508 UNUSED_PARAMETER(nFrame);
138509 #else
138510 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -138521,11 +138546,11 @@
138521
138522 /*
138523 ** Register a callback to be invoked each time a transaction is written
138524 ** into the write-ahead-log by this database connection.
138525 */
138526 SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook(
138527 sqlite3 *db, /* Attach the hook to this db handle */
138528 int(*xCallback)(void *, sqlite3*, const char*, int),
138529 void *pArg /* First argument passed to xCallback() */
138530 ){
138531 #ifndef SQLITE_OMIT_WAL
@@ -138548,11 +138573,11 @@
138548 }
138549
138550 /*
138551 ** Checkpoint database zDb.
138552 */
138553 SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2(
138554 sqlite3 *db, /* Database handle */
138555 const char *zDb, /* Name of attached database (or NULL) */
138556 int eMode, /* SQLITE_CHECKPOINT_* value */
138557 int *pnLog, /* OUT: Size of WAL log in frames */
138558 int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -138603,11 +138628,11 @@
138603 /*
138604 ** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points
138605 ** to contains a zero-length string, all attached databases are
138606 ** checkpointed.
138607 */
138608 SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){
138609 /* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to
138610 ** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */
138611 return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0);
138612 }
138613
@@ -138694,11 +138719,11 @@
138694
138695 /*
138696 ** Return UTF-8 encoded English language explanation of the most recent
138697 ** error.
138698 */
138699 SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3 *db){
138700 const char *z;
138701 if( !db ){
138702 return sqlite3ErrStr(SQLITE_NOMEM_BKPT);
138703 }
138704 if( !sqlite3SafetyCheckSickOrOk(db) ){
@@ -138722,11 +138747,11 @@
138722 #ifndef SQLITE_OMIT_UTF16
138723 /*
138724 ** Return UTF-16 encoded English language explanation of the most recent
138725 ** error.
138726 */
138727 SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3 *db){
138728 static const u16 outOfMem[] = {
138729 'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0
138730 };
138731 static const u16 misuse[] = {
138732 'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ',
@@ -138767,38 +138792,38 @@
138767
138768 /*
138769 ** Return the most recent error code generated by an SQLite routine. If NULL is
138770 ** passed to this function, we assume a malloc() failed during sqlite3_open().
138771 */
138772 SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db){
138773 if( db && !sqlite3SafetyCheckSickOrOk(db) ){
138774 return SQLITE_MISUSE_BKPT;
138775 }
138776 if( !db || db->mallocFailed ){
138777 return SQLITE_NOMEM_BKPT;
138778 }
138779 return db->errCode & db->errMask;
138780 }
138781 SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db){
138782 if( db && !sqlite3SafetyCheckSickOrOk(db) ){
138783 return SQLITE_MISUSE_BKPT;
138784 }
138785 if( !db || db->mallocFailed ){
138786 return SQLITE_NOMEM_BKPT;
138787 }
138788 return db->errCode;
138789 }
138790 SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3 *db){
138791 return db ? db->iSysErrno : 0;
138792 }
138793
138794 /*
138795 ** Return a string that describes the kind of error specified in the
138796 ** argument. For now, this simply calls the internal sqlite3ErrStr()
138797 ** function.
138798 */
138799 SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int rc){
138800 return sqlite3ErrStr(rc);
138801 }
138802
138803 /*
138804 ** Create a new collating function for database "db". The name is zName
@@ -138942,11 +138967,11 @@
138942 **
138943 ** A new lower limit does not shrink existing constructs.
138944 ** It merely prevents new constructs that exceed the limit
138945 ** from forming.
138946 */
138947 SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
138948 int oldLimit;
138949
138950 #ifdef SQLITE_ENABLE_API_ARMOR
138951 if( !sqlite3SafetyCheckOk(db) ){
138952 (void)SQLITE_MISUSE_BKPT;
@@ -139566,18 +139591,18 @@
139566 }
139567
139568 /*
139569 ** Open a new database handle.
139570 */
139571 SQLITE_API int SQLITE_STDCALL sqlite3_open(
139572 const char *zFilename,
139573 sqlite3 **ppDb
139574 ){
139575 return openDatabase(zFilename, ppDb,
139576 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);
139577 }
139578 SQLITE_API int SQLITE_STDCALL sqlite3_open_v2(
139579 const char *filename, /* Database filename (UTF-8) */
139580 sqlite3 **ppDb, /* OUT: SQLite db handle */
139581 int flags, /* Flags */
139582 const char *zVfs /* Name of VFS module to use */
139583 ){
@@ -139586,11 +139611,11 @@
139586
139587 #ifndef SQLITE_OMIT_UTF16
139588 /*
139589 ** Open a new database handle.
139590 */
139591 SQLITE_API int SQLITE_STDCALL sqlite3_open16(
139592 const void *zFilename,
139593 sqlite3 **ppDb
139594 ){
139595 char const *zFilename8; /* zFilename encoded in UTF-8 instead of UTF-16 */
139596 sqlite3_value *pVal;
@@ -139625,11 +139650,11 @@
139625 #endif /* SQLITE_OMIT_UTF16 */
139626
139627 /*
139628 ** Register a new collation sequence with the database handle db.
139629 */
139630 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation(
139631 sqlite3* db,
139632 const char *zName,
139633 int enc,
139634 void* pCtx,
139635 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -139638,11 +139663,11 @@
139638 }
139639
139640 /*
139641 ** Register a new collation sequence with the database handle db.
139642 */
139643 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2(
139644 sqlite3* db,
139645 const char *zName,
139646 int enc,
139647 void* pCtx,
139648 int(*xCompare)(void*,int,const void*,int,const void*),
@@ -139663,11 +139688,11 @@
139663
139664 #ifndef SQLITE_OMIT_UTF16
139665 /*
139666 ** Register a new collation sequence with the database handle db.
139667 */
139668 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16(
139669 sqlite3* db,
139670 const void *zName,
139671 int enc,
139672 void* pCtx,
139673 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -139693,11 +139718,11 @@
139693
139694 /*
139695 ** Register a collation sequence factory callback with the database handle
139696 ** db. Replace any previously installed collation sequence factory.
139697 */
139698 SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed(
139699 sqlite3 *db,
139700 void *pCollNeededArg,
139701 void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)
139702 ){
139703 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -139714,11 +139739,11 @@
139714 #ifndef SQLITE_OMIT_UTF16
139715 /*
139716 ** Register a collation sequence factory callback with the database handle
139717 ** db. Replace any previously installed collation sequence factory.
139718 */
139719 SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16(
139720 sqlite3 *db,
139721 void *pCollNeededArg,
139722 void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)
139723 ){
139724 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -139736,11 +139761,11 @@
139736 #ifndef SQLITE_OMIT_DEPRECATED
139737 /*
139738 ** This function is now an anachronism. It used to be used to recover from a
139739 ** malloc() failure, but SQLite now does this automatically.
139740 */
139741 SQLITE_API int SQLITE_STDCALL sqlite3_global_recover(void){
139742 return SQLITE_OK;
139743 }
139744 #endif
139745
139746 /*
@@ -139747,11 +139772,11 @@
139747 ** Test to see whether or not the database connection is in autocommit
139748 ** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on
139749 ** by default. Autocommit is disabled by a BEGIN statement and reenabled
139750 ** by the next COMMIT or ROLLBACK.
139751 */
139752 SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3 *db){
139753 #ifdef SQLITE_ENABLE_API_ARMOR
139754 if( !sqlite3SafetyCheckOk(db) ){
139755 (void)SQLITE_MISUSE_BKPT;
139756 return 0;
139757 }
@@ -139804,19 +139829,19 @@
139804 ** data for this thread has been deallocated.
139805 **
139806 ** SQLite no longer uses thread-specific data so this routine is now a
139807 ** no-op. It is retained for historical compatibility.
139808 */
139809 SQLITE_API void SQLITE_STDCALL sqlite3_thread_cleanup(void){
139810 }
139811 #endif
139812
139813 /*
139814 ** Return meta information about a specific column of a database table.
139815 ** See comment in sqlite3.h (sqlite.h.in) for details.
139816 */
139817 SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata(
139818 sqlite3 *db, /* Connection handle */
139819 const char *zDbName, /* Database name or NULL */
139820 const char *zTableName, /* Table name */
139821 const char *zColumnName, /* Column name */
139822 char const **pzDataType, /* OUTPUT: Declared data type */
@@ -139930,11 +139955,11 @@
139930 }
139931
139932 /*
139933 ** Sleep for a little while. Return the amount of time slept.
139934 */
139935 SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int ms){
139936 sqlite3_vfs *pVfs;
139937 int rc;
139938 pVfs = sqlite3_vfs_find(0);
139939 if( pVfs==0 ) return 0;
139940
@@ -139946,11 +139971,11 @@
139946 }
139947
139948 /*
139949 ** Enable or disable the extended result codes.
139950 */
139951 SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3 *db, int onoff){
139952 #ifdef SQLITE_ENABLE_API_ARMOR
139953 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
139954 #endif
139955 sqlite3_mutex_enter(db->mutex);
139956 db->errMask = onoff ? 0xffffffff : 0xff;
@@ -139959,11 +139984,11 @@
139959 }
139960
139961 /*
139962 ** Invoke the xFileControl method on a particular database.
139963 */
139964 SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
139965 int rc = SQLITE_ERROR;
139966 Btree *pBtree;
139967
139968 #ifdef SQLITE_ENABLE_API_ARMOR
139969 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -139999,11 +140024,11 @@
139999 }
140000
140001 /*
140002 ** Interface to the testing logic.
140003 */
140004 SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...){
140005 int rc = 0;
140006 #ifdef SQLITE_OMIT_BUILTIN_TEST
140007 UNUSED_PARAMETER(op);
140008 #else
140009 va_list ap;
@@ -140344,11 +140369,11 @@
140344 ** method of a VFS implementation. The zParam argument is the name of the
140345 ** query parameter we seek. This routine returns the value of the zParam
140346 ** parameter if it exists. If the parameter does not exist, this routine
140347 ** returns a NULL pointer.
140348 */
140349 SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam){
140350 if( zFilename==0 || zParam==0 ) return 0;
140351 zFilename += sqlite3Strlen30(zFilename) + 1;
140352 while( zFilename[0] ){
140353 int x = strcmp(zFilename, zParam);
140354 zFilename += sqlite3Strlen30(zFilename) + 1;
@@ -140359,20 +140384,20 @@
140359 }
140360
140361 /*
140362 ** Return a boolean value for a query parameter.
140363 */
140364 SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){
140365 const char *z = sqlite3_uri_parameter(zFilename, zParam);
140366 bDflt = bDflt!=0;
140367 return z ? sqlite3GetBoolean(z, bDflt) : bDflt;
140368 }
140369
140370 /*
140371 ** Return a 64-bit integer value for a query parameter.
140372 */
140373 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(
140374 const char *zFilename, /* Filename as passed to xOpen */
140375 const char *zParam, /* URI parameter sought */
140376 sqlite3_int64 bDflt /* return if parameter is missing */
140377 ){
140378 const char *z = sqlite3_uri_parameter(zFilename, zParam);
@@ -140400,11 +140425,11 @@
140400
140401 /*
140402 ** Return the filename of the database associated with a database
140403 ** connection.
140404 */
140405 SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName){
140406 Btree *pBt;
140407 #ifdef SQLITE_ENABLE_API_ARMOR
140408 if( !sqlite3SafetyCheckOk(db) ){
140409 (void)SQLITE_MISUSE_BKPT;
140410 return 0;
@@ -140416,11 +140441,11 @@
140416
140417 /*
140418 ** Return 1 if database is read-only or 0 if read/write. Return -1 if
140419 ** no such database exists.
140420 */
140421 SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
140422 Btree *pBt;
140423 #ifdef SQLITE_ENABLE_API_ARMOR
140424 if( !sqlite3SafetyCheckOk(db) ){
140425 (void)SQLITE_MISUSE_BKPT;
140426 return -1;
@@ -140433,11 +140458,11 @@
140433 #ifdef SQLITE_ENABLE_SNAPSHOT
140434 /*
140435 ** Obtain a snapshot handle for the snapshot of database zDb currently
140436 ** being read by handle db.
140437 */
140438 SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_get(
140439 sqlite3 *db,
140440 const char *zDb,
140441 sqlite3_snapshot **ppSnapshot
140442 ){
140443 int rc = SQLITE_ERROR;
@@ -140468,11 +140493,11 @@
140468 }
140469
140470 /*
140471 ** Open a read-transaction on the snapshot idendified by pSnapshot.
140472 */
140473 SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_open(
140474 sqlite3 *db,
140475 const char *zDb,
140476 sqlite3_snapshot *pSnapshot
140477 ){
140478 int rc = SQLITE_ERROR;
@@ -140505,11 +140530,11 @@
140505 }
140506
140507 /*
140508 ** Free a snapshot handle obtained from sqlite3_snapshot_get().
140509 */
140510 SQLITE_API void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){
140511 sqlite3_free(pSnapshot);
140512 }
140513 #endif /* SQLITE_ENABLE_SNAPSHOT */
140514
140515 /************** End of main.c ************************************************/
@@ -140659,11 +140684,11 @@
140659 **
140660 ** Each call to this routine overrides any prior callbacks registered
140661 ** on the same "db". If xNotify==0 then any prior callbacks are immediately
140662 ** cancelled.
140663 */
140664 SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify(
140665 sqlite3 *db,
140666 void (*xNotify)(void **, int),
140667 void *pArg
140668 ){
140669 int rc = SQLITE_OK;
@@ -147662,11 +147687,11 @@
147662 ** Initialize API pointer table, if required.
147663 */
147664 #ifdef _WIN32
147665 __declspec(dllexport)
147666 #endif
147667 SQLITE_API int SQLITE_STDCALL sqlite3_fts3_init(
147668 sqlite3 *db,
147669 char **pzErrMsg,
147670 const sqlite3_api_routines *pApi
147671 ){
147672 SQLITE_EXTENSION_INIT2(pApi)
@@ -163463,11 +163488,11 @@
163463 }
163464
163465 /*
163466 ** Register a new geometry function for use with the r-tree MATCH operator.
163467 */
163468 SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback(
163469 sqlite3 *db, /* Register SQL function on this connection */
163470 const char *zGeom, /* Name of the new SQL function */
163471 int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */
163472 void *pContext /* Extra data associated with the callback */
163473 ){
@@ -163487,11 +163512,11 @@
163487
163488 /*
163489 ** Register a new 2nd-generation geometry function for use with the
163490 ** r-tree MATCH operator.
163491 */
163492 SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback(
163493 sqlite3 *db, /* Register SQL function on this connection */
163494 const char *zQueryFunc, /* Name of new SQL function */
163495 int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */
163496 void *pContext, /* Extra data passed into the callback */
163497 void (*xDestructor)(void*) /* Destructor for the extra data */
@@ -163512,11 +163537,11 @@
163512
163513 #if !SQLITE_CORE
163514 #ifdef _WIN32
163515 __declspec(dllexport)
163516 #endif
163517 SQLITE_API int SQLITE_STDCALL sqlite3_rtree_init(
163518 sqlite3 *db,
163519 char **pzErrMsg,
163520 const sqlite3_api_routines *pApi
163521 ){
163522 SQLITE_EXTENSION_INIT2(pApi)
@@ -164063,11 +164088,11 @@
164063
164064 #if !SQLITE_CORE
164065 #ifdef _WIN32
164066 __declspec(dllexport)
164067 #endif
164068 SQLITE_API int SQLITE_STDCALL sqlite3_icu_init(
164069 sqlite3 *db,
164070 char **pzErrMsg,
164071 const sqlite3_api_routines *pApi
164072 ){
164073 SQLITE_EXTENSION_INIT2(pApi)
@@ -164743,11 +164768,11 @@
164743 ** IMPORTANT NOTE FOR ZIPVFS USERS: The RBU extension works with all of
164744 ** SQLite's built-in VFSs, including the multiplexor VFS. However it does
164745 ** not work out of the box with zipvfs. Refer to the comment describing
164746 ** the zipvfs_create_vfs() API below for details on using RBU with zipvfs.
164747 */
164748 SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open(
164749 const char *zTarget,
164750 const char *zRbu,
164751 const char *zState
164752 );
164753
@@ -164776,11 +164801,11 @@
164776 ** As with sqlite3rbu_open(), Zipvfs users should rever to the comment
164777 ** describing the sqlite3rbu_create_vfs() API function below for
164778 ** a description of the complications associated with using RBU with
164779 ** zipvfs databases.
164780 */
164781 SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum(
164782 const char *zTarget,
164783 const char *zState
164784 );
164785
164786 /*
@@ -164812,11 +164837,11 @@
164812 ** when sqlite3rbu_close() is called.
164813 **
164814 ** Database handles returned by this function remain valid until the next
164815 ** call to any sqlite3rbu_xxx() function other than sqlite3rbu_db().
164816 */
164817 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu*, int bRbu);
164818
164819 /*
164820 ** Do some work towards applying the RBU update to the target db.
164821 **
164822 ** Return SQLITE_DONE if the update has been completely applied, or
@@ -164826,11 +164851,11 @@
164826 **
164827 ** Once a call to sqlite3rbu_step() has returned a value other than
164828 ** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops
164829 ** that immediately return the same value.
164830 */
164831 SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *pRbu);
164832
164833 /*
164834 ** Force RBU to save its state to disk.
164835 **
164836 ** If a power failure or application crash occurs during an update, following
@@ -164838,11 +164863,11 @@
164838 ** was last saved. In other words, from the most recent successful call to
164839 ** sqlite3rbu_close() or this function.
164840 **
164841 ** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
164842 */
164843 SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *pRbu);
164844
164845 /*
164846 ** Close an RBU handle.
164847 **
164848 ** If the RBU update has been completely applied, mark the RBU database
@@ -164858,18 +164883,18 @@
164858 **
164859 ** Otherwise, if no error occurs, this function returns SQLITE_OK if the
164860 ** update has been partially applied, or SQLITE_DONE if it has been
164861 ** completely applied.
164862 */
164863 SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg);
164864
164865 /*
164866 ** Return the total number of key-value operations (inserts, deletes or
164867 ** updates) that have been performed on the target database since the
164868 ** current RBU update was started.
164869 */
164870 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu);
164871
164872 /*
164873 ** Obtain permyriadage (permyriadage is to 10000 as percentage is to 100)
164874 ** progress indications for the two stages of an RBU update. This API may
164875 ** be useful for driving GUI progress indicators and similar.
@@ -164907,11 +164932,11 @@
164907 ** permyriadage progress of the same stage. If the rbu_count table does
164908 ** not exist, then (*pnOne) is set to -1 during stage 1. If the rbu_count
164909 ** table exists but is not correctly populated, the value of the *pnOne
164910 ** output variable during stage 1 is undefined.
164911 */
164912 SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo);
164913
164914 /*
164915 ** Obtain an indication as to the current stage of an RBU update or vacuum.
164916 ** This function always returns one of the SQLITE_RBU_STATE_XXX constants
164917 ** defined in this file. Return values should be interpreted as follows:
@@ -164945,11 +164970,11 @@
164945 #define SQLITE_RBU_STATE_MOVE 2
164946 #define SQLITE_RBU_STATE_CHECKPOINT 3
164947 #define SQLITE_RBU_STATE_DONE 4
164948 #define SQLITE_RBU_STATE_ERROR 5
164949
164950 SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *pRbu);
164951
164952 /*
164953 ** Create an RBU VFS named zName that accesses the underlying file-system
164954 ** via existing VFS zParent. Or, if the zParent parameter is passed NULL,
164955 ** then the new RBU VFS uses the default system VFS to access the file-system.
@@ -164989,21 +165014,21 @@
164989 ** The overhead of adding the "rbu" VFS to the system is negligible for
164990 ** non-RBU users. There is no harm in an application accessing the
164991 ** file-system via "rbu" all the time, even if it only uses RBU functionality
164992 ** occasionally.
164993 */
164994 SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent);
164995
164996 /*
164997 ** Deregister and destroy an RBU vfs created by an earlier call to
164998 ** sqlite3rbu_create_vfs().
164999 **
165000 ** VFS objects are not reference counted. If a VFS object is destroyed
165001 ** before all database handles that use it have been closed, the results
165002 ** are undefined.
165003 */
165004 SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName);
165005
165006 #if 0
165007 } /* end of the 'extern "C"' block */
165008 #endif
165009
@@ -168093,11 +168118,11 @@
168093 }
168094
168095 /*
168096 ** Step the RBU object.
168097 */
168098 SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *p){
168099 if( p ){
168100 switch( p->eStage ){
168101 case RBU_STAGE_OAL: {
168102 RbuObjIter *pIter = &p->objiter;
168103
@@ -168535,11 +168560,11 @@
168535 }
168536
168537 /*
168538 ** Open and return a new RBU handle.
168539 */
168540 SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open(
168541 const char *zTarget,
168542 const char *zRbu,
168543 const char *zState
168544 ){
168545 /* TODO: Check that zTarget and zRbu are non-NULL */
@@ -168547,11 +168572,11 @@
168547 }
168548
168549 /*
168550 ** Open a handle to begin or resume an RBU VACUUM operation.
168551 */
168552 SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum(
168553 const char *zTarget,
168554 const char *zState
168555 ){
168556 /* TODO: Check that both arguments are non-NULL */
168557 return openRbuHandle(0, zTarget, zState);
@@ -168558,11 +168583,11 @@
168558 }
168559
168560 /*
168561 ** Return the database handle used by pRbu.
168562 */
168563 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){
168564 sqlite3 *db = 0;
168565 if( pRbu ){
168566 db = (bRbu ? pRbu->dbRbu : pRbu->dbMain);
168567 }
168568 return db;
@@ -168590,11 +168615,11 @@
168590 }
168591
168592 /*
168593 ** Close the RBU handle.
168594 */
168595 SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){
168596 int rc;
168597 if( p ){
168598
168599 /* Commit the transaction to the *-oal file. */
168600 if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){
@@ -168641,19 +168666,19 @@
168641 /*
168642 ** Return the total number of key-value operations (inserts, deletes or
168643 ** updates) that have been performed on the target database since the
168644 ** current RBU update was started.
168645 */
168646 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu){
168647 return pRbu->nProgress;
168648 }
168649
168650 /*
168651 ** Return permyriadage progress indications for the two main stages of
168652 ** an RBU update.
168653 */
168654 SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){
168655 const int MAX_PROGRESS = 10000;
168656 switch( p->eStage ){
168657 case RBU_STAGE_OAL:
168658 if( p->nPhaseOneStep>0 ){
168659 *pnOne = (int)(MAX_PROGRESS * (i64)p->nProgress/(i64)p->nPhaseOneStep);
@@ -168684,11 +168709,11 @@
168684 }
168685
168686 /*
168687 ** Return the current state of the RBU vacuum or update operation.
168688 */
168689 SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *p){
168690 int aRes[] = {
168691 0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE,
168692 0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE
168693 };
168694
@@ -168712,11 +168737,11 @@
168712 );
168713 return aRes[p->eStage];
168714 }
168715 }
168716
168717 SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *p){
168718 int rc = p->rc;
168719 if( rc==SQLITE_DONE ) return SQLITE_OK;
168720
168721 assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE );
168722 if( p->eStage==RBU_STAGE_OAL ){
@@ -169539,11 +169564,11 @@
169539
169540 /*
169541 ** Deregister and destroy an RBU vfs created by an earlier call to
169542 ** sqlite3rbu_create_vfs().
169543 */
169544 SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName){
169545 sqlite3_vfs *pVfs = sqlite3_vfs_find(zName);
169546 if( pVfs && pVfs->xOpen==rbuVfsOpen ){
169547 sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex);
169548 sqlite3_vfs_unregister(pVfs);
169549 sqlite3_free(pVfs);
@@ -169553,11 +169578,11 @@
169553 /*
169554 ** Create an RBU VFS named zName that accesses the underlying file-system
169555 ** via existing VFS zParent. The new object is registered as a non-default
169556 ** VFS with SQLite before returning.
169557 */
169558 SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent){
169559
169560 /* Template for VFS */
169561 static sqlite3_vfs vfs_template = {
169562 1, /* iVersion */
169563 0, /* szOsFile */
@@ -171798,11 +171823,11 @@
171798 }
171799
171800 return rc;
171801 }
171802
171803 SQLITE_API int SQLITE_STDCALL sqlite3session_diff(
171804 sqlite3_session *pSession,
171805 const char *zFrom,
171806 const char *zTbl,
171807 char **pzErrMsg
171808 ){
@@ -171892,11 +171917,11 @@
171892
171893 /*
171894 ** Create a session object. This session object will record changes to
171895 ** database zDb attached to connection db.
171896 */
171897 SQLITE_API int SQLITE_STDCALL sqlite3session_create(
171898 sqlite3 *db, /* Database handle */
171899 const char *zDb, /* Name of db (e.g. "main") */
171900 sqlite3_session **ppSession /* OUT: New session object */
171901 ){
171902 sqlite3_session *pNew; /* Newly allocated session object */
@@ -171954,11 +171979,11 @@
171954 }
171955
171956 /*
171957 ** Delete a session object previously allocated using sqlite3session_create().
171958 */
171959 SQLITE_API void SQLITE_STDCALL sqlite3session_delete(sqlite3_session *pSession){
171960 sqlite3 *db = pSession->db;
171961 sqlite3_session *pHead;
171962 sqlite3_session **pp;
171963
171964 /* Unlink the session from the linked list of sessions attached to the
@@ -171983,11 +172008,11 @@
171983 }
171984
171985 /*
171986 ** Set a table filter on a Session Object.
171987 */
171988 SQLITE_API void SQLITE_STDCALL sqlite3session_table_filter(
171989 sqlite3_session *pSession,
171990 int(*xFilter)(void*, const char*),
171991 void *pCtx /* First argument passed to xFilter */
171992 ){
171993 pSession->bAutoAttach = 1;
@@ -172001,11 +172026,11 @@
172001 **
172002 ** Only tables that have a PRIMARY KEY defined may be attached. It does
172003 ** not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias)
172004 ** or not.
172005 */
172006 SQLITE_API int SQLITE_STDCALL sqlite3session_attach(
172007 sqlite3_session *pSession, /* Session object */
172008 const char *zName /* Table name */
172009 ){
172010 int rc = SQLITE_OK;
172011 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
@@ -172691,11 +172716,11 @@
172691 ** session object passed as the first argument.
172692 **
172693 ** It is the responsibility of the caller to eventually free the buffer
172694 ** using sqlite3_free().
172695 */
172696 SQLITE_API int SQLITE_STDCALL sqlite3session_changeset(
172697 sqlite3_session *pSession, /* Session object */
172698 int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */
172699 void **ppChangeset /* OUT: Buffer containing changeset */
172700 ){
172701 return sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset);
@@ -172702,11 +172727,11 @@
172702 }
172703
172704 /*
172705 ** Streaming version of sqlite3session_changeset().
172706 */
172707 SQLITE_API int SQLITE_STDCALL sqlite3session_changeset_strm(
172708 sqlite3_session *pSession,
172709 int (*xOutput)(void *pOut, const void *pData, int nData),
172710 void *pOut
172711 ){
172712 return sessionGenerateChangeset(pSession, 0, xOutput, pOut, 0, 0);
@@ -172713,11 +172738,11 @@
172713 }
172714
172715 /*
172716 ** Streaming version of sqlite3session_patchset().
172717 */
172718 SQLITE_API int SQLITE_STDCALL sqlite3session_patchset_strm(
172719 sqlite3_session *pSession,
172720 int (*xOutput)(void *pOut, const void *pData, int nData),
172721 void *pOut
172722 ){
172723 return sessionGenerateChangeset(pSession, 1, xOutput, pOut, 0, 0);
@@ -172728,11 +172753,11 @@
172728 ** session object passed as the first argument.
172729 **
172730 ** It is the responsibility of the caller to eventually free the buffer
172731 ** using sqlite3_free().
172732 */
172733 SQLITE_API int SQLITE_STDCALL sqlite3session_patchset(
172734 sqlite3_session *pSession, /* Session object */
172735 int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */
172736 void **ppPatchset /* OUT: Buffer containing changeset */
172737 ){
172738 return sessionGenerateChangeset(pSession, 1, 0, 0, pnPatchset, ppPatchset);
@@ -172739,11 +172764,11 @@
172739 }
172740
172741 /*
172742 ** Enable or disable the session object passed as the first argument.
172743 */
172744 SQLITE_API int SQLITE_STDCALL sqlite3session_enable(sqlite3_session *pSession, int bEnable){
172745 int ret;
172746 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172747 if( bEnable>=0 ){
172748 pSession->bEnable = bEnable;
172749 }
@@ -172753,11 +172778,11 @@
172753 }
172754
172755 /*
172756 ** Enable or disable the session object passed as the first argument.
172757 */
172758 SQLITE_API int SQLITE_STDCALL sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){
172759 int ret;
172760 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172761 if( bIndirect>=0 ){
172762 pSession->bIndirect = bIndirect;
172763 }
@@ -172768,11 +172793,11 @@
172768
172769 /*
172770 ** Return true if there have been no changes to monitored tables recorded
172771 ** by the session object passed as the only argument.
172772 */
172773 SQLITE_API int SQLITE_STDCALL sqlite3session_isempty(sqlite3_session *pSession){
172774 int ret = 0;
172775 SessionTable *pTab;
172776
172777 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172778 for(pTab=pSession->pTable; pTab && ret==0; pTab=pTab->pNext){
@@ -172818,11 +172843,11 @@
172818 }
172819
172820 /*
172821 ** Create an iterator used to iterate through the contents of a changeset.
172822 */
172823 SQLITE_API int SQLITE_STDCALL sqlite3changeset_start(
172824 sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */
172825 int nChangeset, /* Size of buffer pChangeset in bytes */
172826 void *pChangeset /* Pointer to buffer containing changeset */
172827 ){
172828 return sessionChangesetStart(pp, 0, 0, nChangeset, pChangeset);
@@ -172829,11 +172854,11 @@
172829 }
172830
172831 /*
172832 ** Streaming version of sqlite3changeset_start().
172833 */
172834 SQLITE_API int SQLITE_STDCALL sqlite3changeset_start_strm(
172835 sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */
172836 int (*xInput)(void *pIn, void *pData, int *pnData),
172837 void *pIn
172838 ){
172839 return sessionChangesetStart(pp, xInput, pIn, 0, 0);
@@ -173250,20 +173275,20 @@
173250 ** or SQLITE_CORRUPT.
173251 **
173252 ** This function may not be called on iterators passed to a conflict handler
173253 ** callback by changeset_apply().
173254 */
173255 SQLITE_API int SQLITE_STDCALL sqlite3changeset_next(sqlite3_changeset_iter *p){
173256 return sessionChangesetNext(p, 0, 0);
173257 }
173258
173259 /*
173260 ** The following function extracts information on the current change
173261 ** from a changeset iterator. It may only be called after changeset_next()
173262 ** has returned SQLITE_ROW.
173263 */
173264 SQLITE_API int SQLITE_STDCALL sqlite3changeset_op(
173265 sqlite3_changeset_iter *pIter, /* Iterator handle */
173266 const char **pzTab, /* OUT: Pointer to table name */
173267 int *pnCol, /* OUT: Number of columns in table */
173268 int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */
173269 int *pbIndirect /* OUT: True if change is indirect */
@@ -173279,11 +173304,11 @@
173279 ** Return information regarding the PRIMARY KEY and number of columns in
173280 ** the database table affected by the change that pIter currently points
173281 ** to. This function may only be called after changeset_next() returns
173282 ** SQLITE_ROW.
173283 */
173284 SQLITE_API int SQLITE_STDCALL sqlite3changeset_pk(
173285 sqlite3_changeset_iter *pIter, /* Iterator object */
173286 unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */
173287 int *pnCol /* OUT: Number of entries in output array */
173288 ){
173289 *pabPK = pIter->abPK;
@@ -173302,11 +173327,11 @@
173302 ** was not modified and is not a PK column), set *ppValue to NULL.
173303 **
173304 ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is
173305 ** not modified. Otherwise, SQLITE_OK.
173306 */
173307 SQLITE_API int SQLITE_STDCALL sqlite3changeset_old(
173308 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173309 int iVal, /* Index of old.* value to retrieve */
173310 sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */
173311 ){
173312 if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_DELETE ){
@@ -173330,11 +173355,11 @@
173330 ** was not modified), set *ppValue to NULL.
173331 **
173332 ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is
173333 ** not modified. Otherwise, SQLITE_OK.
173334 */
173335 SQLITE_API int SQLITE_STDCALL sqlite3changeset_new(
173336 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173337 int iVal, /* Index of new.* value to retrieve */
173338 sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */
173339 ){
173340 if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_INSERT ){
@@ -173364,11 +173389,11 @@
173364 ** containing the iVal'th value of the conflicting record.
173365 **
173366 ** If value iVal is out-of-range or some other error occurs, an SQLite error
173367 ** code is returned. Otherwise, SQLITE_OK.
173368 */
173369 SQLITE_API int SQLITE_STDCALL sqlite3changeset_conflict(
173370 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173371 int iVal, /* Index of conflict record value to fetch */
173372 sqlite3_value **ppValue /* OUT: Value from conflicting row */
173373 ){
173374 if( !pIter->pConflict ){
@@ -173387,11 +173412,11 @@
173387 ** it sets the output variable to the total number of known foreign key
173388 ** violations in the destination database and returns SQLITE_OK.
173389 **
173390 ** In all other cases this function returns SQLITE_MISUSE.
173391 */
173392 SQLITE_API int SQLITE_STDCALL sqlite3changeset_fk_conflicts(
173393 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173394 int *pnOut /* OUT: Number of FK violations */
173395 ){
173396 if( pIter->pConflict || pIter->apValue ){
173397 return SQLITE_MISUSE;
@@ -173405,11 +173430,11 @@
173405 ** Finalize an iterator allocated with sqlite3changeset_start().
173406 **
173407 ** This function may not be called on iterators passed to a conflict handler
173408 ** callback by changeset_apply().
173409 */
173410 SQLITE_API int SQLITE_STDCALL sqlite3changeset_finalize(sqlite3_changeset_iter *p){
173411 int rc = SQLITE_OK;
173412 if( p ){
173413 int i; /* Used to iterate through p->apValue[] */
173414 rc = p->rc;
173415 if( p->apValue ){
@@ -173579,11 +173604,11 @@
173579
173580
173581 /*
173582 ** Invert a changeset object.
173583 */
173584 SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert(
173585 int nChangeset, /* Number of bytes in input */
173586 const void *pChangeset, /* Input changeset */
173587 int *pnInverted, /* OUT: Number of bytes in output changeset */
173588 void **ppInverted /* OUT: Inverse of pChangeset */
173589 ){
@@ -173598,11 +173623,11 @@
173598 }
173599
173600 /*
173601 ** Streaming version of sqlite3changeset_invert().
173602 */
173603 SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert_strm(
173604 int (*xInput)(void *pIn, void *pData, int *pnData),
173605 void *pIn,
173606 int (*xOutput)(void *pOut, const void *pData, int nData),
173607 void *pOut
173608 ){
@@ -174478,11 +174503,11 @@
174478 /*
174479 ** Apply the changeset passed via pChangeset/nChangeset to the main database
174480 ** attached to handle "db". Invoke the supplied conflict handler callback
174481 ** to resolve any conflicts encountered while applying the change.
174482 */
174483 SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply(
174484 sqlite3 *db, /* Apply change to "main" db of this handle */
174485 int nChangeset, /* Size of changeset in bytes */
174486 void *pChangeset, /* Changeset blob */
174487 int(*xFilter)(
174488 void *pCtx, /* Copy of sixth arg to _apply() */
@@ -174506,11 +174531,11 @@
174506 /*
174507 ** Apply the changeset passed via xInput/pIn to the main database
174508 ** attached to handle "db". Invoke the supplied conflict handler callback
174509 ** to resolve any conflicts encountered while applying the change.
174510 */
174511 SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply_strm(
174512 sqlite3 *db, /* Apply change to "main" db of this handle */
174513 int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
174514 void *pIn, /* First arg for xInput */
174515 int(*xFilter)(
174516 void *pCtx, /* Copy of sixth arg to _apply() */
@@ -174841,11 +174866,11 @@
174841 }
174842
174843 /*
174844 ** Allocate a new, empty, sqlite3_changegroup.
174845 */
174846 SQLITE_API int SQLITE_STDCALL sqlite3changegroup_new(sqlite3_changegroup **pp){
174847 int rc = SQLITE_OK; /* Return code */
174848 sqlite3_changegroup *p; /* New object */
174849 p = (sqlite3_changegroup*)sqlite3_malloc(sizeof(sqlite3_changegroup));
174850 if( p==0 ){
174851 rc = SQLITE_NOMEM;
@@ -174858,11 +174883,11 @@
174858
174859 /*
174860 ** Add the changeset currently stored in buffer pData, size nData bytes,
174861 ** to changeset-group p.
174862 */
174863 SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){
174864 sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */
174865 int rc; /* Return code */
174866
174867 rc = sqlite3changeset_start(&pIter, nData, pData);
174868 if( rc==SQLITE_OK ){
@@ -174874,11 +174899,11 @@
174874
174875 /*
174876 ** Obtain a buffer containing a changeset representing the concatenation
174877 ** of all changesets added to the group so far.
174878 */
174879 SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output(
174880 sqlite3_changegroup *pGrp,
174881 int *pnData,
174882 void **ppData
174883 ){
174884 return sessionChangegroupOutput(pGrp, 0, 0, pnData, ppData);
@@ -174885,11 +174910,11 @@
174885 }
174886
174887 /*
174888 ** Streaming versions of changegroup_add().
174889 */
174890 SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add_strm(
174891 sqlite3_changegroup *pGrp,
174892 int (*xInput)(void *pIn, void *pData, int *pnData),
174893 void *pIn
174894 ){
174895 sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */
@@ -174904,11 +174929,11 @@
174904 }
174905
174906 /*
174907 ** Streaming versions of changegroup_output().
174908 */
174909 SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output_strm(
174910 sqlite3_changegroup *pGrp,
174911 int (*xOutput)(void *pOut, const void *pData, int nData),
174912 void *pOut
174913 ){
174914 return sessionChangegroupOutput(pGrp, xOutput, pOut, 0, 0);
@@ -174915,21 +174940,21 @@
174915 }
174916
174917 /*
174918 ** Delete a changegroup object.
174919 */
174920 SQLITE_API void SQLITE_STDCALL sqlite3changegroup_delete(sqlite3_changegroup *pGrp){
174921 if( pGrp ){
174922 sessionDeleteTable(pGrp->pList);
174923 sqlite3_free(pGrp);
174924 }
174925 }
174926
174927 /*
174928 ** Combine two changesets together.
174929 */
174930 SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat(
174931 int nLeft, /* Number of bytes in lhs input */
174932 void *pLeft, /* Lhs input changeset */
174933 int nRight /* Number of bytes in rhs input */,
174934 void *pRight, /* Rhs input changeset */
174935 int *pnOut, /* OUT: Number of bytes in output changeset */
@@ -174954,11 +174979,11 @@
174954 }
174955
174956 /*
174957 ** Streaming version of sqlite3changeset_concat().
174958 */
174959 SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat_strm(
174960 int (*xInputA)(void *pIn, void *pData, int *pnData),
174961 void *pInA,
174962 int (*xInputB)(void *pIn, void *pData, int *pnData),
174963 void *pInB,
174964 int (*xOutput)(void *pOut, const void *pData, int nData),
@@ -177186,11 +177211,11 @@
177186
177187 #ifndef SQLITE_CORE
177188 #ifdef _WIN32
177189 __declspec(dllexport)
177190 #endif
177191 SQLITE_API int SQLITE_STDCALL sqlite3_json_init(
177192 sqlite3 *db,
177193 char **pzErrMsg,
177194 const sqlite3_api_routines *pApi
177195 ){
177196 SQLITE_EXTENSION_INIT2(pApi);
@@ -194018,11 +194043,11 @@
194018 int nArg, /* Number of args */
194019 sqlite3_value **apUnused /* Function arguments */
194020 ){
194021 assert( nArg==0 );
194022 UNUSED_PARAM2(nArg, apUnused);
194023 sqlite3_result_text(pCtx, "fts5: 2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b", -1, SQLITE_TRANSIENT);
194024 }
194025
194026 static int fts5Init(sqlite3 *db){
194027 static const sqlite3_module fts5Mod = {
194028 /* iVersion */ 2,
@@ -194106,11 +194131,11 @@
194106 */
194107 #ifndef SQLITE_CORE
194108 #ifdef _WIN32
194109 __declspec(dllexport)
194110 #endif
194111 SQLITE_API int SQLITE_STDCALL sqlite3_fts_init(
194112 sqlite3 *db,
194113 char **pzErrMsg,
194114 const sqlite3_api_routines *pApi
194115 ){
194116 SQLITE_EXTENSION_INIT2(pApi);
@@ -194119,11 +194144,11 @@
194119 }
194120
194121 #ifdef _WIN32
194122 __declspec(dllexport)
194123 #endif
194124 SQLITE_API int SQLITE_STDCALL sqlite3_fts5_init(
194125 sqlite3 *db,
194126 char **pzErrMsg,
194127 const sqlite3_api_routines *pApi
194128 ){
194129 SQLITE_EXTENSION_INIT2(pApi);
194130
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,17 +1,17 @@
1 /******************************************************************************
2 ** This file is an amalgamation of many separate C source files from SQLite
3 ** version 3.14.2. By combining all the individual C code files into this
4 ** single large file, the entire code can be compiled as a single translation
5 ** unit. This allows many compilers to do optimizations that would not be
6 ** possible if the files were compiled separately. Performance improvements
7 ** of 5% or more are commonly seen when SQLite is compiled as a single
8 ** translation unit.
9 **
10 ** This file is all you need to compile SQLite. To use SQLite in other
11 ** programs, you need this file and the "sqlite3.h" header file that defines
12 ** the programming interface to the SQLite library. (If you do not have
13 ** the "sqlite3.h" header file at hand, you will find a copy embedded within
14 ** the text of this file. Search for "Begin file sqlite3.h" to find the start
15 ** of the embedded sqlite3.h header file.) Additional code files may be needed
16 ** if you want a wrapper to interface SQLite with your choice of programming
17 ** language. The code for the "sqlite3" command-line shell is also in a
@@ -378,13 +378,13 @@
378 **
379 ** See also: [sqlite3_libversion()],
380 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
381 ** [sqlite_version()] and [sqlite_source_id()].
382 */
383 #define SQLITE_VERSION "3.14.2"
384 #define SQLITE_VERSION_NUMBER 3014002
385 #define SQLITE_SOURCE_ID "2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6"
386
387 /*
388 ** CAPI3REF: Run-Time Library Version Numbers
389 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
390 **
@@ -413,13 +413,13 @@
413 ** [SQLITE_SOURCE_ID] C preprocessor macro.
414 **
415 ** See also: [sqlite_version()] and [sqlite_source_id()].
416 */
417 SQLITE_API const char sqlite3_version[] = SQLITE_VERSION;
418 SQLITE_API const char *sqlite3_libversion(void);
419 SQLITE_API const char *sqlite3_sourceid(void);
420 SQLITE_API int sqlite3_libversion_number(void);
421
422 /*
423 ** CAPI3REF: Run-Time Library Compilation Options Diagnostics
424 **
425 ** ^The sqlite3_compileoption_used() function returns 0 or 1
@@ -440,12 +440,12 @@
440 **
441 ** See also: SQL functions [sqlite_compileoption_used()] and
442 ** [sqlite_compileoption_get()] and the [compile_options pragma].
443 */
444 #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
445 SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
446 SQLITE_API const char *sqlite3_compileoption_get(int N);
447 #endif
448
449 /*
450 ** CAPI3REF: Test To See If The Library Is Threadsafe
451 **
@@ -480,11 +480,11 @@
480 ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
481 ** is unchanged by calls to sqlite3_config().)^
482 **
483 ** See the [threading mode] documentation for additional information.
484 */
485 SQLITE_API int sqlite3_threadsafe(void);
486
487 /*
488 ** CAPI3REF: Database Connection Handle
489 ** KEYWORDS: {database connection} {database connections}
490 **
@@ -577,12 +577,12 @@
577 ** from [sqlite3_open()], [sqlite3_open16()], or
578 ** [sqlite3_open_v2()], and not previously closed.
579 ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
580 ** argument is a harmless no-op.
581 */
582 SQLITE_API int sqlite3_close(sqlite3*);
583 SQLITE_API int sqlite3_close_v2(sqlite3*);
584
585 /*
586 ** The type for a callback function.
587 ** This is legacy and deprecated. It is included for historical
588 ** compatibility and is not documented.
@@ -649,11 +649,11 @@
649 ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
650 ** <li> The application must not modify the SQL statement text passed into
651 ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
652 ** </ul>
653 */
654 SQLITE_API int sqlite3_exec(
655 sqlite3*, /* An open database */
656 const char *sql, /* SQL to be evaluated */
657 int (*callback)(void*,int,char**,char**), /* Callback function */
658 void *, /* 1st argument to callback */
659 char **errmsg /* Error msg written here */
@@ -1648,14 +1648,14 @@
1648 ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied
1649 ** implementation of sqlite3_os_init() or sqlite3_os_end()
1650 ** must return [SQLITE_OK] on success and some other [error code] upon
1651 ** failure.
1652 */
1653 SQLITE_API int sqlite3_initialize(void);
1654 SQLITE_API int sqlite3_shutdown(void);
1655 SQLITE_API int sqlite3_os_init(void);
1656 SQLITE_API int sqlite3_os_end(void);
1657
1658 /*
1659 ** CAPI3REF: Configuring The SQLite Library
1660 **
1661 ** The sqlite3_config() interface is used to make global configuration
@@ -1684,11 +1684,11 @@
1684 **
1685 ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
1686 ** ^If the option is unknown or SQLite is unable to set the option
1687 ** then this routine returns a non-zero [error code].
1688 */
1689 SQLITE_API int sqlite3_config(int, ...);
1690
1691 /*
1692 ** CAPI3REF: Configure database connections
1693 ** METHOD: sqlite3
1694 **
@@ -1703,11 +1703,11 @@
1703 ** Subsequent arguments vary depending on the configuration verb.
1704 **
1705 ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
1706 ** the call is considered successful.
1707 */
1708 SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
1709
1710 /*
1711 ** CAPI3REF: Memory Allocation Routines
1712 **
1713 ** An instance of this object defines the interface between SQLite
@@ -2244,11 +2244,11 @@
2244 **
2245 ** ^The sqlite3_extended_result_codes() routine enables or disables the
2246 ** [extended result codes] feature of SQLite. ^The extended result
2247 ** codes are disabled by default for historical compatibility.
2248 */
2249 SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
2250
2251 /*
2252 ** CAPI3REF: Last Insert Rowid
2253 ** METHOD: sqlite3
2254 **
@@ -2296,11 +2296,11 @@
2296 ** function is running and thus changes the last insert [rowid],
2297 ** then the value returned by [sqlite3_last_insert_rowid()] is
2298 ** unpredictable and might not equal either the old or the new
2299 ** last insert [rowid].
2300 */
2301 SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
2302
2303 /*
2304 ** CAPI3REF: Count The Number Of Rows Modified
2305 ** METHOD: sqlite3
2306 **
@@ -2349,11 +2349,11 @@
2349 **
2350 ** If a separate thread makes changes on the same database connection
2351 ** while [sqlite3_changes()] is running then the value returned
2352 ** is unpredictable and not meaningful.
2353 */
2354 SQLITE_API int sqlite3_changes(sqlite3*);
2355
2356 /*
2357 ** CAPI3REF: Total Number Of Rows Modified
2358 ** METHOD: sqlite3
2359 **
@@ -2373,11 +2373,11 @@
2373 **
2374 ** If a separate thread makes changes on the same database connection
2375 ** while [sqlite3_total_changes()] is running then the value
2376 ** returned is unpredictable and not meaningful.
2377 */
2378 SQLITE_API int sqlite3_total_changes(sqlite3*);
2379
2380 /*
2381 ** CAPI3REF: Interrupt A Long-Running Query
2382 ** METHOD: sqlite3
2383 **
@@ -2413,11 +2413,11 @@
2413 ** that are started after the sqlite3_interrupt() call returns.
2414 **
2415 ** If the database connection closes while [sqlite3_interrupt()]
2416 ** is running then bad things will likely happen.
2417 */
2418 SQLITE_API void sqlite3_interrupt(sqlite3*);
2419
2420 /*
2421 ** CAPI3REF: Determine If An SQL Statement Is Complete
2422 **
2423 ** These routines are useful during command-line input to determine if the
@@ -2448,12 +2448,12 @@
2448 ** UTF-8 string.
2449 **
2450 ** The input to [sqlite3_complete16()] must be a zero-terminated
2451 ** UTF-16 string in native byte order.
2452 */
2453 SQLITE_API int sqlite3_complete(const char *sql);
2454 SQLITE_API int sqlite3_complete16(const void *sql);
2455
2456 /*
2457 ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
2458 ** KEYWORDS: {busy-handler callback} {busy handler}
2459 ** METHOD: sqlite3
@@ -2510,11 +2510,11 @@
2510 ** result in undefined behavior.
2511 **
2512 ** A busy handler must not close the database connection
2513 ** or [prepared statement] that invoked the busy handler.
2514 */
2515 SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2516
2517 /*
2518 ** CAPI3REF: Set A Busy Timeout
2519 ** METHOD: sqlite3
2520 **
@@ -2533,11 +2533,11 @@
2533 ** was defined (using [sqlite3_busy_handler()]) prior to calling
2534 ** this routine, that other busy handler is cleared.)^
2535 **
2536 ** See also: [PRAGMA busy_timeout]
2537 */
2538 SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
2539
2540 /*
2541 ** CAPI3REF: Convenience Routines For Running Queries
2542 ** METHOD: sqlite3
2543 **
@@ -2608,19 +2608,19 @@
2608 ** interface defined here. As a consequence, errors that occur in the
2609 ** wrapper layer outside of the internal [sqlite3_exec()] call are not
2610 ** reflected in subsequent calls to [sqlite3_errcode()] or
2611 ** [sqlite3_errmsg()].
2612 */
2613 SQLITE_API int sqlite3_get_table(
2614 sqlite3 *db, /* An open database */
2615 const char *zSql, /* SQL to be evaluated */
2616 char ***pazResult, /* Results of the query */
2617 int *pnRow, /* Number of result rows written here */
2618 int *pnColumn, /* Number of result columns written here */
2619 char **pzErrmsg /* Error msg written here */
2620 );
2621 SQLITE_API void sqlite3_free_table(char **result);
2622
2623 /*
2624 ** CAPI3REF: Formatted String Printing Functions
2625 **
2626 ** These routines are work-alikes of the "printf()" family of functions
@@ -2722,14 +2722,14 @@
2722 **
2723 ** ^(The "%z" formatting option works like "%s" but with the
2724 ** addition that after the string has been read and copied into
2725 ** the result, [sqlite3_free()] is called on the input string.)^
2726 */
2727 SQLITE_API char *sqlite3_mprintf(const char*,...);
2728 SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
2729 SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
2730 SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
2731
2732 /*
2733 ** CAPI3REF: Memory Allocation Subsystem
2734 **
2735 ** The SQLite core uses these three routines for all of its own
@@ -2815,16 +2815,16 @@
2815 **
2816 ** The application must not read or write any part of
2817 ** a block of memory after it has been released using
2818 ** [sqlite3_free()] or [sqlite3_realloc()].
2819 */
2820 SQLITE_API void *sqlite3_malloc(int);
2821 SQLITE_API void *sqlite3_malloc64(sqlite3_uint64);
2822 SQLITE_API void *sqlite3_realloc(void*, int);
2823 SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64);
2824 SQLITE_API void sqlite3_free(void*);
2825 SQLITE_API sqlite3_uint64 sqlite3_msize(void*);
2826
2827 /*
2828 ** CAPI3REF: Memory Allocator Statistics
2829 **
2830 ** SQLite provides these two interfaces for reporting on the status
@@ -2845,12 +2845,12 @@
2845 ** [sqlite3_memory_used()] if and only if the parameter to
2846 ** [sqlite3_memory_highwater()] is true. ^The value returned
2847 ** by [sqlite3_memory_highwater(1)] is the high-water mark
2848 ** prior to the reset.
2849 */
2850 SQLITE_API sqlite3_int64 sqlite3_memory_used(void);
2851 SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
2852
2853 /*
2854 ** CAPI3REF: Pseudo-Random Number Generator
2855 **
2856 ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
@@ -2869,11 +2869,11 @@
2869 ** ^If the previous call to this routine had an N of 1 or more and a
2870 ** non-NULL P then the pseudo-randomness is generated
2871 ** internally and without recourse to the [sqlite3_vfs] xRandomness
2872 ** method.
2873 */
2874 SQLITE_API void sqlite3_randomness(int N, void *P);
2875
2876 /*
2877 ** CAPI3REF: Compile-Time Authorization Callbacks
2878 ** METHOD: sqlite3
2879 **
@@ -2952,11 +2952,11 @@
2952 ** [sqlite3_prepare()] or its variants. Authorization is not
2953 ** performed during statement evaluation in [sqlite3_step()], unless
2954 ** as stated in the previous paragraph, sqlite3_step() invokes
2955 ** sqlite3_prepare_v2() to reprepare a statement after a schema change.
2956 */
2957 SQLITE_API int sqlite3_set_authorizer(
2958 sqlite3*,
2959 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
2960 void *pUserData
2961 );
2962
@@ -3060,13 +3060,13 @@
3060 ** digits in the time are meaningless. Future versions of SQLite
3061 ** might provide greater resolution on the profiler callback. The
3062 ** sqlite3_profile() function is considered experimental and is
3063 ** subject to change in future versions of SQLite.
3064 */
3065 SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,
3066 void(*xTrace)(void*,const char*), void*);
3067 SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
3068 void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
3069
3070 /*
3071 ** CAPI3REF: SQL Trace Event Codes
3072 ** KEYWORDS: SQLITE_TRACE
@@ -3151,11 +3151,11 @@
3151 **
3152 ** The sqlite3_trace_v2() interface is intended to replace the legacy
3153 ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
3154 ** are deprecated.
3155 */
3156 SQLITE_API int sqlite3_trace_v2(
3157 sqlite3*,
3158 unsigned uMask,
3159 int(*xCallback)(unsigned,void*,void*,void*),
3160 void *pCtx
3161 );
@@ -3190,11 +3190,11 @@
3190 ** the database connection that invoked the progress handler.
3191 ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
3192 ** database connections for the meaning of "modify" in this paragraph.
3193 **
3194 */
3195 SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
3196
3197 /*
3198 ** CAPI3REF: Opening A New Database Connection
3199 ** CONSTRUCTOR: sqlite3
3200 **
@@ -3419,19 +3419,19 @@
3419 ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
3420 ** features that require the use of temporary files may fail.
3421 **
3422 ** See also: [sqlite3_temp_directory]
3423 */
3424 SQLITE_API int sqlite3_open(
3425 const char *filename, /* Database filename (UTF-8) */
3426 sqlite3 **ppDb /* OUT: SQLite db handle */
3427 );
3428 SQLITE_API int sqlite3_open16(
3429 const void *filename, /* Database filename (UTF-16) */
3430 sqlite3 **ppDb /* OUT: SQLite db handle */
3431 );
3432 SQLITE_API int sqlite3_open_v2(
3433 const char *filename, /* Database filename (UTF-8) */
3434 sqlite3 **ppDb, /* OUT: SQLite db handle */
3435 int flags, /* Flags */
3436 const char *zVfs /* Name of VFS module to use */
3437 );
@@ -3473,13 +3473,13 @@
3473 ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and
3474 ** is not a database file pathname pointer that SQLite passed into the xOpen
3475 ** VFS method, then the behavior of this routine is undefined and probably
3476 ** undesirable.
3477 */
3478 SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3479 SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3480 SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
3481
3482
3483 /*
3484 ** CAPI3REF: Error Codes And Messages
3485 ** METHOD: sqlite3
@@ -3519,15 +3519,15 @@
3519 **
3520 ** If an interface fails with SQLITE_MISUSE, that means the interface
3521 ** was invoked incorrectly by the application. In that case, the
3522 ** error code and message may or may not be set.
3523 */
3524 SQLITE_API int sqlite3_errcode(sqlite3 *db);
3525 SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
3526 SQLITE_API const char *sqlite3_errmsg(sqlite3*);
3527 SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
3528 SQLITE_API const char *sqlite3_errstr(int);
3529
3530 /*
3531 ** CAPI3REF: Prepared Statement Object
3532 ** KEYWORDS: {prepared statement} {prepared statements}
3533 **
@@ -3591,11 +3591,11 @@
3591 ** created by an untrusted script can be contained using the
3592 ** [max_page_count] [PRAGMA].
3593 **
3594 ** New run-time limit categories may be added in future releases.
3595 */
3596 SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
3597
3598 /*
3599 ** CAPI3REF: Run-Time Limit Categories
3600 ** KEYWORDS: {limit category} {*limit categories}
3601 **
@@ -3743,32 +3743,32 @@
3743 ** or [GLOB] operator or if the parameter is compared to an indexed column
3744 ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
3745 ** </li>
3746 ** </ol>
3747 */
3748 SQLITE_API int sqlite3_prepare(
3749 sqlite3 *db, /* Database handle */
3750 const char *zSql, /* SQL statement, UTF-8 encoded */
3751 int nByte, /* Maximum length of zSql in bytes. */
3752 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3753 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3754 );
3755 SQLITE_API int sqlite3_prepare_v2(
3756 sqlite3 *db, /* Database handle */
3757 const char *zSql, /* SQL statement, UTF-8 encoded */
3758 int nByte, /* Maximum length of zSql in bytes. */
3759 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3760 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3761 );
3762 SQLITE_API int sqlite3_prepare16(
3763 sqlite3 *db, /* Database handle */
3764 const void *zSql, /* SQL statement, UTF-16 encoded */
3765 int nByte, /* Maximum length of zSql in bytes. */
3766 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3767 const void **pzTail /* OUT: Pointer to unused portion of zSql */
3768 );
3769 SQLITE_API int sqlite3_prepare16_v2(
3770 sqlite3 *db, /* Database handle */
3771 const void *zSql, /* SQL statement, UTF-16 encoded */
3772 int nByte, /* Maximum length of zSql in bytes. */
3773 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3774 const void **pzTail /* OUT: Pointer to unused portion of zSql */
@@ -3803,12 +3803,12 @@
3803 ** automatically freed when the prepared statement is finalized.
3804 ** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
3805 ** is obtained from [sqlite3_malloc()] and must be free by the application
3806 ** by passing it to [sqlite3_free()].
3807 */
3808 SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
3809 SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt);
3810
3811 /*
3812 ** CAPI3REF: Determine If An SQL Statement Writes The Database
3813 ** METHOD: sqlite3_stmt
3814 **
@@ -3836,11 +3836,11 @@
3836 ** database. ^The [ATTACH] and [DETACH] statements also cause
3837 ** sqlite3_stmt_readonly() to return true since, while those statements
3838 ** change the configuration of a database connection, they do not make
3839 ** changes to the content of the database files on disk.
3840 */
3841 SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
3842
3843 /*
3844 ** CAPI3REF: Determine If A Prepared Statement Has Been Reset
3845 ** METHOD: sqlite3_stmt
3846 **
@@ -3857,11 +3857,11 @@
3857 ** to locate all prepared statements associated with a database
3858 ** connection that are in need of being reset. This can be used,
3859 ** for example, in diagnostic routines to search for prepared
3860 ** statements that are holding a transaction open.
3861 */
3862 SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
3863
3864 /*
3865 ** CAPI3REF: Dynamically Typed Value Object
3866 ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
3867 **
@@ -4021,24 +4021,24 @@
4021 ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
4022 **
4023 ** See also: [sqlite3_bind_parameter_count()],
4024 ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
4025 */
4026 SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
4027 SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
4028 void(*)(void*));
4029 SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
4030 SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
4031 SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
4032 SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
4033 SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
4034 SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
4035 SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
4036 void(*)(void*), unsigned char encoding);
4037 SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
4038 SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
4039 SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
4040
4041 /*
4042 ** CAPI3REF: Number Of SQL Parameters
4043 ** METHOD: sqlite3_stmt
4044 **
@@ -4055,11 +4055,11 @@
4055 **
4056 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
4057 ** [sqlite3_bind_parameter_name()], and
4058 ** [sqlite3_bind_parameter_index()].
4059 */
4060 SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
4061
4062 /*
4063 ** CAPI3REF: Name Of A Host Parameter
4064 ** METHOD: sqlite3_stmt
4065 **
@@ -4083,11 +4083,11 @@
4083 **
4084 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
4085 ** [sqlite3_bind_parameter_count()], and
4086 ** [sqlite3_bind_parameter_index()].
4087 */
4088 SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
4089
4090 /*
4091 ** CAPI3REF: Index Of A Parameter With A Given Name
4092 ** METHOD: sqlite3_stmt
4093 **
@@ -4100,21 +4100,21 @@
4100 **
4101 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
4102 ** [sqlite3_bind_parameter_count()], and
4103 ** [sqlite3_bind_parameter_name()].
4104 */
4105 SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
4106
4107 /*
4108 ** CAPI3REF: Reset All Bindings On A Prepared Statement
4109 ** METHOD: sqlite3_stmt
4110 **
4111 ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
4112 ** the [sqlite3_bind_blob | bindings] on a [prepared statement].
4113 ** ^Use this routine to reset all host parameters to NULL.
4114 */
4115 SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
4116
4117 /*
4118 ** CAPI3REF: Number Of Columns In A Result Set
4119 ** METHOD: sqlite3_stmt
4120 **
@@ -4122,11 +4122,11 @@
4122 ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
4123 ** statement that does not return data (for example an [UPDATE]).
4124 **
4125 ** See also: [sqlite3_data_count()]
4126 */
4127 SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
4128
4129 /*
4130 ** CAPI3REF: Column Names In A Result Set
4131 ** METHOD: sqlite3_stmt
4132 **
@@ -4151,12 +4151,12 @@
4151 ** ^The name of a result column is the value of the "AS" clause for
4152 ** that column, if there is an AS clause. If there is no AS clause
4153 ** then the name of the column is unspecified and may change from
4154 ** one release of SQLite to the next.
4155 */
4156 SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
4157 SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
4158
4159 /*
4160 ** CAPI3REF: Source Of Data In A Query Result
4161 ** METHOD: sqlite3_stmt
4162 **
@@ -4200,16 +4200,16 @@
4200 ** If two or more threads call one or more
4201 ** [sqlite3_column_database_name | column metadata interfaces]
4202 ** for the same [prepared statement] and result column
4203 ** at the same time then the results are undefined.
4204 */
4205 SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
4206 SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
4207 SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
4208 SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
4209 SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
4210 SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
4211
4212 /*
4213 ** CAPI3REF: Declared Datatype Of A Query Result
4214 ** METHOD: sqlite3_stmt
4215 **
@@ -4237,12 +4237,12 @@
4237 ** data stored in that column is of the declared type. SQLite is
4238 ** strongly typed, but the typing is dynamic not static. ^Type
4239 ** is associated with individual values, not with the containers
4240 ** used to hold those values.
4241 */
4242 SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
4243 SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
4244
4245 /*
4246 ** CAPI3REF: Evaluate An SQL Statement
4247 ** METHOD: sqlite3_stmt
4248 **
@@ -4318,11 +4318,11 @@
4318 ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
4319 ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
4320 ** then the more specific [error codes] are returned directly
4321 ** by sqlite3_step(). The use of the "v2" interface is recommended.
4322 */
4323 SQLITE_API int sqlite3_step(sqlite3_stmt*);
4324
4325 /*
4326 ** CAPI3REF: Number of columns in a result set
4327 ** METHOD: sqlite3_stmt
4328 **
@@ -4339,11 +4339,11 @@
4339 ** where it always returns zero since each step of that multi-step
4340 ** pragma returns 0 columns of data.
4341 **
4342 ** See also: [sqlite3_column_count()]
4343 */
4344 SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
4345
4346 /*
4347 ** CAPI3REF: Fundamental Datatypes
4348 ** KEYWORDS: SQLITE_TEXT
4349 **
@@ -4529,20 +4529,20 @@
4529 ** of these routines, a default value is returned. The default value
4530 ** is either the integer 0, the floating point number 0.0, or a NULL
4531 ** pointer. Subsequent calls to [sqlite3_errcode()] will return
4532 ** [SQLITE_NOMEM].)^
4533 */
4534 SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
4535 SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4536 SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4537 SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
4538 SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
4539 SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
4540 SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
4541 SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
4542 SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
4543 SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
4544
4545 /*
4546 ** CAPI3REF: Destroy A Prepared Statement Object
4547 ** DESTRUCTOR: sqlite3_stmt
4548 **
@@ -4566,11 +4566,11 @@
4566 ** resource leaks. It is a grievous error for the application to try to use
4567 ** a prepared statement after it has been finalized. Any use of a prepared
4568 ** statement after it has been finalized can result in undefined and
4569 ** undesirable behavior such as segfaults and heap corruption.
4570 */
4571 SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
4572
4573 /*
4574 ** CAPI3REF: Reset A Prepared Statement Object
4575 ** METHOD: sqlite3_stmt
4576 **
@@ -4593,11 +4593,11 @@
4593 ** [sqlite3_reset(S)] returns an appropriate [error code].
4594 **
4595 ** ^The [sqlite3_reset(S)] interface does not change the values
4596 ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
4597 */
4598 SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
4599
4600 /*
4601 ** CAPI3REF: Create Or Redefine SQL Functions
4602 ** KEYWORDS: {function creation routines}
4603 ** KEYWORDS: {application-defined SQL function}
@@ -4693,31 +4693,31 @@
4693 ** ^An application-defined function is permitted to call other
4694 ** SQLite interfaces. However, such calls must not
4695 ** close the database connection nor finalize or reset the prepared
4696 ** statement in which the function is running.
4697 */
4698 SQLITE_API int sqlite3_create_function(
4699 sqlite3 *db,
4700 const char *zFunctionName,
4701 int nArg,
4702 int eTextRep,
4703 void *pApp,
4704 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4705 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4706 void (*xFinal)(sqlite3_context*)
4707 );
4708 SQLITE_API int sqlite3_create_function16(
4709 sqlite3 *db,
4710 const void *zFunctionName,
4711 int nArg,
4712 int eTextRep,
4713 void *pApp,
4714 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4715 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4716 void (*xFinal)(sqlite3_context*)
4717 );
4718 SQLITE_API int sqlite3_create_function_v2(
4719 sqlite3 *db,
4720 const char *zFunctionName,
4721 int nArg,
4722 int eTextRep,
4723 void *pApp,
@@ -4759,16 +4759,16 @@
4759 ** to be supported. However, new applications should avoid
4760 ** the use of these functions. To encourage programmers to avoid
4761 ** these functions, we will not explain what they do.
4762 */
4763 #ifndef SQLITE_OMIT_DEPRECATED
4764 SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
4765 SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
4766 SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4767 SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
4768 SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
4769 SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
4770 void*,sqlite3_int64);
4771 #endif
4772
4773 /*
4774 ** CAPI3REF: Obtaining SQL Values
@@ -4814,22 +4814,22 @@
4814 ** or [sqlite3_value_text16()].
4815 **
4816 ** These routines must be called from the same thread as
4817 ** the SQL function that supplied the [sqlite3_value*] parameters.
4818 */
4819 SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
4820 SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
4821 SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
4822 SQLITE_API double sqlite3_value_double(sqlite3_value*);
4823 SQLITE_API int sqlite3_value_int(sqlite3_value*);
4824 SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
4825 SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
4826 SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
4827 SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
4828 SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
4829 SQLITE_API int sqlite3_value_type(sqlite3_value*);
4830 SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
4831
4832 /*
4833 ** CAPI3REF: Finding The Subtype Of SQL Values
4834 ** METHOD: sqlite3_value
4835 **
@@ -4841,11 +4841,11 @@
4841 **
4842 ** SQLite makes no use of subtype itself. It merely passes the subtype
4843 ** from the result of one [application-defined SQL function] into the
4844 ** input of another.
4845 */
4846 SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
4847
4848 /*
4849 ** CAPI3REF: Copy And Free SQL Values
4850 ** METHOD: sqlite3_value
4851 **
@@ -4857,12 +4857,12 @@
4857 **
4858 ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
4859 ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
4860 ** then sqlite3_value_free(V) is a harmless no-op.
4861 */
4862 SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*);
4863 SQLITE_API void sqlite3_value_free(sqlite3_value*);
4864
4865 /*
4866 ** CAPI3REF: Obtain Aggregate Function Context
4867 ** METHOD: sqlite3_context
4868 **
@@ -4903,11 +4903,11 @@
4903 ** function.
4904 **
4905 ** This routine must be called from the same thread in which
4906 ** the aggregate SQL function is running.
4907 */
4908 SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
4909
4910 /*
4911 ** CAPI3REF: User Data For Functions
4912 ** METHOD: sqlite3_context
4913 **
@@ -4918,11 +4918,11 @@
4918 ** registered the application defined function.
4919 **
4920 ** This routine must be called from the same thread in which
4921 ** the application-defined function is running.
4922 */
4923 SQLITE_API void *sqlite3_user_data(sqlite3_context*);
4924
4925 /*
4926 ** CAPI3REF: Database Connection For Functions
4927 ** METHOD: sqlite3_context
4928 **
@@ -4930,11 +4930,11 @@
4930 ** the pointer to the [database connection] (the 1st parameter)
4931 ** of the [sqlite3_create_function()]
4932 ** and [sqlite3_create_function16()] routines that originally
4933 ** registered the application defined function.
4934 */
4935 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
4936
4937 /*
4938 ** CAPI3REF: Function Auxiliary Data
4939 ** METHOD: sqlite3_context
4940 **
@@ -4984,12 +4984,12 @@
4984 ** values and [parameters] and expressions composed from the same.)^
4985 **
4986 ** These routines must be called from the same thread in which
4987 ** the SQL function is running.
4988 */
4989 SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
4990 SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
4991
4992
4993 /*
4994 ** CAPI3REF: Constants Defining Special Destructor Behavior
4995 **
@@ -5121,31 +5121,31 @@
5121 **
5122 ** If these routines are called from within the different thread
5123 ** than the one containing the application-defined function that received
5124 ** the [sqlite3_context] pointer, the results are undefined.
5125 */
5126 SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
5127 SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,
5128 sqlite3_uint64,void(*)(void*));
5129 SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
5130 SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
5131 SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
5132 SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
5133 SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
5134 SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
5135 SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
5136 SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
5137 SQLITE_API void sqlite3_result_null(sqlite3_context*);
5138 SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
5139 SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
5140 void(*)(void*), unsigned char encoding);
5141 SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
5142 SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
5143 SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
5144 SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
5145 SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
5146 SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
5147
5148
5149 /*
5150 ** CAPI3REF: Setting The Subtype Of An SQL Function
5151 ** METHOD: sqlite3_context
@@ -5156,11 +5156,11 @@
5156 ** of the subtype T are preserved in current versions of SQLite;
5157 ** higher order bits are discarded.
5158 ** The number of subtype bytes preserved by SQLite might increase
5159 ** in future releases of SQLite.
5160 */
5161 SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
5162
5163 /*
5164 ** CAPI3REF: Define New Collating Sequences
5165 ** METHOD: sqlite3
5166 **
@@ -5238,26 +5238,26 @@
5238 ** is unfortunate but cannot be changed without breaking backwards
5239 ** compatibility.
5240 **
5241 ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
5242 */
5243 SQLITE_API int sqlite3_create_collation(
5244 sqlite3*,
5245 const char *zName,
5246 int eTextRep,
5247 void *pArg,
5248 int(*xCompare)(void*,int,const void*,int,const void*)
5249 );
5250 SQLITE_API int sqlite3_create_collation_v2(
5251 sqlite3*,
5252 const char *zName,
5253 int eTextRep,
5254 void *pArg,
5255 int(*xCompare)(void*,int,const void*,int,const void*),
5256 void(*xDestroy)(void*)
5257 );
5258 SQLITE_API int sqlite3_create_collation16(
5259 sqlite3*,
5260 const void *zName,
5261 int eTextRep,
5262 void *pArg,
5263 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -5288,16 +5288,16 @@
5288 **
5289 ** The callback function should register the desired collation using
5290 ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
5291 ** [sqlite3_create_collation_v2()].
5292 */
5293 SQLITE_API int sqlite3_collation_needed(
5294 sqlite3*,
5295 void*,
5296 void(*)(void*,sqlite3*,int eTextRep,const char*)
5297 );
5298 SQLITE_API int sqlite3_collation_needed16(
5299 sqlite3*,
5300 void*,
5301 void(*)(void*,sqlite3*,int eTextRep,const void*)
5302 );
5303
@@ -5307,15 +5307,15 @@
5307 ** called right after sqlite3_open().
5308 **
5309 ** The code to implement this API is not available in the public release
5310 ** of SQLite.
5311 */
5312 SQLITE_API int sqlite3_key(
5313 sqlite3 *db, /* Database to be rekeyed */
5314 const void *pKey, int nKey /* The key */
5315 );
5316 SQLITE_API int sqlite3_key_v2(
5317 sqlite3 *db, /* Database to be rekeyed */
5318 const char *zDbName, /* Name of the database */
5319 const void *pKey, int nKey /* The key */
5320 );
5321
@@ -5325,35 +5325,35 @@
5325 ** database is decrypted.
5326 **
5327 ** The code to implement this API is not available in the public release
5328 ** of SQLite.
5329 */
5330 SQLITE_API int sqlite3_rekey(
5331 sqlite3 *db, /* Database to be rekeyed */
5332 const void *pKey, int nKey /* The new key */
5333 );
5334 SQLITE_API int sqlite3_rekey_v2(
5335 sqlite3 *db, /* Database to be rekeyed */
5336 const char *zDbName, /* Name of the database */
5337 const void *pKey, int nKey /* The new key */
5338 );
5339
5340 /*
5341 ** Specify the activation key for a SEE database. Unless
5342 ** activated, none of the SEE routines will work.
5343 */
5344 SQLITE_API void sqlite3_activate_see(
5345 const char *zPassPhrase /* Activation phrase */
5346 );
5347 #endif
5348
5349 #ifdef SQLITE_ENABLE_CEROD
5350 /*
5351 ** Specify the activation key for a CEROD database. Unless
5352 ** activated, none of the CEROD routines will work.
5353 */
5354 SQLITE_API void sqlite3_activate_cerod(
5355 const char *zPassPhrase /* Activation phrase */
5356 );
5357 #endif
5358
5359 /*
@@ -5371,11 +5371,11 @@
5371 ** method of the default [sqlite3_vfs] object. If the xSleep() method
5372 ** of the default VFS is not implemented correctly, or not implemented at
5373 ** all, then the behavior of sqlite3_sleep() may deviate from the description
5374 ** in the previous paragraphs.
5375 */
5376 SQLITE_API int sqlite3_sleep(int);
5377
5378 /*
5379 ** CAPI3REF: Name Of The Folder Holding Temporary Files
5380 **
5381 ** ^(If this global variable is made to point to a string which is
@@ -5490,11 +5490,11 @@
5490 **
5491 ** If another thread changes the autocommit status of the database
5492 ** connection while this routine is running, then the return value
5493 ** is undefined.
5494 */
5495 SQLITE_API int sqlite3_get_autocommit(sqlite3*);
5496
5497 /*
5498 ** CAPI3REF: Find The Database Handle Of A Prepared Statement
5499 ** METHOD: sqlite3_stmt
5500 **
@@ -5503,11 +5503,11 @@
5503 ** returned by sqlite3_db_handle is the same [database connection]
5504 ** that was the first argument
5505 ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
5506 ** create the statement in the first place.
5507 */
5508 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
5509
5510 /*
5511 ** CAPI3REF: Return The Filename For A Database Connection
5512 ** METHOD: sqlite3
5513 **
@@ -5520,21 +5520,21 @@
5520 ** ^The filename returned by this function is the output of the
5521 ** xFullPathname method of the [VFS]. ^In other words, the filename
5522 ** will be an absolute pathname, even if the filename used
5523 ** to open the database originally was a URI or relative pathname.
5524 */
5525 SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);
5526
5527 /*
5528 ** CAPI3REF: Determine if a database is read-only
5529 ** METHOD: sqlite3
5530 **
5531 ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N
5532 ** of connection D is read-only, 0 if it is read/write, or -1 if N is not
5533 ** the name of a database on connection D.
5534 */
5535 SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
5536
5537 /*
5538 ** CAPI3REF: Find the next prepared statement
5539 ** METHOD: sqlite3
5540 **
@@ -5546,11 +5546,11 @@
5546 **
5547 ** The [database connection] pointer D in a call to
5548 ** [sqlite3_next_stmt(D,S)] must refer to an open database
5549 ** connection and in particular must not be a NULL pointer.
5550 */
5551 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
5552
5553 /*
5554 ** CAPI3REF: Commit And Rollback Notification Callbacks
5555 ** METHOD: sqlite3
5556 **
@@ -5595,12 +5595,12 @@
5595 ** ^The rollback callback is not invoked if a transaction is
5596 ** automatically rolled back because the database connection is closed.
5597 **
5598 ** See also the [sqlite3_update_hook()] interface.
5599 */
5600 SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5601 SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5602
5603 /*
5604 ** CAPI3REF: Data Change Notification Callbacks
5605 ** METHOD: sqlite3
5606 **
@@ -5647,11 +5647,11 @@
5647 ** the first call on D.
5648 **
5649 ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
5650 ** and [sqlite3_preupdate_hook()] interfaces.
5651 */
5652 SQLITE_API void *sqlite3_update_hook(
5653 sqlite3*,
5654 void(*)(void *,int ,char const *,char const *,sqlite3_int64),
5655 void*
5656 );
5657
@@ -5687,11 +5687,11 @@
5687 ** This interface is threadsafe on processors where writing a
5688 ** 32-bit integer is atomic.
5689 **
5690 ** See Also: [SQLite Shared-Cache Mode]
5691 */
5692 SQLITE_API int sqlite3_enable_shared_cache(int);
5693
5694 /*
5695 ** CAPI3REF: Attempt To Free Heap Memory
5696 **
5697 ** ^The sqlite3_release_memory() interface attempts to free N bytes
@@ -5703,11 +5703,11 @@
5703 ** ^The sqlite3_release_memory() routine is a no-op returning zero
5704 ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5705 **
5706 ** See also: [sqlite3_db_release_memory()]
5707 */
5708 SQLITE_API int sqlite3_release_memory(int);
5709
5710 /*
5711 ** CAPI3REF: Free Memory Used By A Database Connection
5712 ** METHOD: sqlite3
5713 **
@@ -5717,11 +5717,11 @@
5717 ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is
5718 ** omitted.
5719 **
5720 ** See also: [sqlite3_release_memory()]
5721 */
5722 SQLITE_API int sqlite3_db_release_memory(sqlite3*);
5723
5724 /*
5725 ** CAPI3REF: Impose A Limit On Heap Size
5726 **
5727 ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
@@ -5769,11 +5769,11 @@
5769 ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5770 **
5771 ** The circumstances under which SQLite will enforce the soft heap limit may
5772 ** changes in future releases of SQLite.
5773 */
5774 SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
5775
5776 /*
5777 ** CAPI3REF: Deprecated Soft Heap Limit Interface
5778 ** DEPRECATED
5779 **
@@ -5780,11 +5780,11 @@
5780 ** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
5781 ** interface. This routine is provided for historical compatibility
5782 ** only. All new applications should use the
5783 ** [sqlite3_soft_heap_limit64()] interface rather than this one.
5784 */
5785 SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
5786
5787
5788 /*
5789 ** CAPI3REF: Extract Metadata About A Column Of A Table
5790 ** METHOD: sqlite3
@@ -5850,11 +5850,11 @@
5850 **
5851 ** ^This function causes all database schemas to be read from disk and
5852 ** parsed, if that has not already been done, and returns an error if
5853 ** any errors are encountered while loading the schema.
5854 */
5855 SQLITE_API int sqlite3_table_column_metadata(
5856 sqlite3 *db, /* Connection handle */
5857 const char *zDbName, /* Database name or NULL */
5858 const char *zTableName, /* Table name */
5859 const char *zColumnName, /* Column name */
5860 char const **pzDataType, /* OUTPUT: Declared data type */
@@ -5906,11 +5906,11 @@
5906 ** disabled and prevent SQL injections from giving attackers
5907 ** access to extension loading capabilities.
5908 **
5909 ** See also the [load_extension() SQL function].
5910 */
5911 SQLITE_API int sqlite3_load_extension(
5912 sqlite3 *db, /* Load the extension into this database connection */
5913 const char *zFile, /* Name of the shared library containing extension */
5914 const char *zProc, /* Entry point. Derived from zFile if 0 */
5915 char **pzErrMsg /* Put error message here if not 0 */
5916 );
@@ -5938,11 +5938,11 @@
5938 ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
5939 ** rather than this interface, so the [load_extension()] SQL function
5940 ** remains disabled. This will prevent SQL injections from giving attackers
5941 ** access to extension loading capabilities.
5942 */
5943 SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5944
5945 /*
5946 ** CAPI3REF: Automatically Load Statically Linked Extensions
5947 **
5948 ** ^This interface causes the xEntryPoint() function to be invoked for
@@ -5976,11 +5976,11 @@
5976 ** will be called more than once for each database connection that is opened.
5977 **
5978 ** See also: [sqlite3_reset_auto_extension()]
5979 ** and [sqlite3_cancel_auto_extension()]
5980 */
5981 SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
5982
5983 /*
5984 ** CAPI3REF: Cancel Automatic Extension Loading
5985 **
5986 ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the
@@ -5988,19 +5988,19 @@
5988 ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)]
5989 ** routine returns 1 if initialization routine X was successfully
5990 ** unregistered and it returns 0 if X was not on the list of initialization
5991 ** routines.
5992 */
5993 SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
5994
5995 /*
5996 ** CAPI3REF: Reset Automatic Extension Loading
5997 **
5998 ** ^This interface disables all automatic extensions previously
5999 ** registered using [sqlite3_auto_extension()].
6000 */
6001 SQLITE_API void sqlite3_reset_auto_extension(void);
6002
6003 /*
6004 ** The interface to the virtual-table mechanism is currently considered
6005 ** to be experimental. The interface might change in incompatible ways.
6006 ** If this is a problem for you, do not use the interface at this time.
@@ -6241,17 +6241,17 @@
6241 ** be invoked if the call to sqlite3_create_module_v2() fails.
6242 ** ^The sqlite3_create_module()
6243 ** interface is equivalent to sqlite3_create_module_v2() with a NULL
6244 ** destructor.
6245 */
6246 SQLITE_API int sqlite3_create_module(
6247 sqlite3 *db, /* SQLite connection to register module with */
6248 const char *zName, /* Name of the module */
6249 const sqlite3_module *p, /* Methods for the module */
6250 void *pClientData /* Client data for xCreate/xConnect */
6251 );
6252 SQLITE_API int sqlite3_create_module_v2(
6253 sqlite3 *db, /* SQLite connection to register module with */
6254 const char *zName, /* Name of the module */
6255 const sqlite3_module *p, /* Methods for the module */
6256 void *pClientData, /* Client data for xCreate/xConnect */
6257 void(*xDestroy)(void*) /* Module destructor function */
@@ -6310,11 +6310,11 @@
6310 ** ^The [xCreate] and [xConnect] methods of a
6311 ** [virtual table module] call this interface
6312 ** to declare the format (the names and datatypes of the columns) of
6313 ** the virtual tables they implement.
6314 */
6315 SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
6316
6317 /*
6318 ** CAPI3REF: Overload A Function For A Virtual Table
6319 ** METHOD: sqlite3
6320 **
@@ -6329,11 +6329,11 @@
6329 ** of the new function always causes an exception to be thrown. So
6330 ** the new function is not good for anything by itself. Its only
6331 ** purpose is to be a placeholder function that can be overloaded
6332 ** by a [virtual table].
6333 */
6334 SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
6335
6336 /*
6337 ** The interface to the virtual-table mechanism defined above (back up
6338 ** to a comment remarkably similar to this one) is currently considered
6339 ** to be experimental. The interface might change in incompatible ways.
@@ -6428,11 +6428,11 @@
6428 ** zero-filled blob to read or write using the incremental-blob interface.
6429 **
6430 ** To avoid a resource leak, every open [BLOB handle] should eventually
6431 ** be released by a call to [sqlite3_blob_close()].
6432 */
6433 SQLITE_API int sqlite3_blob_open(
6434 sqlite3*,
6435 const char *zDb,
6436 const char *zTable,
6437 const char *zColumn,
6438 sqlite3_int64 iRow,
@@ -6461,11 +6461,11 @@
6461 ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
6462 ** always returns zero.
6463 **
6464 ** ^This function sets the database handle error code and message.
6465 */
6466 SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
6467
6468 /*
6469 ** CAPI3REF: Close A BLOB Handle
6470 ** DESTRUCTOR: sqlite3_blob
6471 **
@@ -6484,11 +6484,11 @@
6484 ** with a null pointer (such as would be returned by a failed call to
6485 ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
6486 ** is passed a valid open blob handle, the values returned by the
6487 ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
6488 */
6489 SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
6490
6491 /*
6492 ** CAPI3REF: Return The Size Of An Open BLOB
6493 ** METHOD: sqlite3_blob
6494 **
@@ -6500,11 +6500,11 @@
6500 ** This routine only works on a [BLOB handle] which has been created
6501 ** by a prior successful call to [sqlite3_blob_open()] and which has not
6502 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6503 ** to this routine results in undefined and probably undesirable behavior.
6504 */
6505 SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
6506
6507 /*
6508 ** CAPI3REF: Read Data From A BLOB Incrementally
6509 ** METHOD: sqlite3_blob
6510 **
@@ -6529,11 +6529,11 @@
6529 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6530 ** to this routine results in undefined and probably undesirable behavior.
6531 **
6532 ** See also: [sqlite3_blob_write()].
6533 */
6534 SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
6535
6536 /*
6537 ** CAPI3REF: Write Data Into A BLOB Incrementally
6538 ** METHOD: sqlite3_blob
6539 **
@@ -6571,11 +6571,11 @@
6571 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6572 ** to this routine results in undefined and probably undesirable behavior.
6573 **
6574 ** See also: [sqlite3_blob_read()].
6575 */
6576 SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
6577
6578 /*
6579 ** CAPI3REF: Virtual File System Objects
6580 **
6581 ** A virtual filesystem (VFS) is an [sqlite3_vfs] object
@@ -6602,13 +6602,13 @@
6602 **
6603 ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
6604 ** ^(If the default VFS is unregistered, another VFS is chosen as
6605 ** the default. The choice for the new VFS is arbitrary.)^
6606 */
6607 SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
6608 SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6609 SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
6610
6611 /*
6612 ** CAPI3REF: Mutexes
6613 **
6614 ** The SQLite core uses these routines for thread
@@ -6720,15 +6720,15 @@
6720 ** sqlite3_mutex_leave() is a NULL pointer, then all three routines
6721 ** behave as no-ops.
6722 **
6723 ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
6724 */
6725 SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
6726 SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
6727 SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
6728 SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
6729 SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
6730
6731 /*
6732 ** CAPI3REF: Mutex Methods Object
6733 **
6734 ** An instance of this structure defines the low-level routines
@@ -6834,12 +6834,12 @@
6834 ** call to sqlite3_mutex_held() to fail, so a non-zero return is
6835 ** the appropriate thing to do. The sqlite3_mutex_notheld()
6836 ** interface should also return 1 when given a NULL pointer.
6837 */
6838 #ifndef NDEBUG
6839 SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
6840 SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
6841 #endif
6842
6843 /*
6844 ** CAPI3REF: Mutex Types
6845 **
@@ -6875,11 +6875,11 @@
6875 ** serializes access to the [database connection] given in the argument
6876 ** when the [threading mode] is Serialized.
6877 ** ^If the [threading mode] is Single-thread or Multi-thread then this
6878 ** routine returns a NULL pointer.
6879 */
6880 SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
6881
6882 /*
6883 ** CAPI3REF: Low-Level Control Of Database Files
6884 ** METHOD: sqlite3
6885 **
@@ -6910,11 +6910,11 @@
6910 ** an incorrect zDbName and an SQLITE_ERROR return from the underlying
6911 ** xFileControl method.
6912 **
6913 ** See also: [SQLITE_FCNTL_LOCKSTATE]
6914 */
6915 SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6916
6917 /*
6918 ** CAPI3REF: Testing Interface
6919 **
6920 ** ^The sqlite3_test_control() interface is used to read out internal
@@ -6929,11 +6929,11 @@
6929 ** The details of the operation codes, their meanings, the parameters
6930 ** they take, and what they do are all subject to change without notice.
6931 ** Unlike most of the SQLite API, this function is not guaranteed to
6932 ** operate consistently from one release to the next.
6933 */
6934 SQLITE_API int sqlite3_test_control(int op, ...);
6935
6936 /*
6937 ** CAPI3REF: Testing Interface Operation Codes
6938 **
6939 ** These constants are the valid operation code parameters used
@@ -6992,12 +6992,12 @@
6992 ** be represented by a 32-bit integer, then the values returned by
6993 ** sqlite3_status() are undefined.
6994 **
6995 ** See also: [sqlite3_db_status()]
6996 */
6997 SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6998 SQLITE_API int sqlite3_status64(
6999 int op,
7000 sqlite3_int64 *pCurrent,
7001 sqlite3_int64 *pHighwater,
7002 int resetFlag
7003 );
@@ -7118,11 +7118,11 @@
7118 ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
7119 ** non-zero [error code] on failure.
7120 **
7121 ** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
7122 */
7123 SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
7124
7125 /*
7126 ** CAPI3REF: Status Parameters for database connections
7127 ** KEYWORDS: {SQLITE_DBSTATUS options}
7128 **
@@ -7261,11 +7261,11 @@
7261 ** ^If the resetFlg is true, then the counter is reset to zero after this
7262 ** interface call returns.
7263 **
7264 ** See also: [sqlite3_status()] and [sqlite3_db_status()].
7265 */
7266 SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
7267
7268 /*
7269 ** CAPI3REF: Status Parameters for prepared statements
7270 ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters}
7271 **
@@ -7730,20 +7730,20 @@
7730 ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
7731 ** APIs are not strictly speaking threadsafe. If they are invoked at the
7732 ** same time as another thread is invoking sqlite3_backup_step() it is
7733 ** possible that they return invalid values.
7734 */
7735 SQLITE_API sqlite3_backup *sqlite3_backup_init(
7736 sqlite3 *pDest, /* Destination database handle */
7737 const char *zDestName, /* Destination database name */
7738 sqlite3 *pSource, /* Source database handle */
7739 const char *zSourceName /* Source database name */
7740 );
7741 SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
7742 SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
7743 SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);
7744 SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
7745
7746 /*
7747 ** CAPI3REF: Unlock Notification
7748 ** METHOD: sqlite3
7749 **
@@ -7856,11 +7856,11 @@
7856 ** by an sqlite3_step() call. ^(If there is a blocking connection, then the
7857 ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
7858 ** the special "DROP TABLE/INDEX" case, the extended error code is just
7859 ** SQLITE_LOCKED.)^
7860 */
7861 SQLITE_API int sqlite3_unlock_notify(
7862 sqlite3 *pBlocked, /* Waiting connection */
7863 void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
7864 void *pNotifyArg /* Argument to pass to xNotify */
7865 );
7866
@@ -7871,12 +7871,12 @@
7871 ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications
7872 ** and extensions to compare the contents of two buffers containing UTF-8
7873 ** strings in a case-independent fashion, using the same definition of "case
7874 ** independence" that SQLite uses internally when comparing identifiers.
7875 */
7876 SQLITE_API int sqlite3_stricmp(const char *, const char *);
7877 SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
7878
7879 /*
7880 ** CAPI3REF: String Globbing
7881 *
7882 ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if
@@ -7889,11 +7889,11 @@
7889 ** Note that this routine returns zero on a match and non-zero if the strings
7890 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7891 **
7892 ** See also: [sqlite3_strlike()].
7893 */
7894 SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
7895
7896 /*
7897 ** CAPI3REF: String LIKE Matching
7898 *
7899 ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if
@@ -7912,11 +7912,11 @@
7912 ** Note that this routine returns zero on a match and non-zero if the strings
7913 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7914 **
7915 ** See also: [sqlite3_strglob()].
7916 */
7917 SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
7918
7919 /*
7920 ** CAPI3REF: Error Logging Interface
7921 **
7922 ** ^The [sqlite3_log()] interface writes a message into the [error log]
@@ -7935,11 +7935,11 @@
7935 ** will not use dynamically allocated memory. The log message is stored in
7936 ** a fixed-length buffer on the stack. If the log message is longer than
7937 ** a few hundred characters, it will be truncated to the length of the
7938 ** buffer.
7939 */
7940 SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
7941
7942 /*
7943 ** CAPI3REF: Write-Ahead Log Commit Hook
7944 ** METHOD: sqlite3
7945 **
@@ -7971,11 +7971,11 @@
7971 ** previously registered write-ahead log callback. ^Note that the
7972 ** [sqlite3_wal_autocheckpoint()] interface and the
7973 ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
7974 ** overwrite any prior [sqlite3_wal_hook()] settings.
7975 */
7976 SQLITE_API void *sqlite3_wal_hook(
7977 sqlite3*,
7978 int(*)(void *,sqlite3*,const char*,int),
7979 void*
7980 );
7981
@@ -8006,11 +8006,11 @@
8006 ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
8007 ** pages. The use of this interface
8008 ** is only necessary if the default setting is found to be suboptimal
8009 ** for a particular application.
8010 */
8011 SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
8012
8013 /*
8014 ** CAPI3REF: Checkpoint a database
8015 ** METHOD: sqlite3
8016 **
@@ -8028,11 +8028,11 @@
8028 ** interface was added. This interface is retained for backwards
8029 ** compatibility and as a convenience for applications that need to manually
8030 ** start a callback but which do not need the full power (and corresponding
8031 ** complication) of [sqlite3_wal_checkpoint_v2()].
8032 */
8033 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
8034
8035 /*
8036 ** CAPI3REF: Checkpoint a database
8037 ** METHOD: sqlite3
8038 **
@@ -8122,11 +8122,11 @@
8122 ** [sqlite3_errcode()] and [sqlite3_errmsg()].
8123 **
8124 ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
8125 ** from SQL.
8126 */
8127 SQLITE_API int sqlite3_wal_checkpoint_v2(
8128 sqlite3 *db, /* Database handle */
8129 const char *zDb, /* Name of attached database (or NULL) */
8130 int eMode, /* SQLITE_CHECKPOINT_* value */
8131 int *pnLog, /* OUT: Size of WAL log in frames */
8132 int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -8158,11 +8158,11 @@
8158 **
8159 ** At present, there is only one option that may be configured using
8160 ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
8161 ** may be added in the future.
8162 */
8163 SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
8164
8165 /*
8166 ** CAPI3REF: Virtual Table Configuration Options
8167 **
8168 ** These macros define the various options to the
@@ -8211,11 +8211,11 @@
8211 ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],
8212 ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode
8213 ** of the SQL statement that triggered the call to the [xUpdate] method of the
8214 ** [virtual table].
8215 */
8216 SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
8217
8218 /*
8219 ** CAPI3REF: Conflict resolution modes
8220 ** KEYWORDS: {conflict resolution mode}
8221 **
@@ -8316,11 +8316,11 @@
8316 ** as if the loop did not exist - it returns non-zero and leave the variable
8317 ** that pOut points to unchanged.
8318 **
8319 ** See also: [sqlite3_stmt_scanstatus_reset()]
8320 */
8321 SQLITE_API int sqlite3_stmt_scanstatus(
8322 sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
8323 int idx, /* Index of loop to report on */
8324 int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
8325 void *pOut /* Result written here */
8326 );
@@ -8332,11 +8332,11 @@
8332 ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
8333 **
8334 ** This API is only available if the library is built with pre-processor
8335 ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
8336 */
8337 SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
8338
8339 /*
8340 ** CAPI3REF: Flush caches to disk mid-transaction
8341 **
8342 ** ^If a write-transaction is open on [database connection] D when the
@@ -8364,11 +8364,11 @@
8364 ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.
8365 **
8366 ** ^This function does not set the database handle error code or message
8367 ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
8368 */
8369 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
8370
8371 /*
8372 ** CAPI3REF: The pre-update hook.
8373 **
8374 ** ^These interfaces are only available if SQLite is compiled using the
@@ -8444,11 +8444,11 @@
8444 ** triggers; or 2 for changes resulting from triggers called by top-level
8445 ** triggers; and so forth.
8446 **
8447 ** See also: [sqlite3_update_hook()]
8448 */
8449 SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook(
8450 sqlite3 *db,
8451 void(*xPreUpdate)(
8452 void *pCtx, /* Copy of third arg to preupdate_hook() */
8453 sqlite3 *db, /* Database handle */
8454 int op, /* SQLITE_UPDATE, DELETE or INSERT */
@@ -8457,14 +8457,14 @@
8457 sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
8458 sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
8459 ),
8460 void*
8461 );
8462 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8463 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_count(sqlite3 *);
8464 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_depth(sqlite3 *);
8465 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
8466
8467 /*
8468 ** CAPI3REF: Low-level system error code
8469 **
8470 ** ^Attempt to return the underlying operating system error code or error
@@ -8472,11 +8472,11 @@
8472 ** The return value is OS-dependent. For example, on unix systems, after
8473 ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
8474 ** called to get back the underlying "errno" that caused the problem, such
8475 ** as ENOSPC, EAUTH, EISDIR, and so forth.
8476 */
8477 SQLITE_API int sqlite3_system_errno(sqlite3*);
8478
8479 /*
8480 ** CAPI3REF: Database Snapshot
8481 ** KEYWORDS: {snapshot}
8482 ** EXPERIMENTAL
@@ -8522,11 +8522,11 @@
8522 ** to avoid a memory leak.
8523 **
8524 ** The [sqlite3_snapshot_get()] interface is only available when the
8525 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8526 */
8527 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
8528 sqlite3 *db,
8529 const char *zSchema,
8530 sqlite3_snapshot **ppSnapshot
8531 );
8532
@@ -8560,11 +8560,11 @@
8560 ** database connection in order to make it ready to use snapshots.)
8561 **
8562 ** The [sqlite3_snapshot_open()] interface is only available when the
8563 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8564 */
8565 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
8566 sqlite3 *db,
8567 const char *zSchema,
8568 sqlite3_snapshot *pSnapshot
8569 );
8570
@@ -8577,11 +8577,11 @@
8577 ** using this routine to avoid a memory leak.
8578 **
8579 ** The [sqlite3_snapshot_free()] interface is only available when the
8580 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8581 */
8582 SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
8583
8584 /*
8585 ** CAPI3REF: Compare the ages of two snapshot handles.
8586 ** EXPERIMENTAL
8587 **
@@ -8601,11 +8601,11 @@
8601 **
8602 ** Otherwise, this API returns a negative value if P1 refers to an older
8603 ** snapshot than P2, zero if the two handles refer to the same database
8604 ** snapshot, and a positive value if P1 is a newer snapshot than P2.
8605 */
8606 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
8607 sqlite3_snapshot *p1,
8608 sqlite3_snapshot *p2
8609 );
8610
8611 /*
@@ -8659,11 +8659,11 @@
8659 ** Register a geometry callback named zGeom that can be used as part of an
8660 ** R-Tree geometry query as follows:
8661 **
8662 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
8663 */
8664 SQLITE_API int sqlite3_rtree_geometry_callback(
8665 sqlite3 *db,
8666 const char *zGeom,
8667 int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
8668 void *pContext
8669 );
@@ -8685,11 +8685,11 @@
8685 ** Register a 2nd-generation geometry callback named zScore that can be
8686 ** used as part of an R-Tree geometry query as follows:
8687 **
8688 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
8689 */
8690 SQLITE_API int sqlite3_rtree_query_callback(
8691 sqlite3 *db,
8692 const char *zQueryFunc,
8693 int (*xQueryFunc)(sqlite3_rtree_query_info*),
8694 void *pContext,
8695 void (*xDestructor)(void*)
@@ -11900,12 +11900,12 @@
11900 */
11901 #ifdef SQLITE_OMIT_WSD
11902 #define SQLITE_WSD const
11903 #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v)))
11904 #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config)
11905 SQLITE_API int sqlite3_wsd_init(int N, int J);
11906 SQLITE_API void *sqlite3_wsd_find(void *K, int L);
11907 #else
11908 #define SQLITE_WSD
11909 #define GLOBAL(t,v) v
11910 #define sqlite3GlobalConfig sqlite3Config
11911 #endif
@@ -12559,16 +12559,16 @@
12559 #define OP_Found 31 /* synopsis: key=r[P3@P4] */
12560 #define OP_SeekRowid 32 /* synopsis: intkey=r[P3] */
12561 #define OP_NotExists 33 /* synopsis: intkey=r[P3] */
12562 #define OP_IsNull 34 /* same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
12563 #define OP_NotNull 35 /* same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
12564 #define OP_Ne 36 /* same as TK_NE, synopsis: IF r[P3]!=r[P1] */
12565 #define OP_Eq 37 /* same as TK_EQ, synopsis: IF r[P3]==r[P1] */
12566 #define OP_Gt 38 /* same as TK_GT, synopsis: IF r[P3]>r[P1] */
12567 #define OP_Le 39 /* same as TK_LE, synopsis: IF r[P3]<=r[P1] */
12568 #define OP_Lt 40 /* same as TK_LT, synopsis: IF r[P3]<r[P1] */
12569 #define OP_Ge 41 /* same as TK_GE, synopsis: IF r[P3]>=r[P1] */
12570 #define OP_Last 42
12571 #define OP_BitAnd 43 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
12572 #define OP_BitOr 44 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
12573 #define OP_ShiftLeft 45 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */
12574 #define OP_ShiftRight 46 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */
@@ -17561,11 +17561,11 @@
17561 ** was used and false if not.
17562 **
17563 ** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix
17564 ** is not required for a match.
17565 */
17566 SQLITE_API int sqlite3_compileoption_used(const char *zOptName){
17567 int i, n;
17568
17569 #if SQLITE_ENABLE_API_ARMOR
17570 if( zOptName==0 ){
17571 (void)SQLITE_MISUSE_BKPT;
@@ -17589,11 +17589,11 @@
17589
17590 /*
17591 ** Return the N-th compile-time option string. If N is out of range,
17592 ** return a NULL pointer.
17593 */
17594 SQLITE_API const char *sqlite3_compileoption_get(int N){
17595 if( N>=0 && N<ArraySize(azCompileOpt) ){
17596 return azCompileOpt[N];
17597 }
17598 return 0;
17599 }
@@ -18299,11 +18299,11 @@
18299 }
18300
18301 /*
18302 ** Query status information.
18303 */
18304 SQLITE_API int sqlite3_status64(
18305 int op,
18306 sqlite3_int64 *pCurrent,
18307 sqlite3_int64 *pHighwater,
18308 int resetFlag
18309 ){
@@ -18324,11 +18324,11 @@
18324 }
18325 sqlite3_mutex_leave(pMutex);
18326 (void)pMutex; /* Prevent warning when SQLITE_THREADSAFE=0 */
18327 return SQLITE_OK;
18328 }
18329 SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){
18330 sqlite3_int64 iCur = 0, iHwtr = 0;
18331 int rc;
18332 #ifdef SQLITE_ENABLE_API_ARMOR
18333 if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT;
18334 #endif
@@ -18341,11 +18341,11 @@
18341 }
18342
18343 /*
18344 ** Query status information for a single database connection
18345 */
18346 SQLITE_API int sqlite3_db_status(
18347 sqlite3 *db, /* The database connection whose status is desired */
18348 int op, /* Status verb */
18349 int *pCurrent, /* Write current value here */
18350 int *pHighwater, /* Write high-water mark here */
18351 int resetFlag /* Reset high-water mark if true */
@@ -20018,11 +20018,11 @@
20018
20019 /*
20020 ** Locate a VFS by name. If no name is given, simply return the
20021 ** first VFS on the list.
20022 */
20023 SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){
20024 sqlite3_vfs *pVfs = 0;
20025 #if SQLITE_THREADSAFE
20026 sqlite3_mutex *mutex;
20027 #endif
20028 #ifndef SQLITE_OMIT_AUTOINIT
@@ -20064,11 +20064,11 @@
20064 /*
20065 ** Register a VFS with the system. It is harmless to register the same
20066 ** VFS multiple times. The new VFS becomes the default if makeDflt is
20067 ** true.
20068 */
20069 SQLITE_API int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
20070 MUTEX_LOGIC(sqlite3_mutex *mutex;)
20071 #ifndef SQLITE_OMIT_AUTOINIT
20072 int rc = sqlite3_initialize();
20073 if( rc ) return rc;
20074 #endif
@@ -20092,11 +20092,11 @@
20092 }
20093
20094 /*
20095 ** Unregister a VFS so that it is no longer accessible.
20096 */
20097 SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
20098 #if SQLITE_THREADSAFE
20099 sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
20100 #endif
20101 sqlite3_mutex_enter(mutex);
20102 vfsUnlink(pVfs);
@@ -22443,11 +22443,11 @@
22443 }
22444
22445 /*
22446 ** Retrieve a pointer to a static mutex or allocate a new dynamic one.
22447 */
22448 SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int id){
22449 #ifndef SQLITE_OMIT_AUTOINIT
22450 if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0;
22451 if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0;
22452 #endif
22453 assert( sqlite3GlobalConfig.mutex.xMutexAlloc );
@@ -22464,11 +22464,11 @@
22464 }
22465
22466 /*
22467 ** Free a dynamic mutex.
22468 */
22469 SQLITE_API void sqlite3_mutex_free(sqlite3_mutex *p){
22470 if( p ){
22471 assert( sqlite3GlobalConfig.mutex.xMutexFree );
22472 sqlite3GlobalConfig.mutex.xMutexFree(p);
22473 }
22474 }
@@ -22475,11 +22475,11 @@
22475
22476 /*
22477 ** Obtain the mutex p. If some other thread already has the mutex, block
22478 ** until it can be obtained.
22479 */
22480 SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex *p){
22481 if( p ){
22482 assert( sqlite3GlobalConfig.mutex.xMutexEnter );
22483 sqlite3GlobalConfig.mutex.xMutexEnter(p);
22484 }
22485 }
@@ -22486,11 +22486,11 @@
22486
22487 /*
22488 ** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another
22489 ** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY.
22490 */
22491 SQLITE_API int sqlite3_mutex_try(sqlite3_mutex *p){
22492 int rc = SQLITE_OK;
22493 if( p ){
22494 assert( sqlite3GlobalConfig.mutex.xMutexTry );
22495 return sqlite3GlobalConfig.mutex.xMutexTry(p);
22496 }
@@ -22501,11 +22501,11 @@
22501 ** The sqlite3_mutex_leave() routine exits a mutex that was previously
22502 ** entered by the same thread. The behavior is undefined if the mutex
22503 ** is not currently entered. If a NULL pointer is passed as an argument
22504 ** this function is a no-op.
22505 */
22506 SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex *p){
22507 if( p ){
22508 assert( sqlite3GlobalConfig.mutex.xMutexLeave );
22509 sqlite3GlobalConfig.mutex.xMutexLeave(p);
22510 }
22511 }
@@ -22513,15 +22513,15 @@
22513 #ifndef NDEBUG
22514 /*
22515 ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
22516 ** intended for use inside assert() statements.
22517 */
22518 SQLITE_API int sqlite3_mutex_held(sqlite3_mutex *p){
22519 assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld );
22520 return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p);
22521 }
22522 SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *p){
22523 assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld );
22524 return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p);
22525 }
22526 #endif
22527
@@ -23549,12 +23549,12 @@
23549 ** of the sqlite3_initialize() and sqlite3_shutdown() processing, the
23550 ** "interlocked" magic used here is probably not strictly necessary.
23551 */
23552 static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0;
23553
23554 SQLITE_API int sqlite3_win32_is_nt(void); /* os_win.c */
23555 SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */
23556
23557 static int winMutexInit(void){
23558 /* The first to increment to 1 does actual initialization */
23559 if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){
23560 int i;
@@ -23850,11 +23850,11 @@
23850 /*
23851 ** Attempt to release up to n bytes of non-essential memory currently
23852 ** held by SQLite. An example of non-essential memory is memory used to
23853 ** cache database pages that are not currently in use.
23854 */
23855 SQLITE_API int sqlite3_release_memory(int n){
23856 #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
23857 return sqlite3PcacheReleaseMemory(n);
23858 #else
23859 /* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine
23860 ** is a no-op returning zero if SQLite is not compiled with
@@ -23909,11 +23909,11 @@
23909 /*
23910 ** Deprecated external interface. It used to set an alarm callback
23911 ** that was invoked when memory usage grew too large. Now it is a
23912 ** no-op.
23913 */
23914 SQLITE_API int sqlite3_memory_alarm(
23915 void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
23916 void *pArg,
23917 sqlite3_int64 iThreshold
23918 ){
23919 (void)xCallback;
@@ -23925,11 +23925,11 @@
23925
23926 /*
23927 ** Set the soft heap-size limit for the library. Passing a zero or
23928 ** negative value indicates no limit.
23929 */
23930 SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 n){
23931 sqlite3_int64 priorLimit;
23932 sqlite3_int64 excess;
23933 sqlite3_int64 nUsed;
23934 #ifndef SQLITE_OMIT_AUTOINIT
23935 int rc = sqlite3_initialize();
@@ -23947,11 +23947,11 @@
23947 sqlite3_mutex_leave(mem0.mutex);
23948 excess = sqlite3_memory_used() - n;
23949 if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff));
23950 return priorLimit;
23951 }
23952 SQLITE_API void sqlite3_soft_heap_limit(int n){
23953 if( n<0 ) n = 0;
23954 sqlite3_soft_heap_limit64(n);
23955 }
23956
23957 /*
@@ -24016,11 +24016,11 @@
24016 }
24017
24018 /*
24019 ** Return the amount of memory currently checked out.
24020 */
24021 SQLITE_API sqlite3_int64 sqlite3_memory_used(void){
24022 sqlite3_int64 res, mx;
24023 sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0);
24024 return res;
24025 }
24026
@@ -24027,11 +24027,11 @@
24027 /*
24028 ** Return the maximum amount of memory that has ever been
24029 ** checked out since either the beginning of this process
24030 ** or since the most recent reset.
24031 */
24032 SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag){
24033 sqlite3_int64 res, mx;
24034 sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag);
24035 return mx;
24036 }
24037
@@ -24107,17 +24107,17 @@
24107 /*
24108 ** This version of the memory allocation is for use by the application.
24109 ** First make sure the memory subsystem is initialized, then do the
24110 ** allocation.
24111 */
24112 SQLITE_API void *sqlite3_malloc(int n){
24113 #ifndef SQLITE_OMIT_AUTOINIT
24114 if( sqlite3_initialize() ) return 0;
24115 #endif
24116 return n<=0 ? 0 : sqlite3Malloc(n);
24117 }
24118 SQLITE_API void *sqlite3_malloc64(sqlite3_uint64 n){
24119 #ifndef SQLITE_OMIT_AUTOINIT
24120 if( sqlite3_initialize() ) return 0;
24121 #endif
24122 return sqlite3Malloc(n);
24123 }
@@ -24256,20 +24256,20 @@
24256 }else{
24257 assert( sqlite3_mutex_held(db->mutex) );
24258 return db->lookaside.sz;
24259 }
24260 }
24261 SQLITE_API sqlite3_uint64 sqlite3_msize(void *p){
24262 assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
24263 assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
24264 return p ? sqlite3GlobalConfig.m.xSize(p) : 0;
24265 }
24266
24267 /*
24268 ** Free memory previously obtained from sqlite3Malloc().
24269 */
24270 SQLITE_API void sqlite3_free(void *p){
24271 if( p==0 ) return; /* IMP: R-49053-54554 */
24272 assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
24273 assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
24274 if( sqlite3GlobalConfig.bMemstat ){
24275 sqlite3_mutex_enter(mem0.mutex);
@@ -24374,18 +24374,18 @@
24374
24375 /*
24376 ** The public interface to sqlite3Realloc. Make sure that the memory
24377 ** subsystem is initialized prior to invoking sqliteRealloc.
24378 */
24379 SQLITE_API void *sqlite3_realloc(void *pOld, int n){
24380 #ifndef SQLITE_OMIT_AUTOINIT
24381 if( sqlite3_initialize() ) return 0;
24382 #endif
24383 if( n<0 ) n = 0; /* IMP: R-26507-47431 */
24384 return sqlite3Realloc(pOld, n);
24385 }
24386 SQLITE_API void *sqlite3_realloc64(void *pOld, sqlite3_uint64 n){
24387 #ifndef SQLITE_OMIT_AUTOINIT
24388 if( sqlite3_initialize() ) return 0;
24389 #endif
24390 return sqlite3Realloc(pOld, n);
24391 }
@@ -25608,11 +25608,11 @@
25608
25609 /*
25610 ** Print into memory obtained from sqlite3_malloc(). Omit the internal
25611 ** %-conversion extensions.
25612 */
25613 SQLITE_API char *sqlite3_vmprintf(const char *zFormat, va_list ap){
25614 char *z;
25615 char zBase[SQLITE_PRINT_BUF_SIZE];
25616 StrAccum acc;
25617
25618 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -25632,11 +25632,11 @@
25632
25633 /*
25634 ** Print into memory obtained from sqlite3_malloc()(). Omit the internal
25635 ** %-conversion extensions.
25636 */
25637 SQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){
25638 va_list ap;
25639 char *z;
25640 #ifndef SQLITE_OMIT_AUTOINIT
25641 if( sqlite3_initialize() ) return 0;
25642 #endif
@@ -25657,11 +25657,11 @@
25657 ** this without breaking compatibility, so we just have to live with the
25658 ** mistake.
25659 **
25660 ** sqlite3_vsnprintf() is the varargs version.
25661 */
25662 SQLITE_API char *sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
25663 StrAccum acc;
25664 if( n<=0 ) return zBuf;
25665 #ifdef SQLITE_ENABLE_API_ARMOR
25666 if( zBuf==0 || zFormat==0 ) {
25667 (void)SQLITE_MISUSE_BKPT;
@@ -25671,11 +25671,11 @@
25671 #endif
25672 sqlite3StrAccumInit(&acc, 0, zBuf, n, 0);
25673 sqlite3VXPrintf(&acc, zFormat, ap);
25674 return sqlite3StrAccumFinish(&acc);
25675 }
25676 SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
25677 char *z;
25678 va_list ap;
25679 va_start(ap,zFormat);
25680 z = sqlite3_vsnprintf(n, zBuf, zFormat, ap);
25681 va_end(ap);
@@ -25707,11 +25707,11 @@
25707 }
25708
25709 /*
25710 ** Format and write a message to the log if logging is enabled.
25711 */
25712 SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...){
25713 va_list ap; /* Vararg list */
25714 if( sqlite3GlobalConfig.xLog ){
25715 va_start(ap, zFormat);
25716 renderLogMsg(iErrCode, zFormat, ap);
25717 va_end(ap);
@@ -26284,11 +26284,11 @@
26284 } sqlite3Prng;
26285
26286 /*
26287 ** Return N random bytes.
26288 */
26289 SQLITE_API void sqlite3_randomness(int N, void *pBuf){
26290 unsigned char t;
26291 unsigned char *zBuf = pBuf;
26292
26293 /* The "wsdPrng" macro will resolve to the pseudo-random number generator
26294 ** state vector. If writable static data is unsupported on the target,
@@ -27487,11 +27487,11 @@
27487 ** sqlite3_strnicmp() APIs allow applications and extensions to compare
27488 ** the contents of two buffers containing UTF-8 strings in a
27489 ** case-independent fashion, using the same definition of "case
27490 ** independence" that SQLite uses internally when comparing identifiers.
27491 */
27492 SQLITE_API int sqlite3_stricmp(const char *zLeft, const char *zRight){
27493 if( zLeft==0 ){
27494 return zRight ? -1 : 0;
27495 }else if( zRight==0 ){
27496 return 1;
27497 }
@@ -27508,11 +27508,11 @@
27508 a++;
27509 b++;
27510 }
27511 return c;
27512 }
27513 SQLITE_API int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
27514 register unsigned char *a, *b;
27515 if( zLeft==0 ){
27516 return zRight ? -1 : 0;
27517 }else if( zRight==0 ){
27518 return 1;
@@ -28990,16 +28990,16 @@
28990 /* 31 */ "Found" OpHelp("key=r[P3@P4]"),
28991 /* 32 */ "SeekRowid" OpHelp("intkey=r[P3]"),
28992 /* 33 */ "NotExists" OpHelp("intkey=r[P3]"),
28993 /* 34 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
28994 /* 35 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
28995 /* 36 */ "Ne" OpHelp("IF r[P3]!=r[P1]"),
28996 /* 37 */ "Eq" OpHelp("IF r[P3]==r[P1]"),
28997 /* 38 */ "Gt" OpHelp("IF r[P3]>r[P1]"),
28998 /* 39 */ "Le" OpHelp("IF r[P3]<=r[P1]"),
28999 /* 40 */ "Lt" OpHelp("IF r[P3]<r[P1]"),
29000 /* 41 */ "Ge" OpHelp("IF r[P3]>=r[P1]"),
29001 /* 42 */ "Last" OpHelp(""),
29002 /* 43 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
29003 /* 44 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
29004 /* 45 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
29005 /* 46 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
@@ -36807,11 +36807,11 @@
36807 ** This routine is called once during SQLite initialization and by a
36808 ** single thread. The memory allocation and mutex subsystems have not
36809 ** necessarily been initialized when this routine is called, and so they
36810 ** should not be used.
36811 */
36812 SQLITE_API int sqlite3_os_init(void){
36813 /*
36814 ** The following macro defines an initializer for an sqlite3_vfs object.
36815 ** The name of the VFS is NAME. The pAppData is a pointer to a pointer
36816 ** to the "finder" function. (pAppData is a pointer to a pointer because
36817 ** silly C90 rules prohibit a void* from being cast to a function pointer
@@ -36906,11 +36906,11 @@
36906 **
36907 ** Some operating systems might need to do some cleanup in this routine,
36908 ** to release dynamically allocated objects. But not on unix.
36909 ** This routine is a no-op for unix.
36910 */
36911 SQLITE_API int sqlite3_os_end(void){
36912 return SQLITE_OK;
36913 }
36914
36915 #endif /* SQLITE_OS_UNIX */
36916
@@ -38341,11 +38341,11 @@
38341 ** compact it. Upon success, SQLITE_OK will be returned. Upon failure, one
38342 ** of SQLITE_NOMEM, SQLITE_ERROR, or SQLITE_NOTFOUND will be returned. The
38343 ** "pnLargest" argument, if non-zero, will be used to return the size of the
38344 ** largest committed free block in the heap, in bytes.
38345 */
38346 SQLITE_API int sqlite3_win32_compact_heap(LPUINT pnLargest){
38347 int rc = SQLITE_OK;
38348 UINT nLargest = 0;
38349 HANDLE hHeap;
38350
38351 winMemAssertMagic();
@@ -38381,11 +38381,11 @@
38381 ** If a Win32 native heap has been configured, this function will attempt to
38382 ** destroy and recreate it. If the Win32 native heap is not isolated and/or
38383 ** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will
38384 ** be returned and no changes will be made to the Win32 native heap.
38385 */
38386 SQLITE_API int sqlite3_win32_reset_heap(){
38387 int rc;
38388 MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
38389 MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */
38390 MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); )
38391 MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); )
@@ -38426,11 +38426,11 @@
38426 /*
38427 ** This function outputs the specified (ANSI) string to the Win32 debugger
38428 ** (if available).
38429 */
38430
38431 SQLITE_API void sqlite3_win32_write_debug(const char *zBuf, int nBuf){
38432 char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE];
38433 int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */
38434 if( nMin<-1 ) nMin = -1; /* all negative values become -1. */
38435 assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE );
38436 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -38472,11 +38472,11 @@
38472 */
38473 #if SQLITE_OS_WINRT
38474 static HANDLE sleepObj = NULL;
38475 #endif
38476
38477 SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds){
38478 #if SQLITE_OS_WINRT
38479 if ( sleepObj==NULL ){
38480 sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET,
38481 SYNCHRONIZE);
38482 }
@@ -38521,11 +38521,11 @@
38521
38522 /*
38523 ** This function determines if the machine is running a version of Windows
38524 ** based on the NT kernel.
38525 */
38526 SQLITE_API int sqlite3_win32_is_nt(void){
38527 #if SQLITE_OS_WINRT
38528 /*
38529 ** NOTE: The WinRT sub-platform is always assumed to be based on the NT
38530 ** kernel.
38531 */
@@ -38909,11 +38909,11 @@
38909 }
38910
38911 /*
38912 ** This is a public wrapper for the winUtf8ToUnicode() function.
38913 */
38914 SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char *zText){
38915 #ifdef SQLITE_ENABLE_API_ARMOR
38916 if( !zText ){
38917 (void)SQLITE_MISUSE_BKPT;
38918 return 0;
38919 }
@@ -38925,11 +38925,11 @@
38925 }
38926
38927 /*
38928 ** This is a public wrapper for the winUnicodeToUtf8() function.
38929 */
38930 SQLITE_API char *sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){
38931 #ifdef SQLITE_ENABLE_API_ARMOR
38932 if( !zWideText ){
38933 (void)SQLITE_MISUSE_BKPT;
38934 return 0;
38935 }
@@ -38941,11 +38941,11 @@
38941 }
38942
38943 /*
38944 ** This is a public wrapper for the winMbcsToUtf8() function.
38945 */
38946 SQLITE_API char *sqlite3_win32_mbcs_to_utf8(const char *zText){
38947 #ifdef SQLITE_ENABLE_API_ARMOR
38948 if( !zText ){
38949 (void)SQLITE_MISUSE_BKPT;
38950 return 0;
38951 }
@@ -38957,11 +38957,11 @@
38957 }
38958
38959 /*
38960 ** This is a public wrapper for the winMbcsToUtf8() function.
38961 */
38962 SQLITE_API char *sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){
38963 #ifdef SQLITE_ENABLE_API_ARMOR
38964 if( !zText ){
38965 (void)SQLITE_MISUSE_BKPT;
38966 return 0;
38967 }
@@ -38973,11 +38973,11 @@
38973 }
38974
38975 /*
38976 ** This is a public wrapper for the winUtf8ToMbcs() function.
38977 */
38978 SQLITE_API char *sqlite3_win32_utf8_to_mbcs(const char *zText){
38979 #ifdef SQLITE_ENABLE_API_ARMOR
38980 if( !zText ){
38981 (void)SQLITE_MISUSE_BKPT;
38982 return 0;
38983 }
@@ -38989,11 +38989,11 @@
38989 }
38990
38991 /*
38992 ** This is a public wrapper for the winUtf8ToMbcs() function.
38993 */
38994 SQLITE_API char *sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){
38995 #ifdef SQLITE_ENABLE_API_ARMOR
38996 if( !zText ){
38997 (void)SQLITE_MISUSE_BKPT;
38998 return 0;
38999 }
@@ -39009,11 +39009,11 @@
39009 ** the provided arguments. The type argument must be 1 in order to set the
39010 ** data directory or 2 in order to set the temporary directory. The zValue
39011 ** argument is the name of the directory to use. The return value will be
39012 ** SQLITE_OK if successful.
39013 */
39014 SQLITE_API int sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){
39015 char **ppDirectory = 0;
39016 #ifndef SQLITE_OMIT_AUTOINIT
39017 int rc = sqlite3_initialize();
39018 if( rc ) return rc;
39019 #endif
@@ -42927,11 +42927,11 @@
42927 }
42928
42929 /*
42930 ** Initialize and deinitialize the operating system interface.
42931 */
42932 SQLITE_API int sqlite3_os_init(void){
42933 static sqlite3_vfs winVfs = {
42934 3, /* iVersion */
42935 sizeof(winFile), /* szOsFile */
42936 SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */
42937 0, /* pNext */
@@ -43058,11 +43058,11 @@
43058 #endif
43059
43060 return SQLITE_OK;
43061 }
43062
43063 SQLITE_API int sqlite3_os_end(void){
43064 #if SQLITE_OS_WINRT
43065 if( sleepObj!=NULL ){
43066 osCloseHandle(sleepObj);
43067 sleepObj = NULL;
43068 }
@@ -57083,11 +57083,11 @@
57083
57084 /*
57085 ** Return a +ve value if snapshot p1 is newer than p2. A -ve value if
57086 ** p1 is older than p2 and zero if p1 and p2 are the same snapshot.
57087 */
57088 SQLITE_API int sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){
57089 WalIndexHdr *pHdr1 = (WalIndexHdr*)p1;
57090 WalIndexHdr *pHdr2 = (WalIndexHdr*)p2;
57091
57092 /* aSalt[0] is a copy of the value stored in the wal file header. It
57093 ** is incremented each time the wal file is restarted. */
@@ -58220,11 +58220,11 @@
58220 **
58221 ** This routine has no effect on existing database connections.
58222 ** The shared cache setting effects only future calls to
58223 ** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().
58224 */
58225 SQLITE_API int sqlite3_enable_shared_cache(int enable){
58226 sqlite3GlobalConfig.sharedCacheEnabled = enable;
58227 return SQLITE_OK;
58228 }
58229 #endif
58230
@@ -67993,11 +67993,11 @@
67993 ** a pointer to the new sqlite3_backup object.
67994 **
67995 ** If an error occurs, NULL is returned and an error code and error message
67996 ** stored in database handle pDestDb.
67997 */
67998 SQLITE_API sqlite3_backup *sqlite3_backup_init(
67999 sqlite3* pDestDb, /* Database to write to */
68000 const char *zDestDb, /* Name of database within pDestDb */
68001 sqlite3* pSrcDb, /* Database connection to read from */
68002 const char *zSrcDb /* Name of database within pSrcDb */
68003 ){
@@ -68201,11 +68201,11 @@
68201 }
68202
68203 /*
68204 ** Copy nPage pages from the source b-tree to the destination.
68205 */
68206 SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){
68207 int rc;
68208 int destMode; /* Destination journal mode */
68209 int pgszSrc = 0; /* Source page size */
68210 int pgszDest = 0; /* Destination page size */
68211
@@ -68445,11 +68445,11 @@
68445 }
68446
68447 /*
68448 ** Release all resources associated with an sqlite3_backup* handle.
68449 */
68450 SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p){
68451 sqlite3_backup **pp; /* Ptr to head of pagers backup list */
68452 sqlite3 *pSrcDb; /* Source database connection */
68453 int rc; /* Value to return */
68454
68455 /* Enter the mutexes */
@@ -68497,11 +68497,11 @@
68497
68498 /*
68499 ** Return the number of pages still to be backed up as of the most recent
68500 ** call to sqlite3_backup_step().
68501 */
68502 SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p){
68503 #ifdef SQLITE_ENABLE_API_ARMOR
68504 if( p==0 ){
68505 (void)SQLITE_MISUSE_BKPT;
68506 return 0;
68507 }
@@ -68511,11 +68511,11 @@
68511
68512 /*
68513 ** Return the total number of pages in the source database as of the most
68514 ** recent call to sqlite3_backup_step().
68515 */
68516 SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p){
68517 #ifdef SQLITE_ENABLE_API_ARMOR
68518 if( p==0 ){
68519 (void)SQLITE_MISUSE_BKPT;
68520 return 0;
68521 }
@@ -71450,16 +71450,25 @@
71450 ){
71451 const char *zOpName;
71452 const char *zSynopsis;
71453 int nOpName;
71454 int ii, jj;
71455 char zAlt[50];
71456 zOpName = sqlite3OpcodeName(pOp->opcode);
71457 nOpName = sqlite3Strlen30(zOpName);
71458 if( zOpName[nOpName+1] ){
71459 int seenCom = 0;
71460 char c;
71461 zSynopsis = zOpName += nOpName + 1;
71462 if( strncmp(zSynopsis,"IF ",3)==0 ){
71463 if( pOp->p5 & SQLITE_STOREP2 ){
71464 sqlite3_snprintf(sizeof(zAlt), zAlt, "r[P2] = (%s)", zSynopsis+3);
71465 }else{
71466 sqlite3_snprintf(sizeof(zAlt), zAlt, "if %s goto P2", zSynopsis+3);
71467 }
71468 zSynopsis = zAlt;
71469 }
71470 for(ii=jj=0; jj<nTemp-1 && (c = zSynopsis[ii])!=0; ii++){
71471 if( c=='P' ){
71472 c = zSynopsis[++ii];
71473 if( c=='4' ){
71474 sqlite3_snprintf(nTemp-jj, zTemp+jj, "%s", zP4);
@@ -74967,11 +74976,11 @@
74976 ** execution environment changes in a way that would alter the program
74977 ** that sqlite3_prepare() generates. For example, if new functions or
74978 ** collating sequences are registered or if an authorizer function is
74979 ** added or changed.
74980 */
74981 SQLITE_API int sqlite3_expired(sqlite3_stmt *pStmt){
74982 Vdbe *p = (Vdbe*)pStmt;
74983 return p==0 || p->expired;
74984 }
74985 #endif
74986
@@ -75036,11 +75045,11 @@
75045 ** machine.
75046 **
75047 ** This routine sets the error code and string returned by
75048 ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
75049 */
75050 SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt){
75051 int rc;
75052 if( pStmt==0 ){
75053 /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL
75054 ** pointer is a harmless no-op. */
75055 rc = SQLITE_OK;
@@ -75063,11 +75072,11 @@
75072 ** the prior execution is returned.
75073 **
75074 ** This routine sets the error code and string returned by
75075 ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
75076 */
75077 SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt){
75078 int rc;
75079 if( pStmt==0 ){
75080 rc = SQLITE_OK;
75081 }else{
75082 Vdbe *v = (Vdbe*)pStmt;
@@ -75084,11 +75093,11 @@
75093 }
75094
75095 /*
75096 ** Set all the parameters in the compiled SQL statement to NULL.
75097 */
75098 SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *pStmt){
75099 int i;
75100 int rc = SQLITE_OK;
75101 Vdbe *p = (Vdbe*)pStmt;
75102 #if SQLITE_THREADSAFE
75103 sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
@@ -75108,11 +75117,11 @@
75117
75118 /**************************** sqlite3_value_ *******************************
75119 ** The following routines extract information from a Mem or sqlite3_value
75120 ** structure.
75121 */
75122 SQLITE_API const void *sqlite3_value_blob(sqlite3_value *pVal){
75123 Mem *p = (Mem*)pVal;
75124 if( p->flags & (MEM_Blob|MEM_Str) ){
75125 if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){
75126 assert( p->flags==MEM_Null && p->z==0 );
75127 return 0;
@@ -75121,48 +75130,48 @@
75130 return p->n ? p->z : 0;
75131 }else{
75132 return sqlite3_value_text(pVal);
75133 }
75134 }
75135 SQLITE_API int sqlite3_value_bytes(sqlite3_value *pVal){
75136 return sqlite3ValueBytes(pVal, SQLITE_UTF8);
75137 }
75138 SQLITE_API int sqlite3_value_bytes16(sqlite3_value *pVal){
75139 return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE);
75140 }
75141 SQLITE_API double sqlite3_value_double(sqlite3_value *pVal){
75142 return sqlite3VdbeRealValue((Mem*)pVal);
75143 }
75144 SQLITE_API int sqlite3_value_int(sqlite3_value *pVal){
75145 return (int)sqlite3VdbeIntValue((Mem*)pVal);
75146 }
75147 SQLITE_API sqlite_int64 sqlite3_value_int64(sqlite3_value *pVal){
75148 return sqlite3VdbeIntValue((Mem*)pVal);
75149 }
75150 SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value *pVal){
75151 Mem *pMem = (Mem*)pVal;
75152 return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0);
75153 }
75154 SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value *pVal){
75155 return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8);
75156 }
75157 #ifndef SQLITE_OMIT_UTF16
75158 SQLITE_API const void *sqlite3_value_text16(sqlite3_value* pVal){
75159 return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE);
75160 }
75161 SQLITE_API const void *sqlite3_value_text16be(sqlite3_value *pVal){
75162 return sqlite3ValueText(pVal, SQLITE_UTF16BE);
75163 }
75164 SQLITE_API const void *sqlite3_value_text16le(sqlite3_value *pVal){
75165 return sqlite3ValueText(pVal, SQLITE_UTF16LE);
75166 }
75167 #endif /* SQLITE_OMIT_UTF16 */
75168 /* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five
75169 ** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating
75170 ** point number string BLOB NULL
75171 */
75172 SQLITE_API int sqlite3_value_type(sqlite3_value* pVal){
75173 static const u8 aType[] = {
75174 SQLITE_BLOB, /* 0x00 */
75175 SQLITE_NULL, /* 0x01 */
75176 SQLITE_TEXT, /* 0x02 */
75177 SQLITE_NULL, /* 0x03 */
@@ -75198,11 +75207,11 @@
75207 return aType[pVal->flags&MEM_AffMask];
75208 }
75209
75210 /* Make a copy of an sqlite3_value object
75211 */
75212 SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value *pOrig){
75213 sqlite3_value *pNew;
75214 if( pOrig==0 ) return 0;
75215 pNew = sqlite3_malloc( sizeof(*pNew) );
75216 if( pNew==0 ) return 0;
75217 memset(pNew, 0, sizeof(*pNew));
@@ -75221,11 +75230,11 @@
75230 }
75231
75232 /* Destroy an sqlite3_value object previously obtained from
75233 ** sqlite3_value_dup().
75234 */
75235 SQLITE_API void sqlite3_value_free(sqlite3_value *pOld){
75236 sqlite3ValueFree(pOld);
75237 }
75238
75239
75240 /**************************** sqlite3_result_ *******************************
@@ -75264,21 +75273,21 @@
75273 xDel((void*)p);
75274 }
75275 if( pCtx ) sqlite3_result_error_toobig(pCtx);
75276 return SQLITE_TOOBIG;
75277 }
75278 SQLITE_API void sqlite3_result_blob(
75279 sqlite3_context *pCtx,
75280 const void *z,
75281 int n,
75282 void (*xDel)(void *)
75283 ){
75284 assert( n>=0 );
75285 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75286 setResultStrOrError(pCtx, z, n, 0, xDel);
75287 }
75288 SQLITE_API void sqlite3_result_blob64(
75289 sqlite3_context *pCtx,
75290 const void *z,
75291 sqlite3_uint64 n,
75292 void (*xDel)(void *)
75293 ){
@@ -75288,56 +75297,56 @@
75297 (void)invokeValueDestructor(z, xDel, pCtx);
75298 }else{
75299 setResultStrOrError(pCtx, z, (int)n, 0, xDel);
75300 }
75301 }
75302 SQLITE_API void sqlite3_result_double(sqlite3_context *pCtx, double rVal){
75303 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75304 sqlite3VdbeMemSetDouble(pCtx->pOut, rVal);
75305 }
75306 SQLITE_API void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
75307 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75308 pCtx->isError = SQLITE_ERROR;
75309 pCtx->fErrorOrAux = 1;
75310 sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
75311 }
75312 #ifndef SQLITE_OMIT_UTF16
75313 SQLITE_API void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
75314 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75315 pCtx->isError = SQLITE_ERROR;
75316 pCtx->fErrorOrAux = 1;
75317 sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
75318 }
75319 #endif
75320 SQLITE_API void sqlite3_result_int(sqlite3_context *pCtx, int iVal){
75321 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75322 sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal);
75323 }
75324 SQLITE_API void sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){
75325 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75326 sqlite3VdbeMemSetInt64(pCtx->pOut, iVal);
75327 }
75328 SQLITE_API void sqlite3_result_null(sqlite3_context *pCtx){
75329 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75330 sqlite3VdbeMemSetNull(pCtx->pOut);
75331 }
75332 SQLITE_API void sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){
75333 Mem *pOut = pCtx->pOut;
75334 assert( sqlite3_mutex_held(pOut->db->mutex) );
75335 pOut->eSubtype = eSubtype & 0xff;
75336 pOut->flags |= MEM_Subtype;
75337 }
75338 SQLITE_API void sqlite3_result_text(
75339 sqlite3_context *pCtx,
75340 const char *z,
75341 int n,
75342 void (*xDel)(void *)
75343 ){
75344 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75345 setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel);
75346 }
75347 SQLITE_API void sqlite3_result_text64(
75348 sqlite3_context *pCtx,
75349 const char *z,
75350 sqlite3_uint64 n,
75351 void (*xDel)(void *),
75352 unsigned char enc
@@ -75350,56 +75359,56 @@
75359 }else{
75360 setResultStrOrError(pCtx, z, (int)n, enc, xDel);
75361 }
75362 }
75363 #ifndef SQLITE_OMIT_UTF16
75364 SQLITE_API void sqlite3_result_text16(
75365 sqlite3_context *pCtx,
75366 const void *z,
75367 int n,
75368 void (*xDel)(void *)
75369 ){
75370 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75371 setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel);
75372 }
75373 SQLITE_API void sqlite3_result_text16be(
75374 sqlite3_context *pCtx,
75375 const void *z,
75376 int n,
75377 void (*xDel)(void *)
75378 ){
75379 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75380 setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel);
75381 }
75382 SQLITE_API void sqlite3_result_text16le(
75383 sqlite3_context *pCtx,
75384 const void *z,
75385 int n,
75386 void (*xDel)(void *)
75387 ){
75388 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75389 setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel);
75390 }
75391 #endif /* SQLITE_OMIT_UTF16 */
75392 SQLITE_API void sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){
75393 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75394 sqlite3VdbeMemCopy(pCtx->pOut, pValue);
75395 }
75396 SQLITE_API void sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){
75397 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75398 sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n);
75399 }
75400 SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){
75401 Mem *pOut = pCtx->pOut;
75402 assert( sqlite3_mutex_held(pOut->db->mutex) );
75403 if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){
75404 return SQLITE_TOOBIG;
75405 }
75406 sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n);
75407 return SQLITE_OK;
75408 }
75409 SQLITE_API void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
75410 pCtx->isError = errCode;
75411 pCtx->fErrorOrAux = 1;
75412 #ifdef SQLITE_DEBUG
75413 if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode;
75414 #endif
@@ -75408,20 +75417,20 @@
75417 SQLITE_UTF8, SQLITE_STATIC);
75418 }
75419 }
75420
75421 /* Force an SQLITE_TOOBIG error. */
75422 SQLITE_API void sqlite3_result_error_toobig(sqlite3_context *pCtx){
75423 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75424 pCtx->isError = SQLITE_TOOBIG;
75425 pCtx->fErrorOrAux = 1;
75426 sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1,
75427 SQLITE_UTF8, SQLITE_STATIC);
75428 }
75429
75430 /* An SQLITE_NOMEM error. */
75431 SQLITE_API void sqlite3_result_error_nomem(sqlite3_context *pCtx){
75432 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75433 sqlite3VdbeMemSetNull(pCtx->pOut);
75434 pCtx->isError = SQLITE_NOMEM_BKPT;
75435 pCtx->fErrorOrAux = 1;
75436 sqlite3OomFault(pCtx->pOut->db);
@@ -75589,11 +75598,11 @@
75598 /*
75599 ** This is the top-level implementation of sqlite3_step(). Call
75600 ** sqlite3Step() to do most of the work. If a schema error occurs,
75601 ** call sqlite3Reprepare() and try again.
75602 */
75603 SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){
75604 int rc = SQLITE_OK; /* Result from sqlite3Step() */
75605 int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */
75606 Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */
75607 int cnt = 0; /* Counter to prevent infinite loop of reprepares */
75608 sqlite3 *db; /* The database connection */
@@ -75640,11 +75649,11 @@
75649
75650 /*
75651 ** Extract the user data from a sqlite3_context structure and return a
75652 ** pointer to it.
75653 */
75654 SQLITE_API void *sqlite3_user_data(sqlite3_context *p){
75655 assert( p && p->pFunc );
75656 return p->pFunc->pUserData;
75657 }
75658
75659 /*
@@ -75655,11 +75664,11 @@
75664 ** returns a copy of the pointer to the database connection (the 1st
75665 ** parameter) of the sqlite3_create_function() and
75666 ** sqlite3_create_function16() routines that originally registered the
75667 ** application defined function.
75668 */
75669 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){
75670 assert( p && p->pOut );
75671 return p->pOut->db;
75672 }
75673
75674 /*
@@ -75731,11 +75740,11 @@
75740 /*
75741 ** Allocate or return the aggregate context for a user function. A new
75742 ** context is allocated on the first call. Subsequent calls return the
75743 ** same context that was returned on prior calls.
75744 */
75745 SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *p, int nByte){
75746 assert( p && p->pFunc && p->pFunc->xFinalize );
75747 assert( sqlite3_mutex_held(p->pOut->db->mutex) );
75748 testcase( nByte<0 );
75749 if( (p->pMem->flags & MEM_Agg)==0 ){
75750 return createAggContext(p, nByte);
@@ -75746,11 +75755,11 @@
75755
75756 /*
75757 ** Return the auxiliary data pointer, if any, for the iArg'th argument to
75758 ** the user-function defined by pCtx.
75759 */
75760 SQLITE_API void *sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){
75761 AuxData *pAuxData;
75762
75763 assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
75764 #if SQLITE_ENABLE_STAT3_OR_STAT4
75765 if( pCtx->pVdbe==0 ) return 0;
@@ -75767,11 +75776,11 @@
75776 /*
75777 ** Set the auxiliary data pointer and delete function, for the iArg'th
75778 ** argument to the user-function defined by pCtx. Any previous value is
75779 ** deleted by calling the delete function specified when it was set.
75780 */
75781 SQLITE_API void sqlite3_set_auxdata(
75782 sqlite3_context *pCtx,
75783 int iArg,
75784 void *pAux,
75785 void (*xDelete)(void*)
75786 ){
@@ -75822,29 +75831,29 @@
75831 ** This function is deprecated. Do not use it for new code. It is
75832 ** provide only to avoid breaking legacy code. New aggregate function
75833 ** implementations should keep their own counts within their aggregate
75834 ** context.
75835 */
75836 SQLITE_API int sqlite3_aggregate_count(sqlite3_context *p){
75837 assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize );
75838 return p->pMem->n;
75839 }
75840 #endif
75841
75842 /*
75843 ** Return the number of columns in the result set for the statement pStmt.
75844 */
75845 SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt){
75846 Vdbe *pVm = (Vdbe *)pStmt;
75847 return pVm ? pVm->nResColumn : 0;
75848 }
75849
75850 /*
75851 ** Return the number of values available from the current row of the
75852 ** currently executing statement pStmt.
75853 */
75854 SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt){
75855 Vdbe *pVm = (Vdbe *)pStmt;
75856 if( pVm==0 || pVm->pResultSet==0 ) return 0;
75857 return pVm->nResColumn;
75858 }
75859
@@ -75943,67 +75952,67 @@
75952
75953 /**************************** sqlite3_column_ *******************************
75954 ** The following routines are used to access elements of the current row
75955 ** in the result set.
75956 */
75957 SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt *pStmt, int i){
75958 const void *val;
75959 val = sqlite3_value_blob( columnMem(pStmt,i) );
75960 /* Even though there is no encoding conversion, value_blob() might
75961 ** need to call malloc() to expand the result of a zeroblob()
75962 ** expression.
75963 */
75964 columnMallocFailure(pStmt);
75965 return val;
75966 }
75967 SQLITE_API int sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){
75968 int val = sqlite3_value_bytes( columnMem(pStmt,i) );
75969 columnMallocFailure(pStmt);
75970 return val;
75971 }
75972 SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){
75973 int val = sqlite3_value_bytes16( columnMem(pStmt,i) );
75974 columnMallocFailure(pStmt);
75975 return val;
75976 }
75977 SQLITE_API double sqlite3_column_double(sqlite3_stmt *pStmt, int i){
75978 double val = sqlite3_value_double( columnMem(pStmt,i) );
75979 columnMallocFailure(pStmt);
75980 return val;
75981 }
75982 SQLITE_API int sqlite3_column_int(sqlite3_stmt *pStmt, int i){
75983 int val = sqlite3_value_int( columnMem(pStmt,i) );
75984 columnMallocFailure(pStmt);
75985 return val;
75986 }
75987 SQLITE_API sqlite_int64 sqlite3_column_int64(sqlite3_stmt *pStmt, int i){
75988 sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) );
75989 columnMallocFailure(pStmt);
75990 return val;
75991 }
75992 SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt *pStmt, int i){
75993 const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) );
75994 columnMallocFailure(pStmt);
75995 return val;
75996 }
75997 SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt *pStmt, int i){
75998 Mem *pOut = columnMem(pStmt, i);
75999 if( pOut->flags&MEM_Static ){
76000 pOut->flags &= ~MEM_Static;
76001 pOut->flags |= MEM_Ephem;
76002 }
76003 columnMallocFailure(pStmt);
76004 return (sqlite3_value *)pOut;
76005 }
76006 #ifndef SQLITE_OMIT_UTF16
76007 SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt *pStmt, int i){
76008 const void *val = sqlite3_value_text16( columnMem(pStmt,i) );
76009 columnMallocFailure(pStmt);
76010 return val;
76011 }
76012 #endif /* SQLITE_OMIT_UTF16 */
76013 SQLITE_API int sqlite3_column_type(sqlite3_stmt *pStmt, int i){
76014 int iType = sqlite3_value_type( columnMem(pStmt,i) );
76015 columnMallocFailure(pStmt);
76016 return iType;
76017 }
76018
@@ -76063,16 +76072,16 @@
76072
76073 /*
76074 ** Return the name of the Nth column of the result set returned by SQL
76075 ** statement pStmt.
76076 */
76077 SQLITE_API const char *sqlite3_column_name(sqlite3_stmt *pStmt, int N){
76078 return columnName(
76079 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME);
76080 }
76081 #ifndef SQLITE_OMIT_UTF16
76082 SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt *pStmt, int N){
76083 return columnName(
76084 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME);
76085 }
76086 #endif
76087
@@ -76088,16 +76097,16 @@
76097 #ifndef SQLITE_OMIT_DECLTYPE
76098 /*
76099 ** Return the column declaration type (if applicable) of the 'i'th column
76100 ** of the result set of SQL statement pStmt.
76101 */
76102 SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){
76103 return columnName(
76104 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE);
76105 }
76106 #ifndef SQLITE_OMIT_UTF16
76107 SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){
76108 return columnName(
76109 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE);
76110 }
76111 #endif /* SQLITE_OMIT_UTF16 */
76112 #endif /* SQLITE_OMIT_DECLTYPE */
@@ -76106,16 +76115,16 @@
76115 /*
76116 ** Return the name of the database from which a result column derives.
76117 ** NULL is returned if the result column is an expression or constant or
76118 ** anything else which is not an unambiguous reference to a database column.
76119 */
76120 SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){
76121 return columnName(
76122 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE);
76123 }
76124 #ifndef SQLITE_OMIT_UTF16
76125 SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){
76126 return columnName(
76127 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE);
76128 }
76129 #endif /* SQLITE_OMIT_UTF16 */
76130
@@ -76122,16 +76131,16 @@
76131 /*
76132 ** Return the name of the table from which a result column derives.
76133 ** NULL is returned if the result column is an expression or constant or
76134 ** anything else which is not an unambiguous reference to a database column.
76135 */
76136 SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){
76137 return columnName(
76138 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE);
76139 }
76140 #ifndef SQLITE_OMIT_UTF16
76141 SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){
76142 return columnName(
76143 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE);
76144 }
76145 #endif /* SQLITE_OMIT_UTF16 */
76146
@@ -76138,16 +76147,16 @@
76147 /*
76148 ** Return the name of the table column from which a result column derives.
76149 ** NULL is returned if the result column is an expression or constant or
76150 ** anything else which is not an unambiguous reference to a database column.
76151 */
76152 SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){
76153 return columnName(
76154 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN);
76155 }
76156 #ifndef SQLITE_OMIT_UTF16
76157 SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){
76158 return columnName(
76159 pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN);
76160 }
76161 #endif /* SQLITE_OMIT_UTF16 */
76162 #endif /* SQLITE_ENABLE_COLUMN_METADATA */
@@ -76244,11 +76253,11 @@
76253
76254
76255 /*
76256 ** Bind a blob value to an SQL statement variable.
76257 */
76258 SQLITE_API int sqlite3_bind_blob(
76259 sqlite3_stmt *pStmt,
76260 int i,
76261 const void *zData,
76262 int nData,
76263 void (*xDel)(void*)
@@ -76256,11 +76265,11 @@
76265 #ifdef SQLITE_ENABLE_API_ARMOR
76266 if( nData<0 ) return SQLITE_MISUSE_BKPT;
76267 #endif
76268 return bindText(pStmt, i, zData, nData, xDel, 0);
76269 }
76270 SQLITE_API int sqlite3_bind_blob64(
76271 sqlite3_stmt *pStmt,
76272 int i,
76273 const void *zData,
76274 sqlite3_uint64 nData,
76275 void (*xDel)(void*)
@@ -76270,52 +76279,52 @@
76279 return invokeValueDestructor(zData, xDel, 0);
76280 }else{
76281 return bindText(pStmt, i, zData, (int)nData, xDel, 0);
76282 }
76283 }
76284 SQLITE_API int sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
76285 int rc;
76286 Vdbe *p = (Vdbe *)pStmt;
76287 rc = vdbeUnbind(p, i);
76288 if( rc==SQLITE_OK ){
76289 sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue);
76290 sqlite3_mutex_leave(p->db->mutex);
76291 }
76292 return rc;
76293 }
76294 SQLITE_API int sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){
76295 return sqlite3_bind_int64(p, i, (i64)iValue);
76296 }
76297 SQLITE_API int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
76298 int rc;
76299 Vdbe *p = (Vdbe *)pStmt;
76300 rc = vdbeUnbind(p, i);
76301 if( rc==SQLITE_OK ){
76302 sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue);
76303 sqlite3_mutex_leave(p->db->mutex);
76304 }
76305 return rc;
76306 }
76307 SQLITE_API int sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
76308 int rc;
76309 Vdbe *p = (Vdbe*)pStmt;
76310 rc = vdbeUnbind(p, i);
76311 if( rc==SQLITE_OK ){
76312 sqlite3_mutex_leave(p->db->mutex);
76313 }
76314 return rc;
76315 }
76316 SQLITE_API int sqlite3_bind_text(
76317 sqlite3_stmt *pStmt,
76318 int i,
76319 const char *zData,
76320 int nData,
76321 void (*xDel)(void*)
76322 ){
76323 return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8);
76324 }
76325 SQLITE_API int sqlite3_bind_text64(
76326 sqlite3_stmt *pStmt,
76327 int i,
76328 const char *zData,
76329 sqlite3_uint64 nData,
76330 void (*xDel)(void*),
@@ -76328,21 +76337,21 @@
76337 if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE;
76338 return bindText(pStmt, i, zData, (int)nData, xDel, enc);
76339 }
76340 }
76341 #ifndef SQLITE_OMIT_UTF16
76342 SQLITE_API int sqlite3_bind_text16(
76343 sqlite3_stmt *pStmt,
76344 int i,
76345 const void *zData,
76346 int nData,
76347 void (*xDel)(void*)
76348 ){
76349 return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE);
76350 }
76351 #endif /* SQLITE_OMIT_UTF16 */
76352 SQLITE_API int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
76353 int rc;
76354 switch( sqlite3_value_type((sqlite3_value*)pValue) ){
76355 case SQLITE_INTEGER: {
76356 rc = sqlite3_bind_int64(pStmt, i, pValue->u.i);
76357 break;
@@ -76369,21 +76378,21 @@
76378 break;
76379 }
76380 }
76381 return rc;
76382 }
76383 SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){
76384 int rc;
76385 Vdbe *p = (Vdbe *)pStmt;
76386 rc = vdbeUnbind(p, i);
76387 if( rc==SQLITE_OK ){
76388 sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);
76389 sqlite3_mutex_leave(p->db->mutex);
76390 }
76391 return rc;
76392 }
76393 SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){
76394 int rc;
76395 Vdbe *p = (Vdbe *)pStmt;
76396 sqlite3_mutex_enter(p->db->mutex);
76397 if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){
76398 rc = SQLITE_TOOBIG;
@@ -76398,11 +76407,11 @@
76407
76408 /*
76409 ** Return the number of wildcards that can be potentially bound to.
76410 ** This routine is added to support DBD::SQLite.
76411 */
76412 SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){
76413 Vdbe *p = (Vdbe*)pStmt;
76414 return p ? p->nVar : 0;
76415 }
76416
76417 /*
@@ -76409,11 +76418,11 @@
76418 ** Return the name of a wildcard parameter. Return NULL if the index
76419 ** is out of range or if the wildcard is unnamed.
76420 **
76421 ** The result is always UTF-8.
76422 */
76423 SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){
76424 Vdbe *p = (Vdbe*)pStmt;
76425 if( p==0 || i<1 || i>p->nzVar ){
76426 return 0;
76427 }
76428 return p->azVar[i-1];
@@ -76437,11 +76446,11 @@
76446 }
76447 }
76448 }
76449 return 0;
76450 }
76451 SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
76452 return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName));
76453 }
76454
76455 /*
76456 ** Transfer all bindings from the first statement over to the second.
@@ -76471,11 +76480,11 @@
76480 **
76481 ** If the two statements contain a different number of bindings, then
76482 ** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise
76483 ** SQLITE_OK is returned.
76484 */
76485 SQLITE_API int sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
76486 Vdbe *pFrom = (Vdbe*)pFromStmt;
76487 Vdbe *pTo = (Vdbe*)pToStmt;
76488 if( pFrom->nVar!=pTo->nVar ){
76489 return SQLITE_ERROR;
76490 }
@@ -76493,26 +76502,26 @@
76502 ** Return the sqlite3* database handle to which the prepared statement given
76503 ** in the argument belongs. This is the same database handle that was
76504 ** the first argument to the sqlite3_prepare() that was used to create
76505 ** the statement in the first place.
76506 */
76507 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *pStmt){
76508 return pStmt ? ((Vdbe*)pStmt)->db : 0;
76509 }
76510
76511 /*
76512 ** Return true if the prepared statement is guaranteed to not modify the
76513 ** database.
76514 */
76515 SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt){
76516 return pStmt ? ((Vdbe*)pStmt)->readOnly : 1;
76517 }
76518
76519 /*
76520 ** Return true if the prepared statement is in need of being reset.
76521 */
76522 SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt *pStmt){
76523 Vdbe *v = (Vdbe*)pStmt;
76524 return v!=0 && v->pc>=0 && v->magic==VDBE_MAGIC_RUN;
76525 }
76526
76527 /*
@@ -76519,11 +76528,11 @@
76528 ** Return a pointer to the next prepared statement after pStmt associated
76529 ** with database connection pDb. If pStmt is NULL, return the first
76530 ** prepared statement for the database connection. Return NULL if there
76531 ** are no more.
76532 */
76533 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
76534 sqlite3_stmt *pNext;
76535 #ifdef SQLITE_ENABLE_API_ARMOR
76536 if( !sqlite3SafetyCheckOk(pDb) ){
76537 (void)SQLITE_MISUSE_BKPT;
76538 return 0;
@@ -76540,11 +76549,11 @@
76549 }
76550
76551 /*
76552 ** Return the value of a status counter for a prepared statement
76553 */
76554 SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
76555 Vdbe *pVdbe = (Vdbe*)pStmt;
76556 u32 v;
76557 #ifdef SQLITE_ENABLE_API_ARMOR
76558 if( !pStmt ){
76559 (void)SQLITE_MISUSE_BKPT;
@@ -76557,11 +76566,11 @@
76566 }
76567
76568 /*
76569 ** Return the SQL associated with a prepared statement
76570 */
76571 SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt){
76572 Vdbe *p = (Vdbe *)pStmt;
76573 return p ? p->zSql : 0;
76574 }
76575
76576 /*
@@ -76571,11 +76580,11 @@
76580 ** freeing the returned string by passing it to sqlite3_free().
76581 **
76582 ** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of
76583 ** expanded bound parameters.
76584 */
76585 SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt){
76586 #ifdef SQLITE_OMIT_TRACE
76587 return 0;
76588 #else
76589 char *z = 0;
76590 const char *zSql = sqlite3_sql(pStmt);
@@ -76613,11 +76622,11 @@
76622
76623 /*
76624 ** This function is called from within a pre-update callback to retrieve
76625 ** a field of the row currently being updated or deleted.
76626 */
76627 SQLITE_API int sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
76628 PreUpdate *p = db->pPreUpdate;
76629 int rc = SQLITE_OK;
76630
76631 /* Test that this call is being made from within an SQLITE_DELETE or
76632 ** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */
@@ -76668,11 +76677,11 @@
76677 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
76678 /*
76679 ** This function is called from within a pre-update callback to retrieve
76680 ** the number of columns in the row being updated, deleted or inserted.
76681 */
76682 SQLITE_API int sqlite3_preupdate_count(sqlite3 *db){
76683 PreUpdate *p = db->pPreUpdate;
76684 return (p ? p->keyinfo.nField : 0);
76685 }
76686 #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
76687
@@ -76686,11 +76695,11 @@
76695 ** top-level trigger etc.).
76696 **
76697 ** For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL
76698 ** or SET DEFAULT action is considered a trigger.
76699 */
76700 SQLITE_API int sqlite3_preupdate_depth(sqlite3 *db){
76701 PreUpdate *p = db->pPreUpdate;
76702 return (p ? p->v->nFrame : 0);
76703 }
76704 #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
76705
@@ -76697,11 +76706,11 @@
76706 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
76707 /*
76708 ** This function is called from within a pre-update callback to retrieve
76709 ** a field of the row currently being updated or inserted.
76710 */
76711 SQLITE_API int sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
76712 PreUpdate *p = db->pPreUpdate;
76713 int rc = SQLITE_OK;
76714 Mem *pMem;
76715
76716 if( !p || p->op==SQLITE_DELETE ){
@@ -76771,11 +76780,11 @@
76780
76781 #ifdef SQLITE_ENABLE_STMT_SCANSTATUS
76782 /*
76783 ** Return status data for a single loop within query pStmt.
76784 */
76785 SQLITE_API int sqlite3_stmt_scanstatus(
76786 sqlite3_stmt *pStmt, /* Prepared statement being queried */
76787 int idx, /* Index of loop to report on */
76788 int iScanStatusOp, /* Which metric to return */
76789 void *pOut /* OUT: Write the answer here */
76790 ){
@@ -76830,11 +76839,11 @@
76839 }
76840
76841 /*
76842 ** Zero all counters associated with the sqlite3_stmt_scanstatus() data.
76843 */
76844 SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){
76845 Vdbe *p = (Vdbe*)pStmt;
76846 memset(p->anExec, 0, p->nOp * sizeof(i64));
76847 }
76848 #endif /* SQLITE_ENABLE_STMT_SCANSTATUS */
76849
@@ -77357,11 +77366,11 @@
77366 ** Try to convert the type of a function argument or a result column
77367 ** into a numeric representation. Use either INTEGER or REAL whichever
77368 ** is appropriate. But only do the conversion if it is possible without
77369 ** loss of information and return the revised type of the argument.
77370 */
77371 SQLITE_API int sqlite3_value_numeric_type(sqlite3_value *pVal){
77372 int eType = sqlite3_value_type(pVal);
77373 if( eType==SQLITE_TEXT ){
77374 Mem *pMem = (Mem*)pVal;
77375 applyNumericAffinity(pMem, 0);
77376 eType = sqlite3_value_type(pVal);
@@ -79007,11 +79016,11 @@
79016 break;
79017 }
79018 #endif /* SQLITE_OMIT_CAST */
79019
79020 /* Opcode: Lt P1 P2 P3 P4 P5
79021 ** Synopsis: IF r[P3]<r[P1]
79022 **
79023 ** Compare the values in register P1 and P3. If reg(P3)<reg(P1) then
79024 ** jump to address P2.
79025 **
79026 ** If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or
@@ -79042,11 +79051,11 @@
79051 ** If the SQLITE_NULLEQ bit is set in P5, then NULL values are considered
79052 ** equal to one another, provided that they do not have their MEM_Cleared
79053 ** bit set.
79054 */
79055 /* Opcode: Ne P1 P2 P3 P4 P5
79056 ** Synopsis: IF r[P3]!=r[P1]
79057 **
79058 ** This works just like the Lt opcode except that the jump is taken if
79059 ** the operands in registers P1 and P3 are not equal. See the Lt opcode for
79060 ** additional information.
79061 **
@@ -79055,11 +79064,11 @@
79064 ** of comparison is false. If either operand is NULL then the result is true.
79065 ** If neither operand is NULL the result is the same as it would be if
79066 ** the SQLITE_NULLEQ flag were omitted from P5.
79067 */
79068 /* Opcode: Eq P1 P2 P3 P4 P5
79069 ** Synopsis: IF r[P3]==r[P1]
79070 **
79071 ** This works just like the Lt opcode except that the jump is taken if
79072 ** the operands in registers P1 and P3 are equal.
79073 ** See the Lt opcode for additional information.
79074 **
@@ -79068,25 +79077,25 @@
79077 ** of comparison is true. If either operand is NULL then the result is false.
79078 ** If neither operand is NULL the result is the same as it would be if
79079 ** the SQLITE_NULLEQ flag were omitted from P5.
79080 */
79081 /* Opcode: Le P1 P2 P3 P4 P5
79082 ** Synopsis: IF r[P3]<=r[P1]
79083 **
79084 ** This works just like the Lt opcode except that the jump is taken if
79085 ** the content of register P3 is less than or equal to the content of
79086 ** register P1. See the Lt opcode for additional information.
79087 */
79088 /* Opcode: Gt P1 P2 P3 P4 P5
79089 ** Synopsis: IF r[P3]>r[P1]
79090 **
79091 ** This works just like the Lt opcode except that the jump is taken if
79092 ** the content of register P3 is greater than the content of
79093 ** register P1. See the Lt opcode for additional information.
79094 */
79095 /* Opcode: Ge P1 P2 P3 P4 P5
79096 ** Synopsis: IF r[P3]>=r[P1]
79097 **
79098 ** This works just like the Lt opcode except that the jump is taken if
79099 ** the content of register P3 is greater than or equal to the content of
79100 ** register P1. See the Lt opcode for additional information.
79101 */
@@ -84209,11 +84218,11 @@
84218 }
84219
84220 /*
84221 ** Open a blob handle.
84222 */
84223 SQLITE_API int sqlite3_blob_open(
84224 sqlite3* db, /* The database connection */
84225 const char *zDb, /* The attached database containing the blob */
84226 const char *zTable, /* The table containing the blob */
84227 const char *zColumn, /* The column containing the blob */
84228 sqlite_int64 iRow, /* The row containing the glob */
@@ -84450,11 +84459,11 @@
84459
84460 /*
84461 ** Close a blob handle that was previously created using
84462 ** sqlite3_blob_open().
84463 */
84464 SQLITE_API int sqlite3_blob_close(sqlite3_blob *pBlob){
84465 Incrblob *p = (Incrblob *)pBlob;
84466 int rc;
84467 sqlite3 *db;
84468
84469 if( p ){
@@ -84543,28 +84552,28 @@
84552 }
84553
84554 /*
84555 ** Read data from a blob handle.
84556 */
84557 SQLITE_API int sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){
84558 return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData);
84559 }
84560
84561 /*
84562 ** Write data to a blob handle.
84563 */
84564 SQLITE_API int sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){
84565 return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData);
84566 }
84567
84568 /*
84569 ** Query a blob handle for the size of the data.
84570 **
84571 ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
84572 ** so no mutex is required for access.
84573 */
84574 SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *pBlob){
84575 Incrblob *p = (Incrblob *)pBlob;
84576 return (p && p->pStmt) ? p->nByte : 0;
84577 }
84578
84579 /*
@@ -84575,11 +84584,11 @@
84584 ** contain a blob or text value, then an error code is returned and the
84585 ** database handle error code and message set. If this happens, then all
84586 ** subsequent calls to sqlite3_blob_xxx() functions (except blob_close())
84587 ** immediately return SQLITE_ABORT.
84588 */
84589 SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){
84590 int rc;
84591 Incrblob *p = (Incrblob *)pBlob;
84592 sqlite3 *db;
84593
84594 if( p==0 ) return SQLITE_MISUSE_BKPT;
@@ -97188,11 +97197,11 @@
97197 ** and attempts to write the column will be ignored.
97198 **
97199 ** Setting the auth function to NULL disables this hook. The default
97200 ** setting of the auth function is NULL.
97201 */
97202 SQLITE_API int sqlite3_set_authorizer(
97203 sqlite3 *db,
97204 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
97205 void *pArg
97206 ){
97207 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -103958,18 +103967,18 @@
103967 }
103968
103969 /*
103970 ** The sqlite3_strglob() interface.
103971 */
103972 SQLITE_API int sqlite3_strglob(const char *zGlobPattern, const char *zString){
103973 return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, '[')==0;
103974 }
103975
103976 /*
103977 ** The sqlite3_strlike() interface.
103978 */
103979 SQLITE_API int sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){
103980 return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc)==0;
103981 }
103982
103983 /*
103984 ** Count the number of times that the LIKE operator (or GLOB which is
@@ -108244,19 +108253,19 @@
108253 }
108254 if( piIdxCur ) *piIdxCur = iBase;
108255 for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
108256 int iIdxCur = iBase++;
108257 assert( pIdx->pSchema==pTab->pSchema );
108258 if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){
108259 if( piDataCur ) *piDataCur = iIdxCur;
108260 p5 = 0;
108261 }
108262 if( aToOpen==0 || aToOpen[i+1] ){
108263 sqlite3VdbeAddOp3(v, op, iIdxCur, pIdx->tnum, iDb);
108264 sqlite3VdbeSetP4KeyInfo(pParse, pIdx);
 
 
 
 
 
108265 sqlite3VdbeChangeP5(v, p5);
108266 VdbeComment((v, "%s", pIdx->zName));
108267 }
108268 }
108269 if( iBase>pParse->nTab ) pParse->nTab = iBase;
108270 return i;
108271 }
@@ -108684,11 +108693,11 @@
108693 ** If the SQL is a query, then for each row in the query result
108694 ** the xCallback() function is called. pArg becomes the first
108695 ** argument to xCallback(). If xCallback=NULL then no callback
108696 ** is invoked, even for queries.
108697 */
108698 SQLITE_API int sqlite3_exec(
108699 sqlite3 *db, /* The database on which the SQL executes */
108700 const char *zSql, /* The SQL to be executed */
108701 sqlite3_callback xCallback, /* Invoke this callback routine */
108702 void *pArg, /* First argument to xCallback() */
108703 char **pzErrMsg /* Write error messages here */
@@ -109946,11 +109955,11 @@
109955 db->aExtension = aHandle;
109956
109957 db->aExtension[db->nExtension++] = handle;
109958 return SQLITE_OK;
109959 }
109960 SQLITE_API int sqlite3_load_extension(
109961 sqlite3 *db, /* Load the extension into this database connection */
109962 const char *zFile, /* Name of the shared library containing extension */
109963 const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */
109964 char **pzErrMsg /* Put error message here if not 0 */
109965 ){
@@ -109977,11 +109986,11 @@
109986
109987 /*
109988 ** Enable or disable extension loading. Extension loading is disabled by
109989 ** default so as not to open security holes in older applications.
109990 */
109991 SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){
109992 sqlite3_mutex_enter(db->mutex);
109993 if( onoff ){
109994 db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc;
109995 }else{
109996 db->flags &= ~(SQLITE_LoadExtension|SQLITE_LoadExtFunc);
@@ -110034,11 +110043,11 @@
110043
110044 /*
110045 ** Register a statically linked extension that is automatically
110046 ** loaded by every new database connection.
110047 */
110048 SQLITE_API int sqlite3_auto_extension(
110049 void (*xInit)(void)
110050 ){
110051 int rc = SQLITE_OK;
110052 #ifndef SQLITE_OMIT_AUTOINIT
110053 rc = sqlite3_initialize();
@@ -110081,11 +110090,11 @@
110090 ** routine is a no-op.
110091 **
110092 ** Return 1 if xInit was found on the list and removed. Return 0 if xInit
110093 ** was not on the list.
110094 */
110095 SQLITE_API int sqlite3_cancel_auto_extension(
110096 void (*xInit)(void)
110097 ){
110098 #if SQLITE_THREADSAFE
110099 sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
110100 #endif
@@ -110106,11 +110115,11 @@
110115 }
110116
110117 /*
110118 ** Reset the automatic extension loading mechanism.
110119 */
110120 SQLITE_API void sqlite3_reset_auto_extension(void){
110121 #ifndef SQLITE_OMIT_AUTOINIT
110122 if( sqlite3_initialize()==SQLITE_OK )
110123 #endif
110124 {
110125 #if SQLITE_THREADSAFE
@@ -113367,11 +113376,11 @@
113376 ** and so if a schema change occurs, SQLITE_SCHEMA is returned by
113377 ** sqlite3_step(). In the new version, the original SQL text is retained
113378 ** and the statement is automatically recompiled if an schema change
113379 ** occurs.
113380 */
113381 SQLITE_API int sqlite3_prepare(
113382 sqlite3 *db, /* Database handle. */
113383 const char *zSql, /* UTF-8 encoded SQL statement. */
113384 int nBytes, /* Length of zSql in bytes. */
113385 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113386 const char **pzTail /* OUT: End of parsed string */
@@ -113379,11 +113388,11 @@
113388 int rc;
113389 rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail);
113390 assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
113391 return rc;
113392 }
113393 SQLITE_API int sqlite3_prepare_v2(
113394 sqlite3 *db, /* Database handle. */
113395 const char *zSql, /* UTF-8 encoded SQL statement. */
113396 int nBytes, /* Length of zSql in bytes. */
113397 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113398 const char **pzTail /* OUT: End of parsed string */
@@ -113455,11 +113464,11 @@
113464 ** and so if a schema change occurs, SQLITE_SCHEMA is returned by
113465 ** sqlite3_step(). In the new version, the original SQL text is retained
113466 ** and the statement is automatically recompiled if an schema change
113467 ** occurs.
113468 */
113469 SQLITE_API int sqlite3_prepare16(
113470 sqlite3 *db, /* Database handle. */
113471 const void *zSql, /* UTF-16 encoded SQL statement. */
113472 int nBytes, /* Length of zSql in bytes. */
113473 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113474 const void **pzTail /* OUT: End of parsed string */
@@ -113467,11 +113476,11 @@
113476 int rc;
113477 rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail);
113478 assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
113479 return rc;
113480 }
113481 SQLITE_API int sqlite3_prepare16_v2(
113482 sqlite3 *db, /* Database handle. */
113483 const void *zSql, /* UTF-16 encoded SQL statement. */
113484 int nBytes, /* Length of zSql in bytes. */
113485 sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
113486 const void **pzTail /* OUT: End of parsed string */
@@ -119310,11 +119319,11 @@
119319 ** The result that is written to ***pazResult is held in memory obtained
119320 ** from malloc(). But the caller cannot free this memory directly.
119321 ** Instead, the entire table should be passed to sqlite3_free_table() when
119322 ** the calling procedure is finished using it.
119323 */
119324 SQLITE_API int sqlite3_get_table(
119325 sqlite3 *db, /* The database on which the SQL executes */
119326 const char *zSql, /* The SQL to be executed */
119327 char ***pazResult, /* Write the result table here */
119328 int *pnRow, /* Write the number of rows in the result here */
119329 int *pnColumn, /* Write the number of columns of result here */
@@ -119379,11 +119388,11 @@
119388 }
119389
119390 /*
119391 ** This routine frees the space the sqlite3_get_table() malloced.
119392 */
119393 SQLITE_API void sqlite3_free_table(
119394 char **azResult /* Result returned from sqlite3_get_table() */
119395 ){
119396 if( azResult ){
119397 int i, n;
119398 azResult--;
@@ -121789,11 +121798,11 @@
121798
121799
121800 /*
121801 ** External API function used to create a new virtual-table module.
121802 */
121803 SQLITE_API int sqlite3_create_module(
121804 sqlite3 *db, /* Database in which module is registered */
121805 const char *zName, /* Name assigned to this module */
121806 const sqlite3_module *pModule, /* The definition of the module */
121807 void *pAux /* Context pointer for xCreate/xConnect */
121808 ){
@@ -121804,11 +121813,11 @@
121813 }
121814
121815 /*
121816 ** External API function used to create a new virtual-table module.
121817 */
121818 SQLITE_API int sqlite3_create_module_v2(
121819 sqlite3 *db, /* Database in which module is registered */
121820 const char *zName, /* Name assigned to this module */
121821 const sqlite3_module *pModule, /* The definition of the module */
121822 void *pAux, /* Context pointer for xCreate/xConnect */
121823 void (*xDestroy)(void *) /* Module destructor function */
@@ -122428,11 +122437,11 @@
122437 /*
122438 ** This function is used to set the schema of a virtual table. It is only
122439 ** valid to call this function from within the xCreate() or xConnect() of a
122440 ** virtual table module.
122441 */
122442 SQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
122443 VtabCtx *pCtx;
122444 Parse *pParse;
122445 int rc = SQLITE_OK;
122446 Table *pTab;
122447 char *zErr = 0;
@@ -122885,11 +122894,11 @@
122894 ** table update operation currently in progress.
122895 **
122896 ** The results of this routine are undefined unless it is called from
122897 ** within an xUpdate method.
122898 */
122899 SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *db){
122900 static const unsigned char aMap[] = {
122901 SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE
122902 };
122903 #ifdef SQLITE_ENABLE_API_ARMOR
122904 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -122903,11 +122912,11 @@
122912 /*
122913 ** Call from within the xCreate() or xConnect() methods to provide
122914 ** the SQLite core with additional information about the behavior
122915 ** of the virtual table being implemented.
122916 */
122917 SQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){
122918 va_list ap;
122919 int rc = SQLITE_OK;
122920
122921 #ifdef SQLITE_ENABLE_API_ARMOR
122922 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -124028,13 +124037,19 @@
124037 regBase = r1;
124038 }else{
124039 sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j);
124040 }
124041 }
124042 if( (pTerm->eOperator & WO_IN)!=0 ){
124043 if( pTerm->pExpr->flags & EP_xIsSelect ){
124044 /* No affinity ever needs to be (or should be) applied to a value
124045 ** from the RHS of an "? IN (SELECT ...)" expression. The
124046 ** sqlite3FindInIndex() routine has already ensured that the
124047 ** affinity of the comparison has been applied to the value. */
124048 if( zAff ) zAff[j] = SQLITE_AFF_BLOB;
124049 }
124050 }else if( (pTerm->eOperator & WO_ISNULL)==0 ){
124051 Expr *pRight = pTerm->pExpr->pRight;
124052 if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){
124053 sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
124054 VdbeCoverage(v);
124055 }
@@ -130105,10 +130120,18 @@
130120 if( pOBExpr->op!=TK_COLUMN ) continue;
130121 if( pOBExpr->iTable!=iCur ) continue;
130122 pTerm = sqlite3WhereFindTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn,
130123 ~ready, eqOpMask, 0);
130124 if( pTerm==0 ) continue;
130125 if( pTerm->eOperator==WO_IN ){
130126 /* IN terms are only valid for sorting in the ORDER BY LIMIT
130127 ** optimization, and then only if they are actually used
130128 ** by the query plan */
130129 assert( wctrlFlags & WHERE_ORDERBY_LIMIT );
130130 for(j=0; j<pLoop->nLTerm && pTerm!=pLoop->aLTerm[j]; j++){}
130131 if( j>=pLoop->nLTerm ) continue;
130132 }
130133 if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0 && pOBExpr->iColumn>=0 ){
130134 const char *z1, *z2;
130135 pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
130136 if( !pColl ) pColl = db->pDfltColl;
130137 z1 = pColl->zName;
@@ -136210,11 +136233,11 @@
136233 **
136234 ** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed
136235 ** to recognize the end of a trigger can be omitted. All we have to do
136236 ** is look for a semicolon that is not part of an string or comment.
136237 */
136238 SQLITE_API int sqlite3_complete(const char *zSql){
136239 u8 state = 0; /* Current state, using numbers defined in header comment */
136240 u8 token; /* Value of the next token */
136241
136242 #ifndef SQLITE_OMIT_TRIGGER
136243 /* A complex statement machine used to detect the end of a CREATE TRIGGER
@@ -136375,11 +136398,11 @@
136398 /*
136399 ** This routine is the same as the sqlite3_complete() routine described
136400 ** above, except that the parameter is required to be UTF-16 encoded, not
136401 ** UTF-8.
136402 */
136403 SQLITE_API int sqlite3_complete16(const void *zSql){
136404 sqlite3_value *pVal;
136405 char const *zSql8;
136406 int rc;
136407
136408 #ifndef SQLITE_OMIT_AUTOINIT
@@ -136535,28 +136558,28 @@
136558 #endif
136559
136560 /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns
136561 ** a pointer to the to the sqlite3_version[] string constant.
136562 */
136563 SQLITE_API const char *sqlite3_libversion(void){ return sqlite3_version; }
136564
136565 /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a
136566 ** pointer to a string constant whose value is the same as the
136567 ** SQLITE_SOURCE_ID C preprocessor macro.
136568 */
136569 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
136570
136571 /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function
136572 ** returns an integer equal to SQLITE_VERSION_NUMBER.
136573 */
136574 SQLITE_API int sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
136575
136576 /* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns
136577 ** zero if and only if SQLite was compiled with mutexing code omitted due to
136578 ** the SQLITE_THREADSAFE compile-time option being set to 0.
136579 */
136580 SQLITE_API int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
136581
136582 /*
136583 ** When compiling the test fixture or with debugging enabled (on Win32),
136584 ** this variable being set to non-zero will cause OSTRACE macros to emit
136585 ** extra diagnostic information.
@@ -136625,11 +136648,11 @@
136648 ** call by X completes.
136649 **
136650 ** * Recursive calls to this routine from thread X return immediately
136651 ** without blocking.
136652 */
136653 SQLITE_API int sqlite3_initialize(void){
136654 MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
136655 int rc; /* Result code */
136656 #ifdef SQLITE_EXTRA_INIT
136657 int bRunExtraInit = 0; /* Extra initialization needed */
136658 #endif
@@ -136791,11 +136814,11 @@
136814 ** while any part of SQLite is otherwise in use in any thread. This
136815 ** routine is not threadsafe. But it is safe to invoke this routine
136816 ** on when SQLite is already shut down. If SQLite is already shut down
136817 ** when this routine is invoked, then this routine is a harmless no-op.
136818 */
136819 SQLITE_API int sqlite3_shutdown(void){
136820 #ifdef SQLITE_OMIT_WSD
136821 int rc = sqlite3_wsd_init(4096, 24);
136822 if( rc!=SQLITE_OK ){
136823 return rc;
136824 }
@@ -136845,11 +136868,11 @@
136868 ** This routine should only be called when there are no outstanding
136869 ** database connections or memory allocations. This routine is not
136870 ** threadsafe. Failure to heed these warnings can lead to unpredictable
136871 ** behavior.
136872 */
136873 SQLITE_API int sqlite3_config(int op, ...){
136874 va_list ap;
136875 int rc = SQLITE_OK;
136876
136877 /* sqlite3_config() shall return SQLITE_MISUSE if it is invoked while
136878 ** the SQLite library is in use. */
@@ -137210,11 +137233,11 @@
137233 }
137234
137235 /*
137236 ** Return the mutex associated with a database connection.
137237 */
137238 SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){
137239 #ifdef SQLITE_ENABLE_API_ARMOR
137240 if( !sqlite3SafetyCheckOk(db) ){
137241 (void)SQLITE_MISUSE_BKPT;
137242 return 0;
137243 }
@@ -137224,11 +137247,11 @@
137247
137248 /*
137249 ** Free up as much memory as we can from the given database
137250 ** connection.
137251 */
137252 SQLITE_API int sqlite3_db_release_memory(sqlite3 *db){
137253 int i;
137254
137255 #ifdef SQLITE_ENABLE_API_ARMOR
137256 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
137257 #endif
@@ -137248,11 +137271,11 @@
137271
137272 /*
137273 ** Flush any dirty pages in the pager-cache for any attached database
137274 ** to disk.
137275 */
137276 SQLITE_API int sqlite3_db_cacheflush(sqlite3 *db){
137277 int i;
137278 int rc = SQLITE_OK;
137279 int bSeenBusy = 0;
137280
137281 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -137277,11 +137300,11 @@
137300 }
137301
137302 /*
137303 ** Configuration settings for an individual database connection
137304 */
137305 SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){
137306 va_list ap;
137307 int rc;
137308 va_start(ap, op);
137309 switch( op ){
137310 case SQLITE_DBCONFIG_LOOKASIDE: {
@@ -137398,11 +137421,11 @@
137421 }
137422
137423 /*
137424 ** Return the ROWID of the most recent insert
137425 */
137426 SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){
137427 #ifdef SQLITE_ENABLE_API_ARMOR
137428 if( !sqlite3SafetyCheckOk(db) ){
137429 (void)SQLITE_MISUSE_BKPT;
137430 return 0;
137431 }
@@ -137411,11 +137434,11 @@
137434 }
137435
137436 /*
137437 ** Return the number of changes in the most recent call to sqlite3_exec().
137438 */
137439 SQLITE_API int sqlite3_changes(sqlite3 *db){
137440 #ifdef SQLITE_ENABLE_API_ARMOR
137441 if( !sqlite3SafetyCheckOk(db) ){
137442 (void)SQLITE_MISUSE_BKPT;
137443 return 0;
137444 }
@@ -137424,11 +137447,11 @@
137447 }
137448
137449 /*
137450 ** Return the number of changes since the database handle was opened.
137451 */
137452 SQLITE_API int sqlite3_total_changes(sqlite3 *db){
137453 #ifdef SQLITE_ENABLE_API_ARMOR
137454 if( !sqlite3SafetyCheckOk(db) ){
137455 (void)SQLITE_MISUSE_BKPT;
137456 return 0;
137457 }
@@ -137575,12 +137598,12 @@
137598 ** statements or unfinished sqlite3_backups. The sqlite3_close_v2()
137599 ** version forces the connection to become a zombie if there are
137600 ** unclosed resources, and arranges for deallocation when the last
137601 ** prepare statement or sqlite3_backup closes.
137602 */
137603 SQLITE_API int sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); }
137604 SQLITE_API int sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); }
137605
137606
137607 /*
137608 ** Close the mutex on database connection db.
137609 **
@@ -137983,11 +138006,11 @@
138006
138007 /*
138008 ** This routine sets the busy callback for an Sqlite database to the
138009 ** given callback function with the given argument.
138010 */
138011 SQLITE_API int sqlite3_busy_handler(
138012 sqlite3 *db,
138013 int (*xBusy)(void*,int),
138014 void *pArg
138015 ){
138016 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -138006,11 +138029,11 @@
138029 /*
138030 ** This routine sets the progress callback for an Sqlite database to the
138031 ** given callback function with the given argument. The progress callback will
138032 ** be invoked every nOps opcodes.
138033 */
138034 SQLITE_API void sqlite3_progress_handler(
138035 sqlite3 *db,
138036 int nOps,
138037 int (*xProgress)(void*),
138038 void *pArg
138039 ){
@@ -138037,11 +138060,11 @@
138060
138061 /*
138062 ** This routine installs a default busy handler that waits for the
138063 ** specified number of milliseconds before returning 0.
138064 */
138065 SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){
138066 #ifdef SQLITE_ENABLE_API_ARMOR
138067 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
138068 #endif
138069 if( ms>0 ){
138070 sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db);
@@ -138053,11 +138076,11 @@
138076 }
138077
138078 /*
138079 ** Cause any pending operation to stop at its earliest opportunity.
138080 */
138081 SQLITE_API void sqlite3_interrupt(sqlite3 *db){
138082 #ifdef SQLITE_ENABLE_API_ARMOR
138083 if( !sqlite3SafetyCheckOk(db) ){
138084 (void)SQLITE_MISUSE_BKPT;
138085 return;
138086 }
@@ -138169,11 +138192,11 @@
138192 }
138193
138194 /*
138195 ** Create new user functions.
138196 */
138197 SQLITE_API int sqlite3_create_function(
138198 sqlite3 *db,
138199 const char *zFunc,
138200 int nArg,
138201 int enc,
138202 void *p,
@@ -138183,11 +138206,11 @@
138206 ){
138207 return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xSFunc, xStep,
138208 xFinal, 0);
138209 }
138210
138211 SQLITE_API int sqlite3_create_function_v2(
138212 sqlite3 *db,
138213 const char *zFunc,
138214 int nArg,
138215 int enc,
138216 void *p,
@@ -138226,11 +138249,11 @@
138249 sqlite3_mutex_leave(db->mutex);
138250 return rc;
138251 }
138252
138253 #ifndef SQLITE_OMIT_UTF16
138254 SQLITE_API int sqlite3_create_function16(
138255 sqlite3 *db,
138256 const void *zFunctionName,
138257 int nArg,
138258 int eTextRep,
138259 void *p,
@@ -138266,11 +138289,11 @@
138289 ** When virtual tables intend to provide an overloaded function, they
138290 ** should call this routine to make sure the global function exists.
138291 ** A global function must exist in order for name resolution to work
138292 ** properly.
138293 */
138294 SQLITE_API int sqlite3_overload_function(
138295 sqlite3 *db,
138296 const char *zName,
138297 int nArg
138298 ){
138299 int rc = SQLITE_OK;
@@ -138298,11 +138321,11 @@
138321 ** A NULL trace function means that no tracing is executes. A non-NULL
138322 ** trace is a pointer to a function that is invoked at the start of each
138323 ** SQL statement.
138324 */
138325 #ifndef SQLITE_OMIT_DEPRECATED
138326 SQLITE_API void *sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){
138327 void *pOld;
138328
138329 #ifdef SQLITE_ENABLE_API_ARMOR
138330 if( !sqlite3SafetyCheckOk(db) ){
138331 (void)SQLITE_MISUSE_BKPT;
@@ -138319,11 +138342,11 @@
138342 }
138343 #endif /* SQLITE_OMIT_DEPRECATED */
138344
138345 /* Register a trace callback using the version-2 interface.
138346 */
138347 SQLITE_API int sqlite3_trace_v2(
138348 sqlite3 *db, /* Trace this connection */
138349 unsigned mTrace, /* Mask of events to be traced */
138350 int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */
138351 void *pArg /* Context */
138352 ){
@@ -138331,10 +138354,12 @@
138354 if( !sqlite3SafetyCheckOk(db) ){
138355 return SQLITE_MISUSE_BKPT;
138356 }
138357 #endif
138358 sqlite3_mutex_enter(db->mutex);
138359 if( mTrace==0 ) xTrace = 0;
138360 if( xTrace==0 ) mTrace = 0;
138361 db->mTrace = mTrace;
138362 db->xTrace = xTrace;
138363 db->pTraceArg = pArg;
138364 sqlite3_mutex_leave(db->mutex);
138365 return SQLITE_OK;
@@ -138347,11 +138372,11 @@
138372 **
138373 ** A NULL profile function means that no profiling is executes. A non-NULL
138374 ** profile is a pointer to a function that is invoked at the conclusion of
138375 ** each SQL statement that is run.
138376 */
138377 SQLITE_API void *sqlite3_profile(
138378 sqlite3 *db,
138379 void (*xProfile)(void*,const char*,sqlite_uint64),
138380 void *pArg
138381 ){
138382 void *pOld;
@@ -138375,11 +138400,11 @@
138400 /*
138401 ** Register a function to be invoked when a transaction commits.
138402 ** If the invoked function returns non-zero, then the commit becomes a
138403 ** rollback.
138404 */
138405 SQLITE_API void *sqlite3_commit_hook(
138406 sqlite3 *db, /* Attach the hook to this database */
138407 int (*xCallback)(void*), /* Function to invoke on each commit */
138408 void *pArg /* Argument to the function */
138409 ){
138410 void *pOld;
@@ -138400,11 +138425,11 @@
138425
138426 /*
138427 ** Register a callback to be invoked each time a row is updated,
138428 ** inserted or deleted using this database connection.
138429 */
138430 SQLITE_API void *sqlite3_update_hook(
138431 sqlite3 *db, /* Attach the hook to this database */
138432 void (*xCallback)(void*,int,char const *,char const *,sqlite_int64),
138433 void *pArg /* Argument to the function */
138434 ){
138435 void *pRet;
@@ -138425,11 +138450,11 @@
138450
138451 /*
138452 ** Register a callback to be invoked each time a transaction is rolled
138453 ** back by this database connection.
138454 */
138455 SQLITE_API void *sqlite3_rollback_hook(
138456 sqlite3 *db, /* Attach the hook to this database */
138457 void (*xCallback)(void*), /* Callback function */
138458 void *pArg /* Argument to the function */
138459 ){
138460 void *pRet;
@@ -138451,11 +138476,11 @@
138476 #ifdef SQLITE_ENABLE_PREUPDATE_HOOK
138477 /*
138478 ** Register a callback to be invoked each time a row is updated,
138479 ** inserted or deleted using this database connection.
138480 */
138481 SQLITE_API void *sqlite3_preupdate_hook(
138482 sqlite3 *db, /* Attach the hook to this database */
138483 void(*xCallback)( /* Callback function */
138484 void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64),
138485 void *pArg /* First callback argument */
138486 ){
@@ -138500,11 +138525,11 @@
138525 ** The callback registered by this function replaces any existing callback
138526 ** registered using sqlite3_wal_hook(). Likewise, registering a callback
138527 ** using sqlite3_wal_hook() disables the automatic checkpoint mechanism
138528 ** configured by this function.
138529 */
138530 SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){
138531 #ifdef SQLITE_OMIT_WAL
138532 UNUSED_PARAMETER(db);
138533 UNUSED_PARAMETER(nFrame);
138534 #else
138535 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -138521,11 +138546,11 @@
138546
138547 /*
138548 ** Register a callback to be invoked each time a transaction is written
138549 ** into the write-ahead-log by this database connection.
138550 */
138551 SQLITE_API void *sqlite3_wal_hook(
138552 sqlite3 *db, /* Attach the hook to this db handle */
138553 int(*xCallback)(void *, sqlite3*, const char*, int),
138554 void *pArg /* First argument passed to xCallback() */
138555 ){
138556 #ifndef SQLITE_OMIT_WAL
@@ -138548,11 +138573,11 @@
138573 }
138574
138575 /*
138576 ** Checkpoint database zDb.
138577 */
138578 SQLITE_API int sqlite3_wal_checkpoint_v2(
138579 sqlite3 *db, /* Database handle */
138580 const char *zDb, /* Name of attached database (or NULL) */
138581 int eMode, /* SQLITE_CHECKPOINT_* value */
138582 int *pnLog, /* OUT: Size of WAL log in frames */
138583 int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -138603,11 +138628,11 @@
138628 /*
138629 ** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points
138630 ** to contains a zero-length string, all attached databases are
138631 ** checkpointed.
138632 */
138633 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){
138634 /* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to
138635 ** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */
138636 return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0);
138637 }
138638
@@ -138694,11 +138719,11 @@
138719
138720 /*
138721 ** Return UTF-8 encoded English language explanation of the most recent
138722 ** error.
138723 */
138724 SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){
138725 const char *z;
138726 if( !db ){
138727 return sqlite3ErrStr(SQLITE_NOMEM_BKPT);
138728 }
138729 if( !sqlite3SafetyCheckSickOrOk(db) ){
@@ -138722,11 +138747,11 @@
138747 #ifndef SQLITE_OMIT_UTF16
138748 /*
138749 ** Return UTF-16 encoded English language explanation of the most recent
138750 ** error.
138751 */
138752 SQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){
138753 static const u16 outOfMem[] = {
138754 'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0
138755 };
138756 static const u16 misuse[] = {
138757 'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ',
@@ -138767,38 +138792,38 @@
138792
138793 /*
138794 ** Return the most recent error code generated by an SQLite routine. If NULL is
138795 ** passed to this function, we assume a malloc() failed during sqlite3_open().
138796 */
138797 SQLITE_API int sqlite3_errcode(sqlite3 *db){
138798 if( db && !sqlite3SafetyCheckSickOrOk(db) ){
138799 return SQLITE_MISUSE_BKPT;
138800 }
138801 if( !db || db->mallocFailed ){
138802 return SQLITE_NOMEM_BKPT;
138803 }
138804 return db->errCode & db->errMask;
138805 }
138806 SQLITE_API int sqlite3_extended_errcode(sqlite3 *db){
138807 if( db && !sqlite3SafetyCheckSickOrOk(db) ){
138808 return SQLITE_MISUSE_BKPT;
138809 }
138810 if( !db || db->mallocFailed ){
138811 return SQLITE_NOMEM_BKPT;
138812 }
138813 return db->errCode;
138814 }
138815 SQLITE_API int sqlite3_system_errno(sqlite3 *db){
138816 return db ? db->iSysErrno : 0;
138817 }
138818
138819 /*
138820 ** Return a string that describes the kind of error specified in the
138821 ** argument. For now, this simply calls the internal sqlite3ErrStr()
138822 ** function.
138823 */
138824 SQLITE_API const char *sqlite3_errstr(int rc){
138825 return sqlite3ErrStr(rc);
138826 }
138827
138828 /*
138829 ** Create a new collating function for database "db". The name is zName
@@ -138942,11 +138967,11 @@
138967 **
138968 ** A new lower limit does not shrink existing constructs.
138969 ** It merely prevents new constructs that exceed the limit
138970 ** from forming.
138971 */
138972 SQLITE_API int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
138973 int oldLimit;
138974
138975 #ifdef SQLITE_ENABLE_API_ARMOR
138976 if( !sqlite3SafetyCheckOk(db) ){
138977 (void)SQLITE_MISUSE_BKPT;
@@ -139566,18 +139591,18 @@
139591 }
139592
139593 /*
139594 ** Open a new database handle.
139595 */
139596 SQLITE_API int sqlite3_open(
139597 const char *zFilename,
139598 sqlite3 **ppDb
139599 ){
139600 return openDatabase(zFilename, ppDb,
139601 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);
139602 }
139603 SQLITE_API int sqlite3_open_v2(
139604 const char *filename, /* Database filename (UTF-8) */
139605 sqlite3 **ppDb, /* OUT: SQLite db handle */
139606 int flags, /* Flags */
139607 const char *zVfs /* Name of VFS module to use */
139608 ){
@@ -139586,11 +139611,11 @@
139611
139612 #ifndef SQLITE_OMIT_UTF16
139613 /*
139614 ** Open a new database handle.
139615 */
139616 SQLITE_API int sqlite3_open16(
139617 const void *zFilename,
139618 sqlite3 **ppDb
139619 ){
139620 char const *zFilename8; /* zFilename encoded in UTF-8 instead of UTF-16 */
139621 sqlite3_value *pVal;
@@ -139625,11 +139650,11 @@
139650 #endif /* SQLITE_OMIT_UTF16 */
139651
139652 /*
139653 ** Register a new collation sequence with the database handle db.
139654 */
139655 SQLITE_API int sqlite3_create_collation(
139656 sqlite3* db,
139657 const char *zName,
139658 int enc,
139659 void* pCtx,
139660 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -139638,11 +139663,11 @@
139663 }
139664
139665 /*
139666 ** Register a new collation sequence with the database handle db.
139667 */
139668 SQLITE_API int sqlite3_create_collation_v2(
139669 sqlite3* db,
139670 const char *zName,
139671 int enc,
139672 void* pCtx,
139673 int(*xCompare)(void*,int,const void*,int,const void*),
@@ -139663,11 +139688,11 @@
139688
139689 #ifndef SQLITE_OMIT_UTF16
139690 /*
139691 ** Register a new collation sequence with the database handle db.
139692 */
139693 SQLITE_API int sqlite3_create_collation16(
139694 sqlite3* db,
139695 const void *zName,
139696 int enc,
139697 void* pCtx,
139698 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -139693,11 +139718,11 @@
139718
139719 /*
139720 ** Register a collation sequence factory callback with the database handle
139721 ** db. Replace any previously installed collation sequence factory.
139722 */
139723 SQLITE_API int sqlite3_collation_needed(
139724 sqlite3 *db,
139725 void *pCollNeededArg,
139726 void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)
139727 ){
139728 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -139714,11 +139739,11 @@
139739 #ifndef SQLITE_OMIT_UTF16
139740 /*
139741 ** Register a collation sequence factory callback with the database handle
139742 ** db. Replace any previously installed collation sequence factory.
139743 */
139744 SQLITE_API int sqlite3_collation_needed16(
139745 sqlite3 *db,
139746 void *pCollNeededArg,
139747 void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)
139748 ){
139749 #ifdef SQLITE_ENABLE_API_ARMOR
@@ -139736,11 +139761,11 @@
139761 #ifndef SQLITE_OMIT_DEPRECATED
139762 /*
139763 ** This function is now an anachronism. It used to be used to recover from a
139764 ** malloc() failure, but SQLite now does this automatically.
139765 */
139766 SQLITE_API int sqlite3_global_recover(void){
139767 return SQLITE_OK;
139768 }
139769 #endif
139770
139771 /*
@@ -139747,11 +139772,11 @@
139772 ** Test to see whether or not the database connection is in autocommit
139773 ** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on
139774 ** by default. Autocommit is disabled by a BEGIN statement and reenabled
139775 ** by the next COMMIT or ROLLBACK.
139776 */
139777 SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){
139778 #ifdef SQLITE_ENABLE_API_ARMOR
139779 if( !sqlite3SafetyCheckOk(db) ){
139780 (void)SQLITE_MISUSE_BKPT;
139781 return 0;
139782 }
@@ -139804,19 +139829,19 @@
139829 ** data for this thread has been deallocated.
139830 **
139831 ** SQLite no longer uses thread-specific data so this routine is now a
139832 ** no-op. It is retained for historical compatibility.
139833 */
139834 SQLITE_API void sqlite3_thread_cleanup(void){
139835 }
139836 #endif
139837
139838 /*
139839 ** Return meta information about a specific column of a database table.
139840 ** See comment in sqlite3.h (sqlite.h.in) for details.
139841 */
139842 SQLITE_API int sqlite3_table_column_metadata(
139843 sqlite3 *db, /* Connection handle */
139844 const char *zDbName, /* Database name or NULL */
139845 const char *zTableName, /* Table name */
139846 const char *zColumnName, /* Column name */
139847 char const **pzDataType, /* OUTPUT: Declared data type */
@@ -139930,11 +139955,11 @@
139955 }
139956
139957 /*
139958 ** Sleep for a little while. Return the amount of time slept.
139959 */
139960 SQLITE_API int sqlite3_sleep(int ms){
139961 sqlite3_vfs *pVfs;
139962 int rc;
139963 pVfs = sqlite3_vfs_find(0);
139964 if( pVfs==0 ) return 0;
139965
@@ -139946,11 +139971,11 @@
139971 }
139972
139973 /*
139974 ** Enable or disable the extended result codes.
139975 */
139976 SQLITE_API int sqlite3_extended_result_codes(sqlite3 *db, int onoff){
139977 #ifdef SQLITE_ENABLE_API_ARMOR
139978 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
139979 #endif
139980 sqlite3_mutex_enter(db->mutex);
139981 db->errMask = onoff ? 0xffffffff : 0xff;
@@ -139959,11 +139984,11 @@
139984 }
139985
139986 /*
139987 ** Invoke the xFileControl method on a particular database.
139988 */
139989 SQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
139990 int rc = SQLITE_ERROR;
139991 Btree *pBtree;
139992
139993 #ifdef SQLITE_ENABLE_API_ARMOR
139994 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
@@ -139999,11 +140024,11 @@
140024 }
140025
140026 /*
140027 ** Interface to the testing logic.
140028 */
140029 SQLITE_API int sqlite3_test_control(int op, ...){
140030 int rc = 0;
140031 #ifdef SQLITE_OMIT_BUILTIN_TEST
140032 UNUSED_PARAMETER(op);
140033 #else
140034 va_list ap;
@@ -140344,11 +140369,11 @@
140369 ** method of a VFS implementation. The zParam argument is the name of the
140370 ** query parameter we seek. This routine returns the value of the zParam
140371 ** parameter if it exists. If the parameter does not exist, this routine
140372 ** returns a NULL pointer.
140373 */
140374 SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam){
140375 if( zFilename==0 || zParam==0 ) return 0;
140376 zFilename += sqlite3Strlen30(zFilename) + 1;
140377 while( zFilename[0] ){
140378 int x = strcmp(zFilename, zParam);
140379 zFilename += sqlite3Strlen30(zFilename) + 1;
@@ -140359,20 +140384,20 @@
140384 }
140385
140386 /*
140387 ** Return a boolean value for a query parameter.
140388 */
140389 SQLITE_API int sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){
140390 const char *z = sqlite3_uri_parameter(zFilename, zParam);
140391 bDflt = bDflt!=0;
140392 return z ? sqlite3GetBoolean(z, bDflt) : bDflt;
140393 }
140394
140395 /*
140396 ** Return a 64-bit integer value for a query parameter.
140397 */
140398 SQLITE_API sqlite3_int64 sqlite3_uri_int64(
140399 const char *zFilename, /* Filename as passed to xOpen */
140400 const char *zParam, /* URI parameter sought */
140401 sqlite3_int64 bDflt /* return if parameter is missing */
140402 ){
140403 const char *z = sqlite3_uri_parameter(zFilename, zParam);
@@ -140400,11 +140425,11 @@
140425
140426 /*
140427 ** Return the filename of the database associated with a database
140428 ** connection.
140429 */
140430 SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName){
140431 Btree *pBt;
140432 #ifdef SQLITE_ENABLE_API_ARMOR
140433 if( !sqlite3SafetyCheckOk(db) ){
140434 (void)SQLITE_MISUSE_BKPT;
140435 return 0;
@@ -140416,11 +140441,11 @@
140441
140442 /*
140443 ** Return 1 if database is read-only or 0 if read/write. Return -1 if
140444 ** no such database exists.
140445 */
140446 SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
140447 Btree *pBt;
140448 #ifdef SQLITE_ENABLE_API_ARMOR
140449 if( !sqlite3SafetyCheckOk(db) ){
140450 (void)SQLITE_MISUSE_BKPT;
140451 return -1;
@@ -140433,11 +140458,11 @@
140458 #ifdef SQLITE_ENABLE_SNAPSHOT
140459 /*
140460 ** Obtain a snapshot handle for the snapshot of database zDb currently
140461 ** being read by handle db.
140462 */
140463 SQLITE_API int sqlite3_snapshot_get(
140464 sqlite3 *db,
140465 const char *zDb,
140466 sqlite3_snapshot **ppSnapshot
140467 ){
140468 int rc = SQLITE_ERROR;
@@ -140468,11 +140493,11 @@
140493 }
140494
140495 /*
140496 ** Open a read-transaction on the snapshot idendified by pSnapshot.
140497 */
140498 SQLITE_API int sqlite3_snapshot_open(
140499 sqlite3 *db,
140500 const char *zDb,
140501 sqlite3_snapshot *pSnapshot
140502 ){
140503 int rc = SQLITE_ERROR;
@@ -140505,11 +140530,11 @@
140530 }
140531
140532 /*
140533 ** Free a snapshot handle obtained from sqlite3_snapshot_get().
140534 */
140535 SQLITE_API void sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){
140536 sqlite3_free(pSnapshot);
140537 }
140538 #endif /* SQLITE_ENABLE_SNAPSHOT */
140539
140540 /************** End of main.c ************************************************/
@@ -140659,11 +140684,11 @@
140684 **
140685 ** Each call to this routine overrides any prior callbacks registered
140686 ** on the same "db". If xNotify==0 then any prior callbacks are immediately
140687 ** cancelled.
140688 */
140689 SQLITE_API int sqlite3_unlock_notify(
140690 sqlite3 *db,
140691 void (*xNotify)(void **, int),
140692 void *pArg
140693 ){
140694 int rc = SQLITE_OK;
@@ -147662,11 +147687,11 @@
147687 ** Initialize API pointer table, if required.
147688 */
147689 #ifdef _WIN32
147690 __declspec(dllexport)
147691 #endif
147692 SQLITE_API int sqlite3_fts3_init(
147693 sqlite3 *db,
147694 char **pzErrMsg,
147695 const sqlite3_api_routines *pApi
147696 ){
147697 SQLITE_EXTENSION_INIT2(pApi)
@@ -163463,11 +163488,11 @@
163488 }
163489
163490 /*
163491 ** Register a new geometry function for use with the r-tree MATCH operator.
163492 */
163493 SQLITE_API int sqlite3_rtree_geometry_callback(
163494 sqlite3 *db, /* Register SQL function on this connection */
163495 const char *zGeom, /* Name of the new SQL function */
163496 int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */
163497 void *pContext /* Extra data associated with the callback */
163498 ){
@@ -163487,11 +163512,11 @@
163512
163513 /*
163514 ** Register a new 2nd-generation geometry function for use with the
163515 ** r-tree MATCH operator.
163516 */
163517 SQLITE_API int sqlite3_rtree_query_callback(
163518 sqlite3 *db, /* Register SQL function on this connection */
163519 const char *zQueryFunc, /* Name of new SQL function */
163520 int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */
163521 void *pContext, /* Extra data passed into the callback */
163522 void (*xDestructor)(void*) /* Destructor for the extra data */
@@ -163512,11 +163537,11 @@
163537
163538 #if !SQLITE_CORE
163539 #ifdef _WIN32
163540 __declspec(dllexport)
163541 #endif
163542 SQLITE_API int sqlite3_rtree_init(
163543 sqlite3 *db,
163544 char **pzErrMsg,
163545 const sqlite3_api_routines *pApi
163546 ){
163547 SQLITE_EXTENSION_INIT2(pApi)
@@ -164063,11 +164088,11 @@
164088
164089 #if !SQLITE_CORE
164090 #ifdef _WIN32
164091 __declspec(dllexport)
164092 #endif
164093 SQLITE_API int sqlite3_icu_init(
164094 sqlite3 *db,
164095 char **pzErrMsg,
164096 const sqlite3_api_routines *pApi
164097 ){
164098 SQLITE_EXTENSION_INIT2(pApi)
@@ -164743,11 +164768,11 @@
164768 ** IMPORTANT NOTE FOR ZIPVFS USERS: The RBU extension works with all of
164769 ** SQLite's built-in VFSs, including the multiplexor VFS. However it does
164770 ** not work out of the box with zipvfs. Refer to the comment describing
164771 ** the zipvfs_create_vfs() API below for details on using RBU with zipvfs.
164772 */
164773 SQLITE_API sqlite3rbu *sqlite3rbu_open(
164774 const char *zTarget,
164775 const char *zRbu,
164776 const char *zState
164777 );
164778
@@ -164776,11 +164801,11 @@
164801 ** As with sqlite3rbu_open(), Zipvfs users should rever to the comment
164802 ** describing the sqlite3rbu_create_vfs() API function below for
164803 ** a description of the complications associated with using RBU with
164804 ** zipvfs databases.
164805 */
164806 SQLITE_API sqlite3rbu *sqlite3rbu_vacuum(
164807 const char *zTarget,
164808 const char *zState
164809 );
164810
164811 /*
@@ -164812,11 +164837,11 @@
164837 ** when sqlite3rbu_close() is called.
164838 **
164839 ** Database handles returned by this function remain valid until the next
164840 ** call to any sqlite3rbu_xxx() function other than sqlite3rbu_db().
164841 */
164842 SQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu*, int bRbu);
164843
164844 /*
164845 ** Do some work towards applying the RBU update to the target db.
164846 **
164847 ** Return SQLITE_DONE if the update has been completely applied, or
@@ -164826,11 +164851,11 @@
164851 **
164852 ** Once a call to sqlite3rbu_step() has returned a value other than
164853 ** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops
164854 ** that immediately return the same value.
164855 */
164856 SQLITE_API int sqlite3rbu_step(sqlite3rbu *pRbu);
164857
164858 /*
164859 ** Force RBU to save its state to disk.
164860 **
164861 ** If a power failure or application crash occurs during an update, following
@@ -164838,11 +164863,11 @@
164863 ** was last saved. In other words, from the most recent successful call to
164864 ** sqlite3rbu_close() or this function.
164865 **
164866 ** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
164867 */
164868 SQLITE_API int sqlite3rbu_savestate(sqlite3rbu *pRbu);
164869
164870 /*
164871 ** Close an RBU handle.
164872 **
164873 ** If the RBU update has been completely applied, mark the RBU database
@@ -164858,18 +164883,18 @@
164883 **
164884 ** Otherwise, if no error occurs, this function returns SQLITE_OK if the
164885 ** update has been partially applied, or SQLITE_DONE if it has been
164886 ** completely applied.
164887 */
164888 SQLITE_API int sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg);
164889
164890 /*
164891 ** Return the total number of key-value operations (inserts, deletes or
164892 ** updates) that have been performed on the target database since the
164893 ** current RBU update was started.
164894 */
164895 SQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu);
164896
164897 /*
164898 ** Obtain permyriadage (permyriadage is to 10000 as percentage is to 100)
164899 ** progress indications for the two stages of an RBU update. This API may
164900 ** be useful for driving GUI progress indicators and similar.
@@ -164907,11 +164932,11 @@
164932 ** permyriadage progress of the same stage. If the rbu_count table does
164933 ** not exist, then (*pnOne) is set to -1 during stage 1. If the rbu_count
164934 ** table exists but is not correctly populated, the value of the *pnOne
164935 ** output variable during stage 1 is undefined.
164936 */
164937 SQLITE_API void sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo);
164938
164939 /*
164940 ** Obtain an indication as to the current stage of an RBU update or vacuum.
164941 ** This function always returns one of the SQLITE_RBU_STATE_XXX constants
164942 ** defined in this file. Return values should be interpreted as follows:
@@ -164945,11 +164970,11 @@
164970 #define SQLITE_RBU_STATE_MOVE 2
164971 #define SQLITE_RBU_STATE_CHECKPOINT 3
164972 #define SQLITE_RBU_STATE_DONE 4
164973 #define SQLITE_RBU_STATE_ERROR 5
164974
164975 SQLITE_API int sqlite3rbu_state(sqlite3rbu *pRbu);
164976
164977 /*
164978 ** Create an RBU VFS named zName that accesses the underlying file-system
164979 ** via existing VFS zParent. Or, if the zParent parameter is passed NULL,
164980 ** then the new RBU VFS uses the default system VFS to access the file-system.
@@ -164989,21 +165014,21 @@
165014 ** The overhead of adding the "rbu" VFS to the system is negligible for
165015 ** non-RBU users. There is no harm in an application accessing the
165016 ** file-system via "rbu" all the time, even if it only uses RBU functionality
165017 ** occasionally.
165018 */
165019 SQLITE_API int sqlite3rbu_create_vfs(const char *zName, const char *zParent);
165020
165021 /*
165022 ** Deregister and destroy an RBU vfs created by an earlier call to
165023 ** sqlite3rbu_create_vfs().
165024 **
165025 ** VFS objects are not reference counted. If a VFS object is destroyed
165026 ** before all database handles that use it have been closed, the results
165027 ** are undefined.
165028 */
165029 SQLITE_API void sqlite3rbu_destroy_vfs(const char *zName);
165030
165031 #if 0
165032 } /* end of the 'extern "C"' block */
165033 #endif
165034
@@ -168093,11 +168118,11 @@
168118 }
168119
168120 /*
168121 ** Step the RBU object.
168122 */
168123 SQLITE_API int sqlite3rbu_step(sqlite3rbu *p){
168124 if( p ){
168125 switch( p->eStage ){
168126 case RBU_STAGE_OAL: {
168127 RbuObjIter *pIter = &p->objiter;
168128
@@ -168535,11 +168560,11 @@
168560 }
168561
168562 /*
168563 ** Open and return a new RBU handle.
168564 */
168565 SQLITE_API sqlite3rbu *sqlite3rbu_open(
168566 const char *zTarget,
168567 const char *zRbu,
168568 const char *zState
168569 ){
168570 /* TODO: Check that zTarget and zRbu are non-NULL */
@@ -168547,11 +168572,11 @@
168572 }
168573
168574 /*
168575 ** Open a handle to begin or resume an RBU VACUUM operation.
168576 */
168577 SQLITE_API sqlite3rbu *sqlite3rbu_vacuum(
168578 const char *zTarget,
168579 const char *zState
168580 ){
168581 /* TODO: Check that both arguments are non-NULL */
168582 return openRbuHandle(0, zTarget, zState);
@@ -168558,11 +168583,11 @@
168583 }
168584
168585 /*
168586 ** Return the database handle used by pRbu.
168587 */
168588 SQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){
168589 sqlite3 *db = 0;
168590 if( pRbu ){
168591 db = (bRbu ? pRbu->dbRbu : pRbu->dbMain);
168592 }
168593 return db;
@@ -168590,11 +168615,11 @@
168615 }
168616
168617 /*
168618 ** Close the RBU handle.
168619 */
168620 SQLITE_API int sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){
168621 int rc;
168622 if( p ){
168623
168624 /* Commit the transaction to the *-oal file. */
168625 if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){
@@ -168641,19 +168666,19 @@
168666 /*
168667 ** Return the total number of key-value operations (inserts, deletes or
168668 ** updates) that have been performed on the target database since the
168669 ** current RBU update was started.
168670 */
168671 SQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu){
168672 return pRbu->nProgress;
168673 }
168674
168675 /*
168676 ** Return permyriadage progress indications for the two main stages of
168677 ** an RBU update.
168678 */
168679 SQLITE_API void sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){
168680 const int MAX_PROGRESS = 10000;
168681 switch( p->eStage ){
168682 case RBU_STAGE_OAL:
168683 if( p->nPhaseOneStep>0 ){
168684 *pnOne = (int)(MAX_PROGRESS * (i64)p->nProgress/(i64)p->nPhaseOneStep);
@@ -168684,11 +168709,11 @@
168709 }
168710
168711 /*
168712 ** Return the current state of the RBU vacuum or update operation.
168713 */
168714 SQLITE_API int sqlite3rbu_state(sqlite3rbu *p){
168715 int aRes[] = {
168716 0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE,
168717 0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE
168718 };
168719
@@ -168712,11 +168737,11 @@
168737 );
168738 return aRes[p->eStage];
168739 }
168740 }
168741
168742 SQLITE_API int sqlite3rbu_savestate(sqlite3rbu *p){
168743 int rc = p->rc;
168744 if( rc==SQLITE_DONE ) return SQLITE_OK;
168745
168746 assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE );
168747 if( p->eStage==RBU_STAGE_OAL ){
@@ -169539,11 +169564,11 @@
169564
169565 /*
169566 ** Deregister and destroy an RBU vfs created by an earlier call to
169567 ** sqlite3rbu_create_vfs().
169568 */
169569 SQLITE_API void sqlite3rbu_destroy_vfs(const char *zName){
169570 sqlite3_vfs *pVfs = sqlite3_vfs_find(zName);
169571 if( pVfs && pVfs->xOpen==rbuVfsOpen ){
169572 sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex);
169573 sqlite3_vfs_unregister(pVfs);
169574 sqlite3_free(pVfs);
@@ -169553,11 +169578,11 @@
169578 /*
169579 ** Create an RBU VFS named zName that accesses the underlying file-system
169580 ** via existing VFS zParent. The new object is registered as a non-default
169581 ** VFS with SQLite before returning.
169582 */
169583 SQLITE_API int sqlite3rbu_create_vfs(const char *zName, const char *zParent){
169584
169585 /* Template for VFS */
169586 static sqlite3_vfs vfs_template = {
169587 1, /* iVersion */
169588 0, /* szOsFile */
@@ -171798,11 +171823,11 @@
171823 }
171824
171825 return rc;
171826 }
171827
171828 SQLITE_API int sqlite3session_diff(
171829 sqlite3_session *pSession,
171830 const char *zFrom,
171831 const char *zTbl,
171832 char **pzErrMsg
171833 ){
@@ -171892,11 +171917,11 @@
171917
171918 /*
171919 ** Create a session object. This session object will record changes to
171920 ** database zDb attached to connection db.
171921 */
171922 SQLITE_API int sqlite3session_create(
171923 sqlite3 *db, /* Database handle */
171924 const char *zDb, /* Name of db (e.g. "main") */
171925 sqlite3_session **ppSession /* OUT: New session object */
171926 ){
171927 sqlite3_session *pNew; /* Newly allocated session object */
@@ -171954,11 +171979,11 @@
171979 }
171980
171981 /*
171982 ** Delete a session object previously allocated using sqlite3session_create().
171983 */
171984 SQLITE_API void sqlite3session_delete(sqlite3_session *pSession){
171985 sqlite3 *db = pSession->db;
171986 sqlite3_session *pHead;
171987 sqlite3_session **pp;
171988
171989 /* Unlink the session from the linked list of sessions attached to the
@@ -171983,11 +172008,11 @@
172008 }
172009
172010 /*
172011 ** Set a table filter on a Session Object.
172012 */
172013 SQLITE_API void sqlite3session_table_filter(
172014 sqlite3_session *pSession,
172015 int(*xFilter)(void*, const char*),
172016 void *pCtx /* First argument passed to xFilter */
172017 ){
172018 pSession->bAutoAttach = 1;
@@ -172001,11 +172026,11 @@
172026 **
172027 ** Only tables that have a PRIMARY KEY defined may be attached. It does
172028 ** not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias)
172029 ** or not.
172030 */
172031 SQLITE_API int sqlite3session_attach(
172032 sqlite3_session *pSession, /* Session object */
172033 const char *zName /* Table name */
172034 ){
172035 int rc = SQLITE_OK;
172036 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
@@ -172691,11 +172716,11 @@
172716 ** session object passed as the first argument.
172717 **
172718 ** It is the responsibility of the caller to eventually free the buffer
172719 ** using sqlite3_free().
172720 */
172721 SQLITE_API int sqlite3session_changeset(
172722 sqlite3_session *pSession, /* Session object */
172723 int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */
172724 void **ppChangeset /* OUT: Buffer containing changeset */
172725 ){
172726 return sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset);
@@ -172702,11 +172727,11 @@
172727 }
172728
172729 /*
172730 ** Streaming version of sqlite3session_changeset().
172731 */
172732 SQLITE_API int sqlite3session_changeset_strm(
172733 sqlite3_session *pSession,
172734 int (*xOutput)(void *pOut, const void *pData, int nData),
172735 void *pOut
172736 ){
172737 return sessionGenerateChangeset(pSession, 0, xOutput, pOut, 0, 0);
@@ -172713,11 +172738,11 @@
172738 }
172739
172740 /*
172741 ** Streaming version of sqlite3session_patchset().
172742 */
172743 SQLITE_API int sqlite3session_patchset_strm(
172744 sqlite3_session *pSession,
172745 int (*xOutput)(void *pOut, const void *pData, int nData),
172746 void *pOut
172747 ){
172748 return sessionGenerateChangeset(pSession, 1, xOutput, pOut, 0, 0);
@@ -172728,11 +172753,11 @@
172753 ** session object passed as the first argument.
172754 **
172755 ** It is the responsibility of the caller to eventually free the buffer
172756 ** using sqlite3_free().
172757 */
172758 SQLITE_API int sqlite3session_patchset(
172759 sqlite3_session *pSession, /* Session object */
172760 int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */
172761 void **ppPatchset /* OUT: Buffer containing changeset */
172762 ){
172763 return sessionGenerateChangeset(pSession, 1, 0, 0, pnPatchset, ppPatchset);
@@ -172739,11 +172764,11 @@
172764 }
172765
172766 /*
172767 ** Enable or disable the session object passed as the first argument.
172768 */
172769 SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable){
172770 int ret;
172771 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172772 if( bEnable>=0 ){
172773 pSession->bEnable = bEnable;
172774 }
@@ -172753,11 +172778,11 @@
172778 }
172779
172780 /*
172781 ** Enable or disable the session object passed as the first argument.
172782 */
172783 SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){
172784 int ret;
172785 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172786 if( bIndirect>=0 ){
172787 pSession->bIndirect = bIndirect;
172788 }
@@ -172768,11 +172793,11 @@
172793
172794 /*
172795 ** Return true if there have been no changes to monitored tables recorded
172796 ** by the session object passed as the only argument.
172797 */
172798 SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession){
172799 int ret = 0;
172800 SessionTable *pTab;
172801
172802 sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
172803 for(pTab=pSession->pTable; pTab && ret==0; pTab=pTab->pNext){
@@ -172818,11 +172843,11 @@
172843 }
172844
172845 /*
172846 ** Create an iterator used to iterate through the contents of a changeset.
172847 */
172848 SQLITE_API int sqlite3changeset_start(
172849 sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */
172850 int nChangeset, /* Size of buffer pChangeset in bytes */
172851 void *pChangeset /* Pointer to buffer containing changeset */
172852 ){
172853 return sessionChangesetStart(pp, 0, 0, nChangeset, pChangeset);
@@ -172829,11 +172854,11 @@
172854 }
172855
172856 /*
172857 ** Streaming version of sqlite3changeset_start().
172858 */
172859 SQLITE_API int sqlite3changeset_start_strm(
172860 sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */
172861 int (*xInput)(void *pIn, void *pData, int *pnData),
172862 void *pIn
172863 ){
172864 return sessionChangesetStart(pp, xInput, pIn, 0, 0);
@@ -173250,20 +173275,20 @@
173275 ** or SQLITE_CORRUPT.
173276 **
173277 ** This function may not be called on iterators passed to a conflict handler
173278 ** callback by changeset_apply().
173279 */
173280 SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *p){
173281 return sessionChangesetNext(p, 0, 0);
173282 }
173283
173284 /*
173285 ** The following function extracts information on the current change
173286 ** from a changeset iterator. It may only be called after changeset_next()
173287 ** has returned SQLITE_ROW.
173288 */
173289 SQLITE_API int sqlite3changeset_op(
173290 sqlite3_changeset_iter *pIter, /* Iterator handle */
173291 const char **pzTab, /* OUT: Pointer to table name */
173292 int *pnCol, /* OUT: Number of columns in table */
173293 int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */
173294 int *pbIndirect /* OUT: True if change is indirect */
@@ -173279,11 +173304,11 @@
173304 ** Return information regarding the PRIMARY KEY and number of columns in
173305 ** the database table affected by the change that pIter currently points
173306 ** to. This function may only be called after changeset_next() returns
173307 ** SQLITE_ROW.
173308 */
173309 SQLITE_API int sqlite3changeset_pk(
173310 sqlite3_changeset_iter *pIter, /* Iterator object */
173311 unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */
173312 int *pnCol /* OUT: Number of entries in output array */
173313 ){
173314 *pabPK = pIter->abPK;
@@ -173302,11 +173327,11 @@
173327 ** was not modified and is not a PK column), set *ppValue to NULL.
173328 **
173329 ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is
173330 ** not modified. Otherwise, SQLITE_OK.
173331 */
173332 SQLITE_API int sqlite3changeset_old(
173333 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173334 int iVal, /* Index of old.* value to retrieve */
173335 sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */
173336 ){
173337 if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_DELETE ){
@@ -173330,11 +173355,11 @@
173355 ** was not modified), set *ppValue to NULL.
173356 **
173357 ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is
173358 ** not modified. Otherwise, SQLITE_OK.
173359 */
173360 SQLITE_API int sqlite3changeset_new(
173361 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173362 int iVal, /* Index of new.* value to retrieve */
173363 sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */
173364 ){
173365 if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_INSERT ){
@@ -173364,11 +173389,11 @@
173389 ** containing the iVal'th value of the conflicting record.
173390 **
173391 ** If value iVal is out-of-range or some other error occurs, an SQLite error
173392 ** code is returned. Otherwise, SQLITE_OK.
173393 */
173394 SQLITE_API int sqlite3changeset_conflict(
173395 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173396 int iVal, /* Index of conflict record value to fetch */
173397 sqlite3_value **ppValue /* OUT: Value from conflicting row */
173398 ){
173399 if( !pIter->pConflict ){
@@ -173387,11 +173412,11 @@
173412 ** it sets the output variable to the total number of known foreign key
173413 ** violations in the destination database and returns SQLITE_OK.
173414 **
173415 ** In all other cases this function returns SQLITE_MISUSE.
173416 */
173417 SQLITE_API int sqlite3changeset_fk_conflicts(
173418 sqlite3_changeset_iter *pIter, /* Changeset iterator */
173419 int *pnOut /* OUT: Number of FK violations */
173420 ){
173421 if( pIter->pConflict || pIter->apValue ){
173422 return SQLITE_MISUSE;
@@ -173405,11 +173430,11 @@
173430 ** Finalize an iterator allocated with sqlite3changeset_start().
173431 **
173432 ** This function may not be called on iterators passed to a conflict handler
173433 ** callback by changeset_apply().
173434 */
173435 SQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *p){
173436 int rc = SQLITE_OK;
173437 if( p ){
173438 int i; /* Used to iterate through p->apValue[] */
173439 rc = p->rc;
173440 if( p->apValue ){
@@ -173579,11 +173604,11 @@
173604
173605
173606 /*
173607 ** Invert a changeset object.
173608 */
173609 SQLITE_API int sqlite3changeset_invert(
173610 int nChangeset, /* Number of bytes in input */
173611 const void *pChangeset, /* Input changeset */
173612 int *pnInverted, /* OUT: Number of bytes in output changeset */
173613 void **ppInverted /* OUT: Inverse of pChangeset */
173614 ){
@@ -173598,11 +173623,11 @@
173623 }
173624
173625 /*
173626 ** Streaming version of sqlite3changeset_invert().
173627 */
173628 SQLITE_API int sqlite3changeset_invert_strm(
173629 int (*xInput)(void *pIn, void *pData, int *pnData),
173630 void *pIn,
173631 int (*xOutput)(void *pOut, const void *pData, int nData),
173632 void *pOut
173633 ){
@@ -174478,11 +174503,11 @@
174503 /*
174504 ** Apply the changeset passed via pChangeset/nChangeset to the main database
174505 ** attached to handle "db". Invoke the supplied conflict handler callback
174506 ** to resolve any conflicts encountered while applying the change.
174507 */
174508 SQLITE_API int sqlite3changeset_apply(
174509 sqlite3 *db, /* Apply change to "main" db of this handle */
174510 int nChangeset, /* Size of changeset in bytes */
174511 void *pChangeset, /* Changeset blob */
174512 int(*xFilter)(
174513 void *pCtx, /* Copy of sixth arg to _apply() */
@@ -174506,11 +174531,11 @@
174531 /*
174532 ** Apply the changeset passed via xInput/pIn to the main database
174533 ** attached to handle "db". Invoke the supplied conflict handler callback
174534 ** to resolve any conflicts encountered while applying the change.
174535 */
174536 SQLITE_API int sqlite3changeset_apply_strm(
174537 sqlite3 *db, /* Apply change to "main" db of this handle */
174538 int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
174539 void *pIn, /* First arg for xInput */
174540 int(*xFilter)(
174541 void *pCtx, /* Copy of sixth arg to _apply() */
@@ -174841,11 +174866,11 @@
174866 }
174867
174868 /*
174869 ** Allocate a new, empty, sqlite3_changegroup.
174870 */
174871 SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp){
174872 int rc = SQLITE_OK; /* Return code */
174873 sqlite3_changegroup *p; /* New object */
174874 p = (sqlite3_changegroup*)sqlite3_malloc(sizeof(sqlite3_changegroup));
174875 if( p==0 ){
174876 rc = SQLITE_NOMEM;
@@ -174858,11 +174883,11 @@
174883
174884 /*
174885 ** Add the changeset currently stored in buffer pData, size nData bytes,
174886 ** to changeset-group p.
174887 */
174888 SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){
174889 sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */
174890 int rc; /* Return code */
174891
174892 rc = sqlite3changeset_start(&pIter, nData, pData);
174893 if( rc==SQLITE_OK ){
@@ -174874,11 +174899,11 @@
174899
174900 /*
174901 ** Obtain a buffer containing a changeset representing the concatenation
174902 ** of all changesets added to the group so far.
174903 */
174904 SQLITE_API int sqlite3changegroup_output(
174905 sqlite3_changegroup *pGrp,
174906 int *pnData,
174907 void **ppData
174908 ){
174909 return sessionChangegroupOutput(pGrp, 0, 0, pnData, ppData);
@@ -174885,11 +174910,11 @@
174910 }
174911
174912 /*
174913 ** Streaming versions of changegroup_add().
174914 */
174915 SQLITE_API int sqlite3changegroup_add_strm(
174916 sqlite3_changegroup *pGrp,
174917 int (*xInput)(void *pIn, void *pData, int *pnData),
174918 void *pIn
174919 ){
174920 sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */
@@ -174904,11 +174929,11 @@
174929 }
174930
174931 /*
174932 ** Streaming versions of changegroup_output().
174933 */
174934 SQLITE_API int sqlite3changegroup_output_strm(
174935 sqlite3_changegroup *pGrp,
174936 int (*xOutput)(void *pOut, const void *pData, int nData),
174937 void *pOut
174938 ){
174939 return sessionChangegroupOutput(pGrp, xOutput, pOut, 0, 0);
@@ -174915,21 +174940,21 @@
174940 }
174941
174942 /*
174943 ** Delete a changegroup object.
174944 */
174945 SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup *pGrp){
174946 if( pGrp ){
174947 sessionDeleteTable(pGrp->pList);
174948 sqlite3_free(pGrp);
174949 }
174950 }
174951
174952 /*
174953 ** Combine two changesets together.
174954 */
174955 SQLITE_API int sqlite3changeset_concat(
174956 int nLeft, /* Number of bytes in lhs input */
174957 void *pLeft, /* Lhs input changeset */
174958 int nRight /* Number of bytes in rhs input */,
174959 void *pRight, /* Rhs input changeset */
174960 int *pnOut, /* OUT: Number of bytes in output changeset */
@@ -174954,11 +174979,11 @@
174979 }
174980
174981 /*
174982 ** Streaming version of sqlite3changeset_concat().
174983 */
174984 SQLITE_API int sqlite3changeset_concat_strm(
174985 int (*xInputA)(void *pIn, void *pData, int *pnData),
174986 void *pInA,
174987 int (*xInputB)(void *pIn, void *pData, int *pnData),
174988 void *pInB,
174989 int (*xOutput)(void *pOut, const void *pData, int nData),
@@ -177186,11 +177211,11 @@
177211
177212 #ifndef SQLITE_CORE
177213 #ifdef _WIN32
177214 __declspec(dllexport)
177215 #endif
177216 SQLITE_API int sqlite3_json_init(
177217 sqlite3 *db,
177218 char **pzErrMsg,
177219 const sqlite3_api_routines *pApi
177220 ){
177221 SQLITE_EXTENSION_INIT2(pApi);
@@ -194018,11 +194043,11 @@
194043 int nArg, /* Number of args */
194044 sqlite3_value **apUnused /* Function arguments */
194045 ){
194046 assert( nArg==0 );
194047 UNUSED_PARAM2(nArg, apUnused);
194048 sqlite3_result_text(pCtx, "fts5: 2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6", -1, SQLITE_TRANSIENT);
194049 }
194050
194051 static int fts5Init(sqlite3 *db){
194052 static const sqlite3_module fts5Mod = {
194053 /* iVersion */ 2,
@@ -194106,11 +194131,11 @@
194131 */
194132 #ifndef SQLITE_CORE
194133 #ifdef _WIN32
194134 __declspec(dllexport)
194135 #endif
194136 SQLITE_API int sqlite3_fts_init(
194137 sqlite3 *db,
194138 char **pzErrMsg,
194139 const sqlite3_api_routines *pApi
194140 ){
194141 SQLITE_EXTENSION_INIT2(pApi);
@@ -194119,11 +194144,11 @@
194144 }
194145
194146 #ifdef _WIN32
194147 __declspec(dllexport)
194148 #endif
194149 SQLITE_API int sqlite3_fts5_init(
194150 sqlite3 *db,
194151 char **pzErrMsg,
194152 const sqlite3_api_routines *pApi
194153 ){
194154 SQLITE_EXTENSION_INIT2(pApi);
194155
+247 -247
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -118,13 +118,13 @@
118118
**
119119
** See also: [sqlite3_libversion()],
120120
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
121121
** [sqlite_version()] and [sqlite_source_id()].
122122
*/
123
-#define SQLITE_VERSION "3.14.1"
124
-#define SQLITE_VERSION_NUMBER 3014001
125
-#define SQLITE_SOURCE_ID "2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b"
123
+#define SQLITE_VERSION "3.14.2"
124
+#define SQLITE_VERSION_NUMBER 3014002
125
+#define SQLITE_SOURCE_ID "2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6"
126126
127127
/*
128128
** CAPI3REF: Run-Time Library Version Numbers
129129
** KEYWORDS: sqlite3_version, sqlite3_sourceid
130130
**
@@ -153,13 +153,13 @@
153153
** [SQLITE_SOURCE_ID] C preprocessor macro.
154154
**
155155
** See also: [sqlite_version()] and [sqlite_source_id()].
156156
*/
157157
SQLITE_API SQLITE_EXTERN const char sqlite3_version[];
158
-SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void);
159
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void);
160
-SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void);
158
+SQLITE_API const char *sqlite3_libversion(void);
159
+SQLITE_API const char *sqlite3_sourceid(void);
160
+SQLITE_API int sqlite3_libversion_number(void);
161161
162162
/*
163163
** CAPI3REF: Run-Time Library Compilation Options Diagnostics
164164
**
165165
** ^The sqlite3_compileoption_used() function returns 0 or 1
@@ -180,12 +180,12 @@
180180
**
181181
** See also: SQL functions [sqlite_compileoption_used()] and
182182
** [sqlite_compileoption_get()] and the [compile_options pragma].
183183
*/
184184
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
185
-SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName);
186
-SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N);
185
+SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
186
+SQLITE_API const char *sqlite3_compileoption_get(int N);
187187
#endif
188188
189189
/*
190190
** CAPI3REF: Test To See If The Library Is Threadsafe
191191
**
@@ -220,11 +220,11 @@
220220
** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
221221
** is unchanged by calls to sqlite3_config().)^
222222
**
223223
** See the [threading mode] documentation for additional information.
224224
*/
225
-SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void);
225
+SQLITE_API int sqlite3_threadsafe(void);
226226
227227
/*
228228
** CAPI3REF: Database Connection Handle
229229
** KEYWORDS: {database connection} {database connections}
230230
**
@@ -317,12 +317,12 @@
317317
** from [sqlite3_open()], [sqlite3_open16()], or
318318
** [sqlite3_open_v2()], and not previously closed.
319319
** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
320320
** argument is a harmless no-op.
321321
*/
322
-SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*);
323
-SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*);
322
+SQLITE_API int sqlite3_close(sqlite3*);
323
+SQLITE_API int sqlite3_close_v2(sqlite3*);
324324
325325
/*
326326
** The type for a callback function.
327327
** This is legacy and deprecated. It is included for historical
328328
** compatibility and is not documented.
@@ -389,11 +389,11 @@
389389
** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
390390
** <li> The application must not modify the SQL statement text passed into
391391
** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
392392
** </ul>
393393
*/
394
-SQLITE_API int SQLITE_STDCALL sqlite3_exec(
394
+SQLITE_API int sqlite3_exec(
395395
sqlite3*, /* An open database */
396396
const char *sql, /* SQL to be evaluated */
397397
int (*callback)(void*,int,char**,char**), /* Callback function */
398398
void *, /* 1st argument to callback */
399399
char **errmsg /* Error msg written here */
@@ -1388,14 +1388,14 @@
13881388
** sqlite3_os_init() and sqlite3_os_end(). An application-supplied
13891389
** implementation of sqlite3_os_init() or sqlite3_os_end()
13901390
** must return [SQLITE_OK] on success and some other [error code] upon
13911391
** failure.
13921392
*/
1393
-SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void);
1394
-SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void);
1395
-SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void);
1396
-SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void);
1393
+SQLITE_API int sqlite3_initialize(void);
1394
+SQLITE_API int sqlite3_shutdown(void);
1395
+SQLITE_API int sqlite3_os_init(void);
1396
+SQLITE_API int sqlite3_os_end(void);
13971397
13981398
/*
13991399
** CAPI3REF: Configuring The SQLite Library
14001400
**
14011401
** The sqlite3_config() interface is used to make global configuration
@@ -1424,11 +1424,11 @@
14241424
**
14251425
** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
14261426
** ^If the option is unknown or SQLite is unable to set the option
14271427
** then this routine returns a non-zero [error code].
14281428
*/
1429
-SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...);
1429
+SQLITE_API int sqlite3_config(int, ...);
14301430
14311431
/*
14321432
** CAPI3REF: Configure database connections
14331433
** METHOD: sqlite3
14341434
**
@@ -1443,11 +1443,11 @@
14431443
** Subsequent arguments vary depending on the configuration verb.
14441444
**
14451445
** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
14461446
** the call is considered successful.
14471447
*/
1448
-SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...);
1448
+SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
14491449
14501450
/*
14511451
** CAPI3REF: Memory Allocation Routines
14521452
**
14531453
** An instance of this object defines the interface between SQLite
@@ -1984,11 +1984,11 @@
19841984
**
19851985
** ^The sqlite3_extended_result_codes() routine enables or disables the
19861986
** [extended result codes] feature of SQLite. ^The extended result
19871987
** codes are disabled by default for historical compatibility.
19881988
*/
1989
-SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff);
1989
+SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
19901990
19911991
/*
19921992
** CAPI3REF: Last Insert Rowid
19931993
** METHOD: sqlite3
19941994
**
@@ -2036,11 +2036,11 @@
20362036
** function is running and thus changes the last insert [rowid],
20372037
** then the value returned by [sqlite3_last_insert_rowid()] is
20382038
** unpredictable and might not equal either the old or the new
20392039
** last insert [rowid].
20402040
*/
2041
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*);
2041
+SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
20422042
20432043
/*
20442044
** CAPI3REF: Count The Number Of Rows Modified
20452045
** METHOD: sqlite3
20462046
**
@@ -2089,11 +2089,11 @@
20892089
**
20902090
** If a separate thread makes changes on the same database connection
20912091
** while [sqlite3_changes()] is running then the value returned
20922092
** is unpredictable and not meaningful.
20932093
*/
2094
-SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*);
2094
+SQLITE_API int sqlite3_changes(sqlite3*);
20952095
20962096
/*
20972097
** CAPI3REF: Total Number Of Rows Modified
20982098
** METHOD: sqlite3
20992099
**
@@ -2113,11 +2113,11 @@
21132113
**
21142114
** If a separate thread makes changes on the same database connection
21152115
** while [sqlite3_total_changes()] is running then the value
21162116
** returned is unpredictable and not meaningful.
21172117
*/
2118
-SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*);
2118
+SQLITE_API int sqlite3_total_changes(sqlite3*);
21192119
21202120
/*
21212121
** CAPI3REF: Interrupt A Long-Running Query
21222122
** METHOD: sqlite3
21232123
**
@@ -2153,11 +2153,11 @@
21532153
** that are started after the sqlite3_interrupt() call returns.
21542154
**
21552155
** If the database connection closes while [sqlite3_interrupt()]
21562156
** is running then bad things will likely happen.
21572157
*/
2158
-SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*);
2158
+SQLITE_API void sqlite3_interrupt(sqlite3*);
21592159
21602160
/*
21612161
** CAPI3REF: Determine If An SQL Statement Is Complete
21622162
**
21632163
** These routines are useful during command-line input to determine if the
@@ -2188,12 +2188,12 @@
21882188
** UTF-8 string.
21892189
**
21902190
** The input to [sqlite3_complete16()] must be a zero-terminated
21912191
** UTF-16 string in native byte order.
21922192
*/
2193
-SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql);
2194
-SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql);
2193
+SQLITE_API int sqlite3_complete(const char *sql);
2194
+SQLITE_API int sqlite3_complete16(const void *sql);
21952195
21962196
/*
21972197
** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
21982198
** KEYWORDS: {busy-handler callback} {busy handler}
21992199
** METHOD: sqlite3
@@ -2250,11 +2250,11 @@
22502250
** result in undefined behavior.
22512251
**
22522252
** A busy handler must not close the database connection
22532253
** or [prepared statement] that invoked the busy handler.
22542254
*/
2255
-SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2255
+SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
22562256
22572257
/*
22582258
** CAPI3REF: Set A Busy Timeout
22592259
** METHOD: sqlite3
22602260
**
@@ -2273,11 +2273,11 @@
22732273
** was defined (using [sqlite3_busy_handler()]) prior to calling
22742274
** this routine, that other busy handler is cleared.)^
22752275
**
22762276
** See also: [PRAGMA busy_timeout]
22772277
*/
2278
-SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms);
2278
+SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
22792279
22802280
/*
22812281
** CAPI3REF: Convenience Routines For Running Queries
22822282
** METHOD: sqlite3
22832283
**
@@ -2348,19 +2348,19 @@
23482348
** interface defined here. As a consequence, errors that occur in the
23492349
** wrapper layer outside of the internal [sqlite3_exec()] call are not
23502350
** reflected in subsequent calls to [sqlite3_errcode()] or
23512351
** [sqlite3_errmsg()].
23522352
*/
2353
-SQLITE_API int SQLITE_STDCALL sqlite3_get_table(
2353
+SQLITE_API int sqlite3_get_table(
23542354
sqlite3 *db, /* An open database */
23552355
const char *zSql, /* SQL to be evaluated */
23562356
char ***pazResult, /* Results of the query */
23572357
int *pnRow, /* Number of result rows written here */
23582358
int *pnColumn, /* Number of result columns written here */
23592359
char **pzErrmsg /* Error msg written here */
23602360
);
2361
-SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result);
2361
+SQLITE_API void sqlite3_free_table(char **result);
23622362
23632363
/*
23642364
** CAPI3REF: Formatted String Printing Functions
23652365
**
23662366
** These routines are work-alikes of the "printf()" family of functions
@@ -2462,14 +2462,14 @@
24622462
**
24632463
** ^(The "%z" formatting option works like "%s" but with the
24642464
** addition that after the string has been read and copied into
24652465
** the result, [sqlite3_free()] is called on the input string.)^
24662466
*/
2467
-SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...);
2468
-SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list);
2469
-SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...);
2470
-SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list);
2467
+SQLITE_API char *sqlite3_mprintf(const char*,...);
2468
+SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
2469
+SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
2470
+SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
24712471
24722472
/*
24732473
** CAPI3REF: Memory Allocation Subsystem
24742474
**
24752475
** The SQLite core uses these three routines for all of its own
@@ -2555,16 +2555,16 @@
25552555
**
25562556
** The application must not read or write any part of
25572557
** a block of memory after it has been released using
25582558
** [sqlite3_free()] or [sqlite3_realloc()].
25592559
*/
2560
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int);
2561
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64);
2562
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int);
2563
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64);
2564
-SQLITE_API void SQLITE_STDCALL sqlite3_free(void*);
2565
-SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*);
2560
+SQLITE_API void *sqlite3_malloc(int);
2561
+SQLITE_API void *sqlite3_malloc64(sqlite3_uint64);
2562
+SQLITE_API void *sqlite3_realloc(void*, int);
2563
+SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64);
2564
+SQLITE_API void sqlite3_free(void*);
2565
+SQLITE_API sqlite3_uint64 sqlite3_msize(void*);
25662566
25672567
/*
25682568
** CAPI3REF: Memory Allocator Statistics
25692569
**
25702570
** SQLite provides these two interfaces for reporting on the status
@@ -2585,12 +2585,12 @@
25852585
** [sqlite3_memory_used()] if and only if the parameter to
25862586
** [sqlite3_memory_highwater()] is true. ^The value returned
25872587
** by [sqlite3_memory_highwater(1)] is the high-water mark
25882588
** prior to the reset.
25892589
*/
2590
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void);
2591
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag);
2590
+SQLITE_API sqlite3_int64 sqlite3_memory_used(void);
2591
+SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
25922592
25932593
/*
25942594
** CAPI3REF: Pseudo-Random Number Generator
25952595
**
25962596
** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
@@ -2609,11 +2609,11 @@
26092609
** ^If the previous call to this routine had an N of 1 or more and a
26102610
** non-NULL P then the pseudo-randomness is generated
26112611
** internally and without recourse to the [sqlite3_vfs] xRandomness
26122612
** method.
26132613
*/
2614
-SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P);
2614
+SQLITE_API void sqlite3_randomness(int N, void *P);
26152615
26162616
/*
26172617
** CAPI3REF: Compile-Time Authorization Callbacks
26182618
** METHOD: sqlite3
26192619
**
@@ -2692,11 +2692,11 @@
26922692
** [sqlite3_prepare()] or its variants. Authorization is not
26932693
** performed during statement evaluation in [sqlite3_step()], unless
26942694
** as stated in the previous paragraph, sqlite3_step() invokes
26952695
** sqlite3_prepare_v2() to reprepare a statement after a schema change.
26962696
*/
2697
-SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
2697
+SQLITE_API int sqlite3_set_authorizer(
26982698
sqlite3*,
26992699
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
27002700
void *pUserData
27012701
);
27022702
@@ -2800,13 +2800,13 @@
28002800
** digits in the time are meaningless. Future versions of SQLite
28012801
** might provide greater resolution on the profiler callback. The
28022802
** sqlite3_profile() function is considered experimental and is
28032803
** subject to change in future versions of SQLite.
28042804
*/
2805
-SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*,
2805
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,
28062806
void(*xTrace)(void*,const char*), void*);
2807
-SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_profile(sqlite3*,
2807
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
28082808
void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
28092809
28102810
/*
28112811
** CAPI3REF: SQL Trace Event Codes
28122812
** KEYWORDS: SQLITE_TRACE
@@ -2891,11 +2891,11 @@
28912891
**
28922892
** The sqlite3_trace_v2() interface is intended to replace the legacy
28932893
** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
28942894
** are deprecated.
28952895
*/
2896
-SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2(
2896
+SQLITE_API int sqlite3_trace_v2(
28972897
sqlite3*,
28982898
unsigned uMask,
28992899
int(*xCallback)(unsigned,void*,void*,void*),
29002900
void *pCtx
29012901
);
@@ -2930,11 +2930,11 @@
29302930
** the database connection that invoked the progress handler.
29312931
** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
29322932
** database connections for the meaning of "modify" in this paragraph.
29332933
**
29342934
*/
2935
-SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
2935
+SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
29362936
29372937
/*
29382938
** CAPI3REF: Opening A New Database Connection
29392939
** CONSTRUCTOR: sqlite3
29402940
**
@@ -3159,19 +3159,19 @@
31593159
** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
31603160
** features that require the use of temporary files may fail.
31613161
**
31623162
** See also: [sqlite3_temp_directory]
31633163
*/
3164
-SQLITE_API int SQLITE_STDCALL sqlite3_open(
3164
+SQLITE_API int sqlite3_open(
31653165
const char *filename, /* Database filename (UTF-8) */
31663166
sqlite3 **ppDb /* OUT: SQLite db handle */
31673167
);
3168
-SQLITE_API int SQLITE_STDCALL sqlite3_open16(
3168
+SQLITE_API int sqlite3_open16(
31693169
const void *filename, /* Database filename (UTF-16) */
31703170
sqlite3 **ppDb /* OUT: SQLite db handle */
31713171
);
3172
-SQLITE_API int SQLITE_STDCALL sqlite3_open_v2(
3172
+SQLITE_API int sqlite3_open_v2(
31733173
const char *filename, /* Database filename (UTF-8) */
31743174
sqlite3 **ppDb, /* OUT: SQLite db handle */
31753175
int flags, /* Flags */
31763176
const char *zVfs /* Name of VFS module to use */
31773177
);
@@ -3213,13 +3213,13 @@
32133213
** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and
32143214
** is not a database file pathname pointer that SQLite passed into the xOpen
32153215
** VFS method, then the behavior of this routine is undefined and probably
32163216
** undesirable.
32173217
*/
3218
-SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3219
-SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3220
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
3218
+SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3219
+SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3220
+SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
32213221
32223222
32233223
/*
32243224
** CAPI3REF: Error Codes And Messages
32253225
** METHOD: sqlite3
@@ -3259,15 +3259,15 @@
32593259
**
32603260
** If an interface fails with SQLITE_MISUSE, that means the interface
32613261
** was invoked incorrectly by the application. In that case, the
32623262
** error code and message may or may not be set.
32633263
*/
3264
-SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db);
3265
-SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db);
3266
-SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*);
3267
-SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*);
3268
-SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int);
3264
+SQLITE_API int sqlite3_errcode(sqlite3 *db);
3265
+SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
3266
+SQLITE_API const char *sqlite3_errmsg(sqlite3*);
3267
+SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
3268
+SQLITE_API const char *sqlite3_errstr(int);
32693269
32703270
/*
32713271
** CAPI3REF: Prepared Statement Object
32723272
** KEYWORDS: {prepared statement} {prepared statements}
32733273
**
@@ -3331,11 +3331,11 @@
33313331
** created by an untrusted script can be contained using the
33323332
** [max_page_count] [PRAGMA].
33333333
**
33343334
** New run-time limit categories may be added in future releases.
33353335
*/
3336
-SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal);
3336
+SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
33373337
33383338
/*
33393339
** CAPI3REF: Run-Time Limit Categories
33403340
** KEYWORDS: {limit category} {*limit categories}
33413341
**
@@ -3483,32 +3483,32 @@
34833483
** or [GLOB] operator or if the parameter is compared to an indexed column
34843484
** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
34853485
** </li>
34863486
** </ol>
34873487
*/
3488
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare(
3488
+SQLITE_API int sqlite3_prepare(
34893489
sqlite3 *db, /* Database handle */
34903490
const char *zSql, /* SQL statement, UTF-8 encoded */
34913491
int nByte, /* Maximum length of zSql in bytes. */
34923492
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
34933493
const char **pzTail /* OUT: Pointer to unused portion of zSql */
34943494
);
3495
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2(
3495
+SQLITE_API int sqlite3_prepare_v2(
34963496
sqlite3 *db, /* Database handle */
34973497
const char *zSql, /* SQL statement, UTF-8 encoded */
34983498
int nByte, /* Maximum length of zSql in bytes. */
34993499
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
35003500
const char **pzTail /* OUT: Pointer to unused portion of zSql */
35013501
);
3502
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare16(
3502
+SQLITE_API int sqlite3_prepare16(
35033503
sqlite3 *db, /* Database handle */
35043504
const void *zSql, /* SQL statement, UTF-16 encoded */
35053505
int nByte, /* Maximum length of zSql in bytes. */
35063506
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
35073507
const void **pzTail /* OUT: Pointer to unused portion of zSql */
35083508
);
3509
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
3509
+SQLITE_API int sqlite3_prepare16_v2(
35103510
sqlite3 *db, /* Database handle */
35113511
const void *zSql, /* SQL statement, UTF-16 encoded */
35123512
int nByte, /* Maximum length of zSql in bytes. */
35133513
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
35143514
const void **pzTail /* OUT: Pointer to unused portion of zSql */
@@ -3543,12 +3543,12 @@
35433543
** automatically freed when the prepared statement is finalized.
35443544
** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
35453545
** is obtained from [sqlite3_malloc()] and must be free by the application
35463546
** by passing it to [sqlite3_free()].
35473547
*/
3548
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt);
3549
-SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt);
3548
+SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
3549
+SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt);
35503550
35513551
/*
35523552
** CAPI3REF: Determine If An SQL Statement Writes The Database
35533553
** METHOD: sqlite3_stmt
35543554
**
@@ -3576,11 +3576,11 @@
35763576
** database. ^The [ATTACH] and [DETACH] statements also cause
35773577
** sqlite3_stmt_readonly() to return true since, while those statements
35783578
** change the configuration of a database connection, they do not make
35793579
** changes to the content of the database files on disk.
35803580
*/
3581
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
3581
+SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
35823582
35833583
/*
35843584
** CAPI3REF: Determine If A Prepared Statement Has Been Reset
35853585
** METHOD: sqlite3_stmt
35863586
**
@@ -3597,11 +3597,11 @@
35973597
** to locate all prepared statements associated with a database
35983598
** connection that are in need of being reset. This can be used,
35993599
** for example, in diagnostic routines to search for prepared
36003600
** statements that are holding a transaction open.
36013601
*/
3602
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*);
3602
+SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
36033603
36043604
/*
36053605
** CAPI3REF: Dynamically Typed Value Object
36063606
** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
36073607
**
@@ -3761,24 +3761,24 @@
37613761
** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
37623762
**
37633763
** See also: [sqlite3_bind_parameter_count()],
37643764
** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
37653765
*/
3766
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
3767
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
3766
+SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
3767
+SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
37683768
void(*)(void*));
3769
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double);
3770
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int);
3771
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
3772
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int);
3773
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
3774
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
3775
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
3769
+SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
3770
+SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
3771
+SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
3772
+SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
3773
+SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
3774
+SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
3775
+SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
37763776
void(*)(void*), unsigned char encoding);
3777
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
3778
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
3779
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
3777
+SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
3778
+SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
3779
+SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
37803780
37813781
/*
37823782
** CAPI3REF: Number Of SQL Parameters
37833783
** METHOD: sqlite3_stmt
37843784
**
@@ -3795,11 +3795,11 @@
37953795
**
37963796
** See also: [sqlite3_bind_blob|sqlite3_bind()],
37973797
** [sqlite3_bind_parameter_name()], and
37983798
** [sqlite3_bind_parameter_index()].
37993799
*/
3800
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*);
3800
+SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
38013801
38023802
/*
38033803
** CAPI3REF: Name Of A Host Parameter
38043804
** METHOD: sqlite3_stmt
38053805
**
@@ -3823,11 +3823,11 @@
38233823
**
38243824
** See also: [sqlite3_bind_blob|sqlite3_bind()],
38253825
** [sqlite3_bind_parameter_count()], and
38263826
** [sqlite3_bind_parameter_index()].
38273827
*/
3828
-SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int);
3828
+SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
38293829
38303830
/*
38313831
** CAPI3REF: Index Of A Parameter With A Given Name
38323832
** METHOD: sqlite3_stmt
38333833
**
@@ -3840,21 +3840,21 @@
38403840
**
38413841
** See also: [sqlite3_bind_blob|sqlite3_bind()],
38423842
** [sqlite3_bind_parameter_count()], and
38433843
** [sqlite3_bind_parameter_name()].
38443844
*/
3845
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
3845
+SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
38463846
38473847
/*
38483848
** CAPI3REF: Reset All Bindings On A Prepared Statement
38493849
** METHOD: sqlite3_stmt
38503850
**
38513851
** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
38523852
** the [sqlite3_bind_blob | bindings] on a [prepared statement].
38533853
** ^Use this routine to reset all host parameters to NULL.
38543854
*/
3855
-SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*);
3855
+SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
38563856
38573857
/*
38583858
** CAPI3REF: Number Of Columns In A Result Set
38593859
** METHOD: sqlite3_stmt
38603860
**
@@ -3862,11 +3862,11 @@
38623862
** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
38633863
** statement that does not return data (for example an [UPDATE]).
38643864
**
38653865
** See also: [sqlite3_data_count()]
38663866
*/
3867
-SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt);
3867
+SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
38683868
38693869
/*
38703870
** CAPI3REF: Column Names In A Result Set
38713871
** METHOD: sqlite3_stmt
38723872
**
@@ -3891,12 +3891,12 @@
38913891
** ^The name of a result column is the value of the "AS" clause for
38923892
** that column, if there is an AS clause. If there is no AS clause
38933893
** then the name of the column is unspecified and may change from
38943894
** one release of SQLite to the next.
38953895
*/
3896
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N);
3897
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N);
3896
+SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
3897
+SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
38983898
38993899
/*
39003900
** CAPI3REF: Source Of Data In A Query Result
39013901
** METHOD: sqlite3_stmt
39023902
**
@@ -3940,16 +3940,16 @@
39403940
** If two or more threads call one or more
39413941
** [sqlite3_column_database_name | column metadata interfaces]
39423942
** for the same [prepared statement] and result column
39433943
** at the same time then the results are undefined.
39443944
*/
3945
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int);
3946
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int);
3947
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int);
3948
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int);
3949
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int);
3950
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int);
3945
+SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
3946
+SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
3947
+SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
3948
+SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
3949
+SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
3950
+SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
39513951
39523952
/*
39533953
** CAPI3REF: Declared Datatype Of A Query Result
39543954
** METHOD: sqlite3_stmt
39553955
**
@@ -3977,12 +3977,12 @@
39773977
** data stored in that column is of the declared type. SQLite is
39783978
** strongly typed, but the typing is dynamic not static. ^Type
39793979
** is associated with individual values, not with the containers
39803980
** used to hold those values.
39813981
*/
3982
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int);
3983
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int);
3982
+SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
3983
+SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
39843984
39853985
/*
39863986
** CAPI3REF: Evaluate An SQL Statement
39873987
** METHOD: sqlite3_stmt
39883988
**
@@ -4058,11 +4058,11 @@
40584058
** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
40594059
** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
40604060
** then the more specific [error codes] are returned directly
40614061
** by sqlite3_step(). The use of the "v2" interface is recommended.
40624062
*/
4063
-SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*);
4063
+SQLITE_API int sqlite3_step(sqlite3_stmt*);
40644064
40654065
/*
40664066
** CAPI3REF: Number of columns in a result set
40674067
** METHOD: sqlite3_stmt
40684068
**
@@ -4079,11 +4079,11 @@
40794079
** where it always returns zero since each step of that multi-step
40804080
** pragma returns 0 columns of data.
40814081
**
40824082
** See also: [sqlite3_column_count()]
40834083
*/
4084
-SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
4084
+SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
40854085
40864086
/*
40874087
** CAPI3REF: Fundamental Datatypes
40884088
** KEYWORDS: SQLITE_TEXT
40894089
**
@@ -4269,20 +4269,20 @@
42694269
** of these routines, a default value is returned. The default value
42704270
** is either the integer 0, the floating point number 0.0, or a NULL
42714271
** pointer. Subsequent calls to [sqlite3_errcode()] will return
42724272
** [SQLITE_NOMEM].)^
42734273
*/
4274
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol);
4275
-SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4276
-SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4277
-SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol);
4278
-SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol);
4279
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol);
4280
-SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol);
4281
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol);
4282
-SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol);
4283
-SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol);
4274
+SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
4275
+SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4276
+SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4277
+SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
4278
+SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
4279
+SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
4280
+SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
4281
+SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
4282
+SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
4283
+SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
42844284
42854285
/*
42864286
** CAPI3REF: Destroy A Prepared Statement Object
42874287
** DESTRUCTOR: sqlite3_stmt
42884288
**
@@ -4306,11 +4306,11 @@
43064306
** resource leaks. It is a grievous error for the application to try to use
43074307
** a prepared statement after it has been finalized. Any use of a prepared
43084308
** statement after it has been finalized can result in undefined and
43094309
** undesirable behavior such as segfaults and heap corruption.
43104310
*/
4311
-SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt);
4311
+SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
43124312
43134313
/*
43144314
** CAPI3REF: Reset A Prepared Statement Object
43154315
** METHOD: sqlite3_stmt
43164316
**
@@ -4333,11 +4333,11 @@
43334333
** [sqlite3_reset(S)] returns an appropriate [error code].
43344334
**
43354335
** ^The [sqlite3_reset(S)] interface does not change the values
43364336
** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
43374337
*/
4338
-SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt);
4338
+SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
43394339
43404340
/*
43414341
** CAPI3REF: Create Or Redefine SQL Functions
43424342
** KEYWORDS: {function creation routines}
43434343
** KEYWORDS: {application-defined SQL function}
@@ -4433,31 +4433,31 @@
44334433
** ^An application-defined function is permitted to call other
44344434
** SQLite interfaces. However, such calls must not
44354435
** close the database connection nor finalize or reset the prepared
44364436
** statement in which the function is running.
44374437
*/
4438
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function(
4438
+SQLITE_API int sqlite3_create_function(
44394439
sqlite3 *db,
44404440
const char *zFunctionName,
44414441
int nArg,
44424442
int eTextRep,
44434443
void *pApp,
44444444
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
44454445
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
44464446
void (*xFinal)(sqlite3_context*)
44474447
);
4448
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function16(
4448
+SQLITE_API int sqlite3_create_function16(
44494449
sqlite3 *db,
44504450
const void *zFunctionName,
44514451
int nArg,
44524452
int eTextRep,
44534453
void *pApp,
44544454
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
44554455
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
44564456
void (*xFinal)(sqlite3_context*)
44574457
);
4458
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2(
4458
+SQLITE_API int sqlite3_create_function_v2(
44594459
sqlite3 *db,
44604460
const char *zFunctionName,
44614461
int nArg,
44624462
int eTextRep,
44634463
void *pApp,
@@ -4499,16 +4499,16 @@
44994499
** to be supported. However, new applications should avoid
45004500
** the use of these functions. To encourage programmers to avoid
45014501
** these functions, we will not explain what they do.
45024502
*/
45034503
#ifndef SQLITE_OMIT_DEPRECATED
4504
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*);
4505
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*);
4506
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4507
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void);
4508
-SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void);
4509
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
4504
+SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
4505
+SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
4506
+SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4507
+SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
4508
+SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
4509
+SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
45104510
void*,sqlite3_int64);
45114511
#endif
45124512
45134513
/*
45144514
** CAPI3REF: Obtaining SQL Values
@@ -4554,22 +4554,22 @@
45544554
** or [sqlite3_value_text16()].
45554555
**
45564556
** These routines must be called from the same thread as
45574557
** the SQL function that supplied the [sqlite3_value*] parameters.
45584558
*/
4559
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*);
4560
-SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*);
4561
-SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*);
4562
-SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*);
4563
-SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*);
4564
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*);
4565
-SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*);
4566
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*);
4567
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*);
4568
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*);
4569
-SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*);
4570
-SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*);
4559
+SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
4560
+SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
4561
+SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
4562
+SQLITE_API double sqlite3_value_double(sqlite3_value*);
4563
+SQLITE_API int sqlite3_value_int(sqlite3_value*);
4564
+SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
4565
+SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
4566
+SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
4567
+SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
4568
+SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
4569
+SQLITE_API int sqlite3_value_type(sqlite3_value*);
4570
+SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
45714571
45724572
/*
45734573
** CAPI3REF: Finding The Subtype Of SQL Values
45744574
** METHOD: sqlite3_value
45754575
**
@@ -4581,11 +4581,11 @@
45814581
**
45824582
** SQLite makes no use of subtype itself. It merely passes the subtype
45834583
** from the result of one [application-defined SQL function] into the
45844584
** input of another.
45854585
*/
4586
-SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*);
4586
+SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
45874587
45884588
/*
45894589
** CAPI3REF: Copy And Free SQL Values
45904590
** METHOD: sqlite3_value
45914591
**
@@ -4597,12 +4597,12 @@
45974597
**
45984598
** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
45994599
** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
46004600
** then sqlite3_value_free(V) is a harmless no-op.
46014601
*/
4602
-SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*);
4603
-SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*);
4602
+SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*);
4603
+SQLITE_API void sqlite3_value_free(sqlite3_value*);
46044604
46054605
/*
46064606
** CAPI3REF: Obtain Aggregate Function Context
46074607
** METHOD: sqlite3_context
46084608
**
@@ -4643,11 +4643,11 @@
46434643
** function.
46444644
**
46454645
** This routine must be called from the same thread in which
46464646
** the aggregate SQL function is running.
46474647
*/
4648
-SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes);
4648
+SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
46494649
46504650
/*
46514651
** CAPI3REF: User Data For Functions
46524652
** METHOD: sqlite3_context
46534653
**
@@ -4658,11 +4658,11 @@
46584658
** registered the application defined function.
46594659
**
46604660
** This routine must be called from the same thread in which
46614661
** the application-defined function is running.
46624662
*/
4663
-SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*);
4663
+SQLITE_API void *sqlite3_user_data(sqlite3_context*);
46644664
46654665
/*
46664666
** CAPI3REF: Database Connection For Functions
46674667
** METHOD: sqlite3_context
46684668
**
@@ -4670,11 +4670,11 @@
46704670
** the pointer to the [database connection] (the 1st parameter)
46714671
** of the [sqlite3_create_function()]
46724672
** and [sqlite3_create_function16()] routines that originally
46734673
** registered the application defined function.
46744674
*/
4675
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*);
4675
+SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
46764676
46774677
/*
46784678
** CAPI3REF: Function Auxiliary Data
46794679
** METHOD: sqlite3_context
46804680
**
@@ -4724,12 +4724,12 @@
47244724
** values and [parameters] and expressions composed from the same.)^
47254725
**
47264726
** These routines must be called from the same thread in which
47274727
** the SQL function is running.
47284728
*/
4729
-SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N);
4730
-SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
4729
+SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
4730
+SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
47314731
47324732
47334733
/*
47344734
** CAPI3REF: Constants Defining Special Destructor Behavior
47354735
**
@@ -4861,31 +4861,31 @@
48614861
**
48624862
** If these routines are called from within the different thread
48634863
** than the one containing the application-defined function that received
48644864
** the [sqlite3_context] pointer, the results are undefined.
48654865
*/
4866
-SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
4867
-SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*,
4866
+SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
4867
+SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,
48684868
sqlite3_uint64,void(*)(void*));
4869
-SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double);
4870
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int);
4871
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int);
4872
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*);
4873
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*);
4874
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int);
4875
-SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int);
4876
-SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
4877
-SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*);
4878
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
4879
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
4869
+SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
4870
+SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
4871
+SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
4872
+SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
4873
+SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
4874
+SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
4875
+SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
4876
+SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
4877
+SQLITE_API void sqlite3_result_null(sqlite3_context*);
4878
+SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
4879
+SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
48804880
void(*)(void*), unsigned char encoding);
4881
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
4882
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
4883
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
4884
-SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
4885
-SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
4886
-SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
4881
+SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
4882
+SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
4883
+SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
4884
+SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
4885
+SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
4886
+SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
48874887
48884888
48894889
/*
48904890
** CAPI3REF: Setting The Subtype Of An SQL Function
48914891
** METHOD: sqlite3_context
@@ -4896,11 +4896,11 @@
48964896
** of the subtype T are preserved in current versions of SQLite;
48974897
** higher order bits are discarded.
48984898
** The number of subtype bytes preserved by SQLite might increase
48994899
** in future releases of SQLite.
49004900
*/
4901
-SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int);
4901
+SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
49024902
49034903
/*
49044904
** CAPI3REF: Define New Collating Sequences
49054905
** METHOD: sqlite3
49064906
**
@@ -4978,26 +4978,26 @@
49784978
** is unfortunate but cannot be changed without breaking backwards
49794979
** compatibility.
49804980
**
49814981
** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
49824982
*/
4983
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation(
4983
+SQLITE_API int sqlite3_create_collation(
49844984
sqlite3*,
49854985
const char *zName,
49864986
int eTextRep,
49874987
void *pArg,
49884988
int(*xCompare)(void*,int,const void*,int,const void*)
49894989
);
4990
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2(
4990
+SQLITE_API int sqlite3_create_collation_v2(
49914991
sqlite3*,
49924992
const char *zName,
49934993
int eTextRep,
49944994
void *pArg,
49954995
int(*xCompare)(void*,int,const void*,int,const void*),
49964996
void(*xDestroy)(void*)
49974997
);
4998
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16(
4998
+SQLITE_API int sqlite3_create_collation16(
49994999
sqlite3*,
50005000
const void *zName,
50015001
int eTextRep,
50025002
void *pArg,
50035003
int(*xCompare)(void*,int,const void*,int,const void*)
@@ -5028,16 +5028,16 @@
50285028
**
50295029
** The callback function should register the desired collation using
50305030
** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
50315031
** [sqlite3_create_collation_v2()].
50325032
*/
5033
-SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed(
5033
+SQLITE_API int sqlite3_collation_needed(
50345034
sqlite3*,
50355035
void*,
50365036
void(*)(void*,sqlite3*,int eTextRep,const char*)
50375037
);
5038
-SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16(
5038
+SQLITE_API int sqlite3_collation_needed16(
50395039
sqlite3*,
50405040
void*,
50415041
void(*)(void*,sqlite3*,int eTextRep,const void*)
50425042
);
50435043
@@ -5047,15 +5047,15 @@
50475047
** called right after sqlite3_open().
50485048
**
50495049
** The code to implement this API is not available in the public release
50505050
** of SQLite.
50515051
*/
5052
-SQLITE_API int SQLITE_STDCALL sqlite3_key(
5052
+SQLITE_API int sqlite3_key(
50535053
sqlite3 *db, /* Database to be rekeyed */
50545054
const void *pKey, int nKey /* The key */
50555055
);
5056
-SQLITE_API int SQLITE_STDCALL sqlite3_key_v2(
5056
+SQLITE_API int sqlite3_key_v2(
50575057
sqlite3 *db, /* Database to be rekeyed */
50585058
const char *zDbName, /* Name of the database */
50595059
const void *pKey, int nKey /* The key */
50605060
);
50615061
@@ -5065,35 +5065,35 @@
50655065
** database is decrypted.
50665066
**
50675067
** The code to implement this API is not available in the public release
50685068
** of SQLite.
50695069
*/
5070
-SQLITE_API int SQLITE_STDCALL sqlite3_rekey(
5070
+SQLITE_API int sqlite3_rekey(
50715071
sqlite3 *db, /* Database to be rekeyed */
50725072
const void *pKey, int nKey /* The new key */
50735073
);
5074
-SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2(
5074
+SQLITE_API int sqlite3_rekey_v2(
50755075
sqlite3 *db, /* Database to be rekeyed */
50765076
const char *zDbName, /* Name of the database */
50775077
const void *pKey, int nKey /* The new key */
50785078
);
50795079
50805080
/*
50815081
** Specify the activation key for a SEE database. Unless
50825082
** activated, none of the SEE routines will work.
50835083
*/
5084
-SQLITE_API void SQLITE_STDCALL sqlite3_activate_see(
5084
+SQLITE_API void sqlite3_activate_see(
50855085
const char *zPassPhrase /* Activation phrase */
50865086
);
50875087
#endif
50885088
50895089
#ifdef SQLITE_ENABLE_CEROD
50905090
/*
50915091
** Specify the activation key for a CEROD database. Unless
50925092
** activated, none of the CEROD routines will work.
50935093
*/
5094
-SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod(
5094
+SQLITE_API void sqlite3_activate_cerod(
50955095
const char *zPassPhrase /* Activation phrase */
50965096
);
50975097
#endif
50985098
50995099
/*
@@ -5111,11 +5111,11 @@
51115111
** method of the default [sqlite3_vfs] object. If the xSleep() method
51125112
** of the default VFS is not implemented correctly, or not implemented at
51135113
** all, then the behavior of sqlite3_sleep() may deviate from the description
51145114
** in the previous paragraphs.
51155115
*/
5116
-SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int);
5116
+SQLITE_API int sqlite3_sleep(int);
51175117
51185118
/*
51195119
** CAPI3REF: Name Of The Folder Holding Temporary Files
51205120
**
51215121
** ^(If this global variable is made to point to a string which is
@@ -5230,11 +5230,11 @@
52305230
**
52315231
** If another thread changes the autocommit status of the database
52325232
** connection while this routine is running, then the return value
52335233
** is undefined.
52345234
*/
5235
-SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*);
5235
+SQLITE_API int sqlite3_get_autocommit(sqlite3*);
52365236
52375237
/*
52385238
** CAPI3REF: Find The Database Handle Of A Prepared Statement
52395239
** METHOD: sqlite3_stmt
52405240
**
@@ -5243,11 +5243,11 @@
52435243
** returned by sqlite3_db_handle is the same [database connection]
52445244
** that was the first argument
52455245
** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
52465246
** create the statement in the first place.
52475247
*/
5248
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*);
5248
+SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
52495249
52505250
/*
52515251
** CAPI3REF: Return The Filename For A Database Connection
52525252
** METHOD: sqlite3
52535253
**
@@ -5260,21 +5260,21 @@
52605260
** ^The filename returned by this function is the output of the
52615261
** xFullPathname method of the [VFS]. ^In other words, the filename
52625262
** will be an absolute pathname, even if the filename used
52635263
** to open the database originally was a URI or relative pathname.
52645264
*/
5265
-SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName);
5265
+SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);
52665266
52675267
/*
52685268
** CAPI3REF: Determine if a database is read-only
52695269
** METHOD: sqlite3
52705270
**
52715271
** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N
52725272
** of connection D is read-only, 0 if it is read/write, or -1 if N is not
52735273
** the name of a database on connection D.
52745274
*/
5275
-SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
5275
+SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
52765276
52775277
/*
52785278
** CAPI3REF: Find the next prepared statement
52795279
** METHOD: sqlite3
52805280
**
@@ -5286,11 +5286,11 @@
52865286
**
52875287
** The [database connection] pointer D in a call to
52885288
** [sqlite3_next_stmt(D,S)] must refer to an open database
52895289
** connection and in particular must not be a NULL pointer.
52905290
*/
5291
-SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
5291
+SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
52925292
52935293
/*
52945294
** CAPI3REF: Commit And Rollback Notification Callbacks
52955295
** METHOD: sqlite3
52965296
**
@@ -5335,12 +5335,12 @@
53355335
** ^The rollback callback is not invoked if a transaction is
53365336
** automatically rolled back because the database connection is closed.
53375337
**
53385338
** See also the [sqlite3_update_hook()] interface.
53395339
*/
5340
-SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5341
-SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5340
+SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5341
+SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
53425342
53435343
/*
53445344
** CAPI3REF: Data Change Notification Callbacks
53455345
** METHOD: sqlite3
53465346
**
@@ -5387,11 +5387,11 @@
53875387
** the first call on D.
53885388
**
53895389
** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
53905390
** and [sqlite3_preupdate_hook()] interfaces.
53915391
*/
5392
-SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
5392
+SQLITE_API void *sqlite3_update_hook(
53935393
sqlite3*,
53945394
void(*)(void *,int ,char const *,char const *,sqlite3_int64),
53955395
void*
53965396
);
53975397
@@ -5427,11 +5427,11 @@
54275427
** This interface is threadsafe on processors where writing a
54285428
** 32-bit integer is atomic.
54295429
**
54305430
** See Also: [SQLite Shared-Cache Mode]
54315431
*/
5432
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int);
5432
+SQLITE_API int sqlite3_enable_shared_cache(int);
54335433
54345434
/*
54355435
** CAPI3REF: Attempt To Free Heap Memory
54365436
**
54375437
** ^The sqlite3_release_memory() interface attempts to free N bytes
@@ -5443,11 +5443,11 @@
54435443
** ^The sqlite3_release_memory() routine is a no-op returning zero
54445444
** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
54455445
**
54465446
** See also: [sqlite3_db_release_memory()]
54475447
*/
5448
-SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int);
5448
+SQLITE_API int sqlite3_release_memory(int);
54495449
54505450
/*
54515451
** CAPI3REF: Free Memory Used By A Database Connection
54525452
** METHOD: sqlite3
54535453
**
@@ -5457,11 +5457,11 @@
54575457
** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is
54585458
** omitted.
54595459
**
54605460
** See also: [sqlite3_release_memory()]
54615461
*/
5462
-SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*);
5462
+SQLITE_API int sqlite3_db_release_memory(sqlite3*);
54635463
54645464
/*
54655465
** CAPI3REF: Impose A Limit On Heap Size
54665466
**
54675467
** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
@@ -5509,11 +5509,11 @@
55095509
** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT].
55105510
**
55115511
** The circumstances under which SQLite will enforce the soft heap limit may
55125512
** changes in future releases of SQLite.
55135513
*/
5514
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N);
5514
+SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
55155515
55165516
/*
55175517
** CAPI3REF: Deprecated Soft Heap Limit Interface
55185518
** DEPRECATED
55195519
**
@@ -5520,11 +5520,11 @@
55205520
** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
55215521
** interface. This routine is provided for historical compatibility
55225522
** only. All new applications should use the
55235523
** [sqlite3_soft_heap_limit64()] interface rather than this one.
55245524
*/
5525
-SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N);
5525
+SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
55265526
55275527
55285528
/*
55295529
** CAPI3REF: Extract Metadata About A Column Of A Table
55305530
** METHOD: sqlite3
@@ -5590,11 +5590,11 @@
55905590
**
55915591
** ^This function causes all database schemas to be read from disk and
55925592
** parsed, if that has not already been done, and returns an error if
55935593
** any errors are encountered while loading the schema.
55945594
*/
5595
-SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata(
5595
+SQLITE_API int sqlite3_table_column_metadata(
55965596
sqlite3 *db, /* Connection handle */
55975597
const char *zDbName, /* Database name or NULL */
55985598
const char *zTableName, /* Table name */
55995599
const char *zColumnName, /* Column name */
56005600
char const **pzDataType, /* OUTPUT: Declared data type */
@@ -5646,11 +5646,11 @@
56465646
** disabled and prevent SQL injections from giving attackers
56475647
** access to extension loading capabilities.
56485648
**
56495649
** See also the [load_extension() SQL function].
56505650
*/
5651
-SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
5651
+SQLITE_API int sqlite3_load_extension(
56525652
sqlite3 *db, /* Load the extension into this database connection */
56535653
const char *zFile, /* Name of the shared library containing extension */
56545654
const char *zProc, /* Entry point. Derived from zFile if 0 */
56555655
char **pzErrMsg /* Put error message here if not 0 */
56565656
);
@@ -5678,11 +5678,11 @@
56785678
** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
56795679
** rather than this interface, so the [load_extension()] SQL function
56805680
** remains disabled. This will prevent SQL injections from giving attackers
56815681
** access to extension loading capabilities.
56825682
*/
5683
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5683
+SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
56845684
56855685
/*
56865686
** CAPI3REF: Automatically Load Statically Linked Extensions
56875687
**
56885688
** ^This interface causes the xEntryPoint() function to be invoked for
@@ -5716,11 +5716,11 @@
57165716
** will be called more than once for each database connection that is opened.
57175717
**
57185718
** See also: [sqlite3_reset_auto_extension()]
57195719
** and [sqlite3_cancel_auto_extension()]
57205720
*/
5721
-SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void));
5721
+SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
57225722
57235723
/*
57245724
** CAPI3REF: Cancel Automatic Extension Loading
57255725
**
57265726
** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the
@@ -5728,19 +5728,19 @@
57285728
** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)]
57295729
** routine returns 1 if initialization routine X was successfully
57305730
** unregistered and it returns 0 if X was not on the list of initialization
57315731
** routines.
57325732
*/
5733
-SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
5733
+SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
57345734
57355735
/*
57365736
** CAPI3REF: Reset Automatic Extension Loading
57375737
**
57385738
** ^This interface disables all automatic extensions previously
57395739
** registered using [sqlite3_auto_extension()].
57405740
*/
5741
-SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void);
5741
+SQLITE_API void sqlite3_reset_auto_extension(void);
57425742
57435743
/*
57445744
** The interface to the virtual-table mechanism is currently considered
57455745
** to be experimental. The interface might change in incompatible ways.
57465746
** If this is a problem for you, do not use the interface at this time.
@@ -5981,17 +5981,17 @@
59815981
** be invoked if the call to sqlite3_create_module_v2() fails.
59825982
** ^The sqlite3_create_module()
59835983
** interface is equivalent to sqlite3_create_module_v2() with a NULL
59845984
** destructor.
59855985
*/
5986
-SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
5986
+SQLITE_API int sqlite3_create_module(
59875987
sqlite3 *db, /* SQLite connection to register module with */
59885988
const char *zName, /* Name of the module */
59895989
const sqlite3_module *p, /* Methods for the module */
59905990
void *pClientData /* Client data for xCreate/xConnect */
59915991
);
5992
-SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
5992
+SQLITE_API int sqlite3_create_module_v2(
59935993
sqlite3 *db, /* SQLite connection to register module with */
59945994
const char *zName, /* Name of the module */
59955995
const sqlite3_module *p, /* Methods for the module */
59965996
void *pClientData, /* Client data for xCreate/xConnect */
59975997
void(*xDestroy)(void*) /* Module destructor function */
@@ -6050,11 +6050,11 @@
60506050
** ^The [xCreate] and [xConnect] methods of a
60516051
** [virtual table module] call this interface
60526052
** to declare the format (the names and datatypes of the columns) of
60536053
** the virtual tables they implement.
60546054
*/
6055
-SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL);
6055
+SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
60566056
60576057
/*
60586058
** CAPI3REF: Overload A Function For A Virtual Table
60596059
** METHOD: sqlite3
60606060
**
@@ -6069,11 +6069,11 @@
60696069
** of the new function always causes an exception to be thrown. So
60706070
** the new function is not good for anything by itself. Its only
60716071
** purpose is to be a placeholder function that can be overloaded
60726072
** by a [virtual table].
60736073
*/
6074
-SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
6074
+SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
60756075
60766076
/*
60776077
** The interface to the virtual-table mechanism defined above (back up
60786078
** to a comment remarkably similar to this one) is currently considered
60796079
** to be experimental. The interface might change in incompatible ways.
@@ -6168,11 +6168,11 @@
61686168
** zero-filled blob to read or write using the incremental-blob interface.
61696169
**
61706170
** To avoid a resource leak, every open [BLOB handle] should eventually
61716171
** be released by a call to [sqlite3_blob_close()].
61726172
*/
6173
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
6173
+SQLITE_API int sqlite3_blob_open(
61746174
sqlite3*,
61756175
const char *zDb,
61766176
const char *zTable,
61776177
const char *zColumn,
61786178
sqlite3_int64 iRow,
@@ -6201,11 +6201,11 @@
62016201
** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
62026202
** always returns zero.
62036203
**
62046204
** ^This function sets the database handle error code and message.
62056205
*/
6206
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
6206
+SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
62076207
62086208
/*
62096209
** CAPI3REF: Close A BLOB Handle
62106210
** DESTRUCTOR: sqlite3_blob
62116211
**
@@ -6224,11 +6224,11 @@
62246224
** with a null pointer (such as would be returned by a failed call to
62256225
** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
62266226
** is passed a valid open blob handle, the values returned by the
62276227
** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
62286228
*/
6229
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *);
6229
+SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
62306230
62316231
/*
62326232
** CAPI3REF: Return The Size Of An Open BLOB
62336233
** METHOD: sqlite3_blob
62346234
**
@@ -6240,11 +6240,11 @@
62406240
** This routine only works on a [BLOB handle] which has been created
62416241
** by a prior successful call to [sqlite3_blob_open()] and which has not
62426242
** been closed by [sqlite3_blob_close()]. Passing any other pointer in
62436243
** to this routine results in undefined and probably undesirable behavior.
62446244
*/
6245
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *);
6245
+SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
62466246
62476247
/*
62486248
** CAPI3REF: Read Data From A BLOB Incrementally
62496249
** METHOD: sqlite3_blob
62506250
**
@@ -6269,11 +6269,11 @@
62696269
** been closed by [sqlite3_blob_close()]. Passing any other pointer in
62706270
** to this routine results in undefined and probably undesirable behavior.
62716271
**
62726272
** See also: [sqlite3_blob_write()].
62736273
*/
6274
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
6274
+SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
62756275
62766276
/*
62776277
** CAPI3REF: Write Data Into A BLOB Incrementally
62786278
** METHOD: sqlite3_blob
62796279
**
@@ -6311,11 +6311,11 @@
63116311
** been closed by [sqlite3_blob_close()]. Passing any other pointer in
63126312
** to this routine results in undefined and probably undesirable behavior.
63136313
**
63146314
** See also: [sqlite3_blob_read()].
63156315
*/
6316
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
6316
+SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
63176317
63186318
/*
63196319
** CAPI3REF: Virtual File System Objects
63206320
**
63216321
** A virtual filesystem (VFS) is an [sqlite3_vfs] object
@@ -6342,13 +6342,13 @@
63426342
**
63436343
** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
63446344
** ^(If the default VFS is unregistered, another VFS is chosen as
63456345
** the default. The choice for the new VFS is arbitrary.)^
63466346
*/
6347
-SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName);
6348
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6349
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
6347
+SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
6348
+SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6349
+SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
63506350
63516351
/*
63526352
** CAPI3REF: Mutexes
63536353
**
63546354
** The SQLite core uses these routines for thread
@@ -6460,15 +6460,15 @@
64606460
** sqlite3_mutex_leave() is a NULL pointer, then all three routines
64616461
** behave as no-ops.
64626462
**
64636463
** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
64646464
*/
6465
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int);
6466
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*);
6467
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*);
6468
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*);
6469
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*);
6465
+SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
6466
+SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
6467
+SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
6468
+SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
6469
+SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
64706470
64716471
/*
64726472
** CAPI3REF: Mutex Methods Object
64736473
**
64746474
** An instance of this structure defines the low-level routines
@@ -6574,12 +6574,12 @@
65746574
** call to sqlite3_mutex_held() to fail, so a non-zero return is
65756575
** the appropriate thing to do. The sqlite3_mutex_notheld()
65766576
** interface should also return 1 when given a NULL pointer.
65776577
*/
65786578
#ifndef NDEBUG
6579
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*);
6580
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
6579
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
6580
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
65816581
#endif
65826582
65836583
/*
65846584
** CAPI3REF: Mutex Types
65856585
**
@@ -6615,11 +6615,11 @@
66156615
** serializes access to the [database connection] given in the argument
66166616
** when the [threading mode] is Serialized.
66176617
** ^If the [threading mode] is Single-thread or Multi-thread then this
66186618
** routine returns a NULL pointer.
66196619
*/
6620
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*);
6620
+SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
66216621
66226622
/*
66236623
** CAPI3REF: Low-Level Control Of Database Files
66246624
** METHOD: sqlite3
66256625
**
@@ -6650,11 +6650,11 @@
66506650
** an incorrect zDbName and an SQLITE_ERROR return from the underlying
66516651
** xFileControl method.
66526652
**
66536653
** See also: [SQLITE_FCNTL_LOCKSTATE]
66546654
*/
6655
-SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6655
+SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
66566656
66576657
/*
66586658
** CAPI3REF: Testing Interface
66596659
**
66606660
** ^The sqlite3_test_control() interface is used to read out internal
@@ -6669,11 +6669,11 @@
66696669
** The details of the operation codes, their meanings, the parameters
66706670
** they take, and what they do are all subject to change without notice.
66716671
** Unlike most of the SQLite API, this function is not guaranteed to
66726672
** operate consistently from one release to the next.
66736673
*/
6674
-SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
6674
+SQLITE_API int sqlite3_test_control(int op, ...);
66756675
66766676
/*
66776677
** CAPI3REF: Testing Interface Operation Codes
66786678
**
66796679
** These constants are the valid operation code parameters used
@@ -6732,12 +6732,12 @@
67326732
** be represented by a 32-bit integer, then the values returned by
67336733
** sqlite3_status() are undefined.
67346734
**
67356735
** See also: [sqlite3_db_status()]
67366736
*/
6737
-SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6738
-SQLITE_API int SQLITE_STDCALL sqlite3_status64(
6737
+SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6738
+SQLITE_API int sqlite3_status64(
67396739
int op,
67406740
sqlite3_int64 *pCurrent,
67416741
sqlite3_int64 *pHighwater,
67426742
int resetFlag
67436743
);
@@ -6858,11 +6858,11 @@
68586858
** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
68596859
** non-zero [error code] on failure.
68606860
**
68616861
** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
68626862
*/
6863
-SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
6863
+SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
68646864
68656865
/*
68666866
** CAPI3REF: Status Parameters for database connections
68676867
** KEYWORDS: {SQLITE_DBSTATUS options}
68686868
**
@@ -7001,11 +7001,11 @@
70017001
** ^If the resetFlg is true, then the counter is reset to zero after this
70027002
** interface call returns.
70037003
**
70047004
** See also: [sqlite3_status()] and [sqlite3_db_status()].
70057005
*/
7006
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
7006
+SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
70077007
70087008
/*
70097009
** CAPI3REF: Status Parameters for prepared statements
70107010
** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters}
70117011
**
@@ -7470,20 +7470,20 @@
74707470
** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
74717471
** APIs are not strictly speaking threadsafe. If they are invoked at the
74727472
** same time as another thread is invoking sqlite3_backup_step() it is
74737473
** possible that they return invalid values.
74747474
*/
7475
-SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
7475
+SQLITE_API sqlite3_backup *sqlite3_backup_init(
74767476
sqlite3 *pDest, /* Destination database handle */
74777477
const char *zDestName, /* Destination database name */
74787478
sqlite3 *pSource, /* Source database handle */
74797479
const char *zSourceName /* Source database name */
74807480
);
7481
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage);
7482
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p);
7483
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p);
7484
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p);
7481
+SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
7482
+SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
7483
+SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);
7484
+SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
74857485
74867486
/*
74877487
** CAPI3REF: Unlock Notification
74887488
** METHOD: sqlite3
74897489
**
@@ -7596,11 +7596,11 @@
75967596
** by an sqlite3_step() call. ^(If there is a blocking connection, then the
75977597
** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
75987598
** the special "DROP TABLE/INDEX" case, the extended error code is just
75997599
** SQLITE_LOCKED.)^
76007600
*/
7601
-SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify(
7601
+SQLITE_API int sqlite3_unlock_notify(
76027602
sqlite3 *pBlocked, /* Waiting connection */
76037603
void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
76047604
void *pNotifyArg /* Argument to pass to xNotify */
76057605
);
76067606
@@ -7611,12 +7611,12 @@
76117611
** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications
76127612
** and extensions to compare the contents of two buffers containing UTF-8
76137613
** strings in a case-independent fashion, using the same definition of "case
76147614
** independence" that SQLite uses internally when comparing identifiers.
76157615
*/
7616
-SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *);
7617
-SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int);
7616
+SQLITE_API int sqlite3_stricmp(const char *, const char *);
7617
+SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
76187618
76197619
/*
76207620
** CAPI3REF: String Globbing
76217621
*
76227622
** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if
@@ -7629,11 +7629,11 @@
76297629
** Note that this routine returns zero on a match and non-zero if the strings
76307630
** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
76317631
**
76327632
** See also: [sqlite3_strlike()].
76337633
*/
7634
-SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr);
7634
+SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
76357635
76367636
/*
76377637
** CAPI3REF: String LIKE Matching
76387638
*
76397639
** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if
@@ -7652,11 +7652,11 @@
76527652
** Note that this routine returns zero on a match and non-zero if the strings
76537653
** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
76547654
**
76557655
** See also: [sqlite3_strglob()].
76567656
*/
7657
-SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
7657
+SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
76587658
76597659
/*
76607660
** CAPI3REF: Error Logging Interface
76617661
**
76627662
** ^The [sqlite3_log()] interface writes a message into the [error log]
@@ -7675,11 +7675,11 @@
76757675
** will not use dynamically allocated memory. The log message is stored in
76767676
** a fixed-length buffer on the stack. If the log message is longer than
76777677
** a few hundred characters, it will be truncated to the length of the
76787678
** buffer.
76797679
*/
7680
-SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...);
7680
+SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
76817681
76827682
/*
76837683
** CAPI3REF: Write-Ahead Log Commit Hook
76847684
** METHOD: sqlite3
76857685
**
@@ -7711,11 +7711,11 @@
77117711
** previously registered write-ahead log callback. ^Note that the
77127712
** [sqlite3_wal_autocheckpoint()] interface and the
77137713
** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
77147714
** overwrite any prior [sqlite3_wal_hook()] settings.
77157715
*/
7716
-SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook(
7716
+SQLITE_API void *sqlite3_wal_hook(
77177717
sqlite3*,
77187718
int(*)(void *,sqlite3*,const char*,int),
77197719
void*
77207720
);
77217721
@@ -7746,11 +7746,11 @@
77467746
** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
77477747
** pages. The use of this interface
77487748
** is only necessary if the default setting is found to be suboptimal
77497749
** for a particular application.
77507750
*/
7751
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
7751
+SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
77527752
77537753
/*
77547754
** CAPI3REF: Checkpoint a database
77557755
** METHOD: sqlite3
77567756
**
@@ -7768,11 +7768,11 @@
77687768
** interface was added. This interface is retained for backwards
77697769
** compatibility and as a convenience for applications that need to manually
77707770
** start a callback but which do not need the full power (and corresponding
77717771
** complication) of [sqlite3_wal_checkpoint_v2()].
77727772
*/
7773
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
7773
+SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
77747774
77757775
/*
77767776
** CAPI3REF: Checkpoint a database
77777777
** METHOD: sqlite3
77787778
**
@@ -7862,11 +7862,11 @@
78627862
** [sqlite3_errcode()] and [sqlite3_errmsg()].
78637863
**
78647864
** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
78657865
** from SQL.
78667866
*/
7867
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2(
7867
+SQLITE_API int sqlite3_wal_checkpoint_v2(
78687868
sqlite3 *db, /* Database handle */
78697869
const char *zDb, /* Name of attached database (or NULL) */
78707870
int eMode, /* SQLITE_CHECKPOINT_* value */
78717871
int *pnLog, /* OUT: Size of WAL log in frames */
78727872
int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -7898,11 +7898,11 @@
78987898
**
78997899
** At present, there is only one option that may be configured using
79007900
** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
79017901
** may be added in the future.
79027902
*/
7903
-SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...);
7903
+SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
79047904
79057905
/*
79067906
** CAPI3REF: Virtual Table Configuration Options
79077907
**
79087908
** These macros define the various options to the
@@ -7951,11 +7951,11 @@
79517951
** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],
79527952
** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode
79537953
** of the SQL statement that triggered the call to the [xUpdate] method of the
79547954
** [virtual table].
79557955
*/
7956
-SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *);
7956
+SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
79577957
79587958
/*
79597959
** CAPI3REF: Conflict resolution modes
79607960
** KEYWORDS: {conflict resolution mode}
79617961
**
@@ -8056,11 +8056,11 @@
80568056
** as if the loop did not exist - it returns non-zero and leave the variable
80578057
** that pOut points to unchanged.
80588058
**
80598059
** See also: [sqlite3_stmt_scanstatus_reset()]
80608060
*/
8061
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
8061
+SQLITE_API int sqlite3_stmt_scanstatus(
80628062
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
80638063
int idx, /* Index of loop to report on */
80648064
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
80658065
void *pOut /* Result written here */
80668066
);
@@ -8072,11 +8072,11 @@
80728072
** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
80738073
**
80748074
** This API is only available if the library is built with pre-processor
80758075
** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
80768076
*/
8077
-SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
8077
+SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
80788078
80798079
/*
80808080
** CAPI3REF: Flush caches to disk mid-transaction
80818081
**
80828082
** ^If a write-transaction is open on [database connection] D when the
@@ -8104,11 +8104,11 @@
81048104
** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.
81058105
**
81068106
** ^This function does not set the database handle error code or message
81078107
** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
81088108
*/
8109
-SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*);
8109
+SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
81108110
81118111
/*
81128112
** CAPI3REF: The pre-update hook.
81138113
**
81148114
** ^These interfaces are only available if SQLite is compiled using the
@@ -8184,11 +8184,11 @@
81848184
** triggers; or 2 for changes resulting from triggers called by top-level
81858185
** triggers; and so forth.
81868186
**
81878187
** See also: [sqlite3_update_hook()]
81888188
*/
8189
-SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook(
8189
+SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook(
81908190
sqlite3 *db,
81918191
void(*xPreUpdate)(
81928192
void *pCtx, /* Copy of third arg to preupdate_hook() */
81938193
sqlite3 *db, /* Database handle */
81948194
int op, /* SQLITE_UPDATE, DELETE or INSERT */
@@ -8197,14 +8197,14 @@
81978197
sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
81988198
sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
81998199
),
82008200
void*
82018201
);
8202
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8203
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *);
8204
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *);
8205
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
8202
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8203
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_count(sqlite3 *);
8204
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_depth(sqlite3 *);
8205
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
82068206
82078207
/*
82088208
** CAPI3REF: Low-level system error code
82098209
**
82108210
** ^Attempt to return the underlying operating system error code or error
@@ -8212,11 +8212,11 @@
82128212
** The return value is OS-dependent. For example, on unix systems, after
82138213
** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
82148214
** called to get back the underlying "errno" that caused the problem, such
82158215
** as ENOSPC, EAUTH, EISDIR, and so forth.
82168216
*/
8217
-SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*);
8217
+SQLITE_API int sqlite3_system_errno(sqlite3*);
82188218
82198219
/*
82208220
** CAPI3REF: Database Snapshot
82218221
** KEYWORDS: {snapshot}
82228222
** EXPERIMENTAL
@@ -8262,11 +8262,11 @@
82628262
** to avoid a memory leak.
82638263
**
82648264
** The [sqlite3_snapshot_get()] interface is only available when the
82658265
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
82668266
*/
8267
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get(
8267
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
82688268
sqlite3 *db,
82698269
const char *zSchema,
82708270
sqlite3_snapshot **ppSnapshot
82718271
);
82728272
@@ -8300,11 +8300,11 @@
83008300
** database connection in order to make it ready to use snapshots.)
83018301
**
83028302
** The [sqlite3_snapshot_open()] interface is only available when the
83038303
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
83048304
*/
8305
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open(
8305
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
83068306
sqlite3 *db,
83078307
const char *zSchema,
83088308
sqlite3_snapshot *pSnapshot
83098309
);
83108310
@@ -8317,11 +8317,11 @@
83178317
** using this routine to avoid a memory leak.
83188318
**
83198319
** The [sqlite3_snapshot_free()] interface is only available when the
83208320
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
83218321
*/
8322
-SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*);
8322
+SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
83238323
83248324
/*
83258325
** CAPI3REF: Compare the ages of two snapshot handles.
83268326
** EXPERIMENTAL
83278327
**
@@ -8341,11 +8341,11 @@
83418341
**
83428342
** Otherwise, this API returns a negative value if P1 refers to an older
83438343
** snapshot than P2, zero if the two handles refer to the same database
83448344
** snapshot, and a positive value if P1 is a newer snapshot than P2.
83458345
*/
8346
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp(
8346
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
83478347
sqlite3_snapshot *p1,
83488348
sqlite3_snapshot *p2
83498349
);
83508350
83518351
/*
@@ -8399,11 +8399,11 @@
83998399
** Register a geometry callback named zGeom that can be used as part of an
84008400
** R-Tree geometry query as follows:
84018401
**
84028402
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
84038403
*/
8404
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback(
8404
+SQLITE_API int sqlite3_rtree_geometry_callback(
84058405
sqlite3 *db,
84068406
const char *zGeom,
84078407
int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
84088408
void *pContext
84098409
);
@@ -8425,11 +8425,11 @@
84258425
** Register a 2nd-generation geometry callback named zScore that can be
84268426
** used as part of an R-Tree geometry query as follows:
84278427
**
84288428
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
84298429
*/
8430
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback(
8430
+SQLITE_API int sqlite3_rtree_query_callback(
84318431
sqlite3 *db,
84328432
const char *zQueryFunc,
84338433
int (*xQueryFunc)(sqlite3_rtree_query_info*),
84348434
void *pContext,
84358435
void (*xDestructor)(void*)
84368436
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -118,13 +118,13 @@
118 **
119 ** See also: [sqlite3_libversion()],
120 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
121 ** [sqlite_version()] and [sqlite_source_id()].
122 */
123 #define SQLITE_VERSION "3.14.1"
124 #define SQLITE_VERSION_NUMBER 3014001
125 #define SQLITE_SOURCE_ID "2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b"
126
127 /*
128 ** CAPI3REF: Run-Time Library Version Numbers
129 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
130 **
@@ -153,13 +153,13 @@
153 ** [SQLITE_SOURCE_ID] C preprocessor macro.
154 **
155 ** See also: [sqlite_version()] and [sqlite_source_id()].
156 */
157 SQLITE_API SQLITE_EXTERN const char sqlite3_version[];
158 SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void);
159 SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void);
160 SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void);
161
162 /*
163 ** CAPI3REF: Run-Time Library Compilation Options Diagnostics
164 **
165 ** ^The sqlite3_compileoption_used() function returns 0 or 1
@@ -180,12 +180,12 @@
180 **
181 ** See also: SQL functions [sqlite_compileoption_used()] and
182 ** [sqlite_compileoption_get()] and the [compile_options pragma].
183 */
184 #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
185 SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName);
186 SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N);
187 #endif
188
189 /*
190 ** CAPI3REF: Test To See If The Library Is Threadsafe
191 **
@@ -220,11 +220,11 @@
220 ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
221 ** is unchanged by calls to sqlite3_config().)^
222 **
223 ** See the [threading mode] documentation for additional information.
224 */
225 SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void);
226
227 /*
228 ** CAPI3REF: Database Connection Handle
229 ** KEYWORDS: {database connection} {database connections}
230 **
@@ -317,12 +317,12 @@
317 ** from [sqlite3_open()], [sqlite3_open16()], or
318 ** [sqlite3_open_v2()], and not previously closed.
319 ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
320 ** argument is a harmless no-op.
321 */
322 SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*);
323 SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*);
324
325 /*
326 ** The type for a callback function.
327 ** This is legacy and deprecated. It is included for historical
328 ** compatibility and is not documented.
@@ -389,11 +389,11 @@
389 ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
390 ** <li> The application must not modify the SQL statement text passed into
391 ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
392 ** </ul>
393 */
394 SQLITE_API int SQLITE_STDCALL sqlite3_exec(
395 sqlite3*, /* An open database */
396 const char *sql, /* SQL to be evaluated */
397 int (*callback)(void*,int,char**,char**), /* Callback function */
398 void *, /* 1st argument to callback */
399 char **errmsg /* Error msg written here */
@@ -1388,14 +1388,14 @@
1388 ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied
1389 ** implementation of sqlite3_os_init() or sqlite3_os_end()
1390 ** must return [SQLITE_OK] on success and some other [error code] upon
1391 ** failure.
1392 */
1393 SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void);
1394 SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void);
1395 SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void);
1396 SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void);
1397
1398 /*
1399 ** CAPI3REF: Configuring The SQLite Library
1400 **
1401 ** The sqlite3_config() interface is used to make global configuration
@@ -1424,11 +1424,11 @@
1424 **
1425 ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
1426 ** ^If the option is unknown or SQLite is unable to set the option
1427 ** then this routine returns a non-zero [error code].
1428 */
1429 SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...);
1430
1431 /*
1432 ** CAPI3REF: Configure database connections
1433 ** METHOD: sqlite3
1434 **
@@ -1443,11 +1443,11 @@
1443 ** Subsequent arguments vary depending on the configuration verb.
1444 **
1445 ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
1446 ** the call is considered successful.
1447 */
1448 SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...);
1449
1450 /*
1451 ** CAPI3REF: Memory Allocation Routines
1452 **
1453 ** An instance of this object defines the interface between SQLite
@@ -1984,11 +1984,11 @@
1984 **
1985 ** ^The sqlite3_extended_result_codes() routine enables or disables the
1986 ** [extended result codes] feature of SQLite. ^The extended result
1987 ** codes are disabled by default for historical compatibility.
1988 */
1989 SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff);
1990
1991 /*
1992 ** CAPI3REF: Last Insert Rowid
1993 ** METHOD: sqlite3
1994 **
@@ -2036,11 +2036,11 @@
2036 ** function is running and thus changes the last insert [rowid],
2037 ** then the value returned by [sqlite3_last_insert_rowid()] is
2038 ** unpredictable and might not equal either the old or the new
2039 ** last insert [rowid].
2040 */
2041 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*);
2042
2043 /*
2044 ** CAPI3REF: Count The Number Of Rows Modified
2045 ** METHOD: sqlite3
2046 **
@@ -2089,11 +2089,11 @@
2089 **
2090 ** If a separate thread makes changes on the same database connection
2091 ** while [sqlite3_changes()] is running then the value returned
2092 ** is unpredictable and not meaningful.
2093 */
2094 SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*);
2095
2096 /*
2097 ** CAPI3REF: Total Number Of Rows Modified
2098 ** METHOD: sqlite3
2099 **
@@ -2113,11 +2113,11 @@
2113 **
2114 ** If a separate thread makes changes on the same database connection
2115 ** while [sqlite3_total_changes()] is running then the value
2116 ** returned is unpredictable and not meaningful.
2117 */
2118 SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*);
2119
2120 /*
2121 ** CAPI3REF: Interrupt A Long-Running Query
2122 ** METHOD: sqlite3
2123 **
@@ -2153,11 +2153,11 @@
2153 ** that are started after the sqlite3_interrupt() call returns.
2154 **
2155 ** If the database connection closes while [sqlite3_interrupt()]
2156 ** is running then bad things will likely happen.
2157 */
2158 SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*);
2159
2160 /*
2161 ** CAPI3REF: Determine If An SQL Statement Is Complete
2162 **
2163 ** These routines are useful during command-line input to determine if the
@@ -2188,12 +2188,12 @@
2188 ** UTF-8 string.
2189 **
2190 ** The input to [sqlite3_complete16()] must be a zero-terminated
2191 ** UTF-16 string in native byte order.
2192 */
2193 SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql);
2194 SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql);
2195
2196 /*
2197 ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
2198 ** KEYWORDS: {busy-handler callback} {busy handler}
2199 ** METHOD: sqlite3
@@ -2250,11 +2250,11 @@
2250 ** result in undefined behavior.
2251 **
2252 ** A busy handler must not close the database connection
2253 ** or [prepared statement] that invoked the busy handler.
2254 */
2255 SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2256
2257 /*
2258 ** CAPI3REF: Set A Busy Timeout
2259 ** METHOD: sqlite3
2260 **
@@ -2273,11 +2273,11 @@
2273 ** was defined (using [sqlite3_busy_handler()]) prior to calling
2274 ** this routine, that other busy handler is cleared.)^
2275 **
2276 ** See also: [PRAGMA busy_timeout]
2277 */
2278 SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms);
2279
2280 /*
2281 ** CAPI3REF: Convenience Routines For Running Queries
2282 ** METHOD: sqlite3
2283 **
@@ -2348,19 +2348,19 @@
2348 ** interface defined here. As a consequence, errors that occur in the
2349 ** wrapper layer outside of the internal [sqlite3_exec()] call are not
2350 ** reflected in subsequent calls to [sqlite3_errcode()] or
2351 ** [sqlite3_errmsg()].
2352 */
2353 SQLITE_API int SQLITE_STDCALL sqlite3_get_table(
2354 sqlite3 *db, /* An open database */
2355 const char *zSql, /* SQL to be evaluated */
2356 char ***pazResult, /* Results of the query */
2357 int *pnRow, /* Number of result rows written here */
2358 int *pnColumn, /* Number of result columns written here */
2359 char **pzErrmsg /* Error msg written here */
2360 );
2361 SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result);
2362
2363 /*
2364 ** CAPI3REF: Formatted String Printing Functions
2365 **
2366 ** These routines are work-alikes of the "printf()" family of functions
@@ -2462,14 +2462,14 @@
2462 **
2463 ** ^(The "%z" formatting option works like "%s" but with the
2464 ** addition that after the string has been read and copied into
2465 ** the result, [sqlite3_free()] is called on the input string.)^
2466 */
2467 SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...);
2468 SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list);
2469 SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...);
2470 SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list);
2471
2472 /*
2473 ** CAPI3REF: Memory Allocation Subsystem
2474 **
2475 ** The SQLite core uses these three routines for all of its own
@@ -2555,16 +2555,16 @@
2555 **
2556 ** The application must not read or write any part of
2557 ** a block of memory after it has been released using
2558 ** [sqlite3_free()] or [sqlite3_realloc()].
2559 */
2560 SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int);
2561 SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64);
2562 SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int);
2563 SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64);
2564 SQLITE_API void SQLITE_STDCALL sqlite3_free(void*);
2565 SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*);
2566
2567 /*
2568 ** CAPI3REF: Memory Allocator Statistics
2569 **
2570 ** SQLite provides these two interfaces for reporting on the status
@@ -2585,12 +2585,12 @@
2585 ** [sqlite3_memory_used()] if and only if the parameter to
2586 ** [sqlite3_memory_highwater()] is true. ^The value returned
2587 ** by [sqlite3_memory_highwater(1)] is the high-water mark
2588 ** prior to the reset.
2589 */
2590 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void);
2591 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag);
2592
2593 /*
2594 ** CAPI3REF: Pseudo-Random Number Generator
2595 **
2596 ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
@@ -2609,11 +2609,11 @@
2609 ** ^If the previous call to this routine had an N of 1 or more and a
2610 ** non-NULL P then the pseudo-randomness is generated
2611 ** internally and without recourse to the [sqlite3_vfs] xRandomness
2612 ** method.
2613 */
2614 SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P);
2615
2616 /*
2617 ** CAPI3REF: Compile-Time Authorization Callbacks
2618 ** METHOD: sqlite3
2619 **
@@ -2692,11 +2692,11 @@
2692 ** [sqlite3_prepare()] or its variants. Authorization is not
2693 ** performed during statement evaluation in [sqlite3_step()], unless
2694 ** as stated in the previous paragraph, sqlite3_step() invokes
2695 ** sqlite3_prepare_v2() to reprepare a statement after a schema change.
2696 */
2697 SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
2698 sqlite3*,
2699 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
2700 void *pUserData
2701 );
2702
@@ -2800,13 +2800,13 @@
2800 ** digits in the time are meaningless. Future versions of SQLite
2801 ** might provide greater resolution on the profiler callback. The
2802 ** sqlite3_profile() function is considered experimental and is
2803 ** subject to change in future versions of SQLite.
2804 */
2805 SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*,
2806 void(*xTrace)(void*,const char*), void*);
2807 SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_profile(sqlite3*,
2808 void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
2809
2810 /*
2811 ** CAPI3REF: SQL Trace Event Codes
2812 ** KEYWORDS: SQLITE_TRACE
@@ -2891,11 +2891,11 @@
2891 **
2892 ** The sqlite3_trace_v2() interface is intended to replace the legacy
2893 ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
2894 ** are deprecated.
2895 */
2896 SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2(
2897 sqlite3*,
2898 unsigned uMask,
2899 int(*xCallback)(unsigned,void*,void*,void*),
2900 void *pCtx
2901 );
@@ -2930,11 +2930,11 @@
2930 ** the database connection that invoked the progress handler.
2931 ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
2932 ** database connections for the meaning of "modify" in this paragraph.
2933 **
2934 */
2935 SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
2936
2937 /*
2938 ** CAPI3REF: Opening A New Database Connection
2939 ** CONSTRUCTOR: sqlite3
2940 **
@@ -3159,19 +3159,19 @@
3159 ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
3160 ** features that require the use of temporary files may fail.
3161 **
3162 ** See also: [sqlite3_temp_directory]
3163 */
3164 SQLITE_API int SQLITE_STDCALL sqlite3_open(
3165 const char *filename, /* Database filename (UTF-8) */
3166 sqlite3 **ppDb /* OUT: SQLite db handle */
3167 );
3168 SQLITE_API int SQLITE_STDCALL sqlite3_open16(
3169 const void *filename, /* Database filename (UTF-16) */
3170 sqlite3 **ppDb /* OUT: SQLite db handle */
3171 );
3172 SQLITE_API int SQLITE_STDCALL sqlite3_open_v2(
3173 const char *filename, /* Database filename (UTF-8) */
3174 sqlite3 **ppDb, /* OUT: SQLite db handle */
3175 int flags, /* Flags */
3176 const char *zVfs /* Name of VFS module to use */
3177 );
@@ -3213,13 +3213,13 @@
3213 ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and
3214 ** is not a database file pathname pointer that SQLite passed into the xOpen
3215 ** VFS method, then the behavior of this routine is undefined and probably
3216 ** undesirable.
3217 */
3218 SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3219 SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3220 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
3221
3222
3223 /*
3224 ** CAPI3REF: Error Codes And Messages
3225 ** METHOD: sqlite3
@@ -3259,15 +3259,15 @@
3259 **
3260 ** If an interface fails with SQLITE_MISUSE, that means the interface
3261 ** was invoked incorrectly by the application. In that case, the
3262 ** error code and message may or may not be set.
3263 */
3264 SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db);
3265 SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db);
3266 SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*);
3267 SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*);
3268 SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int);
3269
3270 /*
3271 ** CAPI3REF: Prepared Statement Object
3272 ** KEYWORDS: {prepared statement} {prepared statements}
3273 **
@@ -3331,11 +3331,11 @@
3331 ** created by an untrusted script can be contained using the
3332 ** [max_page_count] [PRAGMA].
3333 **
3334 ** New run-time limit categories may be added in future releases.
3335 */
3336 SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal);
3337
3338 /*
3339 ** CAPI3REF: Run-Time Limit Categories
3340 ** KEYWORDS: {limit category} {*limit categories}
3341 **
@@ -3483,32 +3483,32 @@
3483 ** or [GLOB] operator or if the parameter is compared to an indexed column
3484 ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
3485 ** </li>
3486 ** </ol>
3487 */
3488 SQLITE_API int SQLITE_STDCALL sqlite3_prepare(
3489 sqlite3 *db, /* Database handle */
3490 const char *zSql, /* SQL statement, UTF-8 encoded */
3491 int nByte, /* Maximum length of zSql in bytes. */
3492 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3493 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3494 );
3495 SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2(
3496 sqlite3 *db, /* Database handle */
3497 const char *zSql, /* SQL statement, UTF-8 encoded */
3498 int nByte, /* Maximum length of zSql in bytes. */
3499 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3500 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3501 );
3502 SQLITE_API int SQLITE_STDCALL sqlite3_prepare16(
3503 sqlite3 *db, /* Database handle */
3504 const void *zSql, /* SQL statement, UTF-16 encoded */
3505 int nByte, /* Maximum length of zSql in bytes. */
3506 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3507 const void **pzTail /* OUT: Pointer to unused portion of zSql */
3508 );
3509 SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
3510 sqlite3 *db, /* Database handle */
3511 const void *zSql, /* SQL statement, UTF-16 encoded */
3512 int nByte, /* Maximum length of zSql in bytes. */
3513 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3514 const void **pzTail /* OUT: Pointer to unused portion of zSql */
@@ -3543,12 +3543,12 @@
3543 ** automatically freed when the prepared statement is finalized.
3544 ** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
3545 ** is obtained from [sqlite3_malloc()] and must be free by the application
3546 ** by passing it to [sqlite3_free()].
3547 */
3548 SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt);
3549 SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt);
3550
3551 /*
3552 ** CAPI3REF: Determine If An SQL Statement Writes The Database
3553 ** METHOD: sqlite3_stmt
3554 **
@@ -3576,11 +3576,11 @@
3576 ** database. ^The [ATTACH] and [DETACH] statements also cause
3577 ** sqlite3_stmt_readonly() to return true since, while those statements
3578 ** change the configuration of a database connection, they do not make
3579 ** changes to the content of the database files on disk.
3580 */
3581 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
3582
3583 /*
3584 ** CAPI3REF: Determine If A Prepared Statement Has Been Reset
3585 ** METHOD: sqlite3_stmt
3586 **
@@ -3597,11 +3597,11 @@
3597 ** to locate all prepared statements associated with a database
3598 ** connection that are in need of being reset. This can be used,
3599 ** for example, in diagnostic routines to search for prepared
3600 ** statements that are holding a transaction open.
3601 */
3602 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*);
3603
3604 /*
3605 ** CAPI3REF: Dynamically Typed Value Object
3606 ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
3607 **
@@ -3761,24 +3761,24 @@
3761 ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
3762 **
3763 ** See also: [sqlite3_bind_parameter_count()],
3764 ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
3765 */
3766 SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
3767 SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
3768 void(*)(void*));
3769 SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double);
3770 SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int);
3771 SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
3772 SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int);
3773 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
3774 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
3775 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
3776 void(*)(void*), unsigned char encoding);
3777 SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
3778 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
3779 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
3780
3781 /*
3782 ** CAPI3REF: Number Of SQL Parameters
3783 ** METHOD: sqlite3_stmt
3784 **
@@ -3795,11 +3795,11 @@
3795 **
3796 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
3797 ** [sqlite3_bind_parameter_name()], and
3798 ** [sqlite3_bind_parameter_index()].
3799 */
3800 SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*);
3801
3802 /*
3803 ** CAPI3REF: Name Of A Host Parameter
3804 ** METHOD: sqlite3_stmt
3805 **
@@ -3823,11 +3823,11 @@
3823 **
3824 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
3825 ** [sqlite3_bind_parameter_count()], and
3826 ** [sqlite3_bind_parameter_index()].
3827 */
3828 SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int);
3829
3830 /*
3831 ** CAPI3REF: Index Of A Parameter With A Given Name
3832 ** METHOD: sqlite3_stmt
3833 **
@@ -3840,21 +3840,21 @@
3840 **
3841 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
3842 ** [sqlite3_bind_parameter_count()], and
3843 ** [sqlite3_bind_parameter_name()].
3844 */
3845 SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
3846
3847 /*
3848 ** CAPI3REF: Reset All Bindings On A Prepared Statement
3849 ** METHOD: sqlite3_stmt
3850 **
3851 ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
3852 ** the [sqlite3_bind_blob | bindings] on a [prepared statement].
3853 ** ^Use this routine to reset all host parameters to NULL.
3854 */
3855 SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*);
3856
3857 /*
3858 ** CAPI3REF: Number Of Columns In A Result Set
3859 ** METHOD: sqlite3_stmt
3860 **
@@ -3862,11 +3862,11 @@
3862 ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
3863 ** statement that does not return data (for example an [UPDATE]).
3864 **
3865 ** See also: [sqlite3_data_count()]
3866 */
3867 SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt);
3868
3869 /*
3870 ** CAPI3REF: Column Names In A Result Set
3871 ** METHOD: sqlite3_stmt
3872 **
@@ -3891,12 +3891,12 @@
3891 ** ^The name of a result column is the value of the "AS" clause for
3892 ** that column, if there is an AS clause. If there is no AS clause
3893 ** then the name of the column is unspecified and may change from
3894 ** one release of SQLite to the next.
3895 */
3896 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N);
3897 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N);
3898
3899 /*
3900 ** CAPI3REF: Source Of Data In A Query Result
3901 ** METHOD: sqlite3_stmt
3902 **
@@ -3940,16 +3940,16 @@
3940 ** If two or more threads call one or more
3941 ** [sqlite3_column_database_name | column metadata interfaces]
3942 ** for the same [prepared statement] and result column
3943 ** at the same time then the results are undefined.
3944 */
3945 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int);
3946 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int);
3947 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int);
3948 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int);
3949 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int);
3950 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int);
3951
3952 /*
3953 ** CAPI3REF: Declared Datatype Of A Query Result
3954 ** METHOD: sqlite3_stmt
3955 **
@@ -3977,12 +3977,12 @@
3977 ** data stored in that column is of the declared type. SQLite is
3978 ** strongly typed, but the typing is dynamic not static. ^Type
3979 ** is associated with individual values, not with the containers
3980 ** used to hold those values.
3981 */
3982 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int);
3983 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int);
3984
3985 /*
3986 ** CAPI3REF: Evaluate An SQL Statement
3987 ** METHOD: sqlite3_stmt
3988 **
@@ -4058,11 +4058,11 @@
4058 ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
4059 ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
4060 ** then the more specific [error codes] are returned directly
4061 ** by sqlite3_step(). The use of the "v2" interface is recommended.
4062 */
4063 SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*);
4064
4065 /*
4066 ** CAPI3REF: Number of columns in a result set
4067 ** METHOD: sqlite3_stmt
4068 **
@@ -4079,11 +4079,11 @@
4079 ** where it always returns zero since each step of that multi-step
4080 ** pragma returns 0 columns of data.
4081 **
4082 ** See also: [sqlite3_column_count()]
4083 */
4084 SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
4085
4086 /*
4087 ** CAPI3REF: Fundamental Datatypes
4088 ** KEYWORDS: SQLITE_TEXT
4089 **
@@ -4269,20 +4269,20 @@
4269 ** of these routines, a default value is returned. The default value
4270 ** is either the integer 0, the floating point number 0.0, or a NULL
4271 ** pointer. Subsequent calls to [sqlite3_errcode()] will return
4272 ** [SQLITE_NOMEM].)^
4273 */
4274 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol);
4275 SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4276 SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4277 SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol);
4278 SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol);
4279 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol);
4280 SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol);
4281 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol);
4282 SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol);
4283 SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol);
4284
4285 /*
4286 ** CAPI3REF: Destroy A Prepared Statement Object
4287 ** DESTRUCTOR: sqlite3_stmt
4288 **
@@ -4306,11 +4306,11 @@
4306 ** resource leaks. It is a grievous error for the application to try to use
4307 ** a prepared statement after it has been finalized. Any use of a prepared
4308 ** statement after it has been finalized can result in undefined and
4309 ** undesirable behavior such as segfaults and heap corruption.
4310 */
4311 SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt);
4312
4313 /*
4314 ** CAPI3REF: Reset A Prepared Statement Object
4315 ** METHOD: sqlite3_stmt
4316 **
@@ -4333,11 +4333,11 @@
4333 ** [sqlite3_reset(S)] returns an appropriate [error code].
4334 **
4335 ** ^The [sqlite3_reset(S)] interface does not change the values
4336 ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
4337 */
4338 SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt);
4339
4340 /*
4341 ** CAPI3REF: Create Or Redefine SQL Functions
4342 ** KEYWORDS: {function creation routines}
4343 ** KEYWORDS: {application-defined SQL function}
@@ -4433,31 +4433,31 @@
4433 ** ^An application-defined function is permitted to call other
4434 ** SQLite interfaces. However, such calls must not
4435 ** close the database connection nor finalize or reset the prepared
4436 ** statement in which the function is running.
4437 */
4438 SQLITE_API int SQLITE_STDCALL sqlite3_create_function(
4439 sqlite3 *db,
4440 const char *zFunctionName,
4441 int nArg,
4442 int eTextRep,
4443 void *pApp,
4444 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4445 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4446 void (*xFinal)(sqlite3_context*)
4447 );
4448 SQLITE_API int SQLITE_STDCALL sqlite3_create_function16(
4449 sqlite3 *db,
4450 const void *zFunctionName,
4451 int nArg,
4452 int eTextRep,
4453 void *pApp,
4454 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4455 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4456 void (*xFinal)(sqlite3_context*)
4457 );
4458 SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2(
4459 sqlite3 *db,
4460 const char *zFunctionName,
4461 int nArg,
4462 int eTextRep,
4463 void *pApp,
@@ -4499,16 +4499,16 @@
4499 ** to be supported. However, new applications should avoid
4500 ** the use of these functions. To encourage programmers to avoid
4501 ** these functions, we will not explain what they do.
4502 */
4503 #ifndef SQLITE_OMIT_DEPRECATED
4504 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*);
4505 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*);
4506 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4507 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void);
4508 SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void);
4509 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
4510 void*,sqlite3_int64);
4511 #endif
4512
4513 /*
4514 ** CAPI3REF: Obtaining SQL Values
@@ -4554,22 +4554,22 @@
4554 ** or [sqlite3_value_text16()].
4555 **
4556 ** These routines must be called from the same thread as
4557 ** the SQL function that supplied the [sqlite3_value*] parameters.
4558 */
4559 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*);
4560 SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*);
4561 SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*);
4562 SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*);
4563 SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*);
4564 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*);
4565 SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*);
4566 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*);
4567 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*);
4568 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*);
4569 SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*);
4570 SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*);
4571
4572 /*
4573 ** CAPI3REF: Finding The Subtype Of SQL Values
4574 ** METHOD: sqlite3_value
4575 **
@@ -4581,11 +4581,11 @@
4581 **
4582 ** SQLite makes no use of subtype itself. It merely passes the subtype
4583 ** from the result of one [application-defined SQL function] into the
4584 ** input of another.
4585 */
4586 SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*);
4587
4588 /*
4589 ** CAPI3REF: Copy And Free SQL Values
4590 ** METHOD: sqlite3_value
4591 **
@@ -4597,12 +4597,12 @@
4597 **
4598 ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
4599 ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
4600 ** then sqlite3_value_free(V) is a harmless no-op.
4601 */
4602 SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*);
4603 SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*);
4604
4605 /*
4606 ** CAPI3REF: Obtain Aggregate Function Context
4607 ** METHOD: sqlite3_context
4608 **
@@ -4643,11 +4643,11 @@
4643 ** function.
4644 **
4645 ** This routine must be called from the same thread in which
4646 ** the aggregate SQL function is running.
4647 */
4648 SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes);
4649
4650 /*
4651 ** CAPI3REF: User Data For Functions
4652 ** METHOD: sqlite3_context
4653 **
@@ -4658,11 +4658,11 @@
4658 ** registered the application defined function.
4659 **
4660 ** This routine must be called from the same thread in which
4661 ** the application-defined function is running.
4662 */
4663 SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*);
4664
4665 /*
4666 ** CAPI3REF: Database Connection For Functions
4667 ** METHOD: sqlite3_context
4668 **
@@ -4670,11 +4670,11 @@
4670 ** the pointer to the [database connection] (the 1st parameter)
4671 ** of the [sqlite3_create_function()]
4672 ** and [sqlite3_create_function16()] routines that originally
4673 ** registered the application defined function.
4674 */
4675 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*);
4676
4677 /*
4678 ** CAPI3REF: Function Auxiliary Data
4679 ** METHOD: sqlite3_context
4680 **
@@ -4724,12 +4724,12 @@
4724 ** values and [parameters] and expressions composed from the same.)^
4725 **
4726 ** These routines must be called from the same thread in which
4727 ** the SQL function is running.
4728 */
4729 SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N);
4730 SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
4731
4732
4733 /*
4734 ** CAPI3REF: Constants Defining Special Destructor Behavior
4735 **
@@ -4861,31 +4861,31 @@
4861 **
4862 ** If these routines are called from within the different thread
4863 ** than the one containing the application-defined function that received
4864 ** the [sqlite3_context] pointer, the results are undefined.
4865 */
4866 SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
4867 SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*,
4868 sqlite3_uint64,void(*)(void*));
4869 SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double);
4870 SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int);
4871 SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int);
4872 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*);
4873 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*);
4874 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int);
4875 SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int);
4876 SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
4877 SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*);
4878 SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
4879 SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
4880 void(*)(void*), unsigned char encoding);
4881 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
4882 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
4883 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
4884 SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
4885 SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
4886 SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
4887
4888
4889 /*
4890 ** CAPI3REF: Setting The Subtype Of An SQL Function
4891 ** METHOD: sqlite3_context
@@ -4896,11 +4896,11 @@
4896 ** of the subtype T are preserved in current versions of SQLite;
4897 ** higher order bits are discarded.
4898 ** The number of subtype bytes preserved by SQLite might increase
4899 ** in future releases of SQLite.
4900 */
4901 SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int);
4902
4903 /*
4904 ** CAPI3REF: Define New Collating Sequences
4905 ** METHOD: sqlite3
4906 **
@@ -4978,26 +4978,26 @@
4978 ** is unfortunate but cannot be changed without breaking backwards
4979 ** compatibility.
4980 **
4981 ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
4982 */
4983 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation(
4984 sqlite3*,
4985 const char *zName,
4986 int eTextRep,
4987 void *pArg,
4988 int(*xCompare)(void*,int,const void*,int,const void*)
4989 );
4990 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2(
4991 sqlite3*,
4992 const char *zName,
4993 int eTextRep,
4994 void *pArg,
4995 int(*xCompare)(void*,int,const void*,int,const void*),
4996 void(*xDestroy)(void*)
4997 );
4998 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16(
4999 sqlite3*,
5000 const void *zName,
5001 int eTextRep,
5002 void *pArg,
5003 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -5028,16 +5028,16 @@
5028 **
5029 ** The callback function should register the desired collation using
5030 ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
5031 ** [sqlite3_create_collation_v2()].
5032 */
5033 SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed(
5034 sqlite3*,
5035 void*,
5036 void(*)(void*,sqlite3*,int eTextRep,const char*)
5037 );
5038 SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16(
5039 sqlite3*,
5040 void*,
5041 void(*)(void*,sqlite3*,int eTextRep,const void*)
5042 );
5043
@@ -5047,15 +5047,15 @@
5047 ** called right after sqlite3_open().
5048 **
5049 ** The code to implement this API is not available in the public release
5050 ** of SQLite.
5051 */
5052 SQLITE_API int SQLITE_STDCALL sqlite3_key(
5053 sqlite3 *db, /* Database to be rekeyed */
5054 const void *pKey, int nKey /* The key */
5055 );
5056 SQLITE_API int SQLITE_STDCALL sqlite3_key_v2(
5057 sqlite3 *db, /* Database to be rekeyed */
5058 const char *zDbName, /* Name of the database */
5059 const void *pKey, int nKey /* The key */
5060 );
5061
@@ -5065,35 +5065,35 @@
5065 ** database is decrypted.
5066 **
5067 ** The code to implement this API is not available in the public release
5068 ** of SQLite.
5069 */
5070 SQLITE_API int SQLITE_STDCALL sqlite3_rekey(
5071 sqlite3 *db, /* Database to be rekeyed */
5072 const void *pKey, int nKey /* The new key */
5073 );
5074 SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2(
5075 sqlite3 *db, /* Database to be rekeyed */
5076 const char *zDbName, /* Name of the database */
5077 const void *pKey, int nKey /* The new key */
5078 );
5079
5080 /*
5081 ** Specify the activation key for a SEE database. Unless
5082 ** activated, none of the SEE routines will work.
5083 */
5084 SQLITE_API void SQLITE_STDCALL sqlite3_activate_see(
5085 const char *zPassPhrase /* Activation phrase */
5086 );
5087 #endif
5088
5089 #ifdef SQLITE_ENABLE_CEROD
5090 /*
5091 ** Specify the activation key for a CEROD database. Unless
5092 ** activated, none of the CEROD routines will work.
5093 */
5094 SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod(
5095 const char *zPassPhrase /* Activation phrase */
5096 );
5097 #endif
5098
5099 /*
@@ -5111,11 +5111,11 @@
5111 ** method of the default [sqlite3_vfs] object. If the xSleep() method
5112 ** of the default VFS is not implemented correctly, or not implemented at
5113 ** all, then the behavior of sqlite3_sleep() may deviate from the description
5114 ** in the previous paragraphs.
5115 */
5116 SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int);
5117
5118 /*
5119 ** CAPI3REF: Name Of The Folder Holding Temporary Files
5120 **
5121 ** ^(If this global variable is made to point to a string which is
@@ -5230,11 +5230,11 @@
5230 **
5231 ** If another thread changes the autocommit status of the database
5232 ** connection while this routine is running, then the return value
5233 ** is undefined.
5234 */
5235 SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*);
5236
5237 /*
5238 ** CAPI3REF: Find The Database Handle Of A Prepared Statement
5239 ** METHOD: sqlite3_stmt
5240 **
@@ -5243,11 +5243,11 @@
5243 ** returned by sqlite3_db_handle is the same [database connection]
5244 ** that was the first argument
5245 ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
5246 ** create the statement in the first place.
5247 */
5248 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*);
5249
5250 /*
5251 ** CAPI3REF: Return The Filename For A Database Connection
5252 ** METHOD: sqlite3
5253 **
@@ -5260,21 +5260,21 @@
5260 ** ^The filename returned by this function is the output of the
5261 ** xFullPathname method of the [VFS]. ^In other words, the filename
5262 ** will be an absolute pathname, even if the filename used
5263 ** to open the database originally was a URI or relative pathname.
5264 */
5265 SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName);
5266
5267 /*
5268 ** CAPI3REF: Determine if a database is read-only
5269 ** METHOD: sqlite3
5270 **
5271 ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N
5272 ** of connection D is read-only, 0 if it is read/write, or -1 if N is not
5273 ** the name of a database on connection D.
5274 */
5275 SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
5276
5277 /*
5278 ** CAPI3REF: Find the next prepared statement
5279 ** METHOD: sqlite3
5280 **
@@ -5286,11 +5286,11 @@
5286 **
5287 ** The [database connection] pointer D in a call to
5288 ** [sqlite3_next_stmt(D,S)] must refer to an open database
5289 ** connection and in particular must not be a NULL pointer.
5290 */
5291 SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
5292
5293 /*
5294 ** CAPI3REF: Commit And Rollback Notification Callbacks
5295 ** METHOD: sqlite3
5296 **
@@ -5335,12 +5335,12 @@
5335 ** ^The rollback callback is not invoked if a transaction is
5336 ** automatically rolled back because the database connection is closed.
5337 **
5338 ** See also the [sqlite3_update_hook()] interface.
5339 */
5340 SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5341 SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5342
5343 /*
5344 ** CAPI3REF: Data Change Notification Callbacks
5345 ** METHOD: sqlite3
5346 **
@@ -5387,11 +5387,11 @@
5387 ** the first call on D.
5388 **
5389 ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
5390 ** and [sqlite3_preupdate_hook()] interfaces.
5391 */
5392 SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
5393 sqlite3*,
5394 void(*)(void *,int ,char const *,char const *,sqlite3_int64),
5395 void*
5396 );
5397
@@ -5427,11 +5427,11 @@
5427 ** This interface is threadsafe on processors where writing a
5428 ** 32-bit integer is atomic.
5429 **
5430 ** See Also: [SQLite Shared-Cache Mode]
5431 */
5432 SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int);
5433
5434 /*
5435 ** CAPI3REF: Attempt To Free Heap Memory
5436 **
5437 ** ^The sqlite3_release_memory() interface attempts to free N bytes
@@ -5443,11 +5443,11 @@
5443 ** ^The sqlite3_release_memory() routine is a no-op returning zero
5444 ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5445 **
5446 ** See also: [sqlite3_db_release_memory()]
5447 */
5448 SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int);
5449
5450 /*
5451 ** CAPI3REF: Free Memory Used By A Database Connection
5452 ** METHOD: sqlite3
5453 **
@@ -5457,11 +5457,11 @@
5457 ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is
5458 ** omitted.
5459 **
5460 ** See also: [sqlite3_release_memory()]
5461 */
5462 SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*);
5463
5464 /*
5465 ** CAPI3REF: Impose A Limit On Heap Size
5466 **
5467 ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
@@ -5509,11 +5509,11 @@
5509 ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5510 **
5511 ** The circumstances under which SQLite will enforce the soft heap limit may
5512 ** changes in future releases of SQLite.
5513 */
5514 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N);
5515
5516 /*
5517 ** CAPI3REF: Deprecated Soft Heap Limit Interface
5518 ** DEPRECATED
5519 **
@@ -5520,11 +5520,11 @@
5520 ** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
5521 ** interface. This routine is provided for historical compatibility
5522 ** only. All new applications should use the
5523 ** [sqlite3_soft_heap_limit64()] interface rather than this one.
5524 */
5525 SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N);
5526
5527
5528 /*
5529 ** CAPI3REF: Extract Metadata About A Column Of A Table
5530 ** METHOD: sqlite3
@@ -5590,11 +5590,11 @@
5590 **
5591 ** ^This function causes all database schemas to be read from disk and
5592 ** parsed, if that has not already been done, and returns an error if
5593 ** any errors are encountered while loading the schema.
5594 */
5595 SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata(
5596 sqlite3 *db, /* Connection handle */
5597 const char *zDbName, /* Database name or NULL */
5598 const char *zTableName, /* Table name */
5599 const char *zColumnName, /* Column name */
5600 char const **pzDataType, /* OUTPUT: Declared data type */
@@ -5646,11 +5646,11 @@
5646 ** disabled and prevent SQL injections from giving attackers
5647 ** access to extension loading capabilities.
5648 **
5649 ** See also the [load_extension() SQL function].
5650 */
5651 SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
5652 sqlite3 *db, /* Load the extension into this database connection */
5653 const char *zFile, /* Name of the shared library containing extension */
5654 const char *zProc, /* Entry point. Derived from zFile if 0 */
5655 char **pzErrMsg /* Put error message here if not 0 */
5656 );
@@ -5678,11 +5678,11 @@
5678 ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
5679 ** rather than this interface, so the [load_extension()] SQL function
5680 ** remains disabled. This will prevent SQL injections from giving attackers
5681 ** access to extension loading capabilities.
5682 */
5683 SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5684
5685 /*
5686 ** CAPI3REF: Automatically Load Statically Linked Extensions
5687 **
5688 ** ^This interface causes the xEntryPoint() function to be invoked for
@@ -5716,11 +5716,11 @@
5716 ** will be called more than once for each database connection that is opened.
5717 **
5718 ** See also: [sqlite3_reset_auto_extension()]
5719 ** and [sqlite3_cancel_auto_extension()]
5720 */
5721 SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void));
5722
5723 /*
5724 ** CAPI3REF: Cancel Automatic Extension Loading
5725 **
5726 ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the
@@ -5728,19 +5728,19 @@
5728 ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)]
5729 ** routine returns 1 if initialization routine X was successfully
5730 ** unregistered and it returns 0 if X was not on the list of initialization
5731 ** routines.
5732 */
5733 SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
5734
5735 /*
5736 ** CAPI3REF: Reset Automatic Extension Loading
5737 **
5738 ** ^This interface disables all automatic extensions previously
5739 ** registered using [sqlite3_auto_extension()].
5740 */
5741 SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void);
5742
5743 /*
5744 ** The interface to the virtual-table mechanism is currently considered
5745 ** to be experimental. The interface might change in incompatible ways.
5746 ** If this is a problem for you, do not use the interface at this time.
@@ -5981,17 +5981,17 @@
5981 ** be invoked if the call to sqlite3_create_module_v2() fails.
5982 ** ^The sqlite3_create_module()
5983 ** interface is equivalent to sqlite3_create_module_v2() with a NULL
5984 ** destructor.
5985 */
5986 SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
5987 sqlite3 *db, /* SQLite connection to register module with */
5988 const char *zName, /* Name of the module */
5989 const sqlite3_module *p, /* Methods for the module */
5990 void *pClientData /* Client data for xCreate/xConnect */
5991 );
5992 SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
5993 sqlite3 *db, /* SQLite connection to register module with */
5994 const char *zName, /* Name of the module */
5995 const sqlite3_module *p, /* Methods for the module */
5996 void *pClientData, /* Client data for xCreate/xConnect */
5997 void(*xDestroy)(void*) /* Module destructor function */
@@ -6050,11 +6050,11 @@
6050 ** ^The [xCreate] and [xConnect] methods of a
6051 ** [virtual table module] call this interface
6052 ** to declare the format (the names and datatypes of the columns) of
6053 ** the virtual tables they implement.
6054 */
6055 SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL);
6056
6057 /*
6058 ** CAPI3REF: Overload A Function For A Virtual Table
6059 ** METHOD: sqlite3
6060 **
@@ -6069,11 +6069,11 @@
6069 ** of the new function always causes an exception to be thrown. So
6070 ** the new function is not good for anything by itself. Its only
6071 ** purpose is to be a placeholder function that can be overloaded
6072 ** by a [virtual table].
6073 */
6074 SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
6075
6076 /*
6077 ** The interface to the virtual-table mechanism defined above (back up
6078 ** to a comment remarkably similar to this one) is currently considered
6079 ** to be experimental. The interface might change in incompatible ways.
@@ -6168,11 +6168,11 @@
6168 ** zero-filled blob to read or write using the incremental-blob interface.
6169 **
6170 ** To avoid a resource leak, every open [BLOB handle] should eventually
6171 ** be released by a call to [sqlite3_blob_close()].
6172 */
6173 SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
6174 sqlite3*,
6175 const char *zDb,
6176 const char *zTable,
6177 const char *zColumn,
6178 sqlite3_int64 iRow,
@@ -6201,11 +6201,11 @@
6201 ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
6202 ** always returns zero.
6203 **
6204 ** ^This function sets the database handle error code and message.
6205 */
6206 SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
6207
6208 /*
6209 ** CAPI3REF: Close A BLOB Handle
6210 ** DESTRUCTOR: sqlite3_blob
6211 **
@@ -6224,11 +6224,11 @@
6224 ** with a null pointer (such as would be returned by a failed call to
6225 ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
6226 ** is passed a valid open blob handle, the values returned by the
6227 ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
6228 */
6229 SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *);
6230
6231 /*
6232 ** CAPI3REF: Return The Size Of An Open BLOB
6233 ** METHOD: sqlite3_blob
6234 **
@@ -6240,11 +6240,11 @@
6240 ** This routine only works on a [BLOB handle] which has been created
6241 ** by a prior successful call to [sqlite3_blob_open()] and which has not
6242 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6243 ** to this routine results in undefined and probably undesirable behavior.
6244 */
6245 SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *);
6246
6247 /*
6248 ** CAPI3REF: Read Data From A BLOB Incrementally
6249 ** METHOD: sqlite3_blob
6250 **
@@ -6269,11 +6269,11 @@
6269 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6270 ** to this routine results in undefined and probably undesirable behavior.
6271 **
6272 ** See also: [sqlite3_blob_write()].
6273 */
6274 SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
6275
6276 /*
6277 ** CAPI3REF: Write Data Into A BLOB Incrementally
6278 ** METHOD: sqlite3_blob
6279 **
@@ -6311,11 +6311,11 @@
6311 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6312 ** to this routine results in undefined and probably undesirable behavior.
6313 **
6314 ** See also: [sqlite3_blob_read()].
6315 */
6316 SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
6317
6318 /*
6319 ** CAPI3REF: Virtual File System Objects
6320 **
6321 ** A virtual filesystem (VFS) is an [sqlite3_vfs] object
@@ -6342,13 +6342,13 @@
6342 **
6343 ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
6344 ** ^(If the default VFS is unregistered, another VFS is chosen as
6345 ** the default. The choice for the new VFS is arbitrary.)^
6346 */
6347 SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName);
6348 SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6349 SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
6350
6351 /*
6352 ** CAPI3REF: Mutexes
6353 **
6354 ** The SQLite core uses these routines for thread
@@ -6460,15 +6460,15 @@
6460 ** sqlite3_mutex_leave() is a NULL pointer, then all three routines
6461 ** behave as no-ops.
6462 **
6463 ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
6464 */
6465 SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int);
6466 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*);
6467 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*);
6468 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*);
6469 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*);
6470
6471 /*
6472 ** CAPI3REF: Mutex Methods Object
6473 **
6474 ** An instance of this structure defines the low-level routines
@@ -6574,12 +6574,12 @@
6574 ** call to sqlite3_mutex_held() to fail, so a non-zero return is
6575 ** the appropriate thing to do. The sqlite3_mutex_notheld()
6576 ** interface should also return 1 when given a NULL pointer.
6577 */
6578 #ifndef NDEBUG
6579 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*);
6580 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
6581 #endif
6582
6583 /*
6584 ** CAPI3REF: Mutex Types
6585 **
@@ -6615,11 +6615,11 @@
6615 ** serializes access to the [database connection] given in the argument
6616 ** when the [threading mode] is Serialized.
6617 ** ^If the [threading mode] is Single-thread or Multi-thread then this
6618 ** routine returns a NULL pointer.
6619 */
6620 SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*);
6621
6622 /*
6623 ** CAPI3REF: Low-Level Control Of Database Files
6624 ** METHOD: sqlite3
6625 **
@@ -6650,11 +6650,11 @@
6650 ** an incorrect zDbName and an SQLITE_ERROR return from the underlying
6651 ** xFileControl method.
6652 **
6653 ** See also: [SQLITE_FCNTL_LOCKSTATE]
6654 */
6655 SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6656
6657 /*
6658 ** CAPI3REF: Testing Interface
6659 **
6660 ** ^The sqlite3_test_control() interface is used to read out internal
@@ -6669,11 +6669,11 @@
6669 ** The details of the operation codes, their meanings, the parameters
6670 ** they take, and what they do are all subject to change without notice.
6671 ** Unlike most of the SQLite API, this function is not guaranteed to
6672 ** operate consistently from one release to the next.
6673 */
6674 SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
6675
6676 /*
6677 ** CAPI3REF: Testing Interface Operation Codes
6678 **
6679 ** These constants are the valid operation code parameters used
@@ -6732,12 +6732,12 @@
6732 ** be represented by a 32-bit integer, then the values returned by
6733 ** sqlite3_status() are undefined.
6734 **
6735 ** See also: [sqlite3_db_status()]
6736 */
6737 SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6738 SQLITE_API int SQLITE_STDCALL sqlite3_status64(
6739 int op,
6740 sqlite3_int64 *pCurrent,
6741 sqlite3_int64 *pHighwater,
6742 int resetFlag
6743 );
@@ -6858,11 +6858,11 @@
6858 ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
6859 ** non-zero [error code] on failure.
6860 **
6861 ** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
6862 */
6863 SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
6864
6865 /*
6866 ** CAPI3REF: Status Parameters for database connections
6867 ** KEYWORDS: {SQLITE_DBSTATUS options}
6868 **
@@ -7001,11 +7001,11 @@
7001 ** ^If the resetFlg is true, then the counter is reset to zero after this
7002 ** interface call returns.
7003 **
7004 ** See also: [sqlite3_status()] and [sqlite3_db_status()].
7005 */
7006 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
7007
7008 /*
7009 ** CAPI3REF: Status Parameters for prepared statements
7010 ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters}
7011 **
@@ -7470,20 +7470,20 @@
7470 ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
7471 ** APIs are not strictly speaking threadsafe. If they are invoked at the
7472 ** same time as another thread is invoking sqlite3_backup_step() it is
7473 ** possible that they return invalid values.
7474 */
7475 SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
7476 sqlite3 *pDest, /* Destination database handle */
7477 const char *zDestName, /* Destination database name */
7478 sqlite3 *pSource, /* Source database handle */
7479 const char *zSourceName /* Source database name */
7480 );
7481 SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage);
7482 SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p);
7483 SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p);
7484 SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p);
7485
7486 /*
7487 ** CAPI3REF: Unlock Notification
7488 ** METHOD: sqlite3
7489 **
@@ -7596,11 +7596,11 @@
7596 ** by an sqlite3_step() call. ^(If there is a blocking connection, then the
7597 ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
7598 ** the special "DROP TABLE/INDEX" case, the extended error code is just
7599 ** SQLITE_LOCKED.)^
7600 */
7601 SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify(
7602 sqlite3 *pBlocked, /* Waiting connection */
7603 void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
7604 void *pNotifyArg /* Argument to pass to xNotify */
7605 );
7606
@@ -7611,12 +7611,12 @@
7611 ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications
7612 ** and extensions to compare the contents of two buffers containing UTF-8
7613 ** strings in a case-independent fashion, using the same definition of "case
7614 ** independence" that SQLite uses internally when comparing identifiers.
7615 */
7616 SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *);
7617 SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int);
7618
7619 /*
7620 ** CAPI3REF: String Globbing
7621 *
7622 ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if
@@ -7629,11 +7629,11 @@
7629 ** Note that this routine returns zero on a match and non-zero if the strings
7630 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7631 **
7632 ** See also: [sqlite3_strlike()].
7633 */
7634 SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr);
7635
7636 /*
7637 ** CAPI3REF: String LIKE Matching
7638 *
7639 ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if
@@ -7652,11 +7652,11 @@
7652 ** Note that this routine returns zero on a match and non-zero if the strings
7653 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7654 **
7655 ** See also: [sqlite3_strglob()].
7656 */
7657 SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
7658
7659 /*
7660 ** CAPI3REF: Error Logging Interface
7661 **
7662 ** ^The [sqlite3_log()] interface writes a message into the [error log]
@@ -7675,11 +7675,11 @@
7675 ** will not use dynamically allocated memory. The log message is stored in
7676 ** a fixed-length buffer on the stack. If the log message is longer than
7677 ** a few hundred characters, it will be truncated to the length of the
7678 ** buffer.
7679 */
7680 SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...);
7681
7682 /*
7683 ** CAPI3REF: Write-Ahead Log Commit Hook
7684 ** METHOD: sqlite3
7685 **
@@ -7711,11 +7711,11 @@
7711 ** previously registered write-ahead log callback. ^Note that the
7712 ** [sqlite3_wal_autocheckpoint()] interface and the
7713 ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
7714 ** overwrite any prior [sqlite3_wal_hook()] settings.
7715 */
7716 SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook(
7717 sqlite3*,
7718 int(*)(void *,sqlite3*,const char*,int),
7719 void*
7720 );
7721
@@ -7746,11 +7746,11 @@
7746 ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
7747 ** pages. The use of this interface
7748 ** is only necessary if the default setting is found to be suboptimal
7749 ** for a particular application.
7750 */
7751 SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
7752
7753 /*
7754 ** CAPI3REF: Checkpoint a database
7755 ** METHOD: sqlite3
7756 **
@@ -7768,11 +7768,11 @@
7768 ** interface was added. This interface is retained for backwards
7769 ** compatibility and as a convenience for applications that need to manually
7770 ** start a callback but which do not need the full power (and corresponding
7771 ** complication) of [sqlite3_wal_checkpoint_v2()].
7772 */
7773 SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
7774
7775 /*
7776 ** CAPI3REF: Checkpoint a database
7777 ** METHOD: sqlite3
7778 **
@@ -7862,11 +7862,11 @@
7862 ** [sqlite3_errcode()] and [sqlite3_errmsg()].
7863 **
7864 ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
7865 ** from SQL.
7866 */
7867 SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2(
7868 sqlite3 *db, /* Database handle */
7869 const char *zDb, /* Name of attached database (or NULL) */
7870 int eMode, /* SQLITE_CHECKPOINT_* value */
7871 int *pnLog, /* OUT: Size of WAL log in frames */
7872 int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -7898,11 +7898,11 @@
7898 **
7899 ** At present, there is only one option that may be configured using
7900 ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
7901 ** may be added in the future.
7902 */
7903 SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...);
7904
7905 /*
7906 ** CAPI3REF: Virtual Table Configuration Options
7907 **
7908 ** These macros define the various options to the
@@ -7951,11 +7951,11 @@
7951 ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],
7952 ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode
7953 ** of the SQL statement that triggered the call to the [xUpdate] method of the
7954 ** [virtual table].
7955 */
7956 SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *);
7957
7958 /*
7959 ** CAPI3REF: Conflict resolution modes
7960 ** KEYWORDS: {conflict resolution mode}
7961 **
@@ -8056,11 +8056,11 @@
8056 ** as if the loop did not exist - it returns non-zero and leave the variable
8057 ** that pOut points to unchanged.
8058 **
8059 ** See also: [sqlite3_stmt_scanstatus_reset()]
8060 */
8061 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
8062 sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
8063 int idx, /* Index of loop to report on */
8064 int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
8065 void *pOut /* Result written here */
8066 );
@@ -8072,11 +8072,11 @@
8072 ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
8073 **
8074 ** This API is only available if the library is built with pre-processor
8075 ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
8076 */
8077 SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
8078
8079 /*
8080 ** CAPI3REF: Flush caches to disk mid-transaction
8081 **
8082 ** ^If a write-transaction is open on [database connection] D when the
@@ -8104,11 +8104,11 @@
8104 ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.
8105 **
8106 ** ^This function does not set the database handle error code or message
8107 ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
8108 */
8109 SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*);
8110
8111 /*
8112 ** CAPI3REF: The pre-update hook.
8113 **
8114 ** ^These interfaces are only available if SQLite is compiled using the
@@ -8184,11 +8184,11 @@
8184 ** triggers; or 2 for changes resulting from triggers called by top-level
8185 ** triggers; and so forth.
8186 **
8187 ** See also: [sqlite3_update_hook()]
8188 */
8189 SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook(
8190 sqlite3 *db,
8191 void(*xPreUpdate)(
8192 void *pCtx, /* Copy of third arg to preupdate_hook() */
8193 sqlite3 *db, /* Database handle */
8194 int op, /* SQLITE_UPDATE, DELETE or INSERT */
@@ -8197,14 +8197,14 @@
8197 sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
8198 sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
8199 ),
8200 void*
8201 );
8202 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8203 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *);
8204 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *);
8205 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
8206
8207 /*
8208 ** CAPI3REF: Low-level system error code
8209 **
8210 ** ^Attempt to return the underlying operating system error code or error
@@ -8212,11 +8212,11 @@
8212 ** The return value is OS-dependent. For example, on unix systems, after
8213 ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
8214 ** called to get back the underlying "errno" that caused the problem, such
8215 ** as ENOSPC, EAUTH, EISDIR, and so forth.
8216 */
8217 SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*);
8218
8219 /*
8220 ** CAPI3REF: Database Snapshot
8221 ** KEYWORDS: {snapshot}
8222 ** EXPERIMENTAL
@@ -8262,11 +8262,11 @@
8262 ** to avoid a memory leak.
8263 **
8264 ** The [sqlite3_snapshot_get()] interface is only available when the
8265 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8266 */
8267 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get(
8268 sqlite3 *db,
8269 const char *zSchema,
8270 sqlite3_snapshot **ppSnapshot
8271 );
8272
@@ -8300,11 +8300,11 @@
8300 ** database connection in order to make it ready to use snapshots.)
8301 **
8302 ** The [sqlite3_snapshot_open()] interface is only available when the
8303 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8304 */
8305 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open(
8306 sqlite3 *db,
8307 const char *zSchema,
8308 sqlite3_snapshot *pSnapshot
8309 );
8310
@@ -8317,11 +8317,11 @@
8317 ** using this routine to avoid a memory leak.
8318 **
8319 ** The [sqlite3_snapshot_free()] interface is only available when the
8320 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8321 */
8322 SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*);
8323
8324 /*
8325 ** CAPI3REF: Compare the ages of two snapshot handles.
8326 ** EXPERIMENTAL
8327 **
@@ -8341,11 +8341,11 @@
8341 **
8342 ** Otherwise, this API returns a negative value if P1 refers to an older
8343 ** snapshot than P2, zero if the two handles refer to the same database
8344 ** snapshot, and a positive value if P1 is a newer snapshot than P2.
8345 */
8346 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp(
8347 sqlite3_snapshot *p1,
8348 sqlite3_snapshot *p2
8349 );
8350
8351 /*
@@ -8399,11 +8399,11 @@
8399 ** Register a geometry callback named zGeom that can be used as part of an
8400 ** R-Tree geometry query as follows:
8401 **
8402 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
8403 */
8404 SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback(
8405 sqlite3 *db,
8406 const char *zGeom,
8407 int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
8408 void *pContext
8409 );
@@ -8425,11 +8425,11 @@
8425 ** Register a 2nd-generation geometry callback named zScore that can be
8426 ** used as part of an R-Tree geometry query as follows:
8427 **
8428 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
8429 */
8430 SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback(
8431 sqlite3 *db,
8432 const char *zQueryFunc,
8433 int (*xQueryFunc)(sqlite3_rtree_query_info*),
8434 void *pContext,
8435 void (*xDestructor)(void*)
8436
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -118,13 +118,13 @@
118 **
119 ** See also: [sqlite3_libversion()],
120 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
121 ** [sqlite_version()] and [sqlite_source_id()].
122 */
123 #define SQLITE_VERSION "3.14.2"
124 #define SQLITE_VERSION_NUMBER 3014002
125 #define SQLITE_SOURCE_ID "2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6"
126
127 /*
128 ** CAPI3REF: Run-Time Library Version Numbers
129 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
130 **
@@ -153,13 +153,13 @@
153 ** [SQLITE_SOURCE_ID] C preprocessor macro.
154 **
155 ** See also: [sqlite_version()] and [sqlite_source_id()].
156 */
157 SQLITE_API SQLITE_EXTERN const char sqlite3_version[];
158 SQLITE_API const char *sqlite3_libversion(void);
159 SQLITE_API const char *sqlite3_sourceid(void);
160 SQLITE_API int sqlite3_libversion_number(void);
161
162 /*
163 ** CAPI3REF: Run-Time Library Compilation Options Diagnostics
164 **
165 ** ^The sqlite3_compileoption_used() function returns 0 or 1
@@ -180,12 +180,12 @@
180 **
181 ** See also: SQL functions [sqlite_compileoption_used()] and
182 ** [sqlite_compileoption_get()] and the [compile_options pragma].
183 */
184 #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
185 SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
186 SQLITE_API const char *sqlite3_compileoption_get(int N);
187 #endif
188
189 /*
190 ** CAPI3REF: Test To See If The Library Is Threadsafe
191 **
@@ -220,11 +220,11 @@
220 ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
221 ** is unchanged by calls to sqlite3_config().)^
222 **
223 ** See the [threading mode] documentation for additional information.
224 */
225 SQLITE_API int sqlite3_threadsafe(void);
226
227 /*
228 ** CAPI3REF: Database Connection Handle
229 ** KEYWORDS: {database connection} {database connections}
230 **
@@ -317,12 +317,12 @@
317 ** from [sqlite3_open()], [sqlite3_open16()], or
318 ** [sqlite3_open_v2()], and not previously closed.
319 ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
320 ** argument is a harmless no-op.
321 */
322 SQLITE_API int sqlite3_close(sqlite3*);
323 SQLITE_API int sqlite3_close_v2(sqlite3*);
324
325 /*
326 ** The type for a callback function.
327 ** This is legacy and deprecated. It is included for historical
328 ** compatibility and is not documented.
@@ -389,11 +389,11 @@
389 ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
390 ** <li> The application must not modify the SQL statement text passed into
391 ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
392 ** </ul>
393 */
394 SQLITE_API int sqlite3_exec(
395 sqlite3*, /* An open database */
396 const char *sql, /* SQL to be evaluated */
397 int (*callback)(void*,int,char**,char**), /* Callback function */
398 void *, /* 1st argument to callback */
399 char **errmsg /* Error msg written here */
@@ -1388,14 +1388,14 @@
1388 ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied
1389 ** implementation of sqlite3_os_init() or sqlite3_os_end()
1390 ** must return [SQLITE_OK] on success and some other [error code] upon
1391 ** failure.
1392 */
1393 SQLITE_API int sqlite3_initialize(void);
1394 SQLITE_API int sqlite3_shutdown(void);
1395 SQLITE_API int sqlite3_os_init(void);
1396 SQLITE_API int sqlite3_os_end(void);
1397
1398 /*
1399 ** CAPI3REF: Configuring The SQLite Library
1400 **
1401 ** The sqlite3_config() interface is used to make global configuration
@@ -1424,11 +1424,11 @@
1424 **
1425 ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
1426 ** ^If the option is unknown or SQLite is unable to set the option
1427 ** then this routine returns a non-zero [error code].
1428 */
1429 SQLITE_API int sqlite3_config(int, ...);
1430
1431 /*
1432 ** CAPI3REF: Configure database connections
1433 ** METHOD: sqlite3
1434 **
@@ -1443,11 +1443,11 @@
1443 ** Subsequent arguments vary depending on the configuration verb.
1444 **
1445 ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
1446 ** the call is considered successful.
1447 */
1448 SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
1449
1450 /*
1451 ** CAPI3REF: Memory Allocation Routines
1452 **
1453 ** An instance of this object defines the interface between SQLite
@@ -1984,11 +1984,11 @@
1984 **
1985 ** ^The sqlite3_extended_result_codes() routine enables or disables the
1986 ** [extended result codes] feature of SQLite. ^The extended result
1987 ** codes are disabled by default for historical compatibility.
1988 */
1989 SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
1990
1991 /*
1992 ** CAPI3REF: Last Insert Rowid
1993 ** METHOD: sqlite3
1994 **
@@ -2036,11 +2036,11 @@
2036 ** function is running and thus changes the last insert [rowid],
2037 ** then the value returned by [sqlite3_last_insert_rowid()] is
2038 ** unpredictable and might not equal either the old or the new
2039 ** last insert [rowid].
2040 */
2041 SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
2042
2043 /*
2044 ** CAPI3REF: Count The Number Of Rows Modified
2045 ** METHOD: sqlite3
2046 **
@@ -2089,11 +2089,11 @@
2089 **
2090 ** If a separate thread makes changes on the same database connection
2091 ** while [sqlite3_changes()] is running then the value returned
2092 ** is unpredictable and not meaningful.
2093 */
2094 SQLITE_API int sqlite3_changes(sqlite3*);
2095
2096 /*
2097 ** CAPI3REF: Total Number Of Rows Modified
2098 ** METHOD: sqlite3
2099 **
@@ -2113,11 +2113,11 @@
2113 **
2114 ** If a separate thread makes changes on the same database connection
2115 ** while [sqlite3_total_changes()] is running then the value
2116 ** returned is unpredictable and not meaningful.
2117 */
2118 SQLITE_API int sqlite3_total_changes(sqlite3*);
2119
2120 /*
2121 ** CAPI3REF: Interrupt A Long-Running Query
2122 ** METHOD: sqlite3
2123 **
@@ -2153,11 +2153,11 @@
2153 ** that are started after the sqlite3_interrupt() call returns.
2154 **
2155 ** If the database connection closes while [sqlite3_interrupt()]
2156 ** is running then bad things will likely happen.
2157 */
2158 SQLITE_API void sqlite3_interrupt(sqlite3*);
2159
2160 /*
2161 ** CAPI3REF: Determine If An SQL Statement Is Complete
2162 **
2163 ** These routines are useful during command-line input to determine if the
@@ -2188,12 +2188,12 @@
2188 ** UTF-8 string.
2189 **
2190 ** The input to [sqlite3_complete16()] must be a zero-terminated
2191 ** UTF-16 string in native byte order.
2192 */
2193 SQLITE_API int sqlite3_complete(const char *sql);
2194 SQLITE_API int sqlite3_complete16(const void *sql);
2195
2196 /*
2197 ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
2198 ** KEYWORDS: {busy-handler callback} {busy handler}
2199 ** METHOD: sqlite3
@@ -2250,11 +2250,11 @@
2250 ** result in undefined behavior.
2251 **
2252 ** A busy handler must not close the database connection
2253 ** or [prepared statement] that invoked the busy handler.
2254 */
2255 SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2256
2257 /*
2258 ** CAPI3REF: Set A Busy Timeout
2259 ** METHOD: sqlite3
2260 **
@@ -2273,11 +2273,11 @@
2273 ** was defined (using [sqlite3_busy_handler()]) prior to calling
2274 ** this routine, that other busy handler is cleared.)^
2275 **
2276 ** See also: [PRAGMA busy_timeout]
2277 */
2278 SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
2279
2280 /*
2281 ** CAPI3REF: Convenience Routines For Running Queries
2282 ** METHOD: sqlite3
2283 **
@@ -2348,19 +2348,19 @@
2348 ** interface defined here. As a consequence, errors that occur in the
2349 ** wrapper layer outside of the internal [sqlite3_exec()] call are not
2350 ** reflected in subsequent calls to [sqlite3_errcode()] or
2351 ** [sqlite3_errmsg()].
2352 */
2353 SQLITE_API int sqlite3_get_table(
2354 sqlite3 *db, /* An open database */
2355 const char *zSql, /* SQL to be evaluated */
2356 char ***pazResult, /* Results of the query */
2357 int *pnRow, /* Number of result rows written here */
2358 int *pnColumn, /* Number of result columns written here */
2359 char **pzErrmsg /* Error msg written here */
2360 );
2361 SQLITE_API void sqlite3_free_table(char **result);
2362
2363 /*
2364 ** CAPI3REF: Formatted String Printing Functions
2365 **
2366 ** These routines are work-alikes of the "printf()" family of functions
@@ -2462,14 +2462,14 @@
2462 **
2463 ** ^(The "%z" formatting option works like "%s" but with the
2464 ** addition that after the string has been read and copied into
2465 ** the result, [sqlite3_free()] is called on the input string.)^
2466 */
2467 SQLITE_API char *sqlite3_mprintf(const char*,...);
2468 SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
2469 SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
2470 SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
2471
2472 /*
2473 ** CAPI3REF: Memory Allocation Subsystem
2474 **
2475 ** The SQLite core uses these three routines for all of its own
@@ -2555,16 +2555,16 @@
2555 **
2556 ** The application must not read or write any part of
2557 ** a block of memory after it has been released using
2558 ** [sqlite3_free()] or [sqlite3_realloc()].
2559 */
2560 SQLITE_API void *sqlite3_malloc(int);
2561 SQLITE_API void *sqlite3_malloc64(sqlite3_uint64);
2562 SQLITE_API void *sqlite3_realloc(void*, int);
2563 SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64);
2564 SQLITE_API void sqlite3_free(void*);
2565 SQLITE_API sqlite3_uint64 sqlite3_msize(void*);
2566
2567 /*
2568 ** CAPI3REF: Memory Allocator Statistics
2569 **
2570 ** SQLite provides these two interfaces for reporting on the status
@@ -2585,12 +2585,12 @@
2585 ** [sqlite3_memory_used()] if and only if the parameter to
2586 ** [sqlite3_memory_highwater()] is true. ^The value returned
2587 ** by [sqlite3_memory_highwater(1)] is the high-water mark
2588 ** prior to the reset.
2589 */
2590 SQLITE_API sqlite3_int64 sqlite3_memory_used(void);
2591 SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
2592
2593 /*
2594 ** CAPI3REF: Pseudo-Random Number Generator
2595 **
2596 ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
@@ -2609,11 +2609,11 @@
2609 ** ^If the previous call to this routine had an N of 1 or more and a
2610 ** non-NULL P then the pseudo-randomness is generated
2611 ** internally and without recourse to the [sqlite3_vfs] xRandomness
2612 ** method.
2613 */
2614 SQLITE_API void sqlite3_randomness(int N, void *P);
2615
2616 /*
2617 ** CAPI3REF: Compile-Time Authorization Callbacks
2618 ** METHOD: sqlite3
2619 **
@@ -2692,11 +2692,11 @@
2692 ** [sqlite3_prepare()] or its variants. Authorization is not
2693 ** performed during statement evaluation in [sqlite3_step()], unless
2694 ** as stated in the previous paragraph, sqlite3_step() invokes
2695 ** sqlite3_prepare_v2() to reprepare a statement after a schema change.
2696 */
2697 SQLITE_API int sqlite3_set_authorizer(
2698 sqlite3*,
2699 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
2700 void *pUserData
2701 );
2702
@@ -2800,13 +2800,13 @@
2800 ** digits in the time are meaningless. Future versions of SQLite
2801 ** might provide greater resolution on the profiler callback. The
2802 ** sqlite3_profile() function is considered experimental and is
2803 ** subject to change in future versions of SQLite.
2804 */
2805 SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,
2806 void(*xTrace)(void*,const char*), void*);
2807 SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
2808 void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
2809
2810 /*
2811 ** CAPI3REF: SQL Trace Event Codes
2812 ** KEYWORDS: SQLITE_TRACE
@@ -2891,11 +2891,11 @@
2891 **
2892 ** The sqlite3_trace_v2() interface is intended to replace the legacy
2893 ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
2894 ** are deprecated.
2895 */
2896 SQLITE_API int sqlite3_trace_v2(
2897 sqlite3*,
2898 unsigned uMask,
2899 int(*xCallback)(unsigned,void*,void*,void*),
2900 void *pCtx
2901 );
@@ -2930,11 +2930,11 @@
2930 ** the database connection that invoked the progress handler.
2931 ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
2932 ** database connections for the meaning of "modify" in this paragraph.
2933 **
2934 */
2935 SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
2936
2937 /*
2938 ** CAPI3REF: Opening A New Database Connection
2939 ** CONSTRUCTOR: sqlite3
2940 **
@@ -3159,19 +3159,19 @@
3159 ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
3160 ** features that require the use of temporary files may fail.
3161 **
3162 ** See also: [sqlite3_temp_directory]
3163 */
3164 SQLITE_API int sqlite3_open(
3165 const char *filename, /* Database filename (UTF-8) */
3166 sqlite3 **ppDb /* OUT: SQLite db handle */
3167 );
3168 SQLITE_API int sqlite3_open16(
3169 const void *filename, /* Database filename (UTF-16) */
3170 sqlite3 **ppDb /* OUT: SQLite db handle */
3171 );
3172 SQLITE_API int sqlite3_open_v2(
3173 const char *filename, /* Database filename (UTF-8) */
3174 sqlite3 **ppDb, /* OUT: SQLite db handle */
3175 int flags, /* Flags */
3176 const char *zVfs /* Name of VFS module to use */
3177 );
@@ -3213,13 +3213,13 @@
3213 ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and
3214 ** is not a database file pathname pointer that SQLite passed into the xOpen
3215 ** VFS method, then the behavior of this routine is undefined and probably
3216 ** undesirable.
3217 */
3218 SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3219 SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3220 SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
3221
3222
3223 /*
3224 ** CAPI3REF: Error Codes And Messages
3225 ** METHOD: sqlite3
@@ -3259,15 +3259,15 @@
3259 **
3260 ** If an interface fails with SQLITE_MISUSE, that means the interface
3261 ** was invoked incorrectly by the application. In that case, the
3262 ** error code and message may or may not be set.
3263 */
3264 SQLITE_API int sqlite3_errcode(sqlite3 *db);
3265 SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
3266 SQLITE_API const char *sqlite3_errmsg(sqlite3*);
3267 SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
3268 SQLITE_API const char *sqlite3_errstr(int);
3269
3270 /*
3271 ** CAPI3REF: Prepared Statement Object
3272 ** KEYWORDS: {prepared statement} {prepared statements}
3273 **
@@ -3331,11 +3331,11 @@
3331 ** created by an untrusted script can be contained using the
3332 ** [max_page_count] [PRAGMA].
3333 **
3334 ** New run-time limit categories may be added in future releases.
3335 */
3336 SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
3337
3338 /*
3339 ** CAPI3REF: Run-Time Limit Categories
3340 ** KEYWORDS: {limit category} {*limit categories}
3341 **
@@ -3483,32 +3483,32 @@
3483 ** or [GLOB] operator or if the parameter is compared to an indexed column
3484 ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
3485 ** </li>
3486 ** </ol>
3487 */
3488 SQLITE_API int sqlite3_prepare(
3489 sqlite3 *db, /* Database handle */
3490 const char *zSql, /* SQL statement, UTF-8 encoded */
3491 int nByte, /* Maximum length of zSql in bytes. */
3492 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3493 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3494 );
3495 SQLITE_API int sqlite3_prepare_v2(
3496 sqlite3 *db, /* Database handle */
3497 const char *zSql, /* SQL statement, UTF-8 encoded */
3498 int nByte, /* Maximum length of zSql in bytes. */
3499 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3500 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3501 );
3502 SQLITE_API int sqlite3_prepare16(
3503 sqlite3 *db, /* Database handle */
3504 const void *zSql, /* SQL statement, UTF-16 encoded */
3505 int nByte, /* Maximum length of zSql in bytes. */
3506 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3507 const void **pzTail /* OUT: Pointer to unused portion of zSql */
3508 );
3509 SQLITE_API int sqlite3_prepare16_v2(
3510 sqlite3 *db, /* Database handle */
3511 const void *zSql, /* SQL statement, UTF-16 encoded */
3512 int nByte, /* Maximum length of zSql in bytes. */
3513 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3514 const void **pzTail /* OUT: Pointer to unused portion of zSql */
@@ -3543,12 +3543,12 @@
3543 ** automatically freed when the prepared statement is finalized.
3544 ** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
3545 ** is obtained from [sqlite3_malloc()] and must be free by the application
3546 ** by passing it to [sqlite3_free()].
3547 */
3548 SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
3549 SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt);
3550
3551 /*
3552 ** CAPI3REF: Determine If An SQL Statement Writes The Database
3553 ** METHOD: sqlite3_stmt
3554 **
@@ -3576,11 +3576,11 @@
3576 ** database. ^The [ATTACH] and [DETACH] statements also cause
3577 ** sqlite3_stmt_readonly() to return true since, while those statements
3578 ** change the configuration of a database connection, they do not make
3579 ** changes to the content of the database files on disk.
3580 */
3581 SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
3582
3583 /*
3584 ** CAPI3REF: Determine If A Prepared Statement Has Been Reset
3585 ** METHOD: sqlite3_stmt
3586 **
@@ -3597,11 +3597,11 @@
3597 ** to locate all prepared statements associated with a database
3598 ** connection that are in need of being reset. This can be used,
3599 ** for example, in diagnostic routines to search for prepared
3600 ** statements that are holding a transaction open.
3601 */
3602 SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
3603
3604 /*
3605 ** CAPI3REF: Dynamically Typed Value Object
3606 ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
3607 **
@@ -3761,24 +3761,24 @@
3761 ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
3762 **
3763 ** See also: [sqlite3_bind_parameter_count()],
3764 ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
3765 */
3766 SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
3767 SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
3768 void(*)(void*));
3769 SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
3770 SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
3771 SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
3772 SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
3773 SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
3774 SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
3775 SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
3776 void(*)(void*), unsigned char encoding);
3777 SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
3778 SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
3779 SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
3780
3781 /*
3782 ** CAPI3REF: Number Of SQL Parameters
3783 ** METHOD: sqlite3_stmt
3784 **
@@ -3795,11 +3795,11 @@
3795 **
3796 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
3797 ** [sqlite3_bind_parameter_name()], and
3798 ** [sqlite3_bind_parameter_index()].
3799 */
3800 SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
3801
3802 /*
3803 ** CAPI3REF: Name Of A Host Parameter
3804 ** METHOD: sqlite3_stmt
3805 **
@@ -3823,11 +3823,11 @@
3823 **
3824 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
3825 ** [sqlite3_bind_parameter_count()], and
3826 ** [sqlite3_bind_parameter_index()].
3827 */
3828 SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
3829
3830 /*
3831 ** CAPI3REF: Index Of A Parameter With A Given Name
3832 ** METHOD: sqlite3_stmt
3833 **
@@ -3840,21 +3840,21 @@
3840 **
3841 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
3842 ** [sqlite3_bind_parameter_count()], and
3843 ** [sqlite3_bind_parameter_name()].
3844 */
3845 SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
3846
3847 /*
3848 ** CAPI3REF: Reset All Bindings On A Prepared Statement
3849 ** METHOD: sqlite3_stmt
3850 **
3851 ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
3852 ** the [sqlite3_bind_blob | bindings] on a [prepared statement].
3853 ** ^Use this routine to reset all host parameters to NULL.
3854 */
3855 SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
3856
3857 /*
3858 ** CAPI3REF: Number Of Columns In A Result Set
3859 ** METHOD: sqlite3_stmt
3860 **
@@ -3862,11 +3862,11 @@
3862 ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
3863 ** statement that does not return data (for example an [UPDATE]).
3864 **
3865 ** See also: [sqlite3_data_count()]
3866 */
3867 SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
3868
3869 /*
3870 ** CAPI3REF: Column Names In A Result Set
3871 ** METHOD: sqlite3_stmt
3872 **
@@ -3891,12 +3891,12 @@
3891 ** ^The name of a result column is the value of the "AS" clause for
3892 ** that column, if there is an AS clause. If there is no AS clause
3893 ** then the name of the column is unspecified and may change from
3894 ** one release of SQLite to the next.
3895 */
3896 SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
3897 SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
3898
3899 /*
3900 ** CAPI3REF: Source Of Data In A Query Result
3901 ** METHOD: sqlite3_stmt
3902 **
@@ -3940,16 +3940,16 @@
3940 ** If two or more threads call one or more
3941 ** [sqlite3_column_database_name | column metadata interfaces]
3942 ** for the same [prepared statement] and result column
3943 ** at the same time then the results are undefined.
3944 */
3945 SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
3946 SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
3947 SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
3948 SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
3949 SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
3950 SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
3951
3952 /*
3953 ** CAPI3REF: Declared Datatype Of A Query Result
3954 ** METHOD: sqlite3_stmt
3955 **
@@ -3977,12 +3977,12 @@
3977 ** data stored in that column is of the declared type. SQLite is
3978 ** strongly typed, but the typing is dynamic not static. ^Type
3979 ** is associated with individual values, not with the containers
3980 ** used to hold those values.
3981 */
3982 SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
3983 SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
3984
3985 /*
3986 ** CAPI3REF: Evaluate An SQL Statement
3987 ** METHOD: sqlite3_stmt
3988 **
@@ -4058,11 +4058,11 @@
4058 ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
4059 ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
4060 ** then the more specific [error codes] are returned directly
4061 ** by sqlite3_step(). The use of the "v2" interface is recommended.
4062 */
4063 SQLITE_API int sqlite3_step(sqlite3_stmt*);
4064
4065 /*
4066 ** CAPI3REF: Number of columns in a result set
4067 ** METHOD: sqlite3_stmt
4068 **
@@ -4079,11 +4079,11 @@
4079 ** where it always returns zero since each step of that multi-step
4080 ** pragma returns 0 columns of data.
4081 **
4082 ** See also: [sqlite3_column_count()]
4083 */
4084 SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
4085
4086 /*
4087 ** CAPI3REF: Fundamental Datatypes
4088 ** KEYWORDS: SQLITE_TEXT
4089 **
@@ -4269,20 +4269,20 @@
4269 ** of these routines, a default value is returned. The default value
4270 ** is either the integer 0, the floating point number 0.0, or a NULL
4271 ** pointer. Subsequent calls to [sqlite3_errcode()] will return
4272 ** [SQLITE_NOMEM].)^
4273 */
4274 SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
4275 SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4276 SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4277 SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
4278 SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
4279 SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
4280 SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
4281 SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
4282 SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
4283 SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
4284
4285 /*
4286 ** CAPI3REF: Destroy A Prepared Statement Object
4287 ** DESTRUCTOR: sqlite3_stmt
4288 **
@@ -4306,11 +4306,11 @@
4306 ** resource leaks. It is a grievous error for the application to try to use
4307 ** a prepared statement after it has been finalized. Any use of a prepared
4308 ** statement after it has been finalized can result in undefined and
4309 ** undesirable behavior such as segfaults and heap corruption.
4310 */
4311 SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
4312
4313 /*
4314 ** CAPI3REF: Reset A Prepared Statement Object
4315 ** METHOD: sqlite3_stmt
4316 **
@@ -4333,11 +4333,11 @@
4333 ** [sqlite3_reset(S)] returns an appropriate [error code].
4334 **
4335 ** ^The [sqlite3_reset(S)] interface does not change the values
4336 ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
4337 */
4338 SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
4339
4340 /*
4341 ** CAPI3REF: Create Or Redefine SQL Functions
4342 ** KEYWORDS: {function creation routines}
4343 ** KEYWORDS: {application-defined SQL function}
@@ -4433,31 +4433,31 @@
4433 ** ^An application-defined function is permitted to call other
4434 ** SQLite interfaces. However, such calls must not
4435 ** close the database connection nor finalize or reset the prepared
4436 ** statement in which the function is running.
4437 */
4438 SQLITE_API int sqlite3_create_function(
4439 sqlite3 *db,
4440 const char *zFunctionName,
4441 int nArg,
4442 int eTextRep,
4443 void *pApp,
4444 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4445 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4446 void (*xFinal)(sqlite3_context*)
4447 );
4448 SQLITE_API int sqlite3_create_function16(
4449 sqlite3 *db,
4450 const void *zFunctionName,
4451 int nArg,
4452 int eTextRep,
4453 void *pApp,
4454 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4455 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4456 void (*xFinal)(sqlite3_context*)
4457 );
4458 SQLITE_API int sqlite3_create_function_v2(
4459 sqlite3 *db,
4460 const char *zFunctionName,
4461 int nArg,
4462 int eTextRep,
4463 void *pApp,
@@ -4499,16 +4499,16 @@
4499 ** to be supported. However, new applications should avoid
4500 ** the use of these functions. To encourage programmers to avoid
4501 ** these functions, we will not explain what they do.
4502 */
4503 #ifndef SQLITE_OMIT_DEPRECATED
4504 SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
4505 SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
4506 SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4507 SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
4508 SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
4509 SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
4510 void*,sqlite3_int64);
4511 #endif
4512
4513 /*
4514 ** CAPI3REF: Obtaining SQL Values
@@ -4554,22 +4554,22 @@
4554 ** or [sqlite3_value_text16()].
4555 **
4556 ** These routines must be called from the same thread as
4557 ** the SQL function that supplied the [sqlite3_value*] parameters.
4558 */
4559 SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
4560 SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
4561 SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
4562 SQLITE_API double sqlite3_value_double(sqlite3_value*);
4563 SQLITE_API int sqlite3_value_int(sqlite3_value*);
4564 SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
4565 SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
4566 SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
4567 SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
4568 SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
4569 SQLITE_API int sqlite3_value_type(sqlite3_value*);
4570 SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
4571
4572 /*
4573 ** CAPI3REF: Finding The Subtype Of SQL Values
4574 ** METHOD: sqlite3_value
4575 **
@@ -4581,11 +4581,11 @@
4581 **
4582 ** SQLite makes no use of subtype itself. It merely passes the subtype
4583 ** from the result of one [application-defined SQL function] into the
4584 ** input of another.
4585 */
4586 SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
4587
4588 /*
4589 ** CAPI3REF: Copy And Free SQL Values
4590 ** METHOD: sqlite3_value
4591 **
@@ -4597,12 +4597,12 @@
4597 **
4598 ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
4599 ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
4600 ** then sqlite3_value_free(V) is a harmless no-op.
4601 */
4602 SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*);
4603 SQLITE_API void sqlite3_value_free(sqlite3_value*);
4604
4605 /*
4606 ** CAPI3REF: Obtain Aggregate Function Context
4607 ** METHOD: sqlite3_context
4608 **
@@ -4643,11 +4643,11 @@
4643 ** function.
4644 **
4645 ** This routine must be called from the same thread in which
4646 ** the aggregate SQL function is running.
4647 */
4648 SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
4649
4650 /*
4651 ** CAPI3REF: User Data For Functions
4652 ** METHOD: sqlite3_context
4653 **
@@ -4658,11 +4658,11 @@
4658 ** registered the application defined function.
4659 **
4660 ** This routine must be called from the same thread in which
4661 ** the application-defined function is running.
4662 */
4663 SQLITE_API void *sqlite3_user_data(sqlite3_context*);
4664
4665 /*
4666 ** CAPI3REF: Database Connection For Functions
4667 ** METHOD: sqlite3_context
4668 **
@@ -4670,11 +4670,11 @@
4670 ** the pointer to the [database connection] (the 1st parameter)
4671 ** of the [sqlite3_create_function()]
4672 ** and [sqlite3_create_function16()] routines that originally
4673 ** registered the application defined function.
4674 */
4675 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
4676
4677 /*
4678 ** CAPI3REF: Function Auxiliary Data
4679 ** METHOD: sqlite3_context
4680 **
@@ -4724,12 +4724,12 @@
4724 ** values and [parameters] and expressions composed from the same.)^
4725 **
4726 ** These routines must be called from the same thread in which
4727 ** the SQL function is running.
4728 */
4729 SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
4730 SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
4731
4732
4733 /*
4734 ** CAPI3REF: Constants Defining Special Destructor Behavior
4735 **
@@ -4861,31 +4861,31 @@
4861 **
4862 ** If these routines are called from within the different thread
4863 ** than the one containing the application-defined function that received
4864 ** the [sqlite3_context] pointer, the results are undefined.
4865 */
4866 SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
4867 SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,
4868 sqlite3_uint64,void(*)(void*));
4869 SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
4870 SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
4871 SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
4872 SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
4873 SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
4874 SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
4875 SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
4876 SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
4877 SQLITE_API void sqlite3_result_null(sqlite3_context*);
4878 SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
4879 SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
4880 void(*)(void*), unsigned char encoding);
4881 SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
4882 SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
4883 SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
4884 SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
4885 SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
4886 SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
4887
4888
4889 /*
4890 ** CAPI3REF: Setting The Subtype Of An SQL Function
4891 ** METHOD: sqlite3_context
@@ -4896,11 +4896,11 @@
4896 ** of the subtype T are preserved in current versions of SQLite;
4897 ** higher order bits are discarded.
4898 ** The number of subtype bytes preserved by SQLite might increase
4899 ** in future releases of SQLite.
4900 */
4901 SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
4902
4903 /*
4904 ** CAPI3REF: Define New Collating Sequences
4905 ** METHOD: sqlite3
4906 **
@@ -4978,26 +4978,26 @@
4978 ** is unfortunate but cannot be changed without breaking backwards
4979 ** compatibility.
4980 **
4981 ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
4982 */
4983 SQLITE_API int sqlite3_create_collation(
4984 sqlite3*,
4985 const char *zName,
4986 int eTextRep,
4987 void *pArg,
4988 int(*xCompare)(void*,int,const void*,int,const void*)
4989 );
4990 SQLITE_API int sqlite3_create_collation_v2(
4991 sqlite3*,
4992 const char *zName,
4993 int eTextRep,
4994 void *pArg,
4995 int(*xCompare)(void*,int,const void*,int,const void*),
4996 void(*xDestroy)(void*)
4997 );
4998 SQLITE_API int sqlite3_create_collation16(
4999 sqlite3*,
5000 const void *zName,
5001 int eTextRep,
5002 void *pArg,
5003 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -5028,16 +5028,16 @@
5028 **
5029 ** The callback function should register the desired collation using
5030 ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
5031 ** [sqlite3_create_collation_v2()].
5032 */
5033 SQLITE_API int sqlite3_collation_needed(
5034 sqlite3*,
5035 void*,
5036 void(*)(void*,sqlite3*,int eTextRep,const char*)
5037 );
5038 SQLITE_API int sqlite3_collation_needed16(
5039 sqlite3*,
5040 void*,
5041 void(*)(void*,sqlite3*,int eTextRep,const void*)
5042 );
5043
@@ -5047,15 +5047,15 @@
5047 ** called right after sqlite3_open().
5048 **
5049 ** The code to implement this API is not available in the public release
5050 ** of SQLite.
5051 */
5052 SQLITE_API int sqlite3_key(
5053 sqlite3 *db, /* Database to be rekeyed */
5054 const void *pKey, int nKey /* The key */
5055 );
5056 SQLITE_API int sqlite3_key_v2(
5057 sqlite3 *db, /* Database to be rekeyed */
5058 const char *zDbName, /* Name of the database */
5059 const void *pKey, int nKey /* The key */
5060 );
5061
@@ -5065,35 +5065,35 @@
5065 ** database is decrypted.
5066 **
5067 ** The code to implement this API is not available in the public release
5068 ** of SQLite.
5069 */
5070 SQLITE_API int sqlite3_rekey(
5071 sqlite3 *db, /* Database to be rekeyed */
5072 const void *pKey, int nKey /* The new key */
5073 );
5074 SQLITE_API int sqlite3_rekey_v2(
5075 sqlite3 *db, /* Database to be rekeyed */
5076 const char *zDbName, /* Name of the database */
5077 const void *pKey, int nKey /* The new key */
5078 );
5079
5080 /*
5081 ** Specify the activation key for a SEE database. Unless
5082 ** activated, none of the SEE routines will work.
5083 */
5084 SQLITE_API void sqlite3_activate_see(
5085 const char *zPassPhrase /* Activation phrase */
5086 );
5087 #endif
5088
5089 #ifdef SQLITE_ENABLE_CEROD
5090 /*
5091 ** Specify the activation key for a CEROD database. Unless
5092 ** activated, none of the CEROD routines will work.
5093 */
5094 SQLITE_API void sqlite3_activate_cerod(
5095 const char *zPassPhrase /* Activation phrase */
5096 );
5097 #endif
5098
5099 /*
@@ -5111,11 +5111,11 @@
5111 ** method of the default [sqlite3_vfs] object. If the xSleep() method
5112 ** of the default VFS is not implemented correctly, or not implemented at
5113 ** all, then the behavior of sqlite3_sleep() may deviate from the description
5114 ** in the previous paragraphs.
5115 */
5116 SQLITE_API int sqlite3_sleep(int);
5117
5118 /*
5119 ** CAPI3REF: Name Of The Folder Holding Temporary Files
5120 **
5121 ** ^(If this global variable is made to point to a string which is
@@ -5230,11 +5230,11 @@
5230 **
5231 ** If another thread changes the autocommit status of the database
5232 ** connection while this routine is running, then the return value
5233 ** is undefined.
5234 */
5235 SQLITE_API int sqlite3_get_autocommit(sqlite3*);
5236
5237 /*
5238 ** CAPI3REF: Find The Database Handle Of A Prepared Statement
5239 ** METHOD: sqlite3_stmt
5240 **
@@ -5243,11 +5243,11 @@
5243 ** returned by sqlite3_db_handle is the same [database connection]
5244 ** that was the first argument
5245 ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
5246 ** create the statement in the first place.
5247 */
5248 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
5249
5250 /*
5251 ** CAPI3REF: Return The Filename For A Database Connection
5252 ** METHOD: sqlite3
5253 **
@@ -5260,21 +5260,21 @@
5260 ** ^The filename returned by this function is the output of the
5261 ** xFullPathname method of the [VFS]. ^In other words, the filename
5262 ** will be an absolute pathname, even if the filename used
5263 ** to open the database originally was a URI or relative pathname.
5264 */
5265 SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);
5266
5267 /*
5268 ** CAPI3REF: Determine if a database is read-only
5269 ** METHOD: sqlite3
5270 **
5271 ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N
5272 ** of connection D is read-only, 0 if it is read/write, or -1 if N is not
5273 ** the name of a database on connection D.
5274 */
5275 SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
5276
5277 /*
5278 ** CAPI3REF: Find the next prepared statement
5279 ** METHOD: sqlite3
5280 **
@@ -5286,11 +5286,11 @@
5286 **
5287 ** The [database connection] pointer D in a call to
5288 ** [sqlite3_next_stmt(D,S)] must refer to an open database
5289 ** connection and in particular must not be a NULL pointer.
5290 */
5291 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
5292
5293 /*
5294 ** CAPI3REF: Commit And Rollback Notification Callbacks
5295 ** METHOD: sqlite3
5296 **
@@ -5335,12 +5335,12 @@
5335 ** ^The rollback callback is not invoked if a transaction is
5336 ** automatically rolled back because the database connection is closed.
5337 **
5338 ** See also the [sqlite3_update_hook()] interface.
5339 */
5340 SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5341 SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5342
5343 /*
5344 ** CAPI3REF: Data Change Notification Callbacks
5345 ** METHOD: sqlite3
5346 **
@@ -5387,11 +5387,11 @@
5387 ** the first call on D.
5388 **
5389 ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
5390 ** and [sqlite3_preupdate_hook()] interfaces.
5391 */
5392 SQLITE_API void *sqlite3_update_hook(
5393 sqlite3*,
5394 void(*)(void *,int ,char const *,char const *,sqlite3_int64),
5395 void*
5396 );
5397
@@ -5427,11 +5427,11 @@
5427 ** This interface is threadsafe on processors where writing a
5428 ** 32-bit integer is atomic.
5429 **
5430 ** See Also: [SQLite Shared-Cache Mode]
5431 */
5432 SQLITE_API int sqlite3_enable_shared_cache(int);
5433
5434 /*
5435 ** CAPI3REF: Attempt To Free Heap Memory
5436 **
5437 ** ^The sqlite3_release_memory() interface attempts to free N bytes
@@ -5443,11 +5443,11 @@
5443 ** ^The sqlite3_release_memory() routine is a no-op returning zero
5444 ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5445 **
5446 ** See also: [sqlite3_db_release_memory()]
5447 */
5448 SQLITE_API int sqlite3_release_memory(int);
5449
5450 /*
5451 ** CAPI3REF: Free Memory Used By A Database Connection
5452 ** METHOD: sqlite3
5453 **
@@ -5457,11 +5457,11 @@
5457 ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is
5458 ** omitted.
5459 **
5460 ** See also: [sqlite3_release_memory()]
5461 */
5462 SQLITE_API int sqlite3_db_release_memory(sqlite3*);
5463
5464 /*
5465 ** CAPI3REF: Impose A Limit On Heap Size
5466 **
5467 ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
@@ -5509,11 +5509,11 @@
5509 ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5510 **
5511 ** The circumstances under which SQLite will enforce the soft heap limit may
5512 ** changes in future releases of SQLite.
5513 */
5514 SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
5515
5516 /*
5517 ** CAPI3REF: Deprecated Soft Heap Limit Interface
5518 ** DEPRECATED
5519 **
@@ -5520,11 +5520,11 @@
5520 ** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
5521 ** interface. This routine is provided for historical compatibility
5522 ** only. All new applications should use the
5523 ** [sqlite3_soft_heap_limit64()] interface rather than this one.
5524 */
5525 SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
5526
5527
5528 /*
5529 ** CAPI3REF: Extract Metadata About A Column Of A Table
5530 ** METHOD: sqlite3
@@ -5590,11 +5590,11 @@
5590 **
5591 ** ^This function causes all database schemas to be read from disk and
5592 ** parsed, if that has not already been done, and returns an error if
5593 ** any errors are encountered while loading the schema.
5594 */
5595 SQLITE_API int sqlite3_table_column_metadata(
5596 sqlite3 *db, /* Connection handle */
5597 const char *zDbName, /* Database name or NULL */
5598 const char *zTableName, /* Table name */
5599 const char *zColumnName, /* Column name */
5600 char const **pzDataType, /* OUTPUT: Declared data type */
@@ -5646,11 +5646,11 @@
5646 ** disabled and prevent SQL injections from giving attackers
5647 ** access to extension loading capabilities.
5648 **
5649 ** See also the [load_extension() SQL function].
5650 */
5651 SQLITE_API int sqlite3_load_extension(
5652 sqlite3 *db, /* Load the extension into this database connection */
5653 const char *zFile, /* Name of the shared library containing extension */
5654 const char *zProc, /* Entry point. Derived from zFile if 0 */
5655 char **pzErrMsg /* Put error message here if not 0 */
5656 );
@@ -5678,11 +5678,11 @@
5678 ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
5679 ** rather than this interface, so the [load_extension()] SQL function
5680 ** remains disabled. This will prevent SQL injections from giving attackers
5681 ** access to extension loading capabilities.
5682 */
5683 SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5684
5685 /*
5686 ** CAPI3REF: Automatically Load Statically Linked Extensions
5687 **
5688 ** ^This interface causes the xEntryPoint() function to be invoked for
@@ -5716,11 +5716,11 @@
5716 ** will be called more than once for each database connection that is opened.
5717 **
5718 ** See also: [sqlite3_reset_auto_extension()]
5719 ** and [sqlite3_cancel_auto_extension()]
5720 */
5721 SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
5722
5723 /*
5724 ** CAPI3REF: Cancel Automatic Extension Loading
5725 **
5726 ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the
@@ -5728,19 +5728,19 @@
5728 ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)]
5729 ** routine returns 1 if initialization routine X was successfully
5730 ** unregistered and it returns 0 if X was not on the list of initialization
5731 ** routines.
5732 */
5733 SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
5734
5735 /*
5736 ** CAPI3REF: Reset Automatic Extension Loading
5737 **
5738 ** ^This interface disables all automatic extensions previously
5739 ** registered using [sqlite3_auto_extension()].
5740 */
5741 SQLITE_API void sqlite3_reset_auto_extension(void);
5742
5743 /*
5744 ** The interface to the virtual-table mechanism is currently considered
5745 ** to be experimental. The interface might change in incompatible ways.
5746 ** If this is a problem for you, do not use the interface at this time.
@@ -5981,17 +5981,17 @@
5981 ** be invoked if the call to sqlite3_create_module_v2() fails.
5982 ** ^The sqlite3_create_module()
5983 ** interface is equivalent to sqlite3_create_module_v2() with a NULL
5984 ** destructor.
5985 */
5986 SQLITE_API int sqlite3_create_module(
5987 sqlite3 *db, /* SQLite connection to register module with */
5988 const char *zName, /* Name of the module */
5989 const sqlite3_module *p, /* Methods for the module */
5990 void *pClientData /* Client data for xCreate/xConnect */
5991 );
5992 SQLITE_API int sqlite3_create_module_v2(
5993 sqlite3 *db, /* SQLite connection to register module with */
5994 const char *zName, /* Name of the module */
5995 const sqlite3_module *p, /* Methods for the module */
5996 void *pClientData, /* Client data for xCreate/xConnect */
5997 void(*xDestroy)(void*) /* Module destructor function */
@@ -6050,11 +6050,11 @@
6050 ** ^The [xCreate] and [xConnect] methods of a
6051 ** [virtual table module] call this interface
6052 ** to declare the format (the names and datatypes of the columns) of
6053 ** the virtual tables they implement.
6054 */
6055 SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
6056
6057 /*
6058 ** CAPI3REF: Overload A Function For A Virtual Table
6059 ** METHOD: sqlite3
6060 **
@@ -6069,11 +6069,11 @@
6069 ** of the new function always causes an exception to be thrown. So
6070 ** the new function is not good for anything by itself. Its only
6071 ** purpose is to be a placeholder function that can be overloaded
6072 ** by a [virtual table].
6073 */
6074 SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
6075
6076 /*
6077 ** The interface to the virtual-table mechanism defined above (back up
6078 ** to a comment remarkably similar to this one) is currently considered
6079 ** to be experimental. The interface might change in incompatible ways.
@@ -6168,11 +6168,11 @@
6168 ** zero-filled blob to read or write using the incremental-blob interface.
6169 **
6170 ** To avoid a resource leak, every open [BLOB handle] should eventually
6171 ** be released by a call to [sqlite3_blob_close()].
6172 */
6173 SQLITE_API int sqlite3_blob_open(
6174 sqlite3*,
6175 const char *zDb,
6176 const char *zTable,
6177 const char *zColumn,
6178 sqlite3_int64 iRow,
@@ -6201,11 +6201,11 @@
6201 ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
6202 ** always returns zero.
6203 **
6204 ** ^This function sets the database handle error code and message.
6205 */
6206 SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
6207
6208 /*
6209 ** CAPI3REF: Close A BLOB Handle
6210 ** DESTRUCTOR: sqlite3_blob
6211 **
@@ -6224,11 +6224,11 @@
6224 ** with a null pointer (such as would be returned by a failed call to
6225 ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
6226 ** is passed a valid open blob handle, the values returned by the
6227 ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
6228 */
6229 SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
6230
6231 /*
6232 ** CAPI3REF: Return The Size Of An Open BLOB
6233 ** METHOD: sqlite3_blob
6234 **
@@ -6240,11 +6240,11 @@
6240 ** This routine only works on a [BLOB handle] which has been created
6241 ** by a prior successful call to [sqlite3_blob_open()] and which has not
6242 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6243 ** to this routine results in undefined and probably undesirable behavior.
6244 */
6245 SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
6246
6247 /*
6248 ** CAPI3REF: Read Data From A BLOB Incrementally
6249 ** METHOD: sqlite3_blob
6250 **
@@ -6269,11 +6269,11 @@
6269 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6270 ** to this routine results in undefined and probably undesirable behavior.
6271 **
6272 ** See also: [sqlite3_blob_write()].
6273 */
6274 SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
6275
6276 /*
6277 ** CAPI3REF: Write Data Into A BLOB Incrementally
6278 ** METHOD: sqlite3_blob
6279 **
@@ -6311,11 +6311,11 @@
6311 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6312 ** to this routine results in undefined and probably undesirable behavior.
6313 **
6314 ** See also: [sqlite3_blob_read()].
6315 */
6316 SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
6317
6318 /*
6319 ** CAPI3REF: Virtual File System Objects
6320 **
6321 ** A virtual filesystem (VFS) is an [sqlite3_vfs] object
@@ -6342,13 +6342,13 @@
6342 **
6343 ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
6344 ** ^(If the default VFS is unregistered, another VFS is chosen as
6345 ** the default. The choice for the new VFS is arbitrary.)^
6346 */
6347 SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
6348 SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6349 SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
6350
6351 /*
6352 ** CAPI3REF: Mutexes
6353 **
6354 ** The SQLite core uses these routines for thread
@@ -6460,15 +6460,15 @@
6460 ** sqlite3_mutex_leave() is a NULL pointer, then all three routines
6461 ** behave as no-ops.
6462 **
6463 ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
6464 */
6465 SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
6466 SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
6467 SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
6468 SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
6469 SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
6470
6471 /*
6472 ** CAPI3REF: Mutex Methods Object
6473 **
6474 ** An instance of this structure defines the low-level routines
@@ -6574,12 +6574,12 @@
6574 ** call to sqlite3_mutex_held() to fail, so a non-zero return is
6575 ** the appropriate thing to do. The sqlite3_mutex_notheld()
6576 ** interface should also return 1 when given a NULL pointer.
6577 */
6578 #ifndef NDEBUG
6579 SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
6580 SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
6581 #endif
6582
6583 /*
6584 ** CAPI3REF: Mutex Types
6585 **
@@ -6615,11 +6615,11 @@
6615 ** serializes access to the [database connection] given in the argument
6616 ** when the [threading mode] is Serialized.
6617 ** ^If the [threading mode] is Single-thread or Multi-thread then this
6618 ** routine returns a NULL pointer.
6619 */
6620 SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
6621
6622 /*
6623 ** CAPI3REF: Low-Level Control Of Database Files
6624 ** METHOD: sqlite3
6625 **
@@ -6650,11 +6650,11 @@
6650 ** an incorrect zDbName and an SQLITE_ERROR return from the underlying
6651 ** xFileControl method.
6652 **
6653 ** See also: [SQLITE_FCNTL_LOCKSTATE]
6654 */
6655 SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6656
6657 /*
6658 ** CAPI3REF: Testing Interface
6659 **
6660 ** ^The sqlite3_test_control() interface is used to read out internal
@@ -6669,11 +6669,11 @@
6669 ** The details of the operation codes, their meanings, the parameters
6670 ** they take, and what they do are all subject to change without notice.
6671 ** Unlike most of the SQLite API, this function is not guaranteed to
6672 ** operate consistently from one release to the next.
6673 */
6674 SQLITE_API int sqlite3_test_control(int op, ...);
6675
6676 /*
6677 ** CAPI3REF: Testing Interface Operation Codes
6678 **
6679 ** These constants are the valid operation code parameters used
@@ -6732,12 +6732,12 @@
6732 ** be represented by a 32-bit integer, then the values returned by
6733 ** sqlite3_status() are undefined.
6734 **
6735 ** See also: [sqlite3_db_status()]
6736 */
6737 SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6738 SQLITE_API int sqlite3_status64(
6739 int op,
6740 sqlite3_int64 *pCurrent,
6741 sqlite3_int64 *pHighwater,
6742 int resetFlag
6743 );
@@ -6858,11 +6858,11 @@
6858 ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
6859 ** non-zero [error code] on failure.
6860 **
6861 ** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
6862 */
6863 SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
6864
6865 /*
6866 ** CAPI3REF: Status Parameters for database connections
6867 ** KEYWORDS: {SQLITE_DBSTATUS options}
6868 **
@@ -7001,11 +7001,11 @@
7001 ** ^If the resetFlg is true, then the counter is reset to zero after this
7002 ** interface call returns.
7003 **
7004 ** See also: [sqlite3_status()] and [sqlite3_db_status()].
7005 */
7006 SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
7007
7008 /*
7009 ** CAPI3REF: Status Parameters for prepared statements
7010 ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters}
7011 **
@@ -7470,20 +7470,20 @@
7470 ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
7471 ** APIs are not strictly speaking threadsafe. If they are invoked at the
7472 ** same time as another thread is invoking sqlite3_backup_step() it is
7473 ** possible that they return invalid values.
7474 */
7475 SQLITE_API sqlite3_backup *sqlite3_backup_init(
7476 sqlite3 *pDest, /* Destination database handle */
7477 const char *zDestName, /* Destination database name */
7478 sqlite3 *pSource, /* Source database handle */
7479 const char *zSourceName /* Source database name */
7480 );
7481 SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
7482 SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
7483 SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);
7484 SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
7485
7486 /*
7487 ** CAPI3REF: Unlock Notification
7488 ** METHOD: sqlite3
7489 **
@@ -7596,11 +7596,11 @@
7596 ** by an sqlite3_step() call. ^(If there is a blocking connection, then the
7597 ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
7598 ** the special "DROP TABLE/INDEX" case, the extended error code is just
7599 ** SQLITE_LOCKED.)^
7600 */
7601 SQLITE_API int sqlite3_unlock_notify(
7602 sqlite3 *pBlocked, /* Waiting connection */
7603 void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
7604 void *pNotifyArg /* Argument to pass to xNotify */
7605 );
7606
@@ -7611,12 +7611,12 @@
7611 ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications
7612 ** and extensions to compare the contents of two buffers containing UTF-8
7613 ** strings in a case-independent fashion, using the same definition of "case
7614 ** independence" that SQLite uses internally when comparing identifiers.
7615 */
7616 SQLITE_API int sqlite3_stricmp(const char *, const char *);
7617 SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
7618
7619 /*
7620 ** CAPI3REF: String Globbing
7621 *
7622 ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if
@@ -7629,11 +7629,11 @@
7629 ** Note that this routine returns zero on a match and non-zero if the strings
7630 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7631 **
7632 ** See also: [sqlite3_strlike()].
7633 */
7634 SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
7635
7636 /*
7637 ** CAPI3REF: String LIKE Matching
7638 *
7639 ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if
@@ -7652,11 +7652,11 @@
7652 ** Note that this routine returns zero on a match and non-zero if the strings
7653 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7654 **
7655 ** See also: [sqlite3_strglob()].
7656 */
7657 SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
7658
7659 /*
7660 ** CAPI3REF: Error Logging Interface
7661 **
7662 ** ^The [sqlite3_log()] interface writes a message into the [error log]
@@ -7675,11 +7675,11 @@
7675 ** will not use dynamically allocated memory. The log message is stored in
7676 ** a fixed-length buffer on the stack. If the log message is longer than
7677 ** a few hundred characters, it will be truncated to the length of the
7678 ** buffer.
7679 */
7680 SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
7681
7682 /*
7683 ** CAPI3REF: Write-Ahead Log Commit Hook
7684 ** METHOD: sqlite3
7685 **
@@ -7711,11 +7711,11 @@
7711 ** previously registered write-ahead log callback. ^Note that the
7712 ** [sqlite3_wal_autocheckpoint()] interface and the
7713 ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
7714 ** overwrite any prior [sqlite3_wal_hook()] settings.
7715 */
7716 SQLITE_API void *sqlite3_wal_hook(
7717 sqlite3*,
7718 int(*)(void *,sqlite3*,const char*,int),
7719 void*
7720 );
7721
@@ -7746,11 +7746,11 @@
7746 ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
7747 ** pages. The use of this interface
7748 ** is only necessary if the default setting is found to be suboptimal
7749 ** for a particular application.
7750 */
7751 SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
7752
7753 /*
7754 ** CAPI3REF: Checkpoint a database
7755 ** METHOD: sqlite3
7756 **
@@ -7768,11 +7768,11 @@
7768 ** interface was added. This interface is retained for backwards
7769 ** compatibility and as a convenience for applications that need to manually
7770 ** start a callback but which do not need the full power (and corresponding
7771 ** complication) of [sqlite3_wal_checkpoint_v2()].
7772 */
7773 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
7774
7775 /*
7776 ** CAPI3REF: Checkpoint a database
7777 ** METHOD: sqlite3
7778 **
@@ -7862,11 +7862,11 @@
7862 ** [sqlite3_errcode()] and [sqlite3_errmsg()].
7863 **
7864 ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
7865 ** from SQL.
7866 */
7867 SQLITE_API int sqlite3_wal_checkpoint_v2(
7868 sqlite3 *db, /* Database handle */
7869 const char *zDb, /* Name of attached database (or NULL) */
7870 int eMode, /* SQLITE_CHECKPOINT_* value */
7871 int *pnLog, /* OUT: Size of WAL log in frames */
7872 int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -7898,11 +7898,11 @@
7898 **
7899 ** At present, there is only one option that may be configured using
7900 ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
7901 ** may be added in the future.
7902 */
7903 SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
7904
7905 /*
7906 ** CAPI3REF: Virtual Table Configuration Options
7907 **
7908 ** These macros define the various options to the
@@ -7951,11 +7951,11 @@
7951 ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],
7952 ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode
7953 ** of the SQL statement that triggered the call to the [xUpdate] method of the
7954 ** [virtual table].
7955 */
7956 SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
7957
7958 /*
7959 ** CAPI3REF: Conflict resolution modes
7960 ** KEYWORDS: {conflict resolution mode}
7961 **
@@ -8056,11 +8056,11 @@
8056 ** as if the loop did not exist - it returns non-zero and leave the variable
8057 ** that pOut points to unchanged.
8058 **
8059 ** See also: [sqlite3_stmt_scanstatus_reset()]
8060 */
8061 SQLITE_API int sqlite3_stmt_scanstatus(
8062 sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
8063 int idx, /* Index of loop to report on */
8064 int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
8065 void *pOut /* Result written here */
8066 );
@@ -8072,11 +8072,11 @@
8072 ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
8073 **
8074 ** This API is only available if the library is built with pre-processor
8075 ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
8076 */
8077 SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
8078
8079 /*
8080 ** CAPI3REF: Flush caches to disk mid-transaction
8081 **
8082 ** ^If a write-transaction is open on [database connection] D when the
@@ -8104,11 +8104,11 @@
8104 ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.
8105 **
8106 ** ^This function does not set the database handle error code or message
8107 ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
8108 */
8109 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
8110
8111 /*
8112 ** CAPI3REF: The pre-update hook.
8113 **
8114 ** ^These interfaces are only available if SQLite is compiled using the
@@ -8184,11 +8184,11 @@
8184 ** triggers; or 2 for changes resulting from triggers called by top-level
8185 ** triggers; and so forth.
8186 **
8187 ** See also: [sqlite3_update_hook()]
8188 */
8189 SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook(
8190 sqlite3 *db,
8191 void(*xPreUpdate)(
8192 void *pCtx, /* Copy of third arg to preupdate_hook() */
8193 sqlite3 *db, /* Database handle */
8194 int op, /* SQLITE_UPDATE, DELETE or INSERT */
@@ -8197,14 +8197,14 @@
8197 sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
8198 sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
8199 ),
8200 void*
8201 );
8202 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8203 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_count(sqlite3 *);
8204 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_depth(sqlite3 *);
8205 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
8206
8207 /*
8208 ** CAPI3REF: Low-level system error code
8209 **
8210 ** ^Attempt to return the underlying operating system error code or error
@@ -8212,11 +8212,11 @@
8212 ** The return value is OS-dependent. For example, on unix systems, after
8213 ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
8214 ** called to get back the underlying "errno" that caused the problem, such
8215 ** as ENOSPC, EAUTH, EISDIR, and so forth.
8216 */
8217 SQLITE_API int sqlite3_system_errno(sqlite3*);
8218
8219 /*
8220 ** CAPI3REF: Database Snapshot
8221 ** KEYWORDS: {snapshot}
8222 ** EXPERIMENTAL
@@ -8262,11 +8262,11 @@
8262 ** to avoid a memory leak.
8263 **
8264 ** The [sqlite3_snapshot_get()] interface is only available when the
8265 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8266 */
8267 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
8268 sqlite3 *db,
8269 const char *zSchema,
8270 sqlite3_snapshot **ppSnapshot
8271 );
8272
@@ -8300,11 +8300,11 @@
8300 ** database connection in order to make it ready to use snapshots.)
8301 **
8302 ** The [sqlite3_snapshot_open()] interface is only available when the
8303 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8304 */
8305 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
8306 sqlite3 *db,
8307 const char *zSchema,
8308 sqlite3_snapshot *pSnapshot
8309 );
8310
@@ -8317,11 +8317,11 @@
8317 ** using this routine to avoid a memory leak.
8318 **
8319 ** The [sqlite3_snapshot_free()] interface is only available when the
8320 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8321 */
8322 SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
8323
8324 /*
8325 ** CAPI3REF: Compare the ages of two snapshot handles.
8326 ** EXPERIMENTAL
8327 **
@@ -8341,11 +8341,11 @@
8341 **
8342 ** Otherwise, this API returns a negative value if P1 refers to an older
8343 ** snapshot than P2, zero if the two handles refer to the same database
8344 ** snapshot, and a positive value if P1 is a newer snapshot than P2.
8345 */
8346 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
8347 sqlite3_snapshot *p1,
8348 sqlite3_snapshot *p2
8349 );
8350
8351 /*
@@ -8399,11 +8399,11 @@
8399 ** Register a geometry callback named zGeom that can be used as part of an
8400 ** R-Tree geometry query as follows:
8401 **
8402 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
8403 */
8404 SQLITE_API int sqlite3_rtree_geometry_callback(
8405 sqlite3 *db,
8406 const char *zGeom,
8407 int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
8408 void *pContext
8409 );
@@ -8425,11 +8425,11 @@
8425 ** Register a 2nd-generation geometry callback named zScore that can be
8426 ** used as part of an R-Tree geometry query as follows:
8427 **
8428 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
8429 */
8430 SQLITE_API int sqlite3_rtree_query_callback(
8431 sqlite3 *db,
8432 const char *zQueryFunc,
8433 int (*xQueryFunc)(sqlite3_rtree_query_info*),
8434 void *pContext,
8435 void (*xDestructor)(void*)
8436
+247 -247
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -118,13 +118,13 @@
118118
**
119119
** See also: [sqlite3_libversion()],
120120
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
121121
** [sqlite_version()] and [sqlite_source_id()].
122122
*/
123
-#define SQLITE_VERSION "3.14.1"
124
-#define SQLITE_VERSION_NUMBER 3014001
125
-#define SQLITE_SOURCE_ID "2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b"
123
+#define SQLITE_VERSION "3.14.2"
124
+#define SQLITE_VERSION_NUMBER 3014002
125
+#define SQLITE_SOURCE_ID "2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6"
126126
127127
/*
128128
** CAPI3REF: Run-Time Library Version Numbers
129129
** KEYWORDS: sqlite3_version, sqlite3_sourceid
130130
**
@@ -153,13 +153,13 @@
153153
** [SQLITE_SOURCE_ID] C preprocessor macro.
154154
**
155155
** See also: [sqlite_version()] and [sqlite_source_id()].
156156
*/
157157
SQLITE_API SQLITE_EXTERN const char sqlite3_version[];
158
-SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void);
159
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void);
160
-SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void);
158
+SQLITE_API const char *sqlite3_libversion(void);
159
+SQLITE_API const char *sqlite3_sourceid(void);
160
+SQLITE_API int sqlite3_libversion_number(void);
161161
162162
/*
163163
** CAPI3REF: Run-Time Library Compilation Options Diagnostics
164164
**
165165
** ^The sqlite3_compileoption_used() function returns 0 or 1
@@ -180,12 +180,12 @@
180180
**
181181
** See also: SQL functions [sqlite_compileoption_used()] and
182182
** [sqlite_compileoption_get()] and the [compile_options pragma].
183183
*/
184184
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
185
-SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName);
186
-SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N);
185
+SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
186
+SQLITE_API const char *sqlite3_compileoption_get(int N);
187187
#endif
188188
189189
/*
190190
** CAPI3REF: Test To See If The Library Is Threadsafe
191191
**
@@ -220,11 +220,11 @@
220220
** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
221221
** is unchanged by calls to sqlite3_config().)^
222222
**
223223
** See the [threading mode] documentation for additional information.
224224
*/
225
-SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void);
225
+SQLITE_API int sqlite3_threadsafe(void);
226226
227227
/*
228228
** CAPI3REF: Database Connection Handle
229229
** KEYWORDS: {database connection} {database connections}
230230
**
@@ -317,12 +317,12 @@
317317
** from [sqlite3_open()], [sqlite3_open16()], or
318318
** [sqlite3_open_v2()], and not previously closed.
319319
** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
320320
** argument is a harmless no-op.
321321
*/
322
-SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*);
323
-SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*);
322
+SQLITE_API int sqlite3_close(sqlite3*);
323
+SQLITE_API int sqlite3_close_v2(sqlite3*);
324324
325325
/*
326326
** The type for a callback function.
327327
** This is legacy and deprecated. It is included for historical
328328
** compatibility and is not documented.
@@ -389,11 +389,11 @@
389389
** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
390390
** <li> The application must not modify the SQL statement text passed into
391391
** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
392392
** </ul>
393393
*/
394
-SQLITE_API int SQLITE_STDCALL sqlite3_exec(
394
+SQLITE_API int sqlite3_exec(
395395
sqlite3*, /* An open database */
396396
const char *sql, /* SQL to be evaluated */
397397
int (*callback)(void*,int,char**,char**), /* Callback function */
398398
void *, /* 1st argument to callback */
399399
char **errmsg /* Error msg written here */
@@ -1388,14 +1388,14 @@
13881388
** sqlite3_os_init() and sqlite3_os_end(). An application-supplied
13891389
** implementation of sqlite3_os_init() or sqlite3_os_end()
13901390
** must return [SQLITE_OK] on success and some other [error code] upon
13911391
** failure.
13921392
*/
1393
-SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void);
1394
-SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void);
1395
-SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void);
1396
-SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void);
1393
+SQLITE_API int sqlite3_initialize(void);
1394
+SQLITE_API int sqlite3_shutdown(void);
1395
+SQLITE_API int sqlite3_os_init(void);
1396
+SQLITE_API int sqlite3_os_end(void);
13971397
13981398
/*
13991399
** CAPI3REF: Configuring The SQLite Library
14001400
**
14011401
** The sqlite3_config() interface is used to make global configuration
@@ -1424,11 +1424,11 @@
14241424
**
14251425
** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
14261426
** ^If the option is unknown or SQLite is unable to set the option
14271427
** then this routine returns a non-zero [error code].
14281428
*/
1429
-SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...);
1429
+SQLITE_API int sqlite3_config(int, ...);
14301430
14311431
/*
14321432
** CAPI3REF: Configure database connections
14331433
** METHOD: sqlite3
14341434
**
@@ -1443,11 +1443,11 @@
14431443
** Subsequent arguments vary depending on the configuration verb.
14441444
**
14451445
** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
14461446
** the call is considered successful.
14471447
*/
1448
-SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...);
1448
+SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
14491449
14501450
/*
14511451
** CAPI3REF: Memory Allocation Routines
14521452
**
14531453
** An instance of this object defines the interface between SQLite
@@ -1984,11 +1984,11 @@
19841984
**
19851985
** ^The sqlite3_extended_result_codes() routine enables or disables the
19861986
** [extended result codes] feature of SQLite. ^The extended result
19871987
** codes are disabled by default for historical compatibility.
19881988
*/
1989
-SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff);
1989
+SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
19901990
19911991
/*
19921992
** CAPI3REF: Last Insert Rowid
19931993
** METHOD: sqlite3
19941994
**
@@ -2036,11 +2036,11 @@
20362036
** function is running and thus changes the last insert [rowid],
20372037
** then the value returned by [sqlite3_last_insert_rowid()] is
20382038
** unpredictable and might not equal either the old or the new
20392039
** last insert [rowid].
20402040
*/
2041
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*);
2041
+SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
20422042
20432043
/*
20442044
** CAPI3REF: Count The Number Of Rows Modified
20452045
** METHOD: sqlite3
20462046
**
@@ -2089,11 +2089,11 @@
20892089
**
20902090
** If a separate thread makes changes on the same database connection
20912091
** while [sqlite3_changes()] is running then the value returned
20922092
** is unpredictable and not meaningful.
20932093
*/
2094
-SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*);
2094
+SQLITE_API int sqlite3_changes(sqlite3*);
20952095
20962096
/*
20972097
** CAPI3REF: Total Number Of Rows Modified
20982098
** METHOD: sqlite3
20992099
**
@@ -2113,11 +2113,11 @@
21132113
**
21142114
** If a separate thread makes changes on the same database connection
21152115
** while [sqlite3_total_changes()] is running then the value
21162116
** returned is unpredictable and not meaningful.
21172117
*/
2118
-SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*);
2118
+SQLITE_API int sqlite3_total_changes(sqlite3*);
21192119
21202120
/*
21212121
** CAPI3REF: Interrupt A Long-Running Query
21222122
** METHOD: sqlite3
21232123
**
@@ -2153,11 +2153,11 @@
21532153
** that are started after the sqlite3_interrupt() call returns.
21542154
**
21552155
** If the database connection closes while [sqlite3_interrupt()]
21562156
** is running then bad things will likely happen.
21572157
*/
2158
-SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*);
2158
+SQLITE_API void sqlite3_interrupt(sqlite3*);
21592159
21602160
/*
21612161
** CAPI3REF: Determine If An SQL Statement Is Complete
21622162
**
21632163
** These routines are useful during command-line input to determine if the
@@ -2188,12 +2188,12 @@
21882188
** UTF-8 string.
21892189
**
21902190
** The input to [sqlite3_complete16()] must be a zero-terminated
21912191
** UTF-16 string in native byte order.
21922192
*/
2193
-SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql);
2194
-SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql);
2193
+SQLITE_API int sqlite3_complete(const char *sql);
2194
+SQLITE_API int sqlite3_complete16(const void *sql);
21952195
21962196
/*
21972197
** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
21982198
** KEYWORDS: {busy-handler callback} {busy handler}
21992199
** METHOD: sqlite3
@@ -2250,11 +2250,11 @@
22502250
** result in undefined behavior.
22512251
**
22522252
** A busy handler must not close the database connection
22532253
** or [prepared statement] that invoked the busy handler.
22542254
*/
2255
-SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2255
+SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
22562256
22572257
/*
22582258
** CAPI3REF: Set A Busy Timeout
22592259
** METHOD: sqlite3
22602260
**
@@ -2273,11 +2273,11 @@
22732273
** was defined (using [sqlite3_busy_handler()]) prior to calling
22742274
** this routine, that other busy handler is cleared.)^
22752275
**
22762276
** See also: [PRAGMA busy_timeout]
22772277
*/
2278
-SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms);
2278
+SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
22792279
22802280
/*
22812281
** CAPI3REF: Convenience Routines For Running Queries
22822282
** METHOD: sqlite3
22832283
**
@@ -2348,19 +2348,19 @@
23482348
** interface defined here. As a consequence, errors that occur in the
23492349
** wrapper layer outside of the internal [sqlite3_exec()] call are not
23502350
** reflected in subsequent calls to [sqlite3_errcode()] or
23512351
** [sqlite3_errmsg()].
23522352
*/
2353
-SQLITE_API int SQLITE_STDCALL sqlite3_get_table(
2353
+SQLITE_API int sqlite3_get_table(
23542354
sqlite3 *db, /* An open database */
23552355
const char *zSql, /* SQL to be evaluated */
23562356
char ***pazResult, /* Results of the query */
23572357
int *pnRow, /* Number of result rows written here */
23582358
int *pnColumn, /* Number of result columns written here */
23592359
char **pzErrmsg /* Error msg written here */
23602360
);
2361
-SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result);
2361
+SQLITE_API void sqlite3_free_table(char **result);
23622362
23632363
/*
23642364
** CAPI3REF: Formatted String Printing Functions
23652365
**
23662366
** These routines are work-alikes of the "printf()" family of functions
@@ -2462,14 +2462,14 @@
24622462
**
24632463
** ^(The "%z" formatting option works like "%s" but with the
24642464
** addition that after the string has been read and copied into
24652465
** the result, [sqlite3_free()] is called on the input string.)^
24662466
*/
2467
-SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...);
2468
-SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list);
2469
-SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...);
2470
-SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list);
2467
+SQLITE_API char *sqlite3_mprintf(const char*,...);
2468
+SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
2469
+SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
2470
+SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
24712471
24722472
/*
24732473
** CAPI3REF: Memory Allocation Subsystem
24742474
**
24752475
** The SQLite core uses these three routines for all of its own
@@ -2555,16 +2555,16 @@
25552555
**
25562556
** The application must not read or write any part of
25572557
** a block of memory after it has been released using
25582558
** [sqlite3_free()] or [sqlite3_realloc()].
25592559
*/
2560
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int);
2561
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64);
2562
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int);
2563
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64);
2564
-SQLITE_API void SQLITE_STDCALL sqlite3_free(void*);
2565
-SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*);
2560
+SQLITE_API void *sqlite3_malloc(int);
2561
+SQLITE_API void *sqlite3_malloc64(sqlite3_uint64);
2562
+SQLITE_API void *sqlite3_realloc(void*, int);
2563
+SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64);
2564
+SQLITE_API void sqlite3_free(void*);
2565
+SQLITE_API sqlite3_uint64 sqlite3_msize(void*);
25662566
25672567
/*
25682568
** CAPI3REF: Memory Allocator Statistics
25692569
**
25702570
** SQLite provides these two interfaces for reporting on the status
@@ -2585,12 +2585,12 @@
25852585
** [sqlite3_memory_used()] if and only if the parameter to
25862586
** [sqlite3_memory_highwater()] is true. ^The value returned
25872587
** by [sqlite3_memory_highwater(1)] is the high-water mark
25882588
** prior to the reset.
25892589
*/
2590
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void);
2591
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag);
2590
+SQLITE_API sqlite3_int64 sqlite3_memory_used(void);
2591
+SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
25922592
25932593
/*
25942594
** CAPI3REF: Pseudo-Random Number Generator
25952595
**
25962596
** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
@@ -2609,11 +2609,11 @@
26092609
** ^If the previous call to this routine had an N of 1 or more and a
26102610
** non-NULL P then the pseudo-randomness is generated
26112611
** internally and without recourse to the [sqlite3_vfs] xRandomness
26122612
** method.
26132613
*/
2614
-SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P);
2614
+SQLITE_API void sqlite3_randomness(int N, void *P);
26152615
26162616
/*
26172617
** CAPI3REF: Compile-Time Authorization Callbacks
26182618
** METHOD: sqlite3
26192619
**
@@ -2692,11 +2692,11 @@
26922692
** [sqlite3_prepare()] or its variants. Authorization is not
26932693
** performed during statement evaluation in [sqlite3_step()], unless
26942694
** as stated in the previous paragraph, sqlite3_step() invokes
26952695
** sqlite3_prepare_v2() to reprepare a statement after a schema change.
26962696
*/
2697
-SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
2697
+SQLITE_API int sqlite3_set_authorizer(
26982698
sqlite3*,
26992699
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
27002700
void *pUserData
27012701
);
27022702
@@ -2800,13 +2800,13 @@
28002800
** digits in the time are meaningless. Future versions of SQLite
28012801
** might provide greater resolution on the profiler callback. The
28022802
** sqlite3_profile() function is considered experimental and is
28032803
** subject to change in future versions of SQLite.
28042804
*/
2805
-SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*,
2805
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,
28062806
void(*xTrace)(void*,const char*), void*);
2807
-SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_profile(sqlite3*,
2807
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
28082808
void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
28092809
28102810
/*
28112811
** CAPI3REF: SQL Trace Event Codes
28122812
** KEYWORDS: SQLITE_TRACE
@@ -2891,11 +2891,11 @@
28912891
**
28922892
** The sqlite3_trace_v2() interface is intended to replace the legacy
28932893
** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
28942894
** are deprecated.
28952895
*/
2896
-SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2(
2896
+SQLITE_API int sqlite3_trace_v2(
28972897
sqlite3*,
28982898
unsigned uMask,
28992899
int(*xCallback)(unsigned,void*,void*,void*),
29002900
void *pCtx
29012901
);
@@ -2930,11 +2930,11 @@
29302930
** the database connection that invoked the progress handler.
29312931
** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
29322932
** database connections for the meaning of "modify" in this paragraph.
29332933
**
29342934
*/
2935
-SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
2935
+SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
29362936
29372937
/*
29382938
** CAPI3REF: Opening A New Database Connection
29392939
** CONSTRUCTOR: sqlite3
29402940
**
@@ -3159,19 +3159,19 @@
31593159
** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
31603160
** features that require the use of temporary files may fail.
31613161
**
31623162
** See also: [sqlite3_temp_directory]
31633163
*/
3164
-SQLITE_API int SQLITE_STDCALL sqlite3_open(
3164
+SQLITE_API int sqlite3_open(
31653165
const char *filename, /* Database filename (UTF-8) */
31663166
sqlite3 **ppDb /* OUT: SQLite db handle */
31673167
);
3168
-SQLITE_API int SQLITE_STDCALL sqlite3_open16(
3168
+SQLITE_API int sqlite3_open16(
31693169
const void *filename, /* Database filename (UTF-16) */
31703170
sqlite3 **ppDb /* OUT: SQLite db handle */
31713171
);
3172
-SQLITE_API int SQLITE_STDCALL sqlite3_open_v2(
3172
+SQLITE_API int sqlite3_open_v2(
31733173
const char *filename, /* Database filename (UTF-8) */
31743174
sqlite3 **ppDb, /* OUT: SQLite db handle */
31753175
int flags, /* Flags */
31763176
const char *zVfs /* Name of VFS module to use */
31773177
);
@@ -3213,13 +3213,13 @@
32133213
** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and
32143214
** is not a database file pathname pointer that SQLite passed into the xOpen
32153215
** VFS method, then the behavior of this routine is undefined and probably
32163216
** undesirable.
32173217
*/
3218
-SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3219
-SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3220
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
3218
+SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3219
+SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3220
+SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
32213221
32223222
32233223
/*
32243224
** CAPI3REF: Error Codes And Messages
32253225
** METHOD: sqlite3
@@ -3259,15 +3259,15 @@
32593259
**
32603260
** If an interface fails with SQLITE_MISUSE, that means the interface
32613261
** was invoked incorrectly by the application. In that case, the
32623262
** error code and message may or may not be set.
32633263
*/
3264
-SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db);
3265
-SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db);
3266
-SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*);
3267
-SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*);
3268
-SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int);
3264
+SQLITE_API int sqlite3_errcode(sqlite3 *db);
3265
+SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
3266
+SQLITE_API const char *sqlite3_errmsg(sqlite3*);
3267
+SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
3268
+SQLITE_API const char *sqlite3_errstr(int);
32693269
32703270
/*
32713271
** CAPI3REF: Prepared Statement Object
32723272
** KEYWORDS: {prepared statement} {prepared statements}
32733273
**
@@ -3331,11 +3331,11 @@
33313331
** created by an untrusted script can be contained using the
33323332
** [max_page_count] [PRAGMA].
33333333
**
33343334
** New run-time limit categories may be added in future releases.
33353335
*/
3336
-SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal);
3336
+SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
33373337
33383338
/*
33393339
** CAPI3REF: Run-Time Limit Categories
33403340
** KEYWORDS: {limit category} {*limit categories}
33413341
**
@@ -3483,32 +3483,32 @@
34833483
** or [GLOB] operator or if the parameter is compared to an indexed column
34843484
** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
34853485
** </li>
34863486
** </ol>
34873487
*/
3488
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare(
3488
+SQLITE_API int sqlite3_prepare(
34893489
sqlite3 *db, /* Database handle */
34903490
const char *zSql, /* SQL statement, UTF-8 encoded */
34913491
int nByte, /* Maximum length of zSql in bytes. */
34923492
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
34933493
const char **pzTail /* OUT: Pointer to unused portion of zSql */
34943494
);
3495
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2(
3495
+SQLITE_API int sqlite3_prepare_v2(
34963496
sqlite3 *db, /* Database handle */
34973497
const char *zSql, /* SQL statement, UTF-8 encoded */
34983498
int nByte, /* Maximum length of zSql in bytes. */
34993499
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
35003500
const char **pzTail /* OUT: Pointer to unused portion of zSql */
35013501
);
3502
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare16(
3502
+SQLITE_API int sqlite3_prepare16(
35033503
sqlite3 *db, /* Database handle */
35043504
const void *zSql, /* SQL statement, UTF-16 encoded */
35053505
int nByte, /* Maximum length of zSql in bytes. */
35063506
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
35073507
const void **pzTail /* OUT: Pointer to unused portion of zSql */
35083508
);
3509
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
3509
+SQLITE_API int sqlite3_prepare16_v2(
35103510
sqlite3 *db, /* Database handle */
35113511
const void *zSql, /* SQL statement, UTF-16 encoded */
35123512
int nByte, /* Maximum length of zSql in bytes. */
35133513
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
35143514
const void **pzTail /* OUT: Pointer to unused portion of zSql */
@@ -3543,12 +3543,12 @@
35433543
** automatically freed when the prepared statement is finalized.
35443544
** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
35453545
** is obtained from [sqlite3_malloc()] and must be free by the application
35463546
** by passing it to [sqlite3_free()].
35473547
*/
3548
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt);
3549
-SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt);
3548
+SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
3549
+SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt);
35503550
35513551
/*
35523552
** CAPI3REF: Determine If An SQL Statement Writes The Database
35533553
** METHOD: sqlite3_stmt
35543554
**
@@ -3576,11 +3576,11 @@
35763576
** database. ^The [ATTACH] and [DETACH] statements also cause
35773577
** sqlite3_stmt_readonly() to return true since, while those statements
35783578
** change the configuration of a database connection, they do not make
35793579
** changes to the content of the database files on disk.
35803580
*/
3581
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
3581
+SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
35823582
35833583
/*
35843584
** CAPI3REF: Determine If A Prepared Statement Has Been Reset
35853585
** METHOD: sqlite3_stmt
35863586
**
@@ -3597,11 +3597,11 @@
35973597
** to locate all prepared statements associated with a database
35983598
** connection that are in need of being reset. This can be used,
35993599
** for example, in diagnostic routines to search for prepared
36003600
** statements that are holding a transaction open.
36013601
*/
3602
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*);
3602
+SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
36033603
36043604
/*
36053605
** CAPI3REF: Dynamically Typed Value Object
36063606
** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
36073607
**
@@ -3761,24 +3761,24 @@
37613761
** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
37623762
**
37633763
** See also: [sqlite3_bind_parameter_count()],
37643764
** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
37653765
*/
3766
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
3767
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
3766
+SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
3767
+SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
37683768
void(*)(void*));
3769
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double);
3770
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int);
3771
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
3772
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int);
3773
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
3774
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
3775
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
3769
+SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
3770
+SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
3771
+SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
3772
+SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
3773
+SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
3774
+SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
3775
+SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
37763776
void(*)(void*), unsigned char encoding);
3777
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
3778
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
3779
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
3777
+SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
3778
+SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
3779
+SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
37803780
37813781
/*
37823782
** CAPI3REF: Number Of SQL Parameters
37833783
** METHOD: sqlite3_stmt
37843784
**
@@ -3795,11 +3795,11 @@
37953795
**
37963796
** See also: [sqlite3_bind_blob|sqlite3_bind()],
37973797
** [sqlite3_bind_parameter_name()], and
37983798
** [sqlite3_bind_parameter_index()].
37993799
*/
3800
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*);
3800
+SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
38013801
38023802
/*
38033803
** CAPI3REF: Name Of A Host Parameter
38043804
** METHOD: sqlite3_stmt
38053805
**
@@ -3823,11 +3823,11 @@
38233823
**
38243824
** See also: [sqlite3_bind_blob|sqlite3_bind()],
38253825
** [sqlite3_bind_parameter_count()], and
38263826
** [sqlite3_bind_parameter_index()].
38273827
*/
3828
-SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int);
3828
+SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
38293829
38303830
/*
38313831
** CAPI3REF: Index Of A Parameter With A Given Name
38323832
** METHOD: sqlite3_stmt
38333833
**
@@ -3840,21 +3840,21 @@
38403840
**
38413841
** See also: [sqlite3_bind_blob|sqlite3_bind()],
38423842
** [sqlite3_bind_parameter_count()], and
38433843
** [sqlite3_bind_parameter_name()].
38443844
*/
3845
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
3845
+SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
38463846
38473847
/*
38483848
** CAPI3REF: Reset All Bindings On A Prepared Statement
38493849
** METHOD: sqlite3_stmt
38503850
**
38513851
** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
38523852
** the [sqlite3_bind_blob | bindings] on a [prepared statement].
38533853
** ^Use this routine to reset all host parameters to NULL.
38543854
*/
3855
-SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*);
3855
+SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
38563856
38573857
/*
38583858
** CAPI3REF: Number Of Columns In A Result Set
38593859
** METHOD: sqlite3_stmt
38603860
**
@@ -3862,11 +3862,11 @@
38623862
** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
38633863
** statement that does not return data (for example an [UPDATE]).
38643864
**
38653865
** See also: [sqlite3_data_count()]
38663866
*/
3867
-SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt);
3867
+SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
38683868
38693869
/*
38703870
** CAPI3REF: Column Names In A Result Set
38713871
** METHOD: sqlite3_stmt
38723872
**
@@ -3891,12 +3891,12 @@
38913891
** ^The name of a result column is the value of the "AS" clause for
38923892
** that column, if there is an AS clause. If there is no AS clause
38933893
** then the name of the column is unspecified and may change from
38943894
** one release of SQLite to the next.
38953895
*/
3896
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N);
3897
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N);
3896
+SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
3897
+SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
38983898
38993899
/*
39003900
** CAPI3REF: Source Of Data In A Query Result
39013901
** METHOD: sqlite3_stmt
39023902
**
@@ -3940,16 +3940,16 @@
39403940
** If two or more threads call one or more
39413941
** [sqlite3_column_database_name | column metadata interfaces]
39423942
** for the same [prepared statement] and result column
39433943
** at the same time then the results are undefined.
39443944
*/
3945
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int);
3946
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int);
3947
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int);
3948
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int);
3949
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int);
3950
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int);
3945
+SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
3946
+SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
3947
+SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
3948
+SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
3949
+SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
3950
+SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
39513951
39523952
/*
39533953
** CAPI3REF: Declared Datatype Of A Query Result
39543954
** METHOD: sqlite3_stmt
39553955
**
@@ -3977,12 +3977,12 @@
39773977
** data stored in that column is of the declared type. SQLite is
39783978
** strongly typed, but the typing is dynamic not static. ^Type
39793979
** is associated with individual values, not with the containers
39803980
** used to hold those values.
39813981
*/
3982
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int);
3983
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int);
3982
+SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
3983
+SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
39843984
39853985
/*
39863986
** CAPI3REF: Evaluate An SQL Statement
39873987
** METHOD: sqlite3_stmt
39883988
**
@@ -4058,11 +4058,11 @@
40584058
** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
40594059
** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
40604060
** then the more specific [error codes] are returned directly
40614061
** by sqlite3_step(). The use of the "v2" interface is recommended.
40624062
*/
4063
-SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*);
4063
+SQLITE_API int sqlite3_step(sqlite3_stmt*);
40644064
40654065
/*
40664066
** CAPI3REF: Number of columns in a result set
40674067
** METHOD: sqlite3_stmt
40684068
**
@@ -4079,11 +4079,11 @@
40794079
** where it always returns zero since each step of that multi-step
40804080
** pragma returns 0 columns of data.
40814081
**
40824082
** See also: [sqlite3_column_count()]
40834083
*/
4084
-SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
4084
+SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
40854085
40864086
/*
40874087
** CAPI3REF: Fundamental Datatypes
40884088
** KEYWORDS: SQLITE_TEXT
40894089
**
@@ -4269,20 +4269,20 @@
42694269
** of these routines, a default value is returned. The default value
42704270
** is either the integer 0, the floating point number 0.0, or a NULL
42714271
** pointer. Subsequent calls to [sqlite3_errcode()] will return
42724272
** [SQLITE_NOMEM].)^
42734273
*/
4274
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol);
4275
-SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4276
-SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4277
-SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol);
4278
-SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol);
4279
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol);
4280
-SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol);
4281
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol);
4282
-SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol);
4283
-SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol);
4274
+SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
4275
+SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4276
+SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4277
+SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
4278
+SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
4279
+SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
4280
+SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
4281
+SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
4282
+SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
4283
+SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
42844284
42854285
/*
42864286
** CAPI3REF: Destroy A Prepared Statement Object
42874287
** DESTRUCTOR: sqlite3_stmt
42884288
**
@@ -4306,11 +4306,11 @@
43064306
** resource leaks. It is a grievous error for the application to try to use
43074307
** a prepared statement after it has been finalized. Any use of a prepared
43084308
** statement after it has been finalized can result in undefined and
43094309
** undesirable behavior such as segfaults and heap corruption.
43104310
*/
4311
-SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt);
4311
+SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
43124312
43134313
/*
43144314
** CAPI3REF: Reset A Prepared Statement Object
43154315
** METHOD: sqlite3_stmt
43164316
**
@@ -4333,11 +4333,11 @@
43334333
** [sqlite3_reset(S)] returns an appropriate [error code].
43344334
**
43354335
** ^The [sqlite3_reset(S)] interface does not change the values
43364336
** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
43374337
*/
4338
-SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt);
4338
+SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
43394339
43404340
/*
43414341
** CAPI3REF: Create Or Redefine SQL Functions
43424342
** KEYWORDS: {function creation routines}
43434343
** KEYWORDS: {application-defined SQL function}
@@ -4433,31 +4433,31 @@
44334433
** ^An application-defined function is permitted to call other
44344434
** SQLite interfaces. However, such calls must not
44354435
** close the database connection nor finalize or reset the prepared
44364436
** statement in which the function is running.
44374437
*/
4438
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function(
4438
+SQLITE_API int sqlite3_create_function(
44394439
sqlite3 *db,
44404440
const char *zFunctionName,
44414441
int nArg,
44424442
int eTextRep,
44434443
void *pApp,
44444444
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
44454445
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
44464446
void (*xFinal)(sqlite3_context*)
44474447
);
4448
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function16(
4448
+SQLITE_API int sqlite3_create_function16(
44494449
sqlite3 *db,
44504450
const void *zFunctionName,
44514451
int nArg,
44524452
int eTextRep,
44534453
void *pApp,
44544454
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
44554455
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
44564456
void (*xFinal)(sqlite3_context*)
44574457
);
4458
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2(
4458
+SQLITE_API int sqlite3_create_function_v2(
44594459
sqlite3 *db,
44604460
const char *zFunctionName,
44614461
int nArg,
44624462
int eTextRep,
44634463
void *pApp,
@@ -4499,16 +4499,16 @@
44994499
** to be supported. However, new applications should avoid
45004500
** the use of these functions. To encourage programmers to avoid
45014501
** these functions, we will not explain what they do.
45024502
*/
45034503
#ifndef SQLITE_OMIT_DEPRECATED
4504
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*);
4505
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*);
4506
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4507
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void);
4508
-SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void);
4509
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
4504
+SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
4505
+SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
4506
+SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4507
+SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
4508
+SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
4509
+SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
45104510
void*,sqlite3_int64);
45114511
#endif
45124512
45134513
/*
45144514
** CAPI3REF: Obtaining SQL Values
@@ -4554,22 +4554,22 @@
45544554
** or [sqlite3_value_text16()].
45554555
**
45564556
** These routines must be called from the same thread as
45574557
** the SQL function that supplied the [sqlite3_value*] parameters.
45584558
*/
4559
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*);
4560
-SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*);
4561
-SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*);
4562
-SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*);
4563
-SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*);
4564
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*);
4565
-SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*);
4566
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*);
4567
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*);
4568
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*);
4569
-SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*);
4570
-SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*);
4559
+SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
4560
+SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
4561
+SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
4562
+SQLITE_API double sqlite3_value_double(sqlite3_value*);
4563
+SQLITE_API int sqlite3_value_int(sqlite3_value*);
4564
+SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
4565
+SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
4566
+SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
4567
+SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
4568
+SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
4569
+SQLITE_API int sqlite3_value_type(sqlite3_value*);
4570
+SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
45714571
45724572
/*
45734573
** CAPI3REF: Finding The Subtype Of SQL Values
45744574
** METHOD: sqlite3_value
45754575
**
@@ -4581,11 +4581,11 @@
45814581
**
45824582
** SQLite makes no use of subtype itself. It merely passes the subtype
45834583
** from the result of one [application-defined SQL function] into the
45844584
** input of another.
45854585
*/
4586
-SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*);
4586
+SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
45874587
45884588
/*
45894589
** CAPI3REF: Copy And Free SQL Values
45904590
** METHOD: sqlite3_value
45914591
**
@@ -4597,12 +4597,12 @@
45974597
**
45984598
** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
45994599
** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
46004600
** then sqlite3_value_free(V) is a harmless no-op.
46014601
*/
4602
-SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*);
4603
-SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*);
4602
+SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*);
4603
+SQLITE_API void sqlite3_value_free(sqlite3_value*);
46044604
46054605
/*
46064606
** CAPI3REF: Obtain Aggregate Function Context
46074607
** METHOD: sqlite3_context
46084608
**
@@ -4643,11 +4643,11 @@
46434643
** function.
46444644
**
46454645
** This routine must be called from the same thread in which
46464646
** the aggregate SQL function is running.
46474647
*/
4648
-SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes);
4648
+SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
46494649
46504650
/*
46514651
** CAPI3REF: User Data For Functions
46524652
** METHOD: sqlite3_context
46534653
**
@@ -4658,11 +4658,11 @@
46584658
** registered the application defined function.
46594659
**
46604660
** This routine must be called from the same thread in which
46614661
** the application-defined function is running.
46624662
*/
4663
-SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*);
4663
+SQLITE_API void *sqlite3_user_data(sqlite3_context*);
46644664
46654665
/*
46664666
** CAPI3REF: Database Connection For Functions
46674667
** METHOD: sqlite3_context
46684668
**
@@ -4670,11 +4670,11 @@
46704670
** the pointer to the [database connection] (the 1st parameter)
46714671
** of the [sqlite3_create_function()]
46724672
** and [sqlite3_create_function16()] routines that originally
46734673
** registered the application defined function.
46744674
*/
4675
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*);
4675
+SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
46764676
46774677
/*
46784678
** CAPI3REF: Function Auxiliary Data
46794679
** METHOD: sqlite3_context
46804680
**
@@ -4724,12 +4724,12 @@
47244724
** values and [parameters] and expressions composed from the same.)^
47254725
**
47264726
** These routines must be called from the same thread in which
47274727
** the SQL function is running.
47284728
*/
4729
-SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N);
4730
-SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
4729
+SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
4730
+SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
47314731
47324732
47334733
/*
47344734
** CAPI3REF: Constants Defining Special Destructor Behavior
47354735
**
@@ -4861,31 +4861,31 @@
48614861
**
48624862
** If these routines are called from within the different thread
48634863
** than the one containing the application-defined function that received
48644864
** the [sqlite3_context] pointer, the results are undefined.
48654865
*/
4866
-SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
4867
-SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*,
4866
+SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
4867
+SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,
48684868
sqlite3_uint64,void(*)(void*));
4869
-SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double);
4870
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int);
4871
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int);
4872
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*);
4873
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*);
4874
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int);
4875
-SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int);
4876
-SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
4877
-SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*);
4878
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
4879
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
4869
+SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
4870
+SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
4871
+SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
4872
+SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
4873
+SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
4874
+SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
4875
+SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
4876
+SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
4877
+SQLITE_API void sqlite3_result_null(sqlite3_context*);
4878
+SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
4879
+SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
48804880
void(*)(void*), unsigned char encoding);
4881
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
4882
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
4883
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
4884
-SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
4885
-SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
4886
-SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
4881
+SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
4882
+SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
4883
+SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
4884
+SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
4885
+SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
4886
+SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
48874887
48884888
48894889
/*
48904890
** CAPI3REF: Setting The Subtype Of An SQL Function
48914891
** METHOD: sqlite3_context
@@ -4896,11 +4896,11 @@
48964896
** of the subtype T are preserved in current versions of SQLite;
48974897
** higher order bits are discarded.
48984898
** The number of subtype bytes preserved by SQLite might increase
48994899
** in future releases of SQLite.
49004900
*/
4901
-SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int);
4901
+SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
49024902
49034903
/*
49044904
** CAPI3REF: Define New Collating Sequences
49054905
** METHOD: sqlite3
49064906
**
@@ -4978,26 +4978,26 @@
49784978
** is unfortunate but cannot be changed without breaking backwards
49794979
** compatibility.
49804980
**
49814981
** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
49824982
*/
4983
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation(
4983
+SQLITE_API int sqlite3_create_collation(
49844984
sqlite3*,
49854985
const char *zName,
49864986
int eTextRep,
49874987
void *pArg,
49884988
int(*xCompare)(void*,int,const void*,int,const void*)
49894989
);
4990
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2(
4990
+SQLITE_API int sqlite3_create_collation_v2(
49914991
sqlite3*,
49924992
const char *zName,
49934993
int eTextRep,
49944994
void *pArg,
49954995
int(*xCompare)(void*,int,const void*,int,const void*),
49964996
void(*xDestroy)(void*)
49974997
);
4998
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16(
4998
+SQLITE_API int sqlite3_create_collation16(
49994999
sqlite3*,
50005000
const void *zName,
50015001
int eTextRep,
50025002
void *pArg,
50035003
int(*xCompare)(void*,int,const void*,int,const void*)
@@ -5028,16 +5028,16 @@
50285028
**
50295029
** The callback function should register the desired collation using
50305030
** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
50315031
** [sqlite3_create_collation_v2()].
50325032
*/
5033
-SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed(
5033
+SQLITE_API int sqlite3_collation_needed(
50345034
sqlite3*,
50355035
void*,
50365036
void(*)(void*,sqlite3*,int eTextRep,const char*)
50375037
);
5038
-SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16(
5038
+SQLITE_API int sqlite3_collation_needed16(
50395039
sqlite3*,
50405040
void*,
50415041
void(*)(void*,sqlite3*,int eTextRep,const void*)
50425042
);
50435043
@@ -5047,15 +5047,15 @@
50475047
** called right after sqlite3_open().
50485048
**
50495049
** The code to implement this API is not available in the public release
50505050
** of SQLite.
50515051
*/
5052
-SQLITE_API int SQLITE_STDCALL sqlite3_key(
5052
+SQLITE_API int sqlite3_key(
50535053
sqlite3 *db, /* Database to be rekeyed */
50545054
const void *pKey, int nKey /* The key */
50555055
);
5056
-SQLITE_API int SQLITE_STDCALL sqlite3_key_v2(
5056
+SQLITE_API int sqlite3_key_v2(
50575057
sqlite3 *db, /* Database to be rekeyed */
50585058
const char *zDbName, /* Name of the database */
50595059
const void *pKey, int nKey /* The key */
50605060
);
50615061
@@ -5065,35 +5065,35 @@
50655065
** database is decrypted.
50665066
**
50675067
** The code to implement this API is not available in the public release
50685068
** of SQLite.
50695069
*/
5070
-SQLITE_API int SQLITE_STDCALL sqlite3_rekey(
5070
+SQLITE_API int sqlite3_rekey(
50715071
sqlite3 *db, /* Database to be rekeyed */
50725072
const void *pKey, int nKey /* The new key */
50735073
);
5074
-SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2(
5074
+SQLITE_API int sqlite3_rekey_v2(
50755075
sqlite3 *db, /* Database to be rekeyed */
50765076
const char *zDbName, /* Name of the database */
50775077
const void *pKey, int nKey /* The new key */
50785078
);
50795079
50805080
/*
50815081
** Specify the activation key for a SEE database. Unless
50825082
** activated, none of the SEE routines will work.
50835083
*/
5084
-SQLITE_API void SQLITE_STDCALL sqlite3_activate_see(
5084
+SQLITE_API void sqlite3_activate_see(
50855085
const char *zPassPhrase /* Activation phrase */
50865086
);
50875087
#endif
50885088
50895089
#ifdef SQLITE_ENABLE_CEROD
50905090
/*
50915091
** Specify the activation key for a CEROD database. Unless
50925092
** activated, none of the CEROD routines will work.
50935093
*/
5094
-SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod(
5094
+SQLITE_API void sqlite3_activate_cerod(
50955095
const char *zPassPhrase /* Activation phrase */
50965096
);
50975097
#endif
50985098
50995099
/*
@@ -5111,11 +5111,11 @@
51115111
** method of the default [sqlite3_vfs] object. If the xSleep() method
51125112
** of the default VFS is not implemented correctly, or not implemented at
51135113
** all, then the behavior of sqlite3_sleep() may deviate from the description
51145114
** in the previous paragraphs.
51155115
*/
5116
-SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int);
5116
+SQLITE_API int sqlite3_sleep(int);
51175117
51185118
/*
51195119
** CAPI3REF: Name Of The Folder Holding Temporary Files
51205120
**
51215121
** ^(If this global variable is made to point to a string which is
@@ -5230,11 +5230,11 @@
52305230
**
52315231
** If another thread changes the autocommit status of the database
52325232
** connection while this routine is running, then the return value
52335233
** is undefined.
52345234
*/
5235
-SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*);
5235
+SQLITE_API int sqlite3_get_autocommit(sqlite3*);
52365236
52375237
/*
52385238
** CAPI3REF: Find The Database Handle Of A Prepared Statement
52395239
** METHOD: sqlite3_stmt
52405240
**
@@ -5243,11 +5243,11 @@
52435243
** returned by sqlite3_db_handle is the same [database connection]
52445244
** that was the first argument
52455245
** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
52465246
** create the statement in the first place.
52475247
*/
5248
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*);
5248
+SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
52495249
52505250
/*
52515251
** CAPI3REF: Return The Filename For A Database Connection
52525252
** METHOD: sqlite3
52535253
**
@@ -5260,21 +5260,21 @@
52605260
** ^The filename returned by this function is the output of the
52615261
** xFullPathname method of the [VFS]. ^In other words, the filename
52625262
** will be an absolute pathname, even if the filename used
52635263
** to open the database originally was a URI or relative pathname.
52645264
*/
5265
-SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName);
5265
+SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);
52665266
52675267
/*
52685268
** CAPI3REF: Determine if a database is read-only
52695269
** METHOD: sqlite3
52705270
**
52715271
** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N
52725272
** of connection D is read-only, 0 if it is read/write, or -1 if N is not
52735273
** the name of a database on connection D.
52745274
*/
5275
-SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
5275
+SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
52765276
52775277
/*
52785278
** CAPI3REF: Find the next prepared statement
52795279
** METHOD: sqlite3
52805280
**
@@ -5286,11 +5286,11 @@
52865286
**
52875287
** The [database connection] pointer D in a call to
52885288
** [sqlite3_next_stmt(D,S)] must refer to an open database
52895289
** connection and in particular must not be a NULL pointer.
52905290
*/
5291
-SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
5291
+SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
52925292
52935293
/*
52945294
** CAPI3REF: Commit And Rollback Notification Callbacks
52955295
** METHOD: sqlite3
52965296
**
@@ -5335,12 +5335,12 @@
53355335
** ^The rollback callback is not invoked if a transaction is
53365336
** automatically rolled back because the database connection is closed.
53375337
**
53385338
** See also the [sqlite3_update_hook()] interface.
53395339
*/
5340
-SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5341
-SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5340
+SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5341
+SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
53425342
53435343
/*
53445344
** CAPI3REF: Data Change Notification Callbacks
53455345
** METHOD: sqlite3
53465346
**
@@ -5387,11 +5387,11 @@
53875387
** the first call on D.
53885388
**
53895389
** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
53905390
** and [sqlite3_preupdate_hook()] interfaces.
53915391
*/
5392
-SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
5392
+SQLITE_API void *sqlite3_update_hook(
53935393
sqlite3*,
53945394
void(*)(void *,int ,char const *,char const *,sqlite3_int64),
53955395
void*
53965396
);
53975397
@@ -5427,11 +5427,11 @@
54275427
** This interface is threadsafe on processors where writing a
54285428
** 32-bit integer is atomic.
54295429
**
54305430
** See Also: [SQLite Shared-Cache Mode]
54315431
*/
5432
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int);
5432
+SQLITE_API int sqlite3_enable_shared_cache(int);
54335433
54345434
/*
54355435
** CAPI3REF: Attempt To Free Heap Memory
54365436
**
54375437
** ^The sqlite3_release_memory() interface attempts to free N bytes
@@ -5443,11 +5443,11 @@
54435443
** ^The sqlite3_release_memory() routine is a no-op returning zero
54445444
** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
54455445
**
54465446
** See also: [sqlite3_db_release_memory()]
54475447
*/
5448
-SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int);
5448
+SQLITE_API int sqlite3_release_memory(int);
54495449
54505450
/*
54515451
** CAPI3REF: Free Memory Used By A Database Connection
54525452
** METHOD: sqlite3
54535453
**
@@ -5457,11 +5457,11 @@
54575457
** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is
54585458
** omitted.
54595459
**
54605460
** See also: [sqlite3_release_memory()]
54615461
*/
5462
-SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*);
5462
+SQLITE_API int sqlite3_db_release_memory(sqlite3*);
54635463
54645464
/*
54655465
** CAPI3REF: Impose A Limit On Heap Size
54665466
**
54675467
** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
@@ -5509,11 +5509,11 @@
55095509
** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT].
55105510
**
55115511
** The circumstances under which SQLite will enforce the soft heap limit may
55125512
** changes in future releases of SQLite.
55135513
*/
5514
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N);
5514
+SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
55155515
55165516
/*
55175517
** CAPI3REF: Deprecated Soft Heap Limit Interface
55185518
** DEPRECATED
55195519
**
@@ -5520,11 +5520,11 @@
55205520
** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
55215521
** interface. This routine is provided for historical compatibility
55225522
** only. All new applications should use the
55235523
** [sqlite3_soft_heap_limit64()] interface rather than this one.
55245524
*/
5525
-SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N);
5525
+SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
55265526
55275527
55285528
/*
55295529
** CAPI3REF: Extract Metadata About A Column Of A Table
55305530
** METHOD: sqlite3
@@ -5590,11 +5590,11 @@
55905590
**
55915591
** ^This function causes all database schemas to be read from disk and
55925592
** parsed, if that has not already been done, and returns an error if
55935593
** any errors are encountered while loading the schema.
55945594
*/
5595
-SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata(
5595
+SQLITE_API int sqlite3_table_column_metadata(
55965596
sqlite3 *db, /* Connection handle */
55975597
const char *zDbName, /* Database name or NULL */
55985598
const char *zTableName, /* Table name */
55995599
const char *zColumnName, /* Column name */
56005600
char const **pzDataType, /* OUTPUT: Declared data type */
@@ -5646,11 +5646,11 @@
56465646
** disabled and prevent SQL injections from giving attackers
56475647
** access to extension loading capabilities.
56485648
**
56495649
** See also the [load_extension() SQL function].
56505650
*/
5651
-SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
5651
+SQLITE_API int sqlite3_load_extension(
56525652
sqlite3 *db, /* Load the extension into this database connection */
56535653
const char *zFile, /* Name of the shared library containing extension */
56545654
const char *zProc, /* Entry point. Derived from zFile if 0 */
56555655
char **pzErrMsg /* Put error message here if not 0 */
56565656
);
@@ -5678,11 +5678,11 @@
56785678
** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
56795679
** rather than this interface, so the [load_extension()] SQL function
56805680
** remains disabled. This will prevent SQL injections from giving attackers
56815681
** access to extension loading capabilities.
56825682
*/
5683
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5683
+SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
56845684
56855685
/*
56865686
** CAPI3REF: Automatically Load Statically Linked Extensions
56875687
**
56885688
** ^This interface causes the xEntryPoint() function to be invoked for
@@ -5716,11 +5716,11 @@
57165716
** will be called more than once for each database connection that is opened.
57175717
**
57185718
** See also: [sqlite3_reset_auto_extension()]
57195719
** and [sqlite3_cancel_auto_extension()]
57205720
*/
5721
-SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void));
5721
+SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
57225722
57235723
/*
57245724
** CAPI3REF: Cancel Automatic Extension Loading
57255725
**
57265726
** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the
@@ -5728,19 +5728,19 @@
57285728
** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)]
57295729
** routine returns 1 if initialization routine X was successfully
57305730
** unregistered and it returns 0 if X was not on the list of initialization
57315731
** routines.
57325732
*/
5733
-SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
5733
+SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
57345734
57355735
/*
57365736
** CAPI3REF: Reset Automatic Extension Loading
57375737
**
57385738
** ^This interface disables all automatic extensions previously
57395739
** registered using [sqlite3_auto_extension()].
57405740
*/
5741
-SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void);
5741
+SQLITE_API void sqlite3_reset_auto_extension(void);
57425742
57435743
/*
57445744
** The interface to the virtual-table mechanism is currently considered
57455745
** to be experimental. The interface might change in incompatible ways.
57465746
** If this is a problem for you, do not use the interface at this time.
@@ -5981,17 +5981,17 @@
59815981
** be invoked if the call to sqlite3_create_module_v2() fails.
59825982
** ^The sqlite3_create_module()
59835983
** interface is equivalent to sqlite3_create_module_v2() with a NULL
59845984
** destructor.
59855985
*/
5986
-SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
5986
+SQLITE_API int sqlite3_create_module(
59875987
sqlite3 *db, /* SQLite connection to register module with */
59885988
const char *zName, /* Name of the module */
59895989
const sqlite3_module *p, /* Methods for the module */
59905990
void *pClientData /* Client data for xCreate/xConnect */
59915991
);
5992
-SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
5992
+SQLITE_API int sqlite3_create_module_v2(
59935993
sqlite3 *db, /* SQLite connection to register module with */
59945994
const char *zName, /* Name of the module */
59955995
const sqlite3_module *p, /* Methods for the module */
59965996
void *pClientData, /* Client data for xCreate/xConnect */
59975997
void(*xDestroy)(void*) /* Module destructor function */
@@ -6050,11 +6050,11 @@
60506050
** ^The [xCreate] and [xConnect] methods of a
60516051
** [virtual table module] call this interface
60526052
** to declare the format (the names and datatypes of the columns) of
60536053
** the virtual tables they implement.
60546054
*/
6055
-SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL);
6055
+SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
60566056
60576057
/*
60586058
** CAPI3REF: Overload A Function For A Virtual Table
60596059
** METHOD: sqlite3
60606060
**
@@ -6069,11 +6069,11 @@
60696069
** of the new function always causes an exception to be thrown. So
60706070
** the new function is not good for anything by itself. Its only
60716071
** purpose is to be a placeholder function that can be overloaded
60726072
** by a [virtual table].
60736073
*/
6074
-SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
6074
+SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
60756075
60766076
/*
60776077
** The interface to the virtual-table mechanism defined above (back up
60786078
** to a comment remarkably similar to this one) is currently considered
60796079
** to be experimental. The interface might change in incompatible ways.
@@ -6168,11 +6168,11 @@
61686168
** zero-filled blob to read or write using the incremental-blob interface.
61696169
**
61706170
** To avoid a resource leak, every open [BLOB handle] should eventually
61716171
** be released by a call to [sqlite3_blob_close()].
61726172
*/
6173
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
6173
+SQLITE_API int sqlite3_blob_open(
61746174
sqlite3*,
61756175
const char *zDb,
61766176
const char *zTable,
61776177
const char *zColumn,
61786178
sqlite3_int64 iRow,
@@ -6201,11 +6201,11 @@
62016201
** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
62026202
** always returns zero.
62036203
**
62046204
** ^This function sets the database handle error code and message.
62056205
*/
6206
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
6206
+SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
62076207
62086208
/*
62096209
** CAPI3REF: Close A BLOB Handle
62106210
** DESTRUCTOR: sqlite3_blob
62116211
**
@@ -6224,11 +6224,11 @@
62246224
** with a null pointer (such as would be returned by a failed call to
62256225
** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
62266226
** is passed a valid open blob handle, the values returned by the
62276227
** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
62286228
*/
6229
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *);
6229
+SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
62306230
62316231
/*
62326232
** CAPI3REF: Return The Size Of An Open BLOB
62336233
** METHOD: sqlite3_blob
62346234
**
@@ -6240,11 +6240,11 @@
62406240
** This routine only works on a [BLOB handle] which has been created
62416241
** by a prior successful call to [sqlite3_blob_open()] and which has not
62426242
** been closed by [sqlite3_blob_close()]. Passing any other pointer in
62436243
** to this routine results in undefined and probably undesirable behavior.
62446244
*/
6245
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *);
6245
+SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
62466246
62476247
/*
62486248
** CAPI3REF: Read Data From A BLOB Incrementally
62496249
** METHOD: sqlite3_blob
62506250
**
@@ -6269,11 +6269,11 @@
62696269
** been closed by [sqlite3_blob_close()]. Passing any other pointer in
62706270
** to this routine results in undefined and probably undesirable behavior.
62716271
**
62726272
** See also: [sqlite3_blob_write()].
62736273
*/
6274
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
6274
+SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
62756275
62766276
/*
62776277
** CAPI3REF: Write Data Into A BLOB Incrementally
62786278
** METHOD: sqlite3_blob
62796279
**
@@ -6311,11 +6311,11 @@
63116311
** been closed by [sqlite3_blob_close()]. Passing any other pointer in
63126312
** to this routine results in undefined and probably undesirable behavior.
63136313
**
63146314
** See also: [sqlite3_blob_read()].
63156315
*/
6316
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
6316
+SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
63176317
63186318
/*
63196319
** CAPI3REF: Virtual File System Objects
63206320
**
63216321
** A virtual filesystem (VFS) is an [sqlite3_vfs] object
@@ -6342,13 +6342,13 @@
63426342
**
63436343
** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
63446344
** ^(If the default VFS is unregistered, another VFS is chosen as
63456345
** the default. The choice for the new VFS is arbitrary.)^
63466346
*/
6347
-SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName);
6348
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6349
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
6347
+SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
6348
+SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6349
+SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
63506350
63516351
/*
63526352
** CAPI3REF: Mutexes
63536353
**
63546354
** The SQLite core uses these routines for thread
@@ -6460,15 +6460,15 @@
64606460
** sqlite3_mutex_leave() is a NULL pointer, then all three routines
64616461
** behave as no-ops.
64626462
**
64636463
** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
64646464
*/
6465
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int);
6466
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*);
6467
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*);
6468
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*);
6469
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*);
6465
+SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
6466
+SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
6467
+SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
6468
+SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
6469
+SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
64706470
64716471
/*
64726472
** CAPI3REF: Mutex Methods Object
64736473
**
64746474
** An instance of this structure defines the low-level routines
@@ -6574,12 +6574,12 @@
65746574
** call to sqlite3_mutex_held() to fail, so a non-zero return is
65756575
** the appropriate thing to do. The sqlite3_mutex_notheld()
65766576
** interface should also return 1 when given a NULL pointer.
65776577
*/
65786578
#ifndef NDEBUG
6579
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*);
6580
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
6579
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
6580
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
65816581
#endif
65826582
65836583
/*
65846584
** CAPI3REF: Mutex Types
65856585
**
@@ -6615,11 +6615,11 @@
66156615
** serializes access to the [database connection] given in the argument
66166616
** when the [threading mode] is Serialized.
66176617
** ^If the [threading mode] is Single-thread or Multi-thread then this
66186618
** routine returns a NULL pointer.
66196619
*/
6620
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*);
6620
+SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
66216621
66226622
/*
66236623
** CAPI3REF: Low-Level Control Of Database Files
66246624
** METHOD: sqlite3
66256625
**
@@ -6650,11 +6650,11 @@
66506650
** an incorrect zDbName and an SQLITE_ERROR return from the underlying
66516651
** xFileControl method.
66526652
**
66536653
** See also: [SQLITE_FCNTL_LOCKSTATE]
66546654
*/
6655
-SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6655
+SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
66566656
66576657
/*
66586658
** CAPI3REF: Testing Interface
66596659
**
66606660
** ^The sqlite3_test_control() interface is used to read out internal
@@ -6669,11 +6669,11 @@
66696669
** The details of the operation codes, their meanings, the parameters
66706670
** they take, and what they do are all subject to change without notice.
66716671
** Unlike most of the SQLite API, this function is not guaranteed to
66726672
** operate consistently from one release to the next.
66736673
*/
6674
-SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
6674
+SQLITE_API int sqlite3_test_control(int op, ...);
66756675
66766676
/*
66776677
** CAPI3REF: Testing Interface Operation Codes
66786678
**
66796679
** These constants are the valid operation code parameters used
@@ -6732,12 +6732,12 @@
67326732
** be represented by a 32-bit integer, then the values returned by
67336733
** sqlite3_status() are undefined.
67346734
**
67356735
** See also: [sqlite3_db_status()]
67366736
*/
6737
-SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6738
-SQLITE_API int SQLITE_STDCALL sqlite3_status64(
6737
+SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6738
+SQLITE_API int sqlite3_status64(
67396739
int op,
67406740
sqlite3_int64 *pCurrent,
67416741
sqlite3_int64 *pHighwater,
67426742
int resetFlag
67436743
);
@@ -6858,11 +6858,11 @@
68586858
** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
68596859
** non-zero [error code] on failure.
68606860
**
68616861
** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
68626862
*/
6863
-SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
6863
+SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
68646864
68656865
/*
68666866
** CAPI3REF: Status Parameters for database connections
68676867
** KEYWORDS: {SQLITE_DBSTATUS options}
68686868
**
@@ -7001,11 +7001,11 @@
70017001
** ^If the resetFlg is true, then the counter is reset to zero after this
70027002
** interface call returns.
70037003
**
70047004
** See also: [sqlite3_status()] and [sqlite3_db_status()].
70057005
*/
7006
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
7006
+SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
70077007
70087008
/*
70097009
** CAPI3REF: Status Parameters for prepared statements
70107010
** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters}
70117011
**
@@ -7470,20 +7470,20 @@
74707470
** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
74717471
** APIs are not strictly speaking threadsafe. If they are invoked at the
74727472
** same time as another thread is invoking sqlite3_backup_step() it is
74737473
** possible that they return invalid values.
74747474
*/
7475
-SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
7475
+SQLITE_API sqlite3_backup *sqlite3_backup_init(
74767476
sqlite3 *pDest, /* Destination database handle */
74777477
const char *zDestName, /* Destination database name */
74787478
sqlite3 *pSource, /* Source database handle */
74797479
const char *zSourceName /* Source database name */
74807480
);
7481
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage);
7482
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p);
7483
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p);
7484
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p);
7481
+SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
7482
+SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
7483
+SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);
7484
+SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
74857485
74867486
/*
74877487
** CAPI3REF: Unlock Notification
74887488
** METHOD: sqlite3
74897489
**
@@ -7596,11 +7596,11 @@
75967596
** by an sqlite3_step() call. ^(If there is a blocking connection, then the
75977597
** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
75987598
** the special "DROP TABLE/INDEX" case, the extended error code is just
75997599
** SQLITE_LOCKED.)^
76007600
*/
7601
-SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify(
7601
+SQLITE_API int sqlite3_unlock_notify(
76027602
sqlite3 *pBlocked, /* Waiting connection */
76037603
void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
76047604
void *pNotifyArg /* Argument to pass to xNotify */
76057605
);
76067606
@@ -7611,12 +7611,12 @@
76117611
** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications
76127612
** and extensions to compare the contents of two buffers containing UTF-8
76137613
** strings in a case-independent fashion, using the same definition of "case
76147614
** independence" that SQLite uses internally when comparing identifiers.
76157615
*/
7616
-SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *);
7617
-SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int);
7616
+SQLITE_API int sqlite3_stricmp(const char *, const char *);
7617
+SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
76187618
76197619
/*
76207620
** CAPI3REF: String Globbing
76217621
*
76227622
** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if
@@ -7629,11 +7629,11 @@
76297629
** Note that this routine returns zero on a match and non-zero if the strings
76307630
** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
76317631
**
76327632
** See also: [sqlite3_strlike()].
76337633
*/
7634
-SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr);
7634
+SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
76357635
76367636
/*
76377637
** CAPI3REF: String LIKE Matching
76387638
*
76397639
** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if
@@ -7652,11 +7652,11 @@
76527652
** Note that this routine returns zero on a match and non-zero if the strings
76537653
** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
76547654
**
76557655
** See also: [sqlite3_strglob()].
76567656
*/
7657
-SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
7657
+SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
76587658
76597659
/*
76607660
** CAPI3REF: Error Logging Interface
76617661
**
76627662
** ^The [sqlite3_log()] interface writes a message into the [error log]
@@ -7675,11 +7675,11 @@
76757675
** will not use dynamically allocated memory. The log message is stored in
76767676
** a fixed-length buffer on the stack. If the log message is longer than
76777677
** a few hundred characters, it will be truncated to the length of the
76787678
** buffer.
76797679
*/
7680
-SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...);
7680
+SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
76817681
76827682
/*
76837683
** CAPI3REF: Write-Ahead Log Commit Hook
76847684
** METHOD: sqlite3
76857685
**
@@ -7711,11 +7711,11 @@
77117711
** previously registered write-ahead log callback. ^Note that the
77127712
** [sqlite3_wal_autocheckpoint()] interface and the
77137713
** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
77147714
** overwrite any prior [sqlite3_wal_hook()] settings.
77157715
*/
7716
-SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook(
7716
+SQLITE_API void *sqlite3_wal_hook(
77177717
sqlite3*,
77187718
int(*)(void *,sqlite3*,const char*,int),
77197719
void*
77207720
);
77217721
@@ -7746,11 +7746,11 @@
77467746
** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
77477747
** pages. The use of this interface
77487748
** is only necessary if the default setting is found to be suboptimal
77497749
** for a particular application.
77507750
*/
7751
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
7751
+SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
77527752
77537753
/*
77547754
** CAPI3REF: Checkpoint a database
77557755
** METHOD: sqlite3
77567756
**
@@ -7768,11 +7768,11 @@
77687768
** interface was added. This interface is retained for backwards
77697769
** compatibility and as a convenience for applications that need to manually
77707770
** start a callback but which do not need the full power (and corresponding
77717771
** complication) of [sqlite3_wal_checkpoint_v2()].
77727772
*/
7773
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
7773
+SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
77747774
77757775
/*
77767776
** CAPI3REF: Checkpoint a database
77777777
** METHOD: sqlite3
77787778
**
@@ -7862,11 +7862,11 @@
78627862
** [sqlite3_errcode()] and [sqlite3_errmsg()].
78637863
**
78647864
** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
78657865
** from SQL.
78667866
*/
7867
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2(
7867
+SQLITE_API int sqlite3_wal_checkpoint_v2(
78687868
sqlite3 *db, /* Database handle */
78697869
const char *zDb, /* Name of attached database (or NULL) */
78707870
int eMode, /* SQLITE_CHECKPOINT_* value */
78717871
int *pnLog, /* OUT: Size of WAL log in frames */
78727872
int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -7898,11 +7898,11 @@
78987898
**
78997899
** At present, there is only one option that may be configured using
79007900
** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
79017901
** may be added in the future.
79027902
*/
7903
-SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...);
7903
+SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
79047904
79057905
/*
79067906
** CAPI3REF: Virtual Table Configuration Options
79077907
**
79087908
** These macros define the various options to the
@@ -7951,11 +7951,11 @@
79517951
** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],
79527952
** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode
79537953
** of the SQL statement that triggered the call to the [xUpdate] method of the
79547954
** [virtual table].
79557955
*/
7956
-SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *);
7956
+SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
79577957
79587958
/*
79597959
** CAPI3REF: Conflict resolution modes
79607960
** KEYWORDS: {conflict resolution mode}
79617961
**
@@ -8056,11 +8056,11 @@
80568056
** as if the loop did not exist - it returns non-zero and leave the variable
80578057
** that pOut points to unchanged.
80588058
**
80598059
** See also: [sqlite3_stmt_scanstatus_reset()]
80608060
*/
8061
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
8061
+SQLITE_API int sqlite3_stmt_scanstatus(
80628062
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
80638063
int idx, /* Index of loop to report on */
80648064
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
80658065
void *pOut /* Result written here */
80668066
);
@@ -8072,11 +8072,11 @@
80728072
** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
80738073
**
80748074
** This API is only available if the library is built with pre-processor
80758075
** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
80768076
*/
8077
-SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
8077
+SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
80788078
80798079
/*
80808080
** CAPI3REF: Flush caches to disk mid-transaction
80818081
**
80828082
** ^If a write-transaction is open on [database connection] D when the
@@ -8104,11 +8104,11 @@
81048104
** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.
81058105
**
81068106
** ^This function does not set the database handle error code or message
81078107
** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
81088108
*/
8109
-SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*);
8109
+SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
81108110
81118111
/*
81128112
** CAPI3REF: The pre-update hook.
81138113
**
81148114
** ^These interfaces are only available if SQLite is compiled using the
@@ -8184,11 +8184,11 @@
81848184
** triggers; or 2 for changes resulting from triggers called by top-level
81858185
** triggers; and so forth.
81868186
**
81878187
** See also: [sqlite3_update_hook()]
81888188
*/
8189
-SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook(
8189
+SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook(
81908190
sqlite3 *db,
81918191
void(*xPreUpdate)(
81928192
void *pCtx, /* Copy of third arg to preupdate_hook() */
81938193
sqlite3 *db, /* Database handle */
81948194
int op, /* SQLITE_UPDATE, DELETE or INSERT */
@@ -8197,14 +8197,14 @@
81978197
sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
81988198
sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
81998199
),
82008200
void*
82018201
);
8202
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8203
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *);
8204
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *);
8205
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
8202
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8203
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_count(sqlite3 *);
8204
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_depth(sqlite3 *);
8205
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
82068206
82078207
/*
82088208
** CAPI3REF: Low-level system error code
82098209
**
82108210
** ^Attempt to return the underlying operating system error code or error
@@ -8212,11 +8212,11 @@
82128212
** The return value is OS-dependent. For example, on unix systems, after
82138213
** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
82148214
** called to get back the underlying "errno" that caused the problem, such
82158215
** as ENOSPC, EAUTH, EISDIR, and so forth.
82168216
*/
8217
-SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*);
8217
+SQLITE_API int sqlite3_system_errno(sqlite3*);
82188218
82198219
/*
82208220
** CAPI3REF: Database Snapshot
82218221
** KEYWORDS: {snapshot}
82228222
** EXPERIMENTAL
@@ -8262,11 +8262,11 @@
82628262
** to avoid a memory leak.
82638263
**
82648264
** The [sqlite3_snapshot_get()] interface is only available when the
82658265
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
82668266
*/
8267
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get(
8267
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
82688268
sqlite3 *db,
82698269
const char *zSchema,
82708270
sqlite3_snapshot **ppSnapshot
82718271
);
82728272
@@ -8300,11 +8300,11 @@
83008300
** database connection in order to make it ready to use snapshots.)
83018301
**
83028302
** The [sqlite3_snapshot_open()] interface is only available when the
83038303
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
83048304
*/
8305
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open(
8305
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
83068306
sqlite3 *db,
83078307
const char *zSchema,
83088308
sqlite3_snapshot *pSnapshot
83098309
);
83108310
@@ -8317,11 +8317,11 @@
83178317
** using this routine to avoid a memory leak.
83188318
**
83198319
** The [sqlite3_snapshot_free()] interface is only available when the
83208320
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
83218321
*/
8322
-SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*);
8322
+SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
83238323
83248324
/*
83258325
** CAPI3REF: Compare the ages of two snapshot handles.
83268326
** EXPERIMENTAL
83278327
**
@@ -8341,11 +8341,11 @@
83418341
**
83428342
** Otherwise, this API returns a negative value if P1 refers to an older
83438343
** snapshot than P2, zero if the two handles refer to the same database
83448344
** snapshot, and a positive value if P1 is a newer snapshot than P2.
83458345
*/
8346
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp(
8346
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
83478347
sqlite3_snapshot *p1,
83488348
sqlite3_snapshot *p2
83498349
);
83508350
83518351
/*
@@ -8399,11 +8399,11 @@
83998399
** Register a geometry callback named zGeom that can be used as part of an
84008400
** R-Tree geometry query as follows:
84018401
**
84028402
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
84038403
*/
8404
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback(
8404
+SQLITE_API int sqlite3_rtree_geometry_callback(
84058405
sqlite3 *db,
84068406
const char *zGeom,
84078407
int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
84088408
void *pContext
84098409
);
@@ -8425,11 +8425,11 @@
84258425
** Register a 2nd-generation geometry callback named zScore that can be
84268426
** used as part of an R-Tree geometry query as follows:
84278427
**
84288428
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
84298429
*/
8430
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback(
8430
+SQLITE_API int sqlite3_rtree_query_callback(
84318431
sqlite3 *db,
84328432
const char *zQueryFunc,
84338433
int (*xQueryFunc)(sqlite3_rtree_query_info*),
84348434
void *pContext,
84358435
void (*xDestructor)(void*)
84368436
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -118,13 +118,13 @@
118 **
119 ** See also: [sqlite3_libversion()],
120 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
121 ** [sqlite_version()] and [sqlite_source_id()].
122 */
123 #define SQLITE_VERSION "3.14.1"
124 #define SQLITE_VERSION_NUMBER 3014001
125 #define SQLITE_SOURCE_ID "2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b"
126
127 /*
128 ** CAPI3REF: Run-Time Library Version Numbers
129 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
130 **
@@ -153,13 +153,13 @@
153 ** [SQLITE_SOURCE_ID] C preprocessor macro.
154 **
155 ** See also: [sqlite_version()] and [sqlite_source_id()].
156 */
157 SQLITE_API SQLITE_EXTERN const char sqlite3_version[];
158 SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void);
159 SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void);
160 SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void);
161
162 /*
163 ** CAPI3REF: Run-Time Library Compilation Options Diagnostics
164 **
165 ** ^The sqlite3_compileoption_used() function returns 0 or 1
@@ -180,12 +180,12 @@
180 **
181 ** See also: SQL functions [sqlite_compileoption_used()] and
182 ** [sqlite_compileoption_get()] and the [compile_options pragma].
183 */
184 #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
185 SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName);
186 SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N);
187 #endif
188
189 /*
190 ** CAPI3REF: Test To See If The Library Is Threadsafe
191 **
@@ -220,11 +220,11 @@
220 ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
221 ** is unchanged by calls to sqlite3_config().)^
222 **
223 ** See the [threading mode] documentation for additional information.
224 */
225 SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void);
226
227 /*
228 ** CAPI3REF: Database Connection Handle
229 ** KEYWORDS: {database connection} {database connections}
230 **
@@ -317,12 +317,12 @@
317 ** from [sqlite3_open()], [sqlite3_open16()], or
318 ** [sqlite3_open_v2()], and not previously closed.
319 ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
320 ** argument is a harmless no-op.
321 */
322 SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*);
323 SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*);
324
325 /*
326 ** The type for a callback function.
327 ** This is legacy and deprecated. It is included for historical
328 ** compatibility and is not documented.
@@ -389,11 +389,11 @@
389 ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
390 ** <li> The application must not modify the SQL statement text passed into
391 ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
392 ** </ul>
393 */
394 SQLITE_API int SQLITE_STDCALL sqlite3_exec(
395 sqlite3*, /* An open database */
396 const char *sql, /* SQL to be evaluated */
397 int (*callback)(void*,int,char**,char**), /* Callback function */
398 void *, /* 1st argument to callback */
399 char **errmsg /* Error msg written here */
@@ -1388,14 +1388,14 @@
1388 ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied
1389 ** implementation of sqlite3_os_init() or sqlite3_os_end()
1390 ** must return [SQLITE_OK] on success and some other [error code] upon
1391 ** failure.
1392 */
1393 SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void);
1394 SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void);
1395 SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void);
1396 SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void);
1397
1398 /*
1399 ** CAPI3REF: Configuring The SQLite Library
1400 **
1401 ** The sqlite3_config() interface is used to make global configuration
@@ -1424,11 +1424,11 @@
1424 **
1425 ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
1426 ** ^If the option is unknown or SQLite is unable to set the option
1427 ** then this routine returns a non-zero [error code].
1428 */
1429 SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...);
1430
1431 /*
1432 ** CAPI3REF: Configure database connections
1433 ** METHOD: sqlite3
1434 **
@@ -1443,11 +1443,11 @@
1443 ** Subsequent arguments vary depending on the configuration verb.
1444 **
1445 ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
1446 ** the call is considered successful.
1447 */
1448 SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...);
1449
1450 /*
1451 ** CAPI3REF: Memory Allocation Routines
1452 **
1453 ** An instance of this object defines the interface between SQLite
@@ -1984,11 +1984,11 @@
1984 **
1985 ** ^The sqlite3_extended_result_codes() routine enables or disables the
1986 ** [extended result codes] feature of SQLite. ^The extended result
1987 ** codes are disabled by default for historical compatibility.
1988 */
1989 SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff);
1990
1991 /*
1992 ** CAPI3REF: Last Insert Rowid
1993 ** METHOD: sqlite3
1994 **
@@ -2036,11 +2036,11 @@
2036 ** function is running and thus changes the last insert [rowid],
2037 ** then the value returned by [sqlite3_last_insert_rowid()] is
2038 ** unpredictable and might not equal either the old or the new
2039 ** last insert [rowid].
2040 */
2041 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*);
2042
2043 /*
2044 ** CAPI3REF: Count The Number Of Rows Modified
2045 ** METHOD: sqlite3
2046 **
@@ -2089,11 +2089,11 @@
2089 **
2090 ** If a separate thread makes changes on the same database connection
2091 ** while [sqlite3_changes()] is running then the value returned
2092 ** is unpredictable and not meaningful.
2093 */
2094 SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*);
2095
2096 /*
2097 ** CAPI3REF: Total Number Of Rows Modified
2098 ** METHOD: sqlite3
2099 **
@@ -2113,11 +2113,11 @@
2113 **
2114 ** If a separate thread makes changes on the same database connection
2115 ** while [sqlite3_total_changes()] is running then the value
2116 ** returned is unpredictable and not meaningful.
2117 */
2118 SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*);
2119
2120 /*
2121 ** CAPI3REF: Interrupt A Long-Running Query
2122 ** METHOD: sqlite3
2123 **
@@ -2153,11 +2153,11 @@
2153 ** that are started after the sqlite3_interrupt() call returns.
2154 **
2155 ** If the database connection closes while [sqlite3_interrupt()]
2156 ** is running then bad things will likely happen.
2157 */
2158 SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*);
2159
2160 /*
2161 ** CAPI3REF: Determine If An SQL Statement Is Complete
2162 **
2163 ** These routines are useful during command-line input to determine if the
@@ -2188,12 +2188,12 @@
2188 ** UTF-8 string.
2189 **
2190 ** The input to [sqlite3_complete16()] must be a zero-terminated
2191 ** UTF-16 string in native byte order.
2192 */
2193 SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql);
2194 SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql);
2195
2196 /*
2197 ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
2198 ** KEYWORDS: {busy-handler callback} {busy handler}
2199 ** METHOD: sqlite3
@@ -2250,11 +2250,11 @@
2250 ** result in undefined behavior.
2251 **
2252 ** A busy handler must not close the database connection
2253 ** or [prepared statement] that invoked the busy handler.
2254 */
2255 SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2256
2257 /*
2258 ** CAPI3REF: Set A Busy Timeout
2259 ** METHOD: sqlite3
2260 **
@@ -2273,11 +2273,11 @@
2273 ** was defined (using [sqlite3_busy_handler()]) prior to calling
2274 ** this routine, that other busy handler is cleared.)^
2275 **
2276 ** See also: [PRAGMA busy_timeout]
2277 */
2278 SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms);
2279
2280 /*
2281 ** CAPI3REF: Convenience Routines For Running Queries
2282 ** METHOD: sqlite3
2283 **
@@ -2348,19 +2348,19 @@
2348 ** interface defined here. As a consequence, errors that occur in the
2349 ** wrapper layer outside of the internal [sqlite3_exec()] call are not
2350 ** reflected in subsequent calls to [sqlite3_errcode()] or
2351 ** [sqlite3_errmsg()].
2352 */
2353 SQLITE_API int SQLITE_STDCALL sqlite3_get_table(
2354 sqlite3 *db, /* An open database */
2355 const char *zSql, /* SQL to be evaluated */
2356 char ***pazResult, /* Results of the query */
2357 int *pnRow, /* Number of result rows written here */
2358 int *pnColumn, /* Number of result columns written here */
2359 char **pzErrmsg /* Error msg written here */
2360 );
2361 SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result);
2362
2363 /*
2364 ** CAPI3REF: Formatted String Printing Functions
2365 **
2366 ** These routines are work-alikes of the "printf()" family of functions
@@ -2462,14 +2462,14 @@
2462 **
2463 ** ^(The "%z" formatting option works like "%s" but with the
2464 ** addition that after the string has been read and copied into
2465 ** the result, [sqlite3_free()] is called on the input string.)^
2466 */
2467 SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...);
2468 SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list);
2469 SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...);
2470 SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list);
2471
2472 /*
2473 ** CAPI3REF: Memory Allocation Subsystem
2474 **
2475 ** The SQLite core uses these three routines for all of its own
@@ -2555,16 +2555,16 @@
2555 **
2556 ** The application must not read or write any part of
2557 ** a block of memory after it has been released using
2558 ** [sqlite3_free()] or [sqlite3_realloc()].
2559 */
2560 SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int);
2561 SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64);
2562 SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int);
2563 SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64);
2564 SQLITE_API void SQLITE_STDCALL sqlite3_free(void*);
2565 SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*);
2566
2567 /*
2568 ** CAPI3REF: Memory Allocator Statistics
2569 **
2570 ** SQLite provides these two interfaces for reporting on the status
@@ -2585,12 +2585,12 @@
2585 ** [sqlite3_memory_used()] if and only if the parameter to
2586 ** [sqlite3_memory_highwater()] is true. ^The value returned
2587 ** by [sqlite3_memory_highwater(1)] is the high-water mark
2588 ** prior to the reset.
2589 */
2590 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void);
2591 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag);
2592
2593 /*
2594 ** CAPI3REF: Pseudo-Random Number Generator
2595 **
2596 ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
@@ -2609,11 +2609,11 @@
2609 ** ^If the previous call to this routine had an N of 1 or more and a
2610 ** non-NULL P then the pseudo-randomness is generated
2611 ** internally and without recourse to the [sqlite3_vfs] xRandomness
2612 ** method.
2613 */
2614 SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P);
2615
2616 /*
2617 ** CAPI3REF: Compile-Time Authorization Callbacks
2618 ** METHOD: sqlite3
2619 **
@@ -2692,11 +2692,11 @@
2692 ** [sqlite3_prepare()] or its variants. Authorization is not
2693 ** performed during statement evaluation in [sqlite3_step()], unless
2694 ** as stated in the previous paragraph, sqlite3_step() invokes
2695 ** sqlite3_prepare_v2() to reprepare a statement after a schema change.
2696 */
2697 SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
2698 sqlite3*,
2699 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
2700 void *pUserData
2701 );
2702
@@ -2800,13 +2800,13 @@
2800 ** digits in the time are meaningless. Future versions of SQLite
2801 ** might provide greater resolution on the profiler callback. The
2802 ** sqlite3_profile() function is considered experimental and is
2803 ** subject to change in future versions of SQLite.
2804 */
2805 SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*,
2806 void(*xTrace)(void*,const char*), void*);
2807 SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_profile(sqlite3*,
2808 void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
2809
2810 /*
2811 ** CAPI3REF: SQL Trace Event Codes
2812 ** KEYWORDS: SQLITE_TRACE
@@ -2891,11 +2891,11 @@
2891 **
2892 ** The sqlite3_trace_v2() interface is intended to replace the legacy
2893 ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
2894 ** are deprecated.
2895 */
2896 SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2(
2897 sqlite3*,
2898 unsigned uMask,
2899 int(*xCallback)(unsigned,void*,void*,void*),
2900 void *pCtx
2901 );
@@ -2930,11 +2930,11 @@
2930 ** the database connection that invoked the progress handler.
2931 ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
2932 ** database connections for the meaning of "modify" in this paragraph.
2933 **
2934 */
2935 SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
2936
2937 /*
2938 ** CAPI3REF: Opening A New Database Connection
2939 ** CONSTRUCTOR: sqlite3
2940 **
@@ -3159,19 +3159,19 @@
3159 ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
3160 ** features that require the use of temporary files may fail.
3161 **
3162 ** See also: [sqlite3_temp_directory]
3163 */
3164 SQLITE_API int SQLITE_STDCALL sqlite3_open(
3165 const char *filename, /* Database filename (UTF-8) */
3166 sqlite3 **ppDb /* OUT: SQLite db handle */
3167 );
3168 SQLITE_API int SQLITE_STDCALL sqlite3_open16(
3169 const void *filename, /* Database filename (UTF-16) */
3170 sqlite3 **ppDb /* OUT: SQLite db handle */
3171 );
3172 SQLITE_API int SQLITE_STDCALL sqlite3_open_v2(
3173 const char *filename, /* Database filename (UTF-8) */
3174 sqlite3 **ppDb, /* OUT: SQLite db handle */
3175 int flags, /* Flags */
3176 const char *zVfs /* Name of VFS module to use */
3177 );
@@ -3213,13 +3213,13 @@
3213 ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and
3214 ** is not a database file pathname pointer that SQLite passed into the xOpen
3215 ** VFS method, then the behavior of this routine is undefined and probably
3216 ** undesirable.
3217 */
3218 SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3219 SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3220 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
3221
3222
3223 /*
3224 ** CAPI3REF: Error Codes And Messages
3225 ** METHOD: sqlite3
@@ -3259,15 +3259,15 @@
3259 **
3260 ** If an interface fails with SQLITE_MISUSE, that means the interface
3261 ** was invoked incorrectly by the application. In that case, the
3262 ** error code and message may or may not be set.
3263 */
3264 SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db);
3265 SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db);
3266 SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*);
3267 SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*);
3268 SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int);
3269
3270 /*
3271 ** CAPI3REF: Prepared Statement Object
3272 ** KEYWORDS: {prepared statement} {prepared statements}
3273 **
@@ -3331,11 +3331,11 @@
3331 ** created by an untrusted script can be contained using the
3332 ** [max_page_count] [PRAGMA].
3333 **
3334 ** New run-time limit categories may be added in future releases.
3335 */
3336 SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal);
3337
3338 /*
3339 ** CAPI3REF: Run-Time Limit Categories
3340 ** KEYWORDS: {limit category} {*limit categories}
3341 **
@@ -3483,32 +3483,32 @@
3483 ** or [GLOB] operator or if the parameter is compared to an indexed column
3484 ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
3485 ** </li>
3486 ** </ol>
3487 */
3488 SQLITE_API int SQLITE_STDCALL sqlite3_prepare(
3489 sqlite3 *db, /* Database handle */
3490 const char *zSql, /* SQL statement, UTF-8 encoded */
3491 int nByte, /* Maximum length of zSql in bytes. */
3492 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3493 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3494 );
3495 SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2(
3496 sqlite3 *db, /* Database handle */
3497 const char *zSql, /* SQL statement, UTF-8 encoded */
3498 int nByte, /* Maximum length of zSql in bytes. */
3499 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3500 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3501 );
3502 SQLITE_API int SQLITE_STDCALL sqlite3_prepare16(
3503 sqlite3 *db, /* Database handle */
3504 const void *zSql, /* SQL statement, UTF-16 encoded */
3505 int nByte, /* Maximum length of zSql in bytes. */
3506 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3507 const void **pzTail /* OUT: Pointer to unused portion of zSql */
3508 );
3509 SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
3510 sqlite3 *db, /* Database handle */
3511 const void *zSql, /* SQL statement, UTF-16 encoded */
3512 int nByte, /* Maximum length of zSql in bytes. */
3513 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3514 const void **pzTail /* OUT: Pointer to unused portion of zSql */
@@ -3543,12 +3543,12 @@
3543 ** automatically freed when the prepared statement is finalized.
3544 ** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
3545 ** is obtained from [sqlite3_malloc()] and must be free by the application
3546 ** by passing it to [sqlite3_free()].
3547 */
3548 SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt);
3549 SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt);
3550
3551 /*
3552 ** CAPI3REF: Determine If An SQL Statement Writes The Database
3553 ** METHOD: sqlite3_stmt
3554 **
@@ -3576,11 +3576,11 @@
3576 ** database. ^The [ATTACH] and [DETACH] statements also cause
3577 ** sqlite3_stmt_readonly() to return true since, while those statements
3578 ** change the configuration of a database connection, they do not make
3579 ** changes to the content of the database files on disk.
3580 */
3581 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
3582
3583 /*
3584 ** CAPI3REF: Determine If A Prepared Statement Has Been Reset
3585 ** METHOD: sqlite3_stmt
3586 **
@@ -3597,11 +3597,11 @@
3597 ** to locate all prepared statements associated with a database
3598 ** connection that are in need of being reset. This can be used,
3599 ** for example, in diagnostic routines to search for prepared
3600 ** statements that are holding a transaction open.
3601 */
3602 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*);
3603
3604 /*
3605 ** CAPI3REF: Dynamically Typed Value Object
3606 ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
3607 **
@@ -3761,24 +3761,24 @@
3761 ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
3762 **
3763 ** See also: [sqlite3_bind_parameter_count()],
3764 ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
3765 */
3766 SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
3767 SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
3768 void(*)(void*));
3769 SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double);
3770 SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int);
3771 SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
3772 SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int);
3773 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
3774 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
3775 SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
3776 void(*)(void*), unsigned char encoding);
3777 SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
3778 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
3779 SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
3780
3781 /*
3782 ** CAPI3REF: Number Of SQL Parameters
3783 ** METHOD: sqlite3_stmt
3784 **
@@ -3795,11 +3795,11 @@
3795 **
3796 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
3797 ** [sqlite3_bind_parameter_name()], and
3798 ** [sqlite3_bind_parameter_index()].
3799 */
3800 SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*);
3801
3802 /*
3803 ** CAPI3REF: Name Of A Host Parameter
3804 ** METHOD: sqlite3_stmt
3805 **
@@ -3823,11 +3823,11 @@
3823 **
3824 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
3825 ** [sqlite3_bind_parameter_count()], and
3826 ** [sqlite3_bind_parameter_index()].
3827 */
3828 SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int);
3829
3830 /*
3831 ** CAPI3REF: Index Of A Parameter With A Given Name
3832 ** METHOD: sqlite3_stmt
3833 **
@@ -3840,21 +3840,21 @@
3840 **
3841 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
3842 ** [sqlite3_bind_parameter_count()], and
3843 ** [sqlite3_bind_parameter_name()].
3844 */
3845 SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
3846
3847 /*
3848 ** CAPI3REF: Reset All Bindings On A Prepared Statement
3849 ** METHOD: sqlite3_stmt
3850 **
3851 ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
3852 ** the [sqlite3_bind_blob | bindings] on a [prepared statement].
3853 ** ^Use this routine to reset all host parameters to NULL.
3854 */
3855 SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*);
3856
3857 /*
3858 ** CAPI3REF: Number Of Columns In A Result Set
3859 ** METHOD: sqlite3_stmt
3860 **
@@ -3862,11 +3862,11 @@
3862 ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
3863 ** statement that does not return data (for example an [UPDATE]).
3864 **
3865 ** See also: [sqlite3_data_count()]
3866 */
3867 SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt);
3868
3869 /*
3870 ** CAPI3REF: Column Names In A Result Set
3871 ** METHOD: sqlite3_stmt
3872 **
@@ -3891,12 +3891,12 @@
3891 ** ^The name of a result column is the value of the "AS" clause for
3892 ** that column, if there is an AS clause. If there is no AS clause
3893 ** then the name of the column is unspecified and may change from
3894 ** one release of SQLite to the next.
3895 */
3896 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N);
3897 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N);
3898
3899 /*
3900 ** CAPI3REF: Source Of Data In A Query Result
3901 ** METHOD: sqlite3_stmt
3902 **
@@ -3940,16 +3940,16 @@
3940 ** If two or more threads call one or more
3941 ** [sqlite3_column_database_name | column metadata interfaces]
3942 ** for the same [prepared statement] and result column
3943 ** at the same time then the results are undefined.
3944 */
3945 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int);
3946 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int);
3947 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int);
3948 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int);
3949 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int);
3950 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int);
3951
3952 /*
3953 ** CAPI3REF: Declared Datatype Of A Query Result
3954 ** METHOD: sqlite3_stmt
3955 **
@@ -3977,12 +3977,12 @@
3977 ** data stored in that column is of the declared type. SQLite is
3978 ** strongly typed, but the typing is dynamic not static. ^Type
3979 ** is associated with individual values, not with the containers
3980 ** used to hold those values.
3981 */
3982 SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int);
3983 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int);
3984
3985 /*
3986 ** CAPI3REF: Evaluate An SQL Statement
3987 ** METHOD: sqlite3_stmt
3988 **
@@ -4058,11 +4058,11 @@
4058 ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
4059 ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
4060 ** then the more specific [error codes] are returned directly
4061 ** by sqlite3_step(). The use of the "v2" interface is recommended.
4062 */
4063 SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*);
4064
4065 /*
4066 ** CAPI3REF: Number of columns in a result set
4067 ** METHOD: sqlite3_stmt
4068 **
@@ -4079,11 +4079,11 @@
4079 ** where it always returns zero since each step of that multi-step
4080 ** pragma returns 0 columns of data.
4081 **
4082 ** See also: [sqlite3_column_count()]
4083 */
4084 SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
4085
4086 /*
4087 ** CAPI3REF: Fundamental Datatypes
4088 ** KEYWORDS: SQLITE_TEXT
4089 **
@@ -4269,20 +4269,20 @@
4269 ** of these routines, a default value is returned. The default value
4270 ** is either the integer 0, the floating point number 0.0, or a NULL
4271 ** pointer. Subsequent calls to [sqlite3_errcode()] will return
4272 ** [SQLITE_NOMEM].)^
4273 */
4274 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol);
4275 SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4276 SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4277 SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol);
4278 SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol);
4279 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol);
4280 SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol);
4281 SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol);
4282 SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol);
4283 SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol);
4284
4285 /*
4286 ** CAPI3REF: Destroy A Prepared Statement Object
4287 ** DESTRUCTOR: sqlite3_stmt
4288 **
@@ -4306,11 +4306,11 @@
4306 ** resource leaks. It is a grievous error for the application to try to use
4307 ** a prepared statement after it has been finalized. Any use of a prepared
4308 ** statement after it has been finalized can result in undefined and
4309 ** undesirable behavior such as segfaults and heap corruption.
4310 */
4311 SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt);
4312
4313 /*
4314 ** CAPI3REF: Reset A Prepared Statement Object
4315 ** METHOD: sqlite3_stmt
4316 **
@@ -4333,11 +4333,11 @@
4333 ** [sqlite3_reset(S)] returns an appropriate [error code].
4334 **
4335 ** ^The [sqlite3_reset(S)] interface does not change the values
4336 ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
4337 */
4338 SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt);
4339
4340 /*
4341 ** CAPI3REF: Create Or Redefine SQL Functions
4342 ** KEYWORDS: {function creation routines}
4343 ** KEYWORDS: {application-defined SQL function}
@@ -4433,31 +4433,31 @@
4433 ** ^An application-defined function is permitted to call other
4434 ** SQLite interfaces. However, such calls must not
4435 ** close the database connection nor finalize or reset the prepared
4436 ** statement in which the function is running.
4437 */
4438 SQLITE_API int SQLITE_STDCALL sqlite3_create_function(
4439 sqlite3 *db,
4440 const char *zFunctionName,
4441 int nArg,
4442 int eTextRep,
4443 void *pApp,
4444 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4445 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4446 void (*xFinal)(sqlite3_context*)
4447 );
4448 SQLITE_API int SQLITE_STDCALL sqlite3_create_function16(
4449 sqlite3 *db,
4450 const void *zFunctionName,
4451 int nArg,
4452 int eTextRep,
4453 void *pApp,
4454 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4455 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4456 void (*xFinal)(sqlite3_context*)
4457 );
4458 SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2(
4459 sqlite3 *db,
4460 const char *zFunctionName,
4461 int nArg,
4462 int eTextRep,
4463 void *pApp,
@@ -4499,16 +4499,16 @@
4499 ** to be supported. However, new applications should avoid
4500 ** the use of these functions. To encourage programmers to avoid
4501 ** these functions, we will not explain what they do.
4502 */
4503 #ifndef SQLITE_OMIT_DEPRECATED
4504 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*);
4505 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*);
4506 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4507 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void);
4508 SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void);
4509 SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
4510 void*,sqlite3_int64);
4511 #endif
4512
4513 /*
4514 ** CAPI3REF: Obtaining SQL Values
@@ -4554,22 +4554,22 @@
4554 ** or [sqlite3_value_text16()].
4555 **
4556 ** These routines must be called from the same thread as
4557 ** the SQL function that supplied the [sqlite3_value*] parameters.
4558 */
4559 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*);
4560 SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*);
4561 SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*);
4562 SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*);
4563 SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*);
4564 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*);
4565 SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*);
4566 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*);
4567 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*);
4568 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*);
4569 SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*);
4570 SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*);
4571
4572 /*
4573 ** CAPI3REF: Finding The Subtype Of SQL Values
4574 ** METHOD: sqlite3_value
4575 **
@@ -4581,11 +4581,11 @@
4581 **
4582 ** SQLite makes no use of subtype itself. It merely passes the subtype
4583 ** from the result of one [application-defined SQL function] into the
4584 ** input of another.
4585 */
4586 SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*);
4587
4588 /*
4589 ** CAPI3REF: Copy And Free SQL Values
4590 ** METHOD: sqlite3_value
4591 **
@@ -4597,12 +4597,12 @@
4597 **
4598 ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
4599 ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
4600 ** then sqlite3_value_free(V) is a harmless no-op.
4601 */
4602 SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*);
4603 SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*);
4604
4605 /*
4606 ** CAPI3REF: Obtain Aggregate Function Context
4607 ** METHOD: sqlite3_context
4608 **
@@ -4643,11 +4643,11 @@
4643 ** function.
4644 **
4645 ** This routine must be called from the same thread in which
4646 ** the aggregate SQL function is running.
4647 */
4648 SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes);
4649
4650 /*
4651 ** CAPI3REF: User Data For Functions
4652 ** METHOD: sqlite3_context
4653 **
@@ -4658,11 +4658,11 @@
4658 ** registered the application defined function.
4659 **
4660 ** This routine must be called from the same thread in which
4661 ** the application-defined function is running.
4662 */
4663 SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*);
4664
4665 /*
4666 ** CAPI3REF: Database Connection For Functions
4667 ** METHOD: sqlite3_context
4668 **
@@ -4670,11 +4670,11 @@
4670 ** the pointer to the [database connection] (the 1st parameter)
4671 ** of the [sqlite3_create_function()]
4672 ** and [sqlite3_create_function16()] routines that originally
4673 ** registered the application defined function.
4674 */
4675 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*);
4676
4677 /*
4678 ** CAPI3REF: Function Auxiliary Data
4679 ** METHOD: sqlite3_context
4680 **
@@ -4724,12 +4724,12 @@
4724 ** values and [parameters] and expressions composed from the same.)^
4725 **
4726 ** These routines must be called from the same thread in which
4727 ** the SQL function is running.
4728 */
4729 SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N);
4730 SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
4731
4732
4733 /*
4734 ** CAPI3REF: Constants Defining Special Destructor Behavior
4735 **
@@ -4861,31 +4861,31 @@
4861 **
4862 ** If these routines are called from within the different thread
4863 ** than the one containing the application-defined function that received
4864 ** the [sqlite3_context] pointer, the results are undefined.
4865 */
4866 SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
4867 SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*,
4868 sqlite3_uint64,void(*)(void*));
4869 SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double);
4870 SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int);
4871 SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int);
4872 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*);
4873 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*);
4874 SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int);
4875 SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int);
4876 SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
4877 SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*);
4878 SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
4879 SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
4880 void(*)(void*), unsigned char encoding);
4881 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
4882 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
4883 SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
4884 SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
4885 SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
4886 SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
4887
4888
4889 /*
4890 ** CAPI3REF: Setting The Subtype Of An SQL Function
4891 ** METHOD: sqlite3_context
@@ -4896,11 +4896,11 @@
4896 ** of the subtype T are preserved in current versions of SQLite;
4897 ** higher order bits are discarded.
4898 ** The number of subtype bytes preserved by SQLite might increase
4899 ** in future releases of SQLite.
4900 */
4901 SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int);
4902
4903 /*
4904 ** CAPI3REF: Define New Collating Sequences
4905 ** METHOD: sqlite3
4906 **
@@ -4978,26 +4978,26 @@
4978 ** is unfortunate but cannot be changed without breaking backwards
4979 ** compatibility.
4980 **
4981 ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
4982 */
4983 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation(
4984 sqlite3*,
4985 const char *zName,
4986 int eTextRep,
4987 void *pArg,
4988 int(*xCompare)(void*,int,const void*,int,const void*)
4989 );
4990 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2(
4991 sqlite3*,
4992 const char *zName,
4993 int eTextRep,
4994 void *pArg,
4995 int(*xCompare)(void*,int,const void*,int,const void*),
4996 void(*xDestroy)(void*)
4997 );
4998 SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16(
4999 sqlite3*,
5000 const void *zName,
5001 int eTextRep,
5002 void *pArg,
5003 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -5028,16 +5028,16 @@
5028 **
5029 ** The callback function should register the desired collation using
5030 ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
5031 ** [sqlite3_create_collation_v2()].
5032 */
5033 SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed(
5034 sqlite3*,
5035 void*,
5036 void(*)(void*,sqlite3*,int eTextRep,const char*)
5037 );
5038 SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16(
5039 sqlite3*,
5040 void*,
5041 void(*)(void*,sqlite3*,int eTextRep,const void*)
5042 );
5043
@@ -5047,15 +5047,15 @@
5047 ** called right after sqlite3_open().
5048 **
5049 ** The code to implement this API is not available in the public release
5050 ** of SQLite.
5051 */
5052 SQLITE_API int SQLITE_STDCALL sqlite3_key(
5053 sqlite3 *db, /* Database to be rekeyed */
5054 const void *pKey, int nKey /* The key */
5055 );
5056 SQLITE_API int SQLITE_STDCALL sqlite3_key_v2(
5057 sqlite3 *db, /* Database to be rekeyed */
5058 const char *zDbName, /* Name of the database */
5059 const void *pKey, int nKey /* The key */
5060 );
5061
@@ -5065,35 +5065,35 @@
5065 ** database is decrypted.
5066 **
5067 ** The code to implement this API is not available in the public release
5068 ** of SQLite.
5069 */
5070 SQLITE_API int SQLITE_STDCALL sqlite3_rekey(
5071 sqlite3 *db, /* Database to be rekeyed */
5072 const void *pKey, int nKey /* The new key */
5073 );
5074 SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2(
5075 sqlite3 *db, /* Database to be rekeyed */
5076 const char *zDbName, /* Name of the database */
5077 const void *pKey, int nKey /* The new key */
5078 );
5079
5080 /*
5081 ** Specify the activation key for a SEE database. Unless
5082 ** activated, none of the SEE routines will work.
5083 */
5084 SQLITE_API void SQLITE_STDCALL sqlite3_activate_see(
5085 const char *zPassPhrase /* Activation phrase */
5086 );
5087 #endif
5088
5089 #ifdef SQLITE_ENABLE_CEROD
5090 /*
5091 ** Specify the activation key for a CEROD database. Unless
5092 ** activated, none of the CEROD routines will work.
5093 */
5094 SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod(
5095 const char *zPassPhrase /* Activation phrase */
5096 );
5097 #endif
5098
5099 /*
@@ -5111,11 +5111,11 @@
5111 ** method of the default [sqlite3_vfs] object. If the xSleep() method
5112 ** of the default VFS is not implemented correctly, or not implemented at
5113 ** all, then the behavior of sqlite3_sleep() may deviate from the description
5114 ** in the previous paragraphs.
5115 */
5116 SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int);
5117
5118 /*
5119 ** CAPI3REF: Name Of The Folder Holding Temporary Files
5120 **
5121 ** ^(If this global variable is made to point to a string which is
@@ -5230,11 +5230,11 @@
5230 **
5231 ** If another thread changes the autocommit status of the database
5232 ** connection while this routine is running, then the return value
5233 ** is undefined.
5234 */
5235 SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*);
5236
5237 /*
5238 ** CAPI3REF: Find The Database Handle Of A Prepared Statement
5239 ** METHOD: sqlite3_stmt
5240 **
@@ -5243,11 +5243,11 @@
5243 ** returned by sqlite3_db_handle is the same [database connection]
5244 ** that was the first argument
5245 ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
5246 ** create the statement in the first place.
5247 */
5248 SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*);
5249
5250 /*
5251 ** CAPI3REF: Return The Filename For A Database Connection
5252 ** METHOD: sqlite3
5253 **
@@ -5260,21 +5260,21 @@
5260 ** ^The filename returned by this function is the output of the
5261 ** xFullPathname method of the [VFS]. ^In other words, the filename
5262 ** will be an absolute pathname, even if the filename used
5263 ** to open the database originally was a URI or relative pathname.
5264 */
5265 SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName);
5266
5267 /*
5268 ** CAPI3REF: Determine if a database is read-only
5269 ** METHOD: sqlite3
5270 **
5271 ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N
5272 ** of connection D is read-only, 0 if it is read/write, or -1 if N is not
5273 ** the name of a database on connection D.
5274 */
5275 SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
5276
5277 /*
5278 ** CAPI3REF: Find the next prepared statement
5279 ** METHOD: sqlite3
5280 **
@@ -5286,11 +5286,11 @@
5286 **
5287 ** The [database connection] pointer D in a call to
5288 ** [sqlite3_next_stmt(D,S)] must refer to an open database
5289 ** connection and in particular must not be a NULL pointer.
5290 */
5291 SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
5292
5293 /*
5294 ** CAPI3REF: Commit And Rollback Notification Callbacks
5295 ** METHOD: sqlite3
5296 **
@@ -5335,12 +5335,12 @@
5335 ** ^The rollback callback is not invoked if a transaction is
5336 ** automatically rolled back because the database connection is closed.
5337 **
5338 ** See also the [sqlite3_update_hook()] interface.
5339 */
5340 SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5341 SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5342
5343 /*
5344 ** CAPI3REF: Data Change Notification Callbacks
5345 ** METHOD: sqlite3
5346 **
@@ -5387,11 +5387,11 @@
5387 ** the first call on D.
5388 **
5389 ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
5390 ** and [sqlite3_preupdate_hook()] interfaces.
5391 */
5392 SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
5393 sqlite3*,
5394 void(*)(void *,int ,char const *,char const *,sqlite3_int64),
5395 void*
5396 );
5397
@@ -5427,11 +5427,11 @@
5427 ** This interface is threadsafe on processors where writing a
5428 ** 32-bit integer is atomic.
5429 **
5430 ** See Also: [SQLite Shared-Cache Mode]
5431 */
5432 SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int);
5433
5434 /*
5435 ** CAPI3REF: Attempt To Free Heap Memory
5436 **
5437 ** ^The sqlite3_release_memory() interface attempts to free N bytes
@@ -5443,11 +5443,11 @@
5443 ** ^The sqlite3_release_memory() routine is a no-op returning zero
5444 ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5445 **
5446 ** See also: [sqlite3_db_release_memory()]
5447 */
5448 SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int);
5449
5450 /*
5451 ** CAPI3REF: Free Memory Used By A Database Connection
5452 ** METHOD: sqlite3
5453 **
@@ -5457,11 +5457,11 @@
5457 ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is
5458 ** omitted.
5459 **
5460 ** See also: [sqlite3_release_memory()]
5461 */
5462 SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*);
5463
5464 /*
5465 ** CAPI3REF: Impose A Limit On Heap Size
5466 **
5467 ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
@@ -5509,11 +5509,11 @@
5509 ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5510 **
5511 ** The circumstances under which SQLite will enforce the soft heap limit may
5512 ** changes in future releases of SQLite.
5513 */
5514 SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N);
5515
5516 /*
5517 ** CAPI3REF: Deprecated Soft Heap Limit Interface
5518 ** DEPRECATED
5519 **
@@ -5520,11 +5520,11 @@
5520 ** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
5521 ** interface. This routine is provided for historical compatibility
5522 ** only. All new applications should use the
5523 ** [sqlite3_soft_heap_limit64()] interface rather than this one.
5524 */
5525 SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N);
5526
5527
5528 /*
5529 ** CAPI3REF: Extract Metadata About A Column Of A Table
5530 ** METHOD: sqlite3
@@ -5590,11 +5590,11 @@
5590 **
5591 ** ^This function causes all database schemas to be read from disk and
5592 ** parsed, if that has not already been done, and returns an error if
5593 ** any errors are encountered while loading the schema.
5594 */
5595 SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata(
5596 sqlite3 *db, /* Connection handle */
5597 const char *zDbName, /* Database name or NULL */
5598 const char *zTableName, /* Table name */
5599 const char *zColumnName, /* Column name */
5600 char const **pzDataType, /* OUTPUT: Declared data type */
@@ -5646,11 +5646,11 @@
5646 ** disabled and prevent SQL injections from giving attackers
5647 ** access to extension loading capabilities.
5648 **
5649 ** See also the [load_extension() SQL function].
5650 */
5651 SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
5652 sqlite3 *db, /* Load the extension into this database connection */
5653 const char *zFile, /* Name of the shared library containing extension */
5654 const char *zProc, /* Entry point. Derived from zFile if 0 */
5655 char **pzErrMsg /* Put error message here if not 0 */
5656 );
@@ -5678,11 +5678,11 @@
5678 ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
5679 ** rather than this interface, so the [load_extension()] SQL function
5680 ** remains disabled. This will prevent SQL injections from giving attackers
5681 ** access to extension loading capabilities.
5682 */
5683 SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5684
5685 /*
5686 ** CAPI3REF: Automatically Load Statically Linked Extensions
5687 **
5688 ** ^This interface causes the xEntryPoint() function to be invoked for
@@ -5716,11 +5716,11 @@
5716 ** will be called more than once for each database connection that is opened.
5717 **
5718 ** See also: [sqlite3_reset_auto_extension()]
5719 ** and [sqlite3_cancel_auto_extension()]
5720 */
5721 SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void));
5722
5723 /*
5724 ** CAPI3REF: Cancel Automatic Extension Loading
5725 **
5726 ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the
@@ -5728,19 +5728,19 @@
5728 ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)]
5729 ** routine returns 1 if initialization routine X was successfully
5730 ** unregistered and it returns 0 if X was not on the list of initialization
5731 ** routines.
5732 */
5733 SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
5734
5735 /*
5736 ** CAPI3REF: Reset Automatic Extension Loading
5737 **
5738 ** ^This interface disables all automatic extensions previously
5739 ** registered using [sqlite3_auto_extension()].
5740 */
5741 SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void);
5742
5743 /*
5744 ** The interface to the virtual-table mechanism is currently considered
5745 ** to be experimental. The interface might change in incompatible ways.
5746 ** If this is a problem for you, do not use the interface at this time.
@@ -5981,17 +5981,17 @@
5981 ** be invoked if the call to sqlite3_create_module_v2() fails.
5982 ** ^The sqlite3_create_module()
5983 ** interface is equivalent to sqlite3_create_module_v2() with a NULL
5984 ** destructor.
5985 */
5986 SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
5987 sqlite3 *db, /* SQLite connection to register module with */
5988 const char *zName, /* Name of the module */
5989 const sqlite3_module *p, /* Methods for the module */
5990 void *pClientData /* Client data for xCreate/xConnect */
5991 );
5992 SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
5993 sqlite3 *db, /* SQLite connection to register module with */
5994 const char *zName, /* Name of the module */
5995 const sqlite3_module *p, /* Methods for the module */
5996 void *pClientData, /* Client data for xCreate/xConnect */
5997 void(*xDestroy)(void*) /* Module destructor function */
@@ -6050,11 +6050,11 @@
6050 ** ^The [xCreate] and [xConnect] methods of a
6051 ** [virtual table module] call this interface
6052 ** to declare the format (the names and datatypes of the columns) of
6053 ** the virtual tables they implement.
6054 */
6055 SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL);
6056
6057 /*
6058 ** CAPI3REF: Overload A Function For A Virtual Table
6059 ** METHOD: sqlite3
6060 **
@@ -6069,11 +6069,11 @@
6069 ** of the new function always causes an exception to be thrown. So
6070 ** the new function is not good for anything by itself. Its only
6071 ** purpose is to be a placeholder function that can be overloaded
6072 ** by a [virtual table].
6073 */
6074 SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
6075
6076 /*
6077 ** The interface to the virtual-table mechanism defined above (back up
6078 ** to a comment remarkably similar to this one) is currently considered
6079 ** to be experimental. The interface might change in incompatible ways.
@@ -6168,11 +6168,11 @@
6168 ** zero-filled blob to read or write using the incremental-blob interface.
6169 **
6170 ** To avoid a resource leak, every open [BLOB handle] should eventually
6171 ** be released by a call to [sqlite3_blob_close()].
6172 */
6173 SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
6174 sqlite3*,
6175 const char *zDb,
6176 const char *zTable,
6177 const char *zColumn,
6178 sqlite3_int64 iRow,
@@ -6201,11 +6201,11 @@
6201 ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
6202 ** always returns zero.
6203 **
6204 ** ^This function sets the database handle error code and message.
6205 */
6206 SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
6207
6208 /*
6209 ** CAPI3REF: Close A BLOB Handle
6210 ** DESTRUCTOR: sqlite3_blob
6211 **
@@ -6224,11 +6224,11 @@
6224 ** with a null pointer (such as would be returned by a failed call to
6225 ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
6226 ** is passed a valid open blob handle, the values returned by the
6227 ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
6228 */
6229 SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *);
6230
6231 /*
6232 ** CAPI3REF: Return The Size Of An Open BLOB
6233 ** METHOD: sqlite3_blob
6234 **
@@ -6240,11 +6240,11 @@
6240 ** This routine only works on a [BLOB handle] which has been created
6241 ** by a prior successful call to [sqlite3_blob_open()] and which has not
6242 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6243 ** to this routine results in undefined and probably undesirable behavior.
6244 */
6245 SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *);
6246
6247 /*
6248 ** CAPI3REF: Read Data From A BLOB Incrementally
6249 ** METHOD: sqlite3_blob
6250 **
@@ -6269,11 +6269,11 @@
6269 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6270 ** to this routine results in undefined and probably undesirable behavior.
6271 **
6272 ** See also: [sqlite3_blob_write()].
6273 */
6274 SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
6275
6276 /*
6277 ** CAPI3REF: Write Data Into A BLOB Incrementally
6278 ** METHOD: sqlite3_blob
6279 **
@@ -6311,11 +6311,11 @@
6311 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6312 ** to this routine results in undefined and probably undesirable behavior.
6313 **
6314 ** See also: [sqlite3_blob_read()].
6315 */
6316 SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
6317
6318 /*
6319 ** CAPI3REF: Virtual File System Objects
6320 **
6321 ** A virtual filesystem (VFS) is an [sqlite3_vfs] object
@@ -6342,13 +6342,13 @@
6342 **
6343 ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
6344 ** ^(If the default VFS is unregistered, another VFS is chosen as
6345 ** the default. The choice for the new VFS is arbitrary.)^
6346 */
6347 SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName);
6348 SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6349 SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
6350
6351 /*
6352 ** CAPI3REF: Mutexes
6353 **
6354 ** The SQLite core uses these routines for thread
@@ -6460,15 +6460,15 @@
6460 ** sqlite3_mutex_leave() is a NULL pointer, then all three routines
6461 ** behave as no-ops.
6462 **
6463 ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
6464 */
6465 SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int);
6466 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*);
6467 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*);
6468 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*);
6469 SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*);
6470
6471 /*
6472 ** CAPI3REF: Mutex Methods Object
6473 **
6474 ** An instance of this structure defines the low-level routines
@@ -6574,12 +6574,12 @@
6574 ** call to sqlite3_mutex_held() to fail, so a non-zero return is
6575 ** the appropriate thing to do. The sqlite3_mutex_notheld()
6576 ** interface should also return 1 when given a NULL pointer.
6577 */
6578 #ifndef NDEBUG
6579 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*);
6580 SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
6581 #endif
6582
6583 /*
6584 ** CAPI3REF: Mutex Types
6585 **
@@ -6615,11 +6615,11 @@
6615 ** serializes access to the [database connection] given in the argument
6616 ** when the [threading mode] is Serialized.
6617 ** ^If the [threading mode] is Single-thread or Multi-thread then this
6618 ** routine returns a NULL pointer.
6619 */
6620 SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*);
6621
6622 /*
6623 ** CAPI3REF: Low-Level Control Of Database Files
6624 ** METHOD: sqlite3
6625 **
@@ -6650,11 +6650,11 @@
6650 ** an incorrect zDbName and an SQLITE_ERROR return from the underlying
6651 ** xFileControl method.
6652 **
6653 ** See also: [SQLITE_FCNTL_LOCKSTATE]
6654 */
6655 SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6656
6657 /*
6658 ** CAPI3REF: Testing Interface
6659 **
6660 ** ^The sqlite3_test_control() interface is used to read out internal
@@ -6669,11 +6669,11 @@
6669 ** The details of the operation codes, their meanings, the parameters
6670 ** they take, and what they do are all subject to change without notice.
6671 ** Unlike most of the SQLite API, this function is not guaranteed to
6672 ** operate consistently from one release to the next.
6673 */
6674 SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
6675
6676 /*
6677 ** CAPI3REF: Testing Interface Operation Codes
6678 **
6679 ** These constants are the valid operation code parameters used
@@ -6732,12 +6732,12 @@
6732 ** be represented by a 32-bit integer, then the values returned by
6733 ** sqlite3_status() are undefined.
6734 **
6735 ** See also: [sqlite3_db_status()]
6736 */
6737 SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6738 SQLITE_API int SQLITE_STDCALL sqlite3_status64(
6739 int op,
6740 sqlite3_int64 *pCurrent,
6741 sqlite3_int64 *pHighwater,
6742 int resetFlag
6743 );
@@ -6858,11 +6858,11 @@
6858 ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
6859 ** non-zero [error code] on failure.
6860 **
6861 ** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
6862 */
6863 SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
6864
6865 /*
6866 ** CAPI3REF: Status Parameters for database connections
6867 ** KEYWORDS: {SQLITE_DBSTATUS options}
6868 **
@@ -7001,11 +7001,11 @@
7001 ** ^If the resetFlg is true, then the counter is reset to zero after this
7002 ** interface call returns.
7003 **
7004 ** See also: [sqlite3_status()] and [sqlite3_db_status()].
7005 */
7006 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
7007
7008 /*
7009 ** CAPI3REF: Status Parameters for prepared statements
7010 ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters}
7011 **
@@ -7470,20 +7470,20 @@
7470 ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
7471 ** APIs are not strictly speaking threadsafe. If they are invoked at the
7472 ** same time as another thread is invoking sqlite3_backup_step() it is
7473 ** possible that they return invalid values.
7474 */
7475 SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
7476 sqlite3 *pDest, /* Destination database handle */
7477 const char *zDestName, /* Destination database name */
7478 sqlite3 *pSource, /* Source database handle */
7479 const char *zSourceName /* Source database name */
7480 );
7481 SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage);
7482 SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p);
7483 SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p);
7484 SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p);
7485
7486 /*
7487 ** CAPI3REF: Unlock Notification
7488 ** METHOD: sqlite3
7489 **
@@ -7596,11 +7596,11 @@
7596 ** by an sqlite3_step() call. ^(If there is a blocking connection, then the
7597 ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
7598 ** the special "DROP TABLE/INDEX" case, the extended error code is just
7599 ** SQLITE_LOCKED.)^
7600 */
7601 SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify(
7602 sqlite3 *pBlocked, /* Waiting connection */
7603 void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
7604 void *pNotifyArg /* Argument to pass to xNotify */
7605 );
7606
@@ -7611,12 +7611,12 @@
7611 ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications
7612 ** and extensions to compare the contents of two buffers containing UTF-8
7613 ** strings in a case-independent fashion, using the same definition of "case
7614 ** independence" that SQLite uses internally when comparing identifiers.
7615 */
7616 SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *);
7617 SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int);
7618
7619 /*
7620 ** CAPI3REF: String Globbing
7621 *
7622 ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if
@@ -7629,11 +7629,11 @@
7629 ** Note that this routine returns zero on a match and non-zero if the strings
7630 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7631 **
7632 ** See also: [sqlite3_strlike()].
7633 */
7634 SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr);
7635
7636 /*
7637 ** CAPI3REF: String LIKE Matching
7638 *
7639 ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if
@@ -7652,11 +7652,11 @@
7652 ** Note that this routine returns zero on a match and non-zero if the strings
7653 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7654 **
7655 ** See also: [sqlite3_strglob()].
7656 */
7657 SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
7658
7659 /*
7660 ** CAPI3REF: Error Logging Interface
7661 **
7662 ** ^The [sqlite3_log()] interface writes a message into the [error log]
@@ -7675,11 +7675,11 @@
7675 ** will not use dynamically allocated memory. The log message is stored in
7676 ** a fixed-length buffer on the stack. If the log message is longer than
7677 ** a few hundred characters, it will be truncated to the length of the
7678 ** buffer.
7679 */
7680 SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...);
7681
7682 /*
7683 ** CAPI3REF: Write-Ahead Log Commit Hook
7684 ** METHOD: sqlite3
7685 **
@@ -7711,11 +7711,11 @@
7711 ** previously registered write-ahead log callback. ^Note that the
7712 ** [sqlite3_wal_autocheckpoint()] interface and the
7713 ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
7714 ** overwrite any prior [sqlite3_wal_hook()] settings.
7715 */
7716 SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook(
7717 sqlite3*,
7718 int(*)(void *,sqlite3*,const char*,int),
7719 void*
7720 );
7721
@@ -7746,11 +7746,11 @@
7746 ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
7747 ** pages. The use of this interface
7748 ** is only necessary if the default setting is found to be suboptimal
7749 ** for a particular application.
7750 */
7751 SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
7752
7753 /*
7754 ** CAPI3REF: Checkpoint a database
7755 ** METHOD: sqlite3
7756 **
@@ -7768,11 +7768,11 @@
7768 ** interface was added. This interface is retained for backwards
7769 ** compatibility and as a convenience for applications that need to manually
7770 ** start a callback but which do not need the full power (and corresponding
7771 ** complication) of [sqlite3_wal_checkpoint_v2()].
7772 */
7773 SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
7774
7775 /*
7776 ** CAPI3REF: Checkpoint a database
7777 ** METHOD: sqlite3
7778 **
@@ -7862,11 +7862,11 @@
7862 ** [sqlite3_errcode()] and [sqlite3_errmsg()].
7863 **
7864 ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
7865 ** from SQL.
7866 */
7867 SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2(
7868 sqlite3 *db, /* Database handle */
7869 const char *zDb, /* Name of attached database (or NULL) */
7870 int eMode, /* SQLITE_CHECKPOINT_* value */
7871 int *pnLog, /* OUT: Size of WAL log in frames */
7872 int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -7898,11 +7898,11 @@
7898 **
7899 ** At present, there is only one option that may be configured using
7900 ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
7901 ** may be added in the future.
7902 */
7903 SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...);
7904
7905 /*
7906 ** CAPI3REF: Virtual Table Configuration Options
7907 **
7908 ** These macros define the various options to the
@@ -7951,11 +7951,11 @@
7951 ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],
7952 ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode
7953 ** of the SQL statement that triggered the call to the [xUpdate] method of the
7954 ** [virtual table].
7955 */
7956 SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *);
7957
7958 /*
7959 ** CAPI3REF: Conflict resolution modes
7960 ** KEYWORDS: {conflict resolution mode}
7961 **
@@ -8056,11 +8056,11 @@
8056 ** as if the loop did not exist - it returns non-zero and leave the variable
8057 ** that pOut points to unchanged.
8058 **
8059 ** See also: [sqlite3_stmt_scanstatus_reset()]
8060 */
8061 SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
8062 sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
8063 int idx, /* Index of loop to report on */
8064 int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
8065 void *pOut /* Result written here */
8066 );
@@ -8072,11 +8072,11 @@
8072 ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
8073 **
8074 ** This API is only available if the library is built with pre-processor
8075 ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
8076 */
8077 SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
8078
8079 /*
8080 ** CAPI3REF: Flush caches to disk mid-transaction
8081 **
8082 ** ^If a write-transaction is open on [database connection] D when the
@@ -8104,11 +8104,11 @@
8104 ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.
8105 **
8106 ** ^This function does not set the database handle error code or message
8107 ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
8108 */
8109 SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*);
8110
8111 /*
8112 ** CAPI3REF: The pre-update hook.
8113 **
8114 ** ^These interfaces are only available if SQLite is compiled using the
@@ -8184,11 +8184,11 @@
8184 ** triggers; or 2 for changes resulting from triggers called by top-level
8185 ** triggers; and so forth.
8186 **
8187 ** See also: [sqlite3_update_hook()]
8188 */
8189 SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook(
8190 sqlite3 *db,
8191 void(*xPreUpdate)(
8192 void *pCtx, /* Copy of third arg to preupdate_hook() */
8193 sqlite3 *db, /* Database handle */
8194 int op, /* SQLITE_UPDATE, DELETE or INSERT */
@@ -8197,14 +8197,14 @@
8197 sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
8198 sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
8199 ),
8200 void*
8201 );
8202 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8203 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *);
8204 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *);
8205 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
8206
8207 /*
8208 ** CAPI3REF: Low-level system error code
8209 **
8210 ** ^Attempt to return the underlying operating system error code or error
@@ -8212,11 +8212,11 @@
8212 ** The return value is OS-dependent. For example, on unix systems, after
8213 ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
8214 ** called to get back the underlying "errno" that caused the problem, such
8215 ** as ENOSPC, EAUTH, EISDIR, and so forth.
8216 */
8217 SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*);
8218
8219 /*
8220 ** CAPI3REF: Database Snapshot
8221 ** KEYWORDS: {snapshot}
8222 ** EXPERIMENTAL
@@ -8262,11 +8262,11 @@
8262 ** to avoid a memory leak.
8263 **
8264 ** The [sqlite3_snapshot_get()] interface is only available when the
8265 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8266 */
8267 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get(
8268 sqlite3 *db,
8269 const char *zSchema,
8270 sqlite3_snapshot **ppSnapshot
8271 );
8272
@@ -8300,11 +8300,11 @@
8300 ** database connection in order to make it ready to use snapshots.)
8301 **
8302 ** The [sqlite3_snapshot_open()] interface is only available when the
8303 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8304 */
8305 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open(
8306 sqlite3 *db,
8307 const char *zSchema,
8308 sqlite3_snapshot *pSnapshot
8309 );
8310
@@ -8317,11 +8317,11 @@
8317 ** using this routine to avoid a memory leak.
8318 **
8319 ** The [sqlite3_snapshot_free()] interface is only available when the
8320 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8321 */
8322 SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*);
8323
8324 /*
8325 ** CAPI3REF: Compare the ages of two snapshot handles.
8326 ** EXPERIMENTAL
8327 **
@@ -8341,11 +8341,11 @@
8341 **
8342 ** Otherwise, this API returns a negative value if P1 refers to an older
8343 ** snapshot than P2, zero if the two handles refer to the same database
8344 ** snapshot, and a positive value if P1 is a newer snapshot than P2.
8345 */
8346 SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp(
8347 sqlite3_snapshot *p1,
8348 sqlite3_snapshot *p2
8349 );
8350
8351 /*
@@ -8399,11 +8399,11 @@
8399 ** Register a geometry callback named zGeom that can be used as part of an
8400 ** R-Tree geometry query as follows:
8401 **
8402 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
8403 */
8404 SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback(
8405 sqlite3 *db,
8406 const char *zGeom,
8407 int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
8408 void *pContext
8409 );
@@ -8425,11 +8425,11 @@
8425 ** Register a 2nd-generation geometry callback named zScore that can be
8426 ** used as part of an R-Tree geometry query as follows:
8427 **
8428 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
8429 */
8430 SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback(
8431 sqlite3 *db,
8432 const char *zQueryFunc,
8433 int (*xQueryFunc)(sqlite3_rtree_query_info*),
8434 void *pContext,
8435 void (*xDestructor)(void*)
8436
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -118,13 +118,13 @@
118 **
119 ** See also: [sqlite3_libversion()],
120 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
121 ** [sqlite_version()] and [sqlite_source_id()].
122 */
123 #define SQLITE_VERSION "3.14.2"
124 #define SQLITE_VERSION_NUMBER 3014002
125 #define SQLITE_SOURCE_ID "2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6"
126
127 /*
128 ** CAPI3REF: Run-Time Library Version Numbers
129 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
130 **
@@ -153,13 +153,13 @@
153 ** [SQLITE_SOURCE_ID] C preprocessor macro.
154 **
155 ** See also: [sqlite_version()] and [sqlite_source_id()].
156 */
157 SQLITE_API SQLITE_EXTERN const char sqlite3_version[];
158 SQLITE_API const char *sqlite3_libversion(void);
159 SQLITE_API const char *sqlite3_sourceid(void);
160 SQLITE_API int sqlite3_libversion_number(void);
161
162 /*
163 ** CAPI3REF: Run-Time Library Compilation Options Diagnostics
164 **
165 ** ^The sqlite3_compileoption_used() function returns 0 or 1
@@ -180,12 +180,12 @@
180 **
181 ** See also: SQL functions [sqlite_compileoption_used()] and
182 ** [sqlite_compileoption_get()] and the [compile_options pragma].
183 */
184 #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
185 SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
186 SQLITE_API const char *sqlite3_compileoption_get(int N);
187 #endif
188
189 /*
190 ** CAPI3REF: Test To See If The Library Is Threadsafe
191 **
@@ -220,11 +220,11 @@
220 ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
221 ** is unchanged by calls to sqlite3_config().)^
222 **
223 ** See the [threading mode] documentation for additional information.
224 */
225 SQLITE_API int sqlite3_threadsafe(void);
226
227 /*
228 ** CAPI3REF: Database Connection Handle
229 ** KEYWORDS: {database connection} {database connections}
230 **
@@ -317,12 +317,12 @@
317 ** from [sqlite3_open()], [sqlite3_open16()], or
318 ** [sqlite3_open_v2()], and not previously closed.
319 ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
320 ** argument is a harmless no-op.
321 */
322 SQLITE_API int sqlite3_close(sqlite3*);
323 SQLITE_API int sqlite3_close_v2(sqlite3*);
324
325 /*
326 ** The type for a callback function.
327 ** This is legacy and deprecated. It is included for historical
328 ** compatibility and is not documented.
@@ -389,11 +389,11 @@
389 ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
390 ** <li> The application must not modify the SQL statement text passed into
391 ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
392 ** </ul>
393 */
394 SQLITE_API int sqlite3_exec(
395 sqlite3*, /* An open database */
396 const char *sql, /* SQL to be evaluated */
397 int (*callback)(void*,int,char**,char**), /* Callback function */
398 void *, /* 1st argument to callback */
399 char **errmsg /* Error msg written here */
@@ -1388,14 +1388,14 @@
1388 ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied
1389 ** implementation of sqlite3_os_init() or sqlite3_os_end()
1390 ** must return [SQLITE_OK] on success and some other [error code] upon
1391 ** failure.
1392 */
1393 SQLITE_API int sqlite3_initialize(void);
1394 SQLITE_API int sqlite3_shutdown(void);
1395 SQLITE_API int sqlite3_os_init(void);
1396 SQLITE_API int sqlite3_os_end(void);
1397
1398 /*
1399 ** CAPI3REF: Configuring The SQLite Library
1400 **
1401 ** The sqlite3_config() interface is used to make global configuration
@@ -1424,11 +1424,11 @@
1424 **
1425 ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
1426 ** ^If the option is unknown or SQLite is unable to set the option
1427 ** then this routine returns a non-zero [error code].
1428 */
1429 SQLITE_API int sqlite3_config(int, ...);
1430
1431 /*
1432 ** CAPI3REF: Configure database connections
1433 ** METHOD: sqlite3
1434 **
@@ -1443,11 +1443,11 @@
1443 ** Subsequent arguments vary depending on the configuration verb.
1444 **
1445 ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
1446 ** the call is considered successful.
1447 */
1448 SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
1449
1450 /*
1451 ** CAPI3REF: Memory Allocation Routines
1452 **
1453 ** An instance of this object defines the interface between SQLite
@@ -1984,11 +1984,11 @@
1984 **
1985 ** ^The sqlite3_extended_result_codes() routine enables or disables the
1986 ** [extended result codes] feature of SQLite. ^The extended result
1987 ** codes are disabled by default for historical compatibility.
1988 */
1989 SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
1990
1991 /*
1992 ** CAPI3REF: Last Insert Rowid
1993 ** METHOD: sqlite3
1994 **
@@ -2036,11 +2036,11 @@
2036 ** function is running and thus changes the last insert [rowid],
2037 ** then the value returned by [sqlite3_last_insert_rowid()] is
2038 ** unpredictable and might not equal either the old or the new
2039 ** last insert [rowid].
2040 */
2041 SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
2042
2043 /*
2044 ** CAPI3REF: Count The Number Of Rows Modified
2045 ** METHOD: sqlite3
2046 **
@@ -2089,11 +2089,11 @@
2089 **
2090 ** If a separate thread makes changes on the same database connection
2091 ** while [sqlite3_changes()] is running then the value returned
2092 ** is unpredictable and not meaningful.
2093 */
2094 SQLITE_API int sqlite3_changes(sqlite3*);
2095
2096 /*
2097 ** CAPI3REF: Total Number Of Rows Modified
2098 ** METHOD: sqlite3
2099 **
@@ -2113,11 +2113,11 @@
2113 **
2114 ** If a separate thread makes changes on the same database connection
2115 ** while [sqlite3_total_changes()] is running then the value
2116 ** returned is unpredictable and not meaningful.
2117 */
2118 SQLITE_API int sqlite3_total_changes(sqlite3*);
2119
2120 /*
2121 ** CAPI3REF: Interrupt A Long-Running Query
2122 ** METHOD: sqlite3
2123 **
@@ -2153,11 +2153,11 @@
2153 ** that are started after the sqlite3_interrupt() call returns.
2154 **
2155 ** If the database connection closes while [sqlite3_interrupt()]
2156 ** is running then bad things will likely happen.
2157 */
2158 SQLITE_API void sqlite3_interrupt(sqlite3*);
2159
2160 /*
2161 ** CAPI3REF: Determine If An SQL Statement Is Complete
2162 **
2163 ** These routines are useful during command-line input to determine if the
@@ -2188,12 +2188,12 @@
2188 ** UTF-8 string.
2189 **
2190 ** The input to [sqlite3_complete16()] must be a zero-terminated
2191 ** UTF-16 string in native byte order.
2192 */
2193 SQLITE_API int sqlite3_complete(const char *sql);
2194 SQLITE_API int sqlite3_complete16(const void *sql);
2195
2196 /*
2197 ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
2198 ** KEYWORDS: {busy-handler callback} {busy handler}
2199 ** METHOD: sqlite3
@@ -2250,11 +2250,11 @@
2250 ** result in undefined behavior.
2251 **
2252 ** A busy handler must not close the database connection
2253 ** or [prepared statement] that invoked the busy handler.
2254 */
2255 SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2256
2257 /*
2258 ** CAPI3REF: Set A Busy Timeout
2259 ** METHOD: sqlite3
2260 **
@@ -2273,11 +2273,11 @@
2273 ** was defined (using [sqlite3_busy_handler()]) prior to calling
2274 ** this routine, that other busy handler is cleared.)^
2275 **
2276 ** See also: [PRAGMA busy_timeout]
2277 */
2278 SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
2279
2280 /*
2281 ** CAPI3REF: Convenience Routines For Running Queries
2282 ** METHOD: sqlite3
2283 **
@@ -2348,19 +2348,19 @@
2348 ** interface defined here. As a consequence, errors that occur in the
2349 ** wrapper layer outside of the internal [sqlite3_exec()] call are not
2350 ** reflected in subsequent calls to [sqlite3_errcode()] or
2351 ** [sqlite3_errmsg()].
2352 */
2353 SQLITE_API int sqlite3_get_table(
2354 sqlite3 *db, /* An open database */
2355 const char *zSql, /* SQL to be evaluated */
2356 char ***pazResult, /* Results of the query */
2357 int *pnRow, /* Number of result rows written here */
2358 int *pnColumn, /* Number of result columns written here */
2359 char **pzErrmsg /* Error msg written here */
2360 );
2361 SQLITE_API void sqlite3_free_table(char **result);
2362
2363 /*
2364 ** CAPI3REF: Formatted String Printing Functions
2365 **
2366 ** These routines are work-alikes of the "printf()" family of functions
@@ -2462,14 +2462,14 @@
2462 **
2463 ** ^(The "%z" formatting option works like "%s" but with the
2464 ** addition that after the string has been read and copied into
2465 ** the result, [sqlite3_free()] is called on the input string.)^
2466 */
2467 SQLITE_API char *sqlite3_mprintf(const char*,...);
2468 SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
2469 SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
2470 SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
2471
2472 /*
2473 ** CAPI3REF: Memory Allocation Subsystem
2474 **
2475 ** The SQLite core uses these three routines for all of its own
@@ -2555,16 +2555,16 @@
2555 **
2556 ** The application must not read or write any part of
2557 ** a block of memory after it has been released using
2558 ** [sqlite3_free()] or [sqlite3_realloc()].
2559 */
2560 SQLITE_API void *sqlite3_malloc(int);
2561 SQLITE_API void *sqlite3_malloc64(sqlite3_uint64);
2562 SQLITE_API void *sqlite3_realloc(void*, int);
2563 SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64);
2564 SQLITE_API void sqlite3_free(void*);
2565 SQLITE_API sqlite3_uint64 sqlite3_msize(void*);
2566
2567 /*
2568 ** CAPI3REF: Memory Allocator Statistics
2569 **
2570 ** SQLite provides these two interfaces for reporting on the status
@@ -2585,12 +2585,12 @@
2585 ** [sqlite3_memory_used()] if and only if the parameter to
2586 ** [sqlite3_memory_highwater()] is true. ^The value returned
2587 ** by [sqlite3_memory_highwater(1)] is the high-water mark
2588 ** prior to the reset.
2589 */
2590 SQLITE_API sqlite3_int64 sqlite3_memory_used(void);
2591 SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
2592
2593 /*
2594 ** CAPI3REF: Pseudo-Random Number Generator
2595 **
2596 ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
@@ -2609,11 +2609,11 @@
2609 ** ^If the previous call to this routine had an N of 1 or more and a
2610 ** non-NULL P then the pseudo-randomness is generated
2611 ** internally and without recourse to the [sqlite3_vfs] xRandomness
2612 ** method.
2613 */
2614 SQLITE_API void sqlite3_randomness(int N, void *P);
2615
2616 /*
2617 ** CAPI3REF: Compile-Time Authorization Callbacks
2618 ** METHOD: sqlite3
2619 **
@@ -2692,11 +2692,11 @@
2692 ** [sqlite3_prepare()] or its variants. Authorization is not
2693 ** performed during statement evaluation in [sqlite3_step()], unless
2694 ** as stated in the previous paragraph, sqlite3_step() invokes
2695 ** sqlite3_prepare_v2() to reprepare a statement after a schema change.
2696 */
2697 SQLITE_API int sqlite3_set_authorizer(
2698 sqlite3*,
2699 int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
2700 void *pUserData
2701 );
2702
@@ -2800,13 +2800,13 @@
2800 ** digits in the time are meaningless. Future versions of SQLite
2801 ** might provide greater resolution on the profiler callback. The
2802 ** sqlite3_profile() function is considered experimental and is
2803 ** subject to change in future versions of SQLite.
2804 */
2805 SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,
2806 void(*xTrace)(void*,const char*), void*);
2807 SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
2808 void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
2809
2810 /*
2811 ** CAPI3REF: SQL Trace Event Codes
2812 ** KEYWORDS: SQLITE_TRACE
@@ -2891,11 +2891,11 @@
2891 **
2892 ** The sqlite3_trace_v2() interface is intended to replace the legacy
2893 ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
2894 ** are deprecated.
2895 */
2896 SQLITE_API int sqlite3_trace_v2(
2897 sqlite3*,
2898 unsigned uMask,
2899 int(*xCallback)(unsigned,void*,void*,void*),
2900 void *pCtx
2901 );
@@ -2930,11 +2930,11 @@
2930 ** the database connection that invoked the progress handler.
2931 ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
2932 ** database connections for the meaning of "modify" in this paragraph.
2933 **
2934 */
2935 SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
2936
2937 /*
2938 ** CAPI3REF: Opening A New Database Connection
2939 ** CONSTRUCTOR: sqlite3
2940 **
@@ -3159,19 +3159,19 @@
3159 ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
3160 ** features that require the use of temporary files may fail.
3161 **
3162 ** See also: [sqlite3_temp_directory]
3163 */
3164 SQLITE_API int sqlite3_open(
3165 const char *filename, /* Database filename (UTF-8) */
3166 sqlite3 **ppDb /* OUT: SQLite db handle */
3167 );
3168 SQLITE_API int sqlite3_open16(
3169 const void *filename, /* Database filename (UTF-16) */
3170 sqlite3 **ppDb /* OUT: SQLite db handle */
3171 );
3172 SQLITE_API int sqlite3_open_v2(
3173 const char *filename, /* Database filename (UTF-8) */
3174 sqlite3 **ppDb, /* OUT: SQLite db handle */
3175 int flags, /* Flags */
3176 const char *zVfs /* Name of VFS module to use */
3177 );
@@ -3213,13 +3213,13 @@
3213 ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and
3214 ** is not a database file pathname pointer that SQLite passed into the xOpen
3215 ** VFS method, then the behavior of this routine is undefined and probably
3216 ** undesirable.
3217 */
3218 SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam);
3219 SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
3220 SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
3221
3222
3223 /*
3224 ** CAPI3REF: Error Codes And Messages
3225 ** METHOD: sqlite3
@@ -3259,15 +3259,15 @@
3259 **
3260 ** If an interface fails with SQLITE_MISUSE, that means the interface
3261 ** was invoked incorrectly by the application. In that case, the
3262 ** error code and message may or may not be set.
3263 */
3264 SQLITE_API int sqlite3_errcode(sqlite3 *db);
3265 SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
3266 SQLITE_API const char *sqlite3_errmsg(sqlite3*);
3267 SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
3268 SQLITE_API const char *sqlite3_errstr(int);
3269
3270 /*
3271 ** CAPI3REF: Prepared Statement Object
3272 ** KEYWORDS: {prepared statement} {prepared statements}
3273 **
@@ -3331,11 +3331,11 @@
3331 ** created by an untrusted script can be contained using the
3332 ** [max_page_count] [PRAGMA].
3333 **
3334 ** New run-time limit categories may be added in future releases.
3335 */
3336 SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
3337
3338 /*
3339 ** CAPI3REF: Run-Time Limit Categories
3340 ** KEYWORDS: {limit category} {*limit categories}
3341 **
@@ -3483,32 +3483,32 @@
3483 ** or [GLOB] operator or if the parameter is compared to an indexed column
3484 ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
3485 ** </li>
3486 ** </ol>
3487 */
3488 SQLITE_API int sqlite3_prepare(
3489 sqlite3 *db, /* Database handle */
3490 const char *zSql, /* SQL statement, UTF-8 encoded */
3491 int nByte, /* Maximum length of zSql in bytes. */
3492 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3493 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3494 );
3495 SQLITE_API int sqlite3_prepare_v2(
3496 sqlite3 *db, /* Database handle */
3497 const char *zSql, /* SQL statement, UTF-8 encoded */
3498 int nByte, /* Maximum length of zSql in bytes. */
3499 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3500 const char **pzTail /* OUT: Pointer to unused portion of zSql */
3501 );
3502 SQLITE_API int sqlite3_prepare16(
3503 sqlite3 *db, /* Database handle */
3504 const void *zSql, /* SQL statement, UTF-16 encoded */
3505 int nByte, /* Maximum length of zSql in bytes. */
3506 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3507 const void **pzTail /* OUT: Pointer to unused portion of zSql */
3508 );
3509 SQLITE_API int sqlite3_prepare16_v2(
3510 sqlite3 *db, /* Database handle */
3511 const void *zSql, /* SQL statement, UTF-16 encoded */
3512 int nByte, /* Maximum length of zSql in bytes. */
3513 sqlite3_stmt **ppStmt, /* OUT: Statement handle */
3514 const void **pzTail /* OUT: Pointer to unused portion of zSql */
@@ -3543,12 +3543,12 @@
3543 ** automatically freed when the prepared statement is finalized.
3544 ** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
3545 ** is obtained from [sqlite3_malloc()] and must be free by the application
3546 ** by passing it to [sqlite3_free()].
3547 */
3548 SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
3549 SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt);
3550
3551 /*
3552 ** CAPI3REF: Determine If An SQL Statement Writes The Database
3553 ** METHOD: sqlite3_stmt
3554 **
@@ -3576,11 +3576,11 @@
3576 ** database. ^The [ATTACH] and [DETACH] statements also cause
3577 ** sqlite3_stmt_readonly() to return true since, while those statements
3578 ** change the configuration of a database connection, they do not make
3579 ** changes to the content of the database files on disk.
3580 */
3581 SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
3582
3583 /*
3584 ** CAPI3REF: Determine If A Prepared Statement Has Been Reset
3585 ** METHOD: sqlite3_stmt
3586 **
@@ -3597,11 +3597,11 @@
3597 ** to locate all prepared statements associated with a database
3598 ** connection that are in need of being reset. This can be used,
3599 ** for example, in diagnostic routines to search for prepared
3600 ** statements that are holding a transaction open.
3601 */
3602 SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
3603
3604 /*
3605 ** CAPI3REF: Dynamically Typed Value Object
3606 ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
3607 **
@@ -3761,24 +3761,24 @@
3761 ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
3762 **
3763 ** See also: [sqlite3_bind_parameter_count()],
3764 ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
3765 */
3766 SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
3767 SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
3768 void(*)(void*));
3769 SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
3770 SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
3771 SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
3772 SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
3773 SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
3774 SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
3775 SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
3776 void(*)(void*), unsigned char encoding);
3777 SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
3778 SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
3779 SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
3780
3781 /*
3782 ** CAPI3REF: Number Of SQL Parameters
3783 ** METHOD: sqlite3_stmt
3784 **
@@ -3795,11 +3795,11 @@
3795 **
3796 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
3797 ** [sqlite3_bind_parameter_name()], and
3798 ** [sqlite3_bind_parameter_index()].
3799 */
3800 SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
3801
3802 /*
3803 ** CAPI3REF: Name Of A Host Parameter
3804 ** METHOD: sqlite3_stmt
3805 **
@@ -3823,11 +3823,11 @@
3823 **
3824 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
3825 ** [sqlite3_bind_parameter_count()], and
3826 ** [sqlite3_bind_parameter_index()].
3827 */
3828 SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
3829
3830 /*
3831 ** CAPI3REF: Index Of A Parameter With A Given Name
3832 ** METHOD: sqlite3_stmt
3833 **
@@ -3840,21 +3840,21 @@
3840 **
3841 ** See also: [sqlite3_bind_blob|sqlite3_bind()],
3842 ** [sqlite3_bind_parameter_count()], and
3843 ** [sqlite3_bind_parameter_name()].
3844 */
3845 SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
3846
3847 /*
3848 ** CAPI3REF: Reset All Bindings On A Prepared Statement
3849 ** METHOD: sqlite3_stmt
3850 **
3851 ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
3852 ** the [sqlite3_bind_blob | bindings] on a [prepared statement].
3853 ** ^Use this routine to reset all host parameters to NULL.
3854 */
3855 SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
3856
3857 /*
3858 ** CAPI3REF: Number Of Columns In A Result Set
3859 ** METHOD: sqlite3_stmt
3860 **
@@ -3862,11 +3862,11 @@
3862 ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
3863 ** statement that does not return data (for example an [UPDATE]).
3864 **
3865 ** See also: [sqlite3_data_count()]
3866 */
3867 SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
3868
3869 /*
3870 ** CAPI3REF: Column Names In A Result Set
3871 ** METHOD: sqlite3_stmt
3872 **
@@ -3891,12 +3891,12 @@
3891 ** ^The name of a result column is the value of the "AS" clause for
3892 ** that column, if there is an AS clause. If there is no AS clause
3893 ** then the name of the column is unspecified and may change from
3894 ** one release of SQLite to the next.
3895 */
3896 SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
3897 SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
3898
3899 /*
3900 ** CAPI3REF: Source Of Data In A Query Result
3901 ** METHOD: sqlite3_stmt
3902 **
@@ -3940,16 +3940,16 @@
3940 ** If two or more threads call one or more
3941 ** [sqlite3_column_database_name | column metadata interfaces]
3942 ** for the same [prepared statement] and result column
3943 ** at the same time then the results are undefined.
3944 */
3945 SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
3946 SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
3947 SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
3948 SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
3949 SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
3950 SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
3951
3952 /*
3953 ** CAPI3REF: Declared Datatype Of A Query Result
3954 ** METHOD: sqlite3_stmt
3955 **
@@ -3977,12 +3977,12 @@
3977 ** data stored in that column is of the declared type. SQLite is
3978 ** strongly typed, but the typing is dynamic not static. ^Type
3979 ** is associated with individual values, not with the containers
3980 ** used to hold those values.
3981 */
3982 SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
3983 SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
3984
3985 /*
3986 ** CAPI3REF: Evaluate An SQL Statement
3987 ** METHOD: sqlite3_stmt
3988 **
@@ -4058,11 +4058,11 @@
4058 ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
4059 ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
4060 ** then the more specific [error codes] are returned directly
4061 ** by sqlite3_step(). The use of the "v2" interface is recommended.
4062 */
4063 SQLITE_API int sqlite3_step(sqlite3_stmt*);
4064
4065 /*
4066 ** CAPI3REF: Number of columns in a result set
4067 ** METHOD: sqlite3_stmt
4068 **
@@ -4079,11 +4079,11 @@
4079 ** where it always returns zero since each step of that multi-step
4080 ** pragma returns 0 columns of data.
4081 **
4082 ** See also: [sqlite3_column_count()]
4083 */
4084 SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
4085
4086 /*
4087 ** CAPI3REF: Fundamental Datatypes
4088 ** KEYWORDS: SQLITE_TEXT
4089 **
@@ -4269,20 +4269,20 @@
4269 ** of these routines, a default value is returned. The default value
4270 ** is either the integer 0, the floating point number 0.0, or a NULL
4271 ** pointer. Subsequent calls to [sqlite3_errcode()] will return
4272 ** [SQLITE_NOMEM].)^
4273 */
4274 SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
4275 SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
4276 SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
4277 SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
4278 SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
4279 SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
4280 SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
4281 SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
4282 SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
4283 SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
4284
4285 /*
4286 ** CAPI3REF: Destroy A Prepared Statement Object
4287 ** DESTRUCTOR: sqlite3_stmt
4288 **
@@ -4306,11 +4306,11 @@
4306 ** resource leaks. It is a grievous error for the application to try to use
4307 ** a prepared statement after it has been finalized. Any use of a prepared
4308 ** statement after it has been finalized can result in undefined and
4309 ** undesirable behavior such as segfaults and heap corruption.
4310 */
4311 SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
4312
4313 /*
4314 ** CAPI3REF: Reset A Prepared Statement Object
4315 ** METHOD: sqlite3_stmt
4316 **
@@ -4333,11 +4333,11 @@
4333 ** [sqlite3_reset(S)] returns an appropriate [error code].
4334 **
4335 ** ^The [sqlite3_reset(S)] interface does not change the values
4336 ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
4337 */
4338 SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
4339
4340 /*
4341 ** CAPI3REF: Create Or Redefine SQL Functions
4342 ** KEYWORDS: {function creation routines}
4343 ** KEYWORDS: {application-defined SQL function}
@@ -4433,31 +4433,31 @@
4433 ** ^An application-defined function is permitted to call other
4434 ** SQLite interfaces. However, such calls must not
4435 ** close the database connection nor finalize or reset the prepared
4436 ** statement in which the function is running.
4437 */
4438 SQLITE_API int sqlite3_create_function(
4439 sqlite3 *db,
4440 const char *zFunctionName,
4441 int nArg,
4442 int eTextRep,
4443 void *pApp,
4444 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4445 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4446 void (*xFinal)(sqlite3_context*)
4447 );
4448 SQLITE_API int sqlite3_create_function16(
4449 sqlite3 *db,
4450 const void *zFunctionName,
4451 int nArg,
4452 int eTextRep,
4453 void *pApp,
4454 void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
4455 void (*xStep)(sqlite3_context*,int,sqlite3_value**),
4456 void (*xFinal)(sqlite3_context*)
4457 );
4458 SQLITE_API int sqlite3_create_function_v2(
4459 sqlite3 *db,
4460 const char *zFunctionName,
4461 int nArg,
4462 int eTextRep,
4463 void *pApp,
@@ -4499,16 +4499,16 @@
4499 ** to be supported. However, new applications should avoid
4500 ** the use of these functions. To encourage programmers to avoid
4501 ** these functions, we will not explain what they do.
4502 */
4503 #ifndef SQLITE_OMIT_DEPRECATED
4504 SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
4505 SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
4506 SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
4507 SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
4508 SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
4509 SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
4510 void*,sqlite3_int64);
4511 #endif
4512
4513 /*
4514 ** CAPI3REF: Obtaining SQL Values
@@ -4554,22 +4554,22 @@
4554 ** or [sqlite3_value_text16()].
4555 **
4556 ** These routines must be called from the same thread as
4557 ** the SQL function that supplied the [sqlite3_value*] parameters.
4558 */
4559 SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
4560 SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
4561 SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
4562 SQLITE_API double sqlite3_value_double(sqlite3_value*);
4563 SQLITE_API int sqlite3_value_int(sqlite3_value*);
4564 SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
4565 SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
4566 SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
4567 SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
4568 SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
4569 SQLITE_API int sqlite3_value_type(sqlite3_value*);
4570 SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
4571
4572 /*
4573 ** CAPI3REF: Finding The Subtype Of SQL Values
4574 ** METHOD: sqlite3_value
4575 **
@@ -4581,11 +4581,11 @@
4581 **
4582 ** SQLite makes no use of subtype itself. It merely passes the subtype
4583 ** from the result of one [application-defined SQL function] into the
4584 ** input of another.
4585 */
4586 SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
4587
4588 /*
4589 ** CAPI3REF: Copy And Free SQL Values
4590 ** METHOD: sqlite3_value
4591 **
@@ -4597,12 +4597,12 @@
4597 **
4598 ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
4599 ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
4600 ** then sqlite3_value_free(V) is a harmless no-op.
4601 */
4602 SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*);
4603 SQLITE_API void sqlite3_value_free(sqlite3_value*);
4604
4605 /*
4606 ** CAPI3REF: Obtain Aggregate Function Context
4607 ** METHOD: sqlite3_context
4608 **
@@ -4643,11 +4643,11 @@
4643 ** function.
4644 **
4645 ** This routine must be called from the same thread in which
4646 ** the aggregate SQL function is running.
4647 */
4648 SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
4649
4650 /*
4651 ** CAPI3REF: User Data For Functions
4652 ** METHOD: sqlite3_context
4653 **
@@ -4658,11 +4658,11 @@
4658 ** registered the application defined function.
4659 **
4660 ** This routine must be called from the same thread in which
4661 ** the application-defined function is running.
4662 */
4663 SQLITE_API void *sqlite3_user_data(sqlite3_context*);
4664
4665 /*
4666 ** CAPI3REF: Database Connection For Functions
4667 ** METHOD: sqlite3_context
4668 **
@@ -4670,11 +4670,11 @@
4670 ** the pointer to the [database connection] (the 1st parameter)
4671 ** of the [sqlite3_create_function()]
4672 ** and [sqlite3_create_function16()] routines that originally
4673 ** registered the application defined function.
4674 */
4675 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
4676
4677 /*
4678 ** CAPI3REF: Function Auxiliary Data
4679 ** METHOD: sqlite3_context
4680 **
@@ -4724,12 +4724,12 @@
4724 ** values and [parameters] and expressions composed from the same.)^
4725 **
4726 ** These routines must be called from the same thread in which
4727 ** the SQL function is running.
4728 */
4729 SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
4730 SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
4731
4732
4733 /*
4734 ** CAPI3REF: Constants Defining Special Destructor Behavior
4735 **
@@ -4861,31 +4861,31 @@
4861 **
4862 ** If these routines are called from within the different thread
4863 ** than the one containing the application-defined function that received
4864 ** the [sqlite3_context] pointer, the results are undefined.
4865 */
4866 SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
4867 SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,
4868 sqlite3_uint64,void(*)(void*));
4869 SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
4870 SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
4871 SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
4872 SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
4873 SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
4874 SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
4875 SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
4876 SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
4877 SQLITE_API void sqlite3_result_null(sqlite3_context*);
4878 SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
4879 SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
4880 void(*)(void*), unsigned char encoding);
4881 SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
4882 SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
4883 SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
4884 SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
4885 SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
4886 SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
4887
4888
4889 /*
4890 ** CAPI3REF: Setting The Subtype Of An SQL Function
4891 ** METHOD: sqlite3_context
@@ -4896,11 +4896,11 @@
4896 ** of the subtype T are preserved in current versions of SQLite;
4897 ** higher order bits are discarded.
4898 ** The number of subtype bytes preserved by SQLite might increase
4899 ** in future releases of SQLite.
4900 */
4901 SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
4902
4903 /*
4904 ** CAPI3REF: Define New Collating Sequences
4905 ** METHOD: sqlite3
4906 **
@@ -4978,26 +4978,26 @@
4978 ** is unfortunate but cannot be changed without breaking backwards
4979 ** compatibility.
4980 **
4981 ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
4982 */
4983 SQLITE_API int sqlite3_create_collation(
4984 sqlite3*,
4985 const char *zName,
4986 int eTextRep,
4987 void *pArg,
4988 int(*xCompare)(void*,int,const void*,int,const void*)
4989 );
4990 SQLITE_API int sqlite3_create_collation_v2(
4991 sqlite3*,
4992 const char *zName,
4993 int eTextRep,
4994 void *pArg,
4995 int(*xCompare)(void*,int,const void*,int,const void*),
4996 void(*xDestroy)(void*)
4997 );
4998 SQLITE_API int sqlite3_create_collation16(
4999 sqlite3*,
5000 const void *zName,
5001 int eTextRep,
5002 void *pArg,
5003 int(*xCompare)(void*,int,const void*,int,const void*)
@@ -5028,16 +5028,16 @@
5028 **
5029 ** The callback function should register the desired collation using
5030 ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
5031 ** [sqlite3_create_collation_v2()].
5032 */
5033 SQLITE_API int sqlite3_collation_needed(
5034 sqlite3*,
5035 void*,
5036 void(*)(void*,sqlite3*,int eTextRep,const char*)
5037 );
5038 SQLITE_API int sqlite3_collation_needed16(
5039 sqlite3*,
5040 void*,
5041 void(*)(void*,sqlite3*,int eTextRep,const void*)
5042 );
5043
@@ -5047,15 +5047,15 @@
5047 ** called right after sqlite3_open().
5048 **
5049 ** The code to implement this API is not available in the public release
5050 ** of SQLite.
5051 */
5052 SQLITE_API int sqlite3_key(
5053 sqlite3 *db, /* Database to be rekeyed */
5054 const void *pKey, int nKey /* The key */
5055 );
5056 SQLITE_API int sqlite3_key_v2(
5057 sqlite3 *db, /* Database to be rekeyed */
5058 const char *zDbName, /* Name of the database */
5059 const void *pKey, int nKey /* The key */
5060 );
5061
@@ -5065,35 +5065,35 @@
5065 ** database is decrypted.
5066 **
5067 ** The code to implement this API is not available in the public release
5068 ** of SQLite.
5069 */
5070 SQLITE_API int sqlite3_rekey(
5071 sqlite3 *db, /* Database to be rekeyed */
5072 const void *pKey, int nKey /* The new key */
5073 );
5074 SQLITE_API int sqlite3_rekey_v2(
5075 sqlite3 *db, /* Database to be rekeyed */
5076 const char *zDbName, /* Name of the database */
5077 const void *pKey, int nKey /* The new key */
5078 );
5079
5080 /*
5081 ** Specify the activation key for a SEE database. Unless
5082 ** activated, none of the SEE routines will work.
5083 */
5084 SQLITE_API void sqlite3_activate_see(
5085 const char *zPassPhrase /* Activation phrase */
5086 );
5087 #endif
5088
5089 #ifdef SQLITE_ENABLE_CEROD
5090 /*
5091 ** Specify the activation key for a CEROD database. Unless
5092 ** activated, none of the CEROD routines will work.
5093 */
5094 SQLITE_API void sqlite3_activate_cerod(
5095 const char *zPassPhrase /* Activation phrase */
5096 );
5097 #endif
5098
5099 /*
@@ -5111,11 +5111,11 @@
5111 ** method of the default [sqlite3_vfs] object. If the xSleep() method
5112 ** of the default VFS is not implemented correctly, or not implemented at
5113 ** all, then the behavior of sqlite3_sleep() may deviate from the description
5114 ** in the previous paragraphs.
5115 */
5116 SQLITE_API int sqlite3_sleep(int);
5117
5118 /*
5119 ** CAPI3REF: Name Of The Folder Holding Temporary Files
5120 **
5121 ** ^(If this global variable is made to point to a string which is
@@ -5230,11 +5230,11 @@
5230 **
5231 ** If another thread changes the autocommit status of the database
5232 ** connection while this routine is running, then the return value
5233 ** is undefined.
5234 */
5235 SQLITE_API int sqlite3_get_autocommit(sqlite3*);
5236
5237 /*
5238 ** CAPI3REF: Find The Database Handle Of A Prepared Statement
5239 ** METHOD: sqlite3_stmt
5240 **
@@ -5243,11 +5243,11 @@
5243 ** returned by sqlite3_db_handle is the same [database connection]
5244 ** that was the first argument
5245 ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
5246 ** create the statement in the first place.
5247 */
5248 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
5249
5250 /*
5251 ** CAPI3REF: Return The Filename For A Database Connection
5252 ** METHOD: sqlite3
5253 **
@@ -5260,21 +5260,21 @@
5260 ** ^The filename returned by this function is the output of the
5261 ** xFullPathname method of the [VFS]. ^In other words, the filename
5262 ** will be an absolute pathname, even if the filename used
5263 ** to open the database originally was a URI or relative pathname.
5264 */
5265 SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);
5266
5267 /*
5268 ** CAPI3REF: Determine if a database is read-only
5269 ** METHOD: sqlite3
5270 **
5271 ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N
5272 ** of connection D is read-only, 0 if it is read/write, or -1 if N is not
5273 ** the name of a database on connection D.
5274 */
5275 SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
5276
5277 /*
5278 ** CAPI3REF: Find the next prepared statement
5279 ** METHOD: sqlite3
5280 **
@@ -5286,11 +5286,11 @@
5286 **
5287 ** The [database connection] pointer D in a call to
5288 ** [sqlite3_next_stmt(D,S)] must refer to an open database
5289 ** connection and in particular must not be a NULL pointer.
5290 */
5291 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
5292
5293 /*
5294 ** CAPI3REF: Commit And Rollback Notification Callbacks
5295 ** METHOD: sqlite3
5296 **
@@ -5335,12 +5335,12 @@
5335 ** ^The rollback callback is not invoked if a transaction is
5336 ** automatically rolled back because the database connection is closed.
5337 **
5338 ** See also the [sqlite3_update_hook()] interface.
5339 */
5340 SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
5341 SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
5342
5343 /*
5344 ** CAPI3REF: Data Change Notification Callbacks
5345 ** METHOD: sqlite3
5346 **
@@ -5387,11 +5387,11 @@
5387 ** the first call on D.
5388 **
5389 ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
5390 ** and [sqlite3_preupdate_hook()] interfaces.
5391 */
5392 SQLITE_API void *sqlite3_update_hook(
5393 sqlite3*,
5394 void(*)(void *,int ,char const *,char const *,sqlite3_int64),
5395 void*
5396 );
5397
@@ -5427,11 +5427,11 @@
5427 ** This interface is threadsafe on processors where writing a
5428 ** 32-bit integer is atomic.
5429 **
5430 ** See Also: [SQLite Shared-Cache Mode]
5431 */
5432 SQLITE_API int sqlite3_enable_shared_cache(int);
5433
5434 /*
5435 ** CAPI3REF: Attempt To Free Heap Memory
5436 **
5437 ** ^The sqlite3_release_memory() interface attempts to free N bytes
@@ -5443,11 +5443,11 @@
5443 ** ^The sqlite3_release_memory() routine is a no-op returning zero
5444 ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5445 **
5446 ** See also: [sqlite3_db_release_memory()]
5447 */
5448 SQLITE_API int sqlite3_release_memory(int);
5449
5450 /*
5451 ** CAPI3REF: Free Memory Used By A Database Connection
5452 ** METHOD: sqlite3
5453 **
@@ -5457,11 +5457,11 @@
5457 ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is
5458 ** omitted.
5459 **
5460 ** See also: [sqlite3_release_memory()]
5461 */
5462 SQLITE_API int sqlite3_db_release_memory(sqlite3*);
5463
5464 /*
5465 ** CAPI3REF: Impose A Limit On Heap Size
5466 **
5467 ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
@@ -5509,11 +5509,11 @@
5509 ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT].
5510 **
5511 ** The circumstances under which SQLite will enforce the soft heap limit may
5512 ** changes in future releases of SQLite.
5513 */
5514 SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
5515
5516 /*
5517 ** CAPI3REF: Deprecated Soft Heap Limit Interface
5518 ** DEPRECATED
5519 **
@@ -5520,11 +5520,11 @@
5520 ** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
5521 ** interface. This routine is provided for historical compatibility
5522 ** only. All new applications should use the
5523 ** [sqlite3_soft_heap_limit64()] interface rather than this one.
5524 */
5525 SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
5526
5527
5528 /*
5529 ** CAPI3REF: Extract Metadata About A Column Of A Table
5530 ** METHOD: sqlite3
@@ -5590,11 +5590,11 @@
5590 **
5591 ** ^This function causes all database schemas to be read from disk and
5592 ** parsed, if that has not already been done, and returns an error if
5593 ** any errors are encountered while loading the schema.
5594 */
5595 SQLITE_API int sqlite3_table_column_metadata(
5596 sqlite3 *db, /* Connection handle */
5597 const char *zDbName, /* Database name or NULL */
5598 const char *zTableName, /* Table name */
5599 const char *zColumnName, /* Column name */
5600 char const **pzDataType, /* OUTPUT: Declared data type */
@@ -5646,11 +5646,11 @@
5646 ** disabled and prevent SQL injections from giving attackers
5647 ** access to extension loading capabilities.
5648 **
5649 ** See also the [load_extension() SQL function].
5650 */
5651 SQLITE_API int sqlite3_load_extension(
5652 sqlite3 *db, /* Load the extension into this database connection */
5653 const char *zFile, /* Name of the shared library containing extension */
5654 const char *zProc, /* Entry point. Derived from zFile if 0 */
5655 char **pzErrMsg /* Put error message here if not 0 */
5656 );
@@ -5678,11 +5678,11 @@
5678 ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
5679 ** rather than this interface, so the [load_extension()] SQL function
5680 ** remains disabled. This will prevent SQL injections from giving attackers
5681 ** access to extension loading capabilities.
5682 */
5683 SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
5684
5685 /*
5686 ** CAPI3REF: Automatically Load Statically Linked Extensions
5687 **
5688 ** ^This interface causes the xEntryPoint() function to be invoked for
@@ -5716,11 +5716,11 @@
5716 ** will be called more than once for each database connection that is opened.
5717 **
5718 ** See also: [sqlite3_reset_auto_extension()]
5719 ** and [sqlite3_cancel_auto_extension()]
5720 */
5721 SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
5722
5723 /*
5724 ** CAPI3REF: Cancel Automatic Extension Loading
5725 **
5726 ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the
@@ -5728,19 +5728,19 @@
5728 ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)]
5729 ** routine returns 1 if initialization routine X was successfully
5730 ** unregistered and it returns 0 if X was not on the list of initialization
5731 ** routines.
5732 */
5733 SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
5734
5735 /*
5736 ** CAPI3REF: Reset Automatic Extension Loading
5737 **
5738 ** ^This interface disables all automatic extensions previously
5739 ** registered using [sqlite3_auto_extension()].
5740 */
5741 SQLITE_API void sqlite3_reset_auto_extension(void);
5742
5743 /*
5744 ** The interface to the virtual-table mechanism is currently considered
5745 ** to be experimental. The interface might change in incompatible ways.
5746 ** If this is a problem for you, do not use the interface at this time.
@@ -5981,17 +5981,17 @@
5981 ** be invoked if the call to sqlite3_create_module_v2() fails.
5982 ** ^The sqlite3_create_module()
5983 ** interface is equivalent to sqlite3_create_module_v2() with a NULL
5984 ** destructor.
5985 */
5986 SQLITE_API int sqlite3_create_module(
5987 sqlite3 *db, /* SQLite connection to register module with */
5988 const char *zName, /* Name of the module */
5989 const sqlite3_module *p, /* Methods for the module */
5990 void *pClientData /* Client data for xCreate/xConnect */
5991 );
5992 SQLITE_API int sqlite3_create_module_v2(
5993 sqlite3 *db, /* SQLite connection to register module with */
5994 const char *zName, /* Name of the module */
5995 const sqlite3_module *p, /* Methods for the module */
5996 void *pClientData, /* Client data for xCreate/xConnect */
5997 void(*xDestroy)(void*) /* Module destructor function */
@@ -6050,11 +6050,11 @@
6050 ** ^The [xCreate] and [xConnect] methods of a
6051 ** [virtual table module] call this interface
6052 ** to declare the format (the names and datatypes of the columns) of
6053 ** the virtual tables they implement.
6054 */
6055 SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
6056
6057 /*
6058 ** CAPI3REF: Overload A Function For A Virtual Table
6059 ** METHOD: sqlite3
6060 **
@@ -6069,11 +6069,11 @@
6069 ** of the new function always causes an exception to be thrown. So
6070 ** the new function is not good for anything by itself. Its only
6071 ** purpose is to be a placeholder function that can be overloaded
6072 ** by a [virtual table].
6073 */
6074 SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
6075
6076 /*
6077 ** The interface to the virtual-table mechanism defined above (back up
6078 ** to a comment remarkably similar to this one) is currently considered
6079 ** to be experimental. The interface might change in incompatible ways.
@@ -6168,11 +6168,11 @@
6168 ** zero-filled blob to read or write using the incremental-blob interface.
6169 **
6170 ** To avoid a resource leak, every open [BLOB handle] should eventually
6171 ** be released by a call to [sqlite3_blob_close()].
6172 */
6173 SQLITE_API int sqlite3_blob_open(
6174 sqlite3*,
6175 const char *zDb,
6176 const char *zTable,
6177 const char *zColumn,
6178 sqlite3_int64 iRow,
@@ -6201,11 +6201,11 @@
6201 ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
6202 ** always returns zero.
6203 **
6204 ** ^This function sets the database handle error code and message.
6205 */
6206 SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
6207
6208 /*
6209 ** CAPI3REF: Close A BLOB Handle
6210 ** DESTRUCTOR: sqlite3_blob
6211 **
@@ -6224,11 +6224,11 @@
6224 ** with a null pointer (such as would be returned by a failed call to
6225 ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
6226 ** is passed a valid open blob handle, the values returned by the
6227 ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
6228 */
6229 SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
6230
6231 /*
6232 ** CAPI3REF: Return The Size Of An Open BLOB
6233 ** METHOD: sqlite3_blob
6234 **
@@ -6240,11 +6240,11 @@
6240 ** This routine only works on a [BLOB handle] which has been created
6241 ** by a prior successful call to [sqlite3_blob_open()] and which has not
6242 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6243 ** to this routine results in undefined and probably undesirable behavior.
6244 */
6245 SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
6246
6247 /*
6248 ** CAPI3REF: Read Data From A BLOB Incrementally
6249 ** METHOD: sqlite3_blob
6250 **
@@ -6269,11 +6269,11 @@
6269 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6270 ** to this routine results in undefined and probably undesirable behavior.
6271 **
6272 ** See also: [sqlite3_blob_write()].
6273 */
6274 SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
6275
6276 /*
6277 ** CAPI3REF: Write Data Into A BLOB Incrementally
6278 ** METHOD: sqlite3_blob
6279 **
@@ -6311,11 +6311,11 @@
6311 ** been closed by [sqlite3_blob_close()]. Passing any other pointer in
6312 ** to this routine results in undefined and probably undesirable behavior.
6313 **
6314 ** See also: [sqlite3_blob_read()].
6315 */
6316 SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
6317
6318 /*
6319 ** CAPI3REF: Virtual File System Objects
6320 **
6321 ** A virtual filesystem (VFS) is an [sqlite3_vfs] object
@@ -6342,13 +6342,13 @@
6342 **
6343 ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
6344 ** ^(If the default VFS is unregistered, another VFS is chosen as
6345 ** the default. The choice for the new VFS is arbitrary.)^
6346 */
6347 SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
6348 SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
6349 SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
6350
6351 /*
6352 ** CAPI3REF: Mutexes
6353 **
6354 ** The SQLite core uses these routines for thread
@@ -6460,15 +6460,15 @@
6460 ** sqlite3_mutex_leave() is a NULL pointer, then all three routines
6461 ** behave as no-ops.
6462 **
6463 ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
6464 */
6465 SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
6466 SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
6467 SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
6468 SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
6469 SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
6470
6471 /*
6472 ** CAPI3REF: Mutex Methods Object
6473 **
6474 ** An instance of this structure defines the low-level routines
@@ -6574,12 +6574,12 @@
6574 ** call to sqlite3_mutex_held() to fail, so a non-zero return is
6575 ** the appropriate thing to do. The sqlite3_mutex_notheld()
6576 ** interface should also return 1 when given a NULL pointer.
6577 */
6578 #ifndef NDEBUG
6579 SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
6580 SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
6581 #endif
6582
6583 /*
6584 ** CAPI3REF: Mutex Types
6585 **
@@ -6615,11 +6615,11 @@
6615 ** serializes access to the [database connection] given in the argument
6616 ** when the [threading mode] is Serialized.
6617 ** ^If the [threading mode] is Single-thread or Multi-thread then this
6618 ** routine returns a NULL pointer.
6619 */
6620 SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
6621
6622 /*
6623 ** CAPI3REF: Low-Level Control Of Database Files
6624 ** METHOD: sqlite3
6625 **
@@ -6650,11 +6650,11 @@
6650 ** an incorrect zDbName and an SQLITE_ERROR return from the underlying
6651 ** xFileControl method.
6652 **
6653 ** See also: [SQLITE_FCNTL_LOCKSTATE]
6654 */
6655 SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
6656
6657 /*
6658 ** CAPI3REF: Testing Interface
6659 **
6660 ** ^The sqlite3_test_control() interface is used to read out internal
@@ -6669,11 +6669,11 @@
6669 ** The details of the operation codes, their meanings, the parameters
6670 ** they take, and what they do are all subject to change without notice.
6671 ** Unlike most of the SQLite API, this function is not guaranteed to
6672 ** operate consistently from one release to the next.
6673 */
6674 SQLITE_API int sqlite3_test_control(int op, ...);
6675
6676 /*
6677 ** CAPI3REF: Testing Interface Operation Codes
6678 **
6679 ** These constants are the valid operation code parameters used
@@ -6732,12 +6732,12 @@
6732 ** be represented by a 32-bit integer, then the values returned by
6733 ** sqlite3_status() are undefined.
6734 **
6735 ** See also: [sqlite3_db_status()]
6736 */
6737 SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
6738 SQLITE_API int sqlite3_status64(
6739 int op,
6740 sqlite3_int64 *pCurrent,
6741 sqlite3_int64 *pHighwater,
6742 int resetFlag
6743 );
@@ -6858,11 +6858,11 @@
6858 ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
6859 ** non-zero [error code] on failure.
6860 **
6861 ** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
6862 */
6863 SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
6864
6865 /*
6866 ** CAPI3REF: Status Parameters for database connections
6867 ** KEYWORDS: {SQLITE_DBSTATUS options}
6868 **
@@ -7001,11 +7001,11 @@
7001 ** ^If the resetFlg is true, then the counter is reset to zero after this
7002 ** interface call returns.
7003 **
7004 ** See also: [sqlite3_status()] and [sqlite3_db_status()].
7005 */
7006 SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
7007
7008 /*
7009 ** CAPI3REF: Status Parameters for prepared statements
7010 ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters}
7011 **
@@ -7470,20 +7470,20 @@
7470 ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
7471 ** APIs are not strictly speaking threadsafe. If they are invoked at the
7472 ** same time as another thread is invoking sqlite3_backup_step() it is
7473 ** possible that they return invalid values.
7474 */
7475 SQLITE_API sqlite3_backup *sqlite3_backup_init(
7476 sqlite3 *pDest, /* Destination database handle */
7477 const char *zDestName, /* Destination database name */
7478 sqlite3 *pSource, /* Source database handle */
7479 const char *zSourceName /* Source database name */
7480 );
7481 SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
7482 SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
7483 SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);
7484 SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
7485
7486 /*
7487 ** CAPI3REF: Unlock Notification
7488 ** METHOD: sqlite3
7489 **
@@ -7596,11 +7596,11 @@
7596 ** by an sqlite3_step() call. ^(If there is a blocking connection, then the
7597 ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
7598 ** the special "DROP TABLE/INDEX" case, the extended error code is just
7599 ** SQLITE_LOCKED.)^
7600 */
7601 SQLITE_API int sqlite3_unlock_notify(
7602 sqlite3 *pBlocked, /* Waiting connection */
7603 void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
7604 void *pNotifyArg /* Argument to pass to xNotify */
7605 );
7606
@@ -7611,12 +7611,12 @@
7611 ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications
7612 ** and extensions to compare the contents of two buffers containing UTF-8
7613 ** strings in a case-independent fashion, using the same definition of "case
7614 ** independence" that SQLite uses internally when comparing identifiers.
7615 */
7616 SQLITE_API int sqlite3_stricmp(const char *, const char *);
7617 SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
7618
7619 /*
7620 ** CAPI3REF: String Globbing
7621 *
7622 ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if
@@ -7629,11 +7629,11 @@
7629 ** Note that this routine returns zero on a match and non-zero if the strings
7630 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7631 **
7632 ** See also: [sqlite3_strlike()].
7633 */
7634 SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
7635
7636 /*
7637 ** CAPI3REF: String LIKE Matching
7638 *
7639 ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if
@@ -7652,11 +7652,11 @@
7652 ** Note that this routine returns zero on a match and non-zero if the strings
7653 ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
7654 **
7655 ** See also: [sqlite3_strglob()].
7656 */
7657 SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
7658
7659 /*
7660 ** CAPI3REF: Error Logging Interface
7661 **
7662 ** ^The [sqlite3_log()] interface writes a message into the [error log]
@@ -7675,11 +7675,11 @@
7675 ** will not use dynamically allocated memory. The log message is stored in
7676 ** a fixed-length buffer on the stack. If the log message is longer than
7677 ** a few hundred characters, it will be truncated to the length of the
7678 ** buffer.
7679 */
7680 SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
7681
7682 /*
7683 ** CAPI3REF: Write-Ahead Log Commit Hook
7684 ** METHOD: sqlite3
7685 **
@@ -7711,11 +7711,11 @@
7711 ** previously registered write-ahead log callback. ^Note that the
7712 ** [sqlite3_wal_autocheckpoint()] interface and the
7713 ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
7714 ** overwrite any prior [sqlite3_wal_hook()] settings.
7715 */
7716 SQLITE_API void *sqlite3_wal_hook(
7717 sqlite3*,
7718 int(*)(void *,sqlite3*,const char*,int),
7719 void*
7720 );
7721
@@ -7746,11 +7746,11 @@
7746 ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
7747 ** pages. The use of this interface
7748 ** is only necessary if the default setting is found to be suboptimal
7749 ** for a particular application.
7750 */
7751 SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
7752
7753 /*
7754 ** CAPI3REF: Checkpoint a database
7755 ** METHOD: sqlite3
7756 **
@@ -7768,11 +7768,11 @@
7768 ** interface was added. This interface is retained for backwards
7769 ** compatibility and as a convenience for applications that need to manually
7770 ** start a callback but which do not need the full power (and corresponding
7771 ** complication) of [sqlite3_wal_checkpoint_v2()].
7772 */
7773 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
7774
7775 /*
7776 ** CAPI3REF: Checkpoint a database
7777 ** METHOD: sqlite3
7778 **
@@ -7862,11 +7862,11 @@
7862 ** [sqlite3_errcode()] and [sqlite3_errmsg()].
7863 **
7864 ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
7865 ** from SQL.
7866 */
7867 SQLITE_API int sqlite3_wal_checkpoint_v2(
7868 sqlite3 *db, /* Database handle */
7869 const char *zDb, /* Name of attached database (or NULL) */
7870 int eMode, /* SQLITE_CHECKPOINT_* value */
7871 int *pnLog, /* OUT: Size of WAL log in frames */
7872 int *pnCkpt /* OUT: Total number of frames checkpointed */
@@ -7898,11 +7898,11 @@
7898 **
7899 ** At present, there is only one option that may be configured using
7900 ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
7901 ** may be added in the future.
7902 */
7903 SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
7904
7905 /*
7906 ** CAPI3REF: Virtual Table Configuration Options
7907 **
7908 ** These macros define the various options to the
@@ -7951,11 +7951,11 @@
7951 ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],
7952 ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode
7953 ** of the SQL statement that triggered the call to the [xUpdate] method of the
7954 ** [virtual table].
7955 */
7956 SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
7957
7958 /*
7959 ** CAPI3REF: Conflict resolution modes
7960 ** KEYWORDS: {conflict resolution mode}
7961 **
@@ -8056,11 +8056,11 @@
8056 ** as if the loop did not exist - it returns non-zero and leave the variable
8057 ** that pOut points to unchanged.
8058 **
8059 ** See also: [sqlite3_stmt_scanstatus_reset()]
8060 */
8061 SQLITE_API int sqlite3_stmt_scanstatus(
8062 sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
8063 int idx, /* Index of loop to report on */
8064 int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
8065 void *pOut /* Result written here */
8066 );
@@ -8072,11 +8072,11 @@
8072 ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
8073 **
8074 ** This API is only available if the library is built with pre-processor
8075 ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
8076 */
8077 SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
8078
8079 /*
8080 ** CAPI3REF: Flush caches to disk mid-transaction
8081 **
8082 ** ^If a write-transaction is open on [database connection] D when the
@@ -8104,11 +8104,11 @@
8104 ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.
8105 **
8106 ** ^This function does not set the database handle error code or message
8107 ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
8108 */
8109 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
8110
8111 /*
8112 ** CAPI3REF: The pre-update hook.
8113 **
8114 ** ^These interfaces are only available if SQLite is compiled using the
@@ -8184,11 +8184,11 @@
8184 ** triggers; or 2 for changes resulting from triggers called by top-level
8185 ** triggers; and so forth.
8186 **
8187 ** See also: [sqlite3_update_hook()]
8188 */
8189 SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook(
8190 sqlite3 *db,
8191 void(*xPreUpdate)(
8192 void *pCtx, /* Copy of third arg to preupdate_hook() */
8193 sqlite3 *db, /* Database handle */
8194 int op, /* SQLITE_UPDATE, DELETE or INSERT */
@@ -8197,14 +8197,14 @@
8197 sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
8198 sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
8199 ),
8200 void*
8201 );
8202 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
8203 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_count(sqlite3 *);
8204 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_depth(sqlite3 *);
8205 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
8206
8207 /*
8208 ** CAPI3REF: Low-level system error code
8209 **
8210 ** ^Attempt to return the underlying operating system error code or error
@@ -8212,11 +8212,11 @@
8212 ** The return value is OS-dependent. For example, on unix systems, after
8213 ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
8214 ** called to get back the underlying "errno" that caused the problem, such
8215 ** as ENOSPC, EAUTH, EISDIR, and so forth.
8216 */
8217 SQLITE_API int sqlite3_system_errno(sqlite3*);
8218
8219 /*
8220 ** CAPI3REF: Database Snapshot
8221 ** KEYWORDS: {snapshot}
8222 ** EXPERIMENTAL
@@ -8262,11 +8262,11 @@
8262 ** to avoid a memory leak.
8263 **
8264 ** The [sqlite3_snapshot_get()] interface is only available when the
8265 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8266 */
8267 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
8268 sqlite3 *db,
8269 const char *zSchema,
8270 sqlite3_snapshot **ppSnapshot
8271 );
8272
@@ -8300,11 +8300,11 @@
8300 ** database connection in order to make it ready to use snapshots.)
8301 **
8302 ** The [sqlite3_snapshot_open()] interface is only available when the
8303 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8304 */
8305 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
8306 sqlite3 *db,
8307 const char *zSchema,
8308 sqlite3_snapshot *pSnapshot
8309 );
8310
@@ -8317,11 +8317,11 @@
8317 ** using this routine to avoid a memory leak.
8318 **
8319 ** The [sqlite3_snapshot_free()] interface is only available when the
8320 ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
8321 */
8322 SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
8323
8324 /*
8325 ** CAPI3REF: Compare the ages of two snapshot handles.
8326 ** EXPERIMENTAL
8327 **
@@ -8341,11 +8341,11 @@
8341 **
8342 ** Otherwise, this API returns a negative value if P1 refers to an older
8343 ** snapshot than P2, zero if the two handles refer to the same database
8344 ** snapshot, and a positive value if P1 is a newer snapshot than P2.
8345 */
8346 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
8347 sqlite3_snapshot *p1,
8348 sqlite3_snapshot *p2
8349 );
8350
8351 /*
@@ -8399,11 +8399,11 @@
8399 ** Register a geometry callback named zGeom that can be used as part of an
8400 ** R-Tree geometry query as follows:
8401 **
8402 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
8403 */
8404 SQLITE_API int sqlite3_rtree_geometry_callback(
8405 sqlite3 *db,
8406 const char *zGeom,
8407 int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
8408 void *pContext
8409 );
@@ -8425,11 +8425,11 @@
8425 ** Register a 2nd-generation geometry callback named zScore that can be
8426 ** used as part of an R-Tree geometry query as follows:
8427 **
8428 ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
8429 */
8430 SQLITE_API int sqlite3_rtree_query_callback(
8431 sqlite3 *db,
8432 const char *zQueryFunc,
8433 int (*xQueryFunc)(sqlite3_rtree_query_info*),
8434 void *pContext,
8435 void (*xDestructor)(void*)
8436
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,11 +83,11 @@
8383
8484
# define the SQLite files, which need special flags on compile
8585
SQLITESRC=sqlite3.c
8686
ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
8787
SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88
-SQLITEDEFINES=-DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 -DSQLITE_WIN32_NO_ANSI
88
+SQLITEDEFINES=-DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 -DSQLITE_WIN32_NO_ANSI
8989
9090
# define the SQLite shell files, which need special flags on compile
9191
SQLITESHELLSRC=shell.c
9292
ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
9393
SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
9494
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,11 +83,11 @@
83
84 # define the SQLite files, which need special flags on compile
85 SQLITESRC=sqlite3.c
86 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
87 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88 SQLITEDEFINES=-DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 -DSQLITE_WIN32_NO_ANSI
89
90 # define the SQLite shell files, which need special flags on compile
91 SQLITESHELLSRC=shell.c
92 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
93 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,11 +83,11 @@
83
84 # define the SQLite files, which need special flags on compile
85 SQLITESRC=sqlite3.c
86 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
87 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88 SQLITEDEFINES=-DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 -DSQLITE_WIN32_NO_ANSI
89
90 # define the SQLite shell files, which need special flags on compile
91 SQLITESHELLSRC=shell.c
92 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
93 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,11 +83,11 @@
8383
8484
# define the SQLite files, which need special flags on compile
8585
SQLITESRC=sqlite3.c
8686
ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
8787
SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88
-SQLITEDEFINES=-DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 -DSQLITE_WIN32_NO_ANSI
88
+SQLITEDEFINES=-DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 -DSQLITE_WIN32_NO_ANSI
8989
9090
# define the SQLite shell files, which need special flags on compile
9191
SQLITESHELLSRC=shell.c
9292
ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
9393
SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
9494
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,11 +83,11 @@
83
84 # define the SQLite files, which need special flags on compile
85 SQLITESRC=sqlite3.c
86 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
87 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88 SQLITEDEFINES=-DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 -DSQLITE_WIN32_NO_ANSI
89
90 # define the SQLite shell files, which need special flags on compile
91 SQLITESHELLSRC=shell.c
92 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
93 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,11 +83,11 @@
83
84 # define the SQLite files, which need special flags on compile
85 SQLITESRC=sqlite3.c
86 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
87 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88 SQLITEDEFINES=-DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 -DSQLITE_WIN32_NO_ANSI
89
90 # define the SQLite shell files, which need special flags on compile
91 SQLITESHELLSRC=shell.c
92 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
93 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,11 +24,11 @@
2424
CFLAGS = -o
2525
BCC = $(DMDIR)\bin\dmc $(CFLAGS)
2626
TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
2727
LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
2828
29
-SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
29
+SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
3030
3131
SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
3232
3333
SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
3434
3535
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,11 +24,11 @@
24 CFLAGS = -o
25 BCC = $(DMDIR)\bin\dmc $(CFLAGS)
26 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
27 LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
28
29 SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,11 +24,11 @@
24 CFLAGS = -o
25 BCC = $(DMDIR)\bin\dmc $(CFLAGS)
26 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
27 LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
28
29 SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,11 +24,11 @@
2424
CFLAGS = -o
2525
BCC = $(DMDIR)\bin\dmc $(CFLAGS)
2626
TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
2727
LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
2828
29
-SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
29
+SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
3030
3131
SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
3232
3333
SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
3434
3535
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,11 +24,11 @@
24 CFLAGS = -o
25 BCC = $(DMDIR)\bin\dmc $(CFLAGS)
26 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
27 LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
28
29 SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,11 +24,11 @@
24 CFLAGS = -o
25 BCC = $(DMDIR)\bin\dmc $(CFLAGS)
26 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
27 LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
28
29 SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -2130,10 +2130,11 @@
21302130
21312131
MINGW_OPTIONS = -D_HAVE__MINGW_H
21322132
21332133
SQLITE_OPTIONS = -DNDEBUG=1 \
21342134
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
2135
+ -DSQLITE_OMIT_SHARED_CACHE \
21352136
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
21362137
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
21372138
-DSQLITE_THREADSAFE=0 \
21382139
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
21392140
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
21402141
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -2130,10 +2130,11 @@
2130
2131 MINGW_OPTIONS = -D_HAVE__MINGW_H
2132
2133 SQLITE_OPTIONS = -DNDEBUG=1 \
2134 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
2135 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
2136 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
2137 -DSQLITE_THREADSAFE=0 \
2138 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
2139 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
2140
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -2130,10 +2130,11 @@
2130
2131 MINGW_OPTIONS = -D_HAVE__MINGW_H
2132
2133 SQLITE_OPTIONS = -DNDEBUG=1 \
2134 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
2135 -DSQLITE_OMIT_SHARED_CACHE \
2136 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
2137 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
2138 -DSQLITE_THREADSAFE=0 \
2139 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
2140 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
2141
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -2130,10 +2130,11 @@
21302130
21312131
MINGW_OPTIONS = -D_HAVE__MINGW_H
21322132
21332133
SQLITE_OPTIONS = -DNDEBUG=1 \
21342134
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
2135
+ -DSQLITE_OMIT_SHARED_CACHE \
21352136
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
21362137
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
21372138
-DSQLITE_THREADSAFE=0 \
21382139
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
21392140
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
21402141
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -2130,10 +2130,11 @@
2130
2131 MINGW_OPTIONS = -D_HAVE__MINGW_H
2132
2133 SQLITE_OPTIONS = -DNDEBUG=1 \
2134 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
2135 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
2136 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
2137 -DSQLITE_THREADSAFE=0 \
2138 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
2139 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
2140
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -2130,10 +2130,11 @@
2130
2131 MINGW_OPTIONS = -D_HAVE__MINGW_H
2132
2133 SQLITE_OPTIONS = -DNDEBUG=1 \
2134 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
2135 -DSQLITE_OMIT_SHARED_CACHE \
2136 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
2137 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
2138 -DSQLITE_THREADSAFE=0 \
2139 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
2140 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
2141
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -2130,10 +2130,11 @@
21302130
21312131
MINGW_OPTIONS = -D_HAVE__MINGW_H
21322132
21332133
SQLITE_OPTIONS = -DNDEBUG=1 \
21342134
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
2135
+ -DSQLITE_OMIT_SHARED_CACHE \
21352136
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
21362137
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
21372138
-DSQLITE_THREADSAFE=0 \
21382139
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
21392140
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
21402141
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -2130,10 +2130,11 @@
2130
2131 MINGW_OPTIONS = -D_HAVE__MINGW_H
2132
2133 SQLITE_OPTIONS = -DNDEBUG=1 \
2134 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
2135 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
2136 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
2137 -DSQLITE_THREADSAFE=0 \
2138 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
2139 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
2140
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -2130,10 +2130,11 @@
2130
2131 MINGW_OPTIONS = -D_HAVE__MINGW_H
2132
2133 SQLITE_OPTIONS = -DNDEBUG=1 \
2134 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
2135 -DSQLITE_OMIT_SHARED_CACHE \
2136 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
2137 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
2138 -DSQLITE_THREADSAFE=0 \
2139 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
2140 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
2141
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -2130,10 +2130,11 @@
21302130
21312131
MINGW_OPTIONS = -D_HAVE__MINGW_H
21322132
21332133
SQLITE_OPTIONS = -DNDEBUG=1 \
21342134
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
2135
+ -DSQLITE_OMIT_SHARED_CACHE \
21352136
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
21362137
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
21372138
-DSQLITE_THREADSAFE=0 \
21382139
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
21392140
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
21402141
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -2130,10 +2130,11 @@
2130
2131 MINGW_OPTIONS = -D_HAVE__MINGW_H
2132
2133 SQLITE_OPTIONS = -DNDEBUG=1 \
2134 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
2135 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
2136 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
2137 -DSQLITE_THREADSAFE=0 \
2138 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
2139 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
2140
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -2130,10 +2130,11 @@
2130
2131 MINGW_OPTIONS = -D_HAVE__MINGW_H
2132
2133 SQLITE_OPTIONS = -DNDEBUG=1 \
2134 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
2135 -DSQLITE_OMIT_SHARED_CACHE \
2136 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
2137 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
2138 -DSQLITE_THREADSAFE=0 \
2139 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
2140 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
2141
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -313,10 +313,11 @@
313313
RCC = $(RCC) /DUSE_SEE=1
314314
!endif
315315
316316
SQLITE_OPTIONS = /DNDEBUG=1 \
317317
/DSQLITE_OMIT_LOAD_EXTENSION=1 \
318
+ /DSQLITE_OMIT_SHARED_CACHE \
318319
/DSQLITE_ENABLE_LOCKING_STYLE=0 \
319320
/DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
320321
/DSQLITE_THREADSAFE=0 \
321322
/DSQLITE_DEFAULT_FILE_FORMAT=4 \
322323
/DSQLITE_ENABLE_EXPLAIN_COMMENTS \
323324
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -313,10 +313,11 @@
313 RCC = $(RCC) /DUSE_SEE=1
314 !endif
315
316 SQLITE_OPTIONS = /DNDEBUG=1 \
317 /DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
318 /DSQLITE_ENABLE_LOCKING_STYLE=0 \
319 /DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
320 /DSQLITE_THREADSAFE=0 \
321 /DSQLITE_DEFAULT_FILE_FORMAT=4 \
322 /DSQLITE_ENABLE_EXPLAIN_COMMENTS \
323
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -313,10 +313,11 @@
313 RCC = $(RCC) /DUSE_SEE=1
314 !endif
315
316 SQLITE_OPTIONS = /DNDEBUG=1 \
317 /DSQLITE_OMIT_LOAD_EXTENSION=1 \
318 /DSQLITE_OMIT_SHARED_CACHE \
319 /DSQLITE_ENABLE_LOCKING_STYLE=0 \
320 /DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
321 /DSQLITE_THREADSAFE=0 \
322 /DSQLITE_DEFAULT_FILE_FORMAT=4 \
323 /DSQLITE_ENABLE_EXPLAIN_COMMENTS \
324
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -313,10 +313,11 @@
313313
RCC = $(RCC) /DUSE_SEE=1
314314
!endif
315315
316316
SQLITE_OPTIONS = /DNDEBUG=1 \
317317
/DSQLITE_OMIT_LOAD_EXTENSION=1 \
318
+ /DSQLITE_OMIT_SHARED_CACHE \
318319
/DSQLITE_ENABLE_LOCKING_STYLE=0 \
319320
/DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
320321
/DSQLITE_THREADSAFE=0 \
321322
/DSQLITE_DEFAULT_FILE_FORMAT=4 \
322323
/DSQLITE_ENABLE_EXPLAIN_COMMENTS \
323324
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -313,10 +313,11 @@
313 RCC = $(RCC) /DUSE_SEE=1
314 !endif
315
316 SQLITE_OPTIONS = /DNDEBUG=1 \
317 /DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
318 /DSQLITE_ENABLE_LOCKING_STYLE=0 \
319 /DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
320 /DSQLITE_THREADSAFE=0 \
321 /DSQLITE_DEFAULT_FILE_FORMAT=4 \
322 /DSQLITE_ENABLE_EXPLAIN_COMMENTS \
323
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -313,10 +313,11 @@
313 RCC = $(RCC) /DUSE_SEE=1
314 !endif
315
316 SQLITE_OPTIONS = /DNDEBUG=1 \
317 /DSQLITE_OMIT_LOAD_EXTENSION=1 \
318 /DSQLITE_OMIT_SHARED_CACHE \
319 /DSQLITE_ENABLE_LOCKING_STYLE=0 \
320 /DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \
321 /DSQLITE_THREADSAFE=0 \
322 /DSQLITE_DEFAULT_FILE_FORMAT=4 \
323 /DSQLITE_ENABLE_EXPLAIN_COMMENTS \
324

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button