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.
Commit
0417467b72063283c132e596dd83e59edcd85b2f
Parent
e122e8a72d80aa9…
20 files changed
+1
+1
+1
+1
+6
-4
+6
-4
+619
-594
+619
-594
+247
-247
+247
-247
+1
-1
+1
-1
+1
-1
+1
-1
+1
+1
+1
+1
+1
+1
~
src/main.mk
~
src/main.mk
~
src/makemake.tcl
~
src/makemake.tcl
~
src/shell.c
~
src/shell.c
~
src/sqlite3.c
~
src/sqlite3.c
~
src/sqlite3.h
~
src/sqlite3.h
~
win/Makefile.PellesCGMake
~
win/Makefile.PellesCGMake
~
win/Makefile.dmc
~
win/Makefile.dmc
~
win/Makefile.mingw
~
win/Makefile.mingw
~
win/Makefile.mingw.mistachkin
~
win/Makefile.mingw.mistachkin
~
win/Makefile.msc
~
win/Makefile.msc
+1
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -481,10 +481,11 @@ | ||
| 481 | 481 | $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 482 | 482 | |
| 483 | 483 | # Setup the options used to compile the included SQLite library. |
| 484 | 484 | SQLITE_OPTIONS = -DNDEBUG=1 \ |
| 485 | 485 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 486 | + -DSQLITE_OMIT_SHARED_CACHE \ | |
| 486 | 487 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 487 | 488 | -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \ |
| 488 | 489 | -DSQLITE_THREADSAFE=0 \ |
| 489 | 490 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 490 | 491 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 491 | 492 |
| --- 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 |
+1
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -481,10 +481,11 @@ | ||
| 481 | 481 | $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 482 | 482 | |
| 483 | 483 | # Setup the options used to compile the included SQLite library. |
| 484 | 484 | SQLITE_OPTIONS = -DNDEBUG=1 \ |
| 485 | 485 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 486 | + -DSQLITE_OMIT_SHARED_CACHE \ | |
| 486 | 487 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 487 | 488 | -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \ |
| 488 | 489 | -DSQLITE_THREADSAFE=0 \ |
| 489 | 490 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 490 | 491 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 491 | 492 |
| --- 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 |
+1
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -153,10 +153,11 @@ | ||
| 153 | 153 | # Options used to compile the included SQLite library. |
| 154 | 154 | # |
| 155 | 155 | set SQLITE_OPTIONS { |
| 156 | 156 | -DNDEBUG=1 |
| 157 | 157 | -DSQLITE_OMIT_LOAD_EXTENSION=1 |
| 158 | + -DSQLITE_OMIT_SHARED_CACHE | |
| 158 | 159 | -DSQLITE_ENABLE_LOCKING_STYLE=0 |
| 159 | 160 | -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 |
| 160 | 161 | -DSQLITE_THREADSAFE=0 |
| 161 | 162 | -DSQLITE_DEFAULT_FILE_FORMAT=4 |
| 162 | 163 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 163 | 164 |
| --- 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 |
+1
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -153,10 +153,11 @@ | ||
| 153 | 153 | # Options used to compile the included SQLite library. |
| 154 | 154 | # |
| 155 | 155 | set SQLITE_OPTIONS { |
| 156 | 156 | -DNDEBUG=1 |
| 157 | 157 | -DSQLITE_OMIT_LOAD_EXTENSION=1 |
| 158 | + -DSQLITE_OMIT_SHARED_CACHE | |
| 158 | 159 | -DSQLITE_ENABLE_LOCKING_STYLE=0 |
| 159 | 160 | -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 |
| 160 | 161 | -DSQLITE_THREADSAFE=0 |
| 161 | 162 | -DSQLITE_DEFAULT_FILE_FORMAT=4 |
| 162 | 163 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 163 | 164 |
| --- 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 @@ | ||
| 522 | 522 | } |
| 523 | 523 | } |
| 524 | 524 | #if defined(_WIN32) || defined(WIN32) |
| 525 | 525 | /* For interactive input on Windows systems, translate the |
| 526 | 526 | ** multi-byte characterset characters into UTF-8. */ |
| 527 | - if( stdin_is_interactive ){ | |
| 527 | + if( stdin_is_interactive && in==stdin ){ | |
| 528 | 528 | char *zTrans = sqlite3_win32_mbcs_to_utf8_v2(zLine, 0); |
| 529 | 529 | if( zTrans ){ |
| 530 | 530 | int nTrans = strlen30(zTrans)+1; |
| 531 | 531 | if( nTrans>nLine ){ |
| 532 | 532 | zLine = realloc(zLine, nTrans); |
| @@ -2944,14 +2944,14 @@ | ||
| 2944 | 2944 | } |
| 2945 | 2945 | |
| 2946 | 2946 | /* |
| 2947 | 2947 | ** Convert a 2-byte or 4-byte big-endian integer into a native integer |
| 2948 | 2948 | */ |
| 2949 | -unsigned int get2byteInt(unsigned char *a){ | |
| 2949 | +static unsigned int get2byteInt(unsigned char *a){ | |
| 2950 | 2950 | return (a[0]<<8) + a[1]; |
| 2951 | 2951 | } |
| 2952 | -unsigned int get4byteInt(unsigned char *a){ | |
| 2952 | +static unsigned int get4byteInt(unsigned char *a){ | |
| 2953 | 2953 | return (a[0]<<24) + (a[1]<<16) + (a[2]<<8) + a[3]; |
| 2954 | 2954 | } |
| 2955 | 2955 | |
| 2956 | 2956 | /* |
| 2957 | 2957 | ** Implementation of the ".info" command. |
| @@ -4894,11 +4894,11 @@ | ||
| 4894 | 4894 | while( errCnt==0 || !bail_on_error || (in==0 && stdin_is_interactive) ){ |
| 4895 | 4895 | fflush(p->out); |
| 4896 | 4896 | zLine = one_input_line(in, zLine, nSql>0); |
| 4897 | 4897 | if( zLine==0 ){ |
| 4898 | 4898 | /* End of input */ |
| 4899 | - if( stdin_is_interactive ) printf("\n"); | |
| 4899 | + if( in==0 && stdin_is_interactive ) printf("\n"); | |
| 4900 | 4900 | break; |
| 4901 | 4901 | } |
| 4902 | 4902 | if( seenInterrupt ){ |
| 4903 | 4903 | if( in!=0 ) break; |
| 4904 | 4904 | seenInterrupt = 0; |
| @@ -5315,10 +5315,12 @@ | ||
| 5315 | 5315 | |
| 5316 | 5316 | zSize = cmdline_option_value(argc, argv, ++i); |
| 5317 | 5317 | szHeap = integerValue(zSize); |
| 5318 | 5318 | if( szHeap>0x7fff0000 ) szHeap = 0x7fff0000; |
| 5319 | 5319 | sqlite3_config(SQLITE_CONFIG_HEAP, malloc((int)szHeap), (int)szHeap, 64); |
| 5320 | +#else | |
| 5321 | + (void)cmdline_option_value(argc, argv, ++i); | |
| 5320 | 5322 | #endif |
| 5321 | 5323 | }else if( strcmp(z,"-scratch")==0 ){ |
| 5322 | 5324 | int n, sz; |
| 5323 | 5325 | sz = (int)integerValue(cmdline_option_value(argc,argv,++i)); |
| 5324 | 5326 | if( sz>400000 ) sz = 400000; |
| 5325 | 5327 |
| --- 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 @@ | ||
| 522 | 522 | } |
| 523 | 523 | } |
| 524 | 524 | #if defined(_WIN32) || defined(WIN32) |
| 525 | 525 | /* For interactive input on Windows systems, translate the |
| 526 | 526 | ** multi-byte characterset characters into UTF-8. */ |
| 527 | - if( stdin_is_interactive ){ | |
| 527 | + if( stdin_is_interactive && in==stdin ){ | |
| 528 | 528 | char *zTrans = sqlite3_win32_mbcs_to_utf8_v2(zLine, 0); |
| 529 | 529 | if( zTrans ){ |
| 530 | 530 | int nTrans = strlen30(zTrans)+1; |
| 531 | 531 | if( nTrans>nLine ){ |
| 532 | 532 | zLine = realloc(zLine, nTrans); |
| @@ -2944,14 +2944,14 @@ | ||
| 2944 | 2944 | } |
| 2945 | 2945 | |
| 2946 | 2946 | /* |
| 2947 | 2947 | ** Convert a 2-byte or 4-byte big-endian integer into a native integer |
| 2948 | 2948 | */ |
| 2949 | -unsigned int get2byteInt(unsigned char *a){ | |
| 2949 | +static unsigned int get2byteInt(unsigned char *a){ | |
| 2950 | 2950 | return (a[0]<<8) + a[1]; |
| 2951 | 2951 | } |
| 2952 | -unsigned int get4byteInt(unsigned char *a){ | |
| 2952 | +static unsigned int get4byteInt(unsigned char *a){ | |
| 2953 | 2953 | return (a[0]<<24) + (a[1]<<16) + (a[2]<<8) + a[3]; |
| 2954 | 2954 | } |
| 2955 | 2955 | |
| 2956 | 2956 | /* |
| 2957 | 2957 | ** Implementation of the ".info" command. |
| @@ -4894,11 +4894,11 @@ | ||
| 4894 | 4894 | while( errCnt==0 || !bail_on_error || (in==0 && stdin_is_interactive) ){ |
| 4895 | 4895 | fflush(p->out); |
| 4896 | 4896 | zLine = one_input_line(in, zLine, nSql>0); |
| 4897 | 4897 | if( zLine==0 ){ |
| 4898 | 4898 | /* End of input */ |
| 4899 | - if( stdin_is_interactive ) printf("\n"); | |
| 4899 | + if( in==0 && stdin_is_interactive ) printf("\n"); | |
| 4900 | 4900 | break; |
| 4901 | 4901 | } |
| 4902 | 4902 | if( seenInterrupt ){ |
| 4903 | 4903 | if( in!=0 ) break; |
| 4904 | 4904 | seenInterrupt = 0; |
| @@ -5315,10 +5315,12 @@ | ||
| 5315 | 5315 | |
| 5316 | 5316 | zSize = cmdline_option_value(argc, argv, ++i); |
| 5317 | 5317 | szHeap = integerValue(zSize); |
| 5318 | 5318 | if( szHeap>0x7fff0000 ) szHeap = 0x7fff0000; |
| 5319 | 5319 | sqlite3_config(SQLITE_CONFIG_HEAP, malloc((int)szHeap), (int)szHeap, 64); |
| 5320 | +#else | |
| 5321 | + (void)cmdline_option_value(argc, argv, ++i); | |
| 5320 | 5322 | #endif |
| 5321 | 5323 | }else if( strcmp(z,"-scratch")==0 ){ |
| 5322 | 5324 | int n, sz; |
| 5323 | 5325 | sz = (int)integerValue(cmdline_option_value(argc,argv,++i)); |
| 5324 | 5326 | if( sz>400000 ) sz = 400000; |
| 5325 | 5327 |
| --- 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 @@ | ||
| 1 | 1 | /****************************************************************************** |
| 2 | 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 | |
| 3 | +** version 3.14.2. By combining all the individual C code files into this | |
| 4 | 4 | ** single large file, the entire code can be compiled as a single translation |
| 5 | 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | 7 | ** of 5% or more are commonly seen when SQLite is compiled as a single |
| 8 | 8 | ** translation unit. |
| 9 | 9 | ** |
| 10 | 10 | ** This file is all you need to compile SQLite. To use SQLite in other |
| 11 | 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 | |
| 12 | +** the programming interface to the SQLite library. (If you do not have | |
| 13 | 13 | ** the "sqlite3.h" header file at hand, you will find a copy embedded within |
| 14 | 14 | ** the text of this file. Search for "Begin file sqlite3.h" to find the start |
| 15 | 15 | ** of the embedded sqlite3.h header file.) Additional code files may be needed |
| 16 | 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| @@ -378,13 +378,13 @@ | ||
| 378 | 378 | ** |
| 379 | 379 | ** See also: [sqlite3_libversion()], |
| 380 | 380 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 381 | 381 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 382 | 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" | |
| 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 | 386 | |
| 387 | 387 | /* |
| 388 | 388 | ** CAPI3REF: Run-Time Library Version Numbers |
| 389 | 389 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 390 | 390 | ** |
| @@ -413,13 +413,13 @@ | ||
| 413 | 413 | ** [SQLITE_SOURCE_ID] C preprocessor macro. |
| 414 | 414 | ** |
| 415 | 415 | ** See also: [sqlite_version()] and [sqlite_source_id()]. |
| 416 | 416 | */ |
| 417 | 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); | |
| 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 | 421 | |
| 422 | 422 | /* |
| 423 | 423 | ** CAPI3REF: Run-Time Library Compilation Options Diagnostics |
| 424 | 424 | ** |
| 425 | 425 | ** ^The sqlite3_compileoption_used() function returns 0 or 1 |
| @@ -440,12 +440,12 @@ | ||
| 440 | 440 | ** |
| 441 | 441 | ** See also: SQL functions [sqlite_compileoption_used()] and |
| 442 | 442 | ** [sqlite_compileoption_get()] and the [compile_options pragma]. |
| 443 | 443 | */ |
| 444 | 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); | |
| 445 | +SQLITE_API int sqlite3_compileoption_used(const char *zOptName); | |
| 446 | +SQLITE_API const char *sqlite3_compileoption_get(int N); | |
| 447 | 447 | #endif |
| 448 | 448 | |
| 449 | 449 | /* |
| 450 | 450 | ** CAPI3REF: Test To See If The Library Is Threadsafe |
| 451 | 451 | ** |
| @@ -480,11 +480,11 @@ | ||
| 480 | 480 | ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() |
| 481 | 481 | ** is unchanged by calls to sqlite3_config().)^ |
| 482 | 482 | ** |
| 483 | 483 | ** See the [threading mode] documentation for additional information. |
| 484 | 484 | */ |
| 485 | -SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void); | |
| 485 | +SQLITE_API int sqlite3_threadsafe(void); | |
| 486 | 486 | |
| 487 | 487 | /* |
| 488 | 488 | ** CAPI3REF: Database Connection Handle |
| 489 | 489 | ** KEYWORDS: {database connection} {database connections} |
| 490 | 490 | ** |
| @@ -577,12 +577,12 @@ | ||
| 577 | 577 | ** from [sqlite3_open()], [sqlite3_open16()], or |
| 578 | 578 | ** [sqlite3_open_v2()], and not previously closed. |
| 579 | 579 | ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer |
| 580 | 580 | ** argument is a harmless no-op. |
| 581 | 581 | */ |
| 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*); | |
| 584 | 584 | |
| 585 | 585 | /* |
| 586 | 586 | ** The type for a callback function. |
| 587 | 587 | ** This is legacy and deprecated. It is included for historical |
| 588 | 588 | ** compatibility and is not documented. |
| @@ -649,11 +649,11 @@ | ||
| 649 | 649 | ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. |
| 650 | 650 | ** <li> The application must not modify the SQL statement text passed into |
| 651 | 651 | ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. |
| 652 | 652 | ** </ul> |
| 653 | 653 | */ |
| 654 | -SQLITE_API int SQLITE_STDCALL sqlite3_exec( | |
| 654 | +SQLITE_API int sqlite3_exec( | |
| 655 | 655 | sqlite3*, /* An open database */ |
| 656 | 656 | const char *sql, /* SQL to be evaluated */ |
| 657 | 657 | int (*callback)(void*,int,char**,char**), /* Callback function */ |
| 658 | 658 | void *, /* 1st argument to callback */ |
| 659 | 659 | char **errmsg /* Error msg written here */ |
| @@ -1648,14 +1648,14 @@ | ||
| 1648 | 1648 | ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied |
| 1649 | 1649 | ** implementation of sqlite3_os_init() or sqlite3_os_end() |
| 1650 | 1650 | ** must return [SQLITE_OK] on success and some other [error code] upon |
| 1651 | 1651 | ** failure. |
| 1652 | 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); | |
| 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 | 1657 | |
| 1658 | 1658 | /* |
| 1659 | 1659 | ** CAPI3REF: Configuring The SQLite Library |
| 1660 | 1660 | ** |
| 1661 | 1661 | ** The sqlite3_config() interface is used to make global configuration |
| @@ -1684,11 +1684,11 @@ | ||
| 1684 | 1684 | ** |
| 1685 | 1685 | ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. |
| 1686 | 1686 | ** ^If the option is unknown or SQLite is unable to set the option |
| 1687 | 1687 | ** then this routine returns a non-zero [error code]. |
| 1688 | 1688 | */ |
| 1689 | -SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...); | |
| 1689 | +SQLITE_API int sqlite3_config(int, ...); | |
| 1690 | 1690 | |
| 1691 | 1691 | /* |
| 1692 | 1692 | ** CAPI3REF: Configure database connections |
| 1693 | 1693 | ** METHOD: sqlite3 |
| 1694 | 1694 | ** |
| @@ -1703,11 +1703,11 @@ | ||
| 1703 | 1703 | ** Subsequent arguments vary depending on the configuration verb. |
| 1704 | 1704 | ** |
| 1705 | 1705 | ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if |
| 1706 | 1706 | ** the call is considered successful. |
| 1707 | 1707 | */ |
| 1708 | -SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...); | |
| 1708 | +SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...); | |
| 1709 | 1709 | |
| 1710 | 1710 | /* |
| 1711 | 1711 | ** CAPI3REF: Memory Allocation Routines |
| 1712 | 1712 | ** |
| 1713 | 1713 | ** An instance of this object defines the interface between SQLite |
| @@ -2244,11 +2244,11 @@ | ||
| 2244 | 2244 | ** |
| 2245 | 2245 | ** ^The sqlite3_extended_result_codes() routine enables or disables the |
| 2246 | 2246 | ** [extended result codes] feature of SQLite. ^The extended result |
| 2247 | 2247 | ** codes are disabled by default for historical compatibility. |
| 2248 | 2248 | */ |
| 2249 | -SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff); | |
| 2249 | +SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff); | |
| 2250 | 2250 | |
| 2251 | 2251 | /* |
| 2252 | 2252 | ** CAPI3REF: Last Insert Rowid |
| 2253 | 2253 | ** METHOD: sqlite3 |
| 2254 | 2254 | ** |
| @@ -2296,11 +2296,11 @@ | ||
| 2296 | 2296 | ** function is running and thus changes the last insert [rowid], |
| 2297 | 2297 | ** then the value returned by [sqlite3_last_insert_rowid()] is |
| 2298 | 2298 | ** unpredictable and might not equal either the old or the new |
| 2299 | 2299 | ** last insert [rowid]. |
| 2300 | 2300 | */ |
| 2301 | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); | |
| 2301 | +SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); | |
| 2302 | 2302 | |
| 2303 | 2303 | /* |
| 2304 | 2304 | ** CAPI3REF: Count The Number Of Rows Modified |
| 2305 | 2305 | ** METHOD: sqlite3 |
| 2306 | 2306 | ** |
| @@ -2349,11 +2349,11 @@ | ||
| 2349 | 2349 | ** |
| 2350 | 2350 | ** If a separate thread makes changes on the same database connection |
| 2351 | 2351 | ** while [sqlite3_changes()] is running then the value returned |
| 2352 | 2352 | ** is unpredictable and not meaningful. |
| 2353 | 2353 | */ |
| 2354 | -SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*); | |
| 2354 | +SQLITE_API int sqlite3_changes(sqlite3*); | |
| 2355 | 2355 | |
| 2356 | 2356 | /* |
| 2357 | 2357 | ** CAPI3REF: Total Number Of Rows Modified |
| 2358 | 2358 | ** METHOD: sqlite3 |
| 2359 | 2359 | ** |
| @@ -2373,11 +2373,11 @@ | ||
| 2373 | 2373 | ** |
| 2374 | 2374 | ** If a separate thread makes changes on the same database connection |
| 2375 | 2375 | ** while [sqlite3_total_changes()] is running then the value |
| 2376 | 2376 | ** returned is unpredictable and not meaningful. |
| 2377 | 2377 | */ |
| 2378 | -SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*); | |
| 2378 | +SQLITE_API int sqlite3_total_changes(sqlite3*); | |
| 2379 | 2379 | |
| 2380 | 2380 | /* |
| 2381 | 2381 | ** CAPI3REF: Interrupt A Long-Running Query |
| 2382 | 2382 | ** METHOD: sqlite3 |
| 2383 | 2383 | ** |
| @@ -2413,11 +2413,11 @@ | ||
| 2413 | 2413 | ** that are started after the sqlite3_interrupt() call returns. |
| 2414 | 2414 | ** |
| 2415 | 2415 | ** If the database connection closes while [sqlite3_interrupt()] |
| 2416 | 2416 | ** is running then bad things will likely happen. |
| 2417 | 2417 | */ |
| 2418 | -SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*); | |
| 2418 | +SQLITE_API void sqlite3_interrupt(sqlite3*); | |
| 2419 | 2419 | |
| 2420 | 2420 | /* |
| 2421 | 2421 | ** CAPI3REF: Determine If An SQL Statement Is Complete |
| 2422 | 2422 | ** |
| 2423 | 2423 | ** These routines are useful during command-line input to determine if the |
| @@ -2448,12 +2448,12 @@ | ||
| 2448 | 2448 | ** UTF-8 string. |
| 2449 | 2449 | ** |
| 2450 | 2450 | ** The input to [sqlite3_complete16()] must be a zero-terminated |
| 2451 | 2451 | ** UTF-16 string in native byte order. |
| 2452 | 2452 | */ |
| 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); | |
| 2455 | 2455 | |
| 2456 | 2456 | /* |
| 2457 | 2457 | ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors |
| 2458 | 2458 | ** KEYWORDS: {busy-handler callback} {busy handler} |
| 2459 | 2459 | ** METHOD: sqlite3 |
| @@ -2510,11 +2510,11 @@ | ||
| 2510 | 2510 | ** result in undefined behavior. |
| 2511 | 2511 | ** |
| 2512 | 2512 | ** A busy handler must not close the database connection |
| 2513 | 2513 | ** or [prepared statement] that invoked the busy handler. |
| 2514 | 2514 | */ |
| 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*); | |
| 2516 | 2516 | |
| 2517 | 2517 | /* |
| 2518 | 2518 | ** CAPI3REF: Set A Busy Timeout |
| 2519 | 2519 | ** METHOD: sqlite3 |
| 2520 | 2520 | ** |
| @@ -2533,11 +2533,11 @@ | ||
| 2533 | 2533 | ** was defined (using [sqlite3_busy_handler()]) prior to calling |
| 2534 | 2534 | ** this routine, that other busy handler is cleared.)^ |
| 2535 | 2535 | ** |
| 2536 | 2536 | ** See also: [PRAGMA busy_timeout] |
| 2537 | 2537 | */ |
| 2538 | -SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms); | |
| 2538 | +SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms); | |
| 2539 | 2539 | |
| 2540 | 2540 | /* |
| 2541 | 2541 | ** CAPI3REF: Convenience Routines For Running Queries |
| 2542 | 2542 | ** METHOD: sqlite3 |
| 2543 | 2543 | ** |
| @@ -2608,19 +2608,19 @@ | ||
| 2608 | 2608 | ** interface defined here. As a consequence, errors that occur in the |
| 2609 | 2609 | ** wrapper layer outside of the internal [sqlite3_exec()] call are not |
| 2610 | 2610 | ** reflected in subsequent calls to [sqlite3_errcode()] or |
| 2611 | 2611 | ** [sqlite3_errmsg()]. |
| 2612 | 2612 | */ |
| 2613 | -SQLITE_API int SQLITE_STDCALL sqlite3_get_table( | |
| 2613 | +SQLITE_API int sqlite3_get_table( | |
| 2614 | 2614 | sqlite3 *db, /* An open database */ |
| 2615 | 2615 | const char *zSql, /* SQL to be evaluated */ |
| 2616 | 2616 | char ***pazResult, /* Results of the query */ |
| 2617 | 2617 | int *pnRow, /* Number of result rows written here */ |
| 2618 | 2618 | int *pnColumn, /* Number of result columns written here */ |
| 2619 | 2619 | char **pzErrmsg /* Error msg written here */ |
| 2620 | 2620 | ); |
| 2621 | -SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result); | |
| 2621 | +SQLITE_API void sqlite3_free_table(char **result); | |
| 2622 | 2622 | |
| 2623 | 2623 | /* |
| 2624 | 2624 | ** CAPI3REF: Formatted String Printing Functions |
| 2625 | 2625 | ** |
| 2626 | 2626 | ** These routines are work-alikes of the "printf()" family of functions |
| @@ -2722,14 +2722,14 @@ | ||
| 2722 | 2722 | ** |
| 2723 | 2723 | ** ^(The "%z" formatting option works like "%s" but with the |
| 2724 | 2724 | ** addition that after the string has been read and copied into |
| 2725 | 2725 | ** the result, [sqlite3_free()] is called on the input string.)^ |
| 2726 | 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); | |
| 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 | 2731 | |
| 2732 | 2732 | /* |
| 2733 | 2733 | ** CAPI3REF: Memory Allocation Subsystem |
| 2734 | 2734 | ** |
| 2735 | 2735 | ** The SQLite core uses these three routines for all of its own |
| @@ -2815,16 +2815,16 @@ | ||
| 2815 | 2815 | ** |
| 2816 | 2816 | ** The application must not read or write any part of |
| 2817 | 2817 | ** a block of memory after it has been released using |
| 2818 | 2818 | ** [sqlite3_free()] or [sqlite3_realloc()]. |
| 2819 | 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*); | |
| 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 | 2826 | |
| 2827 | 2827 | /* |
| 2828 | 2828 | ** CAPI3REF: Memory Allocator Statistics |
| 2829 | 2829 | ** |
| 2830 | 2830 | ** SQLite provides these two interfaces for reporting on the status |
| @@ -2845,12 +2845,12 @@ | ||
| 2845 | 2845 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 2846 | 2846 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| 2847 | 2847 | ** by [sqlite3_memory_highwater(1)] is the high-water mark |
| 2848 | 2848 | ** prior to the reset. |
| 2849 | 2849 | */ |
| 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); | |
| 2852 | 2852 | |
| 2853 | 2853 | /* |
| 2854 | 2854 | ** CAPI3REF: Pseudo-Random Number Generator |
| 2855 | 2855 | ** |
| 2856 | 2856 | ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to |
| @@ -2869,11 +2869,11 @@ | ||
| 2869 | 2869 | ** ^If the previous call to this routine had an N of 1 or more and a |
| 2870 | 2870 | ** non-NULL P then the pseudo-randomness is generated |
| 2871 | 2871 | ** internally and without recourse to the [sqlite3_vfs] xRandomness |
| 2872 | 2872 | ** method. |
| 2873 | 2873 | */ |
| 2874 | -SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P); | |
| 2874 | +SQLITE_API void sqlite3_randomness(int N, void *P); | |
| 2875 | 2875 | |
| 2876 | 2876 | /* |
| 2877 | 2877 | ** CAPI3REF: Compile-Time Authorization Callbacks |
| 2878 | 2878 | ** METHOD: sqlite3 |
| 2879 | 2879 | ** |
| @@ -2952,11 +2952,11 @@ | ||
| 2952 | 2952 | ** [sqlite3_prepare()] or its variants. Authorization is not |
| 2953 | 2953 | ** performed during statement evaluation in [sqlite3_step()], unless |
| 2954 | 2954 | ** as stated in the previous paragraph, sqlite3_step() invokes |
| 2955 | 2955 | ** sqlite3_prepare_v2() to reprepare a statement after a schema change. |
| 2956 | 2956 | */ |
| 2957 | -SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( | |
| 2957 | +SQLITE_API int sqlite3_set_authorizer( | |
| 2958 | 2958 | sqlite3*, |
| 2959 | 2959 | int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 2960 | 2960 | void *pUserData |
| 2961 | 2961 | ); |
| 2962 | 2962 | |
| @@ -3060,13 +3060,13 @@ | ||
| 3060 | 3060 | ** digits in the time are meaningless. Future versions of SQLite |
| 3061 | 3061 | ** might provide greater resolution on the profiler callback. The |
| 3062 | 3062 | ** sqlite3_profile() function is considered experimental and is |
| 3063 | 3063 | ** subject to change in future versions of SQLite. |
| 3064 | 3064 | */ |
| 3065 | -SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*, | |
| 3065 | +SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*, | |
| 3066 | 3066 | 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*, | |
| 3068 | 3068 | void(*xProfile)(void*,const char*,sqlite3_uint64), void*); |
| 3069 | 3069 | |
| 3070 | 3070 | /* |
| 3071 | 3071 | ** CAPI3REF: SQL Trace Event Codes |
| 3072 | 3072 | ** KEYWORDS: SQLITE_TRACE |
| @@ -3151,11 +3151,11 @@ | ||
| 3151 | 3151 | ** |
| 3152 | 3152 | ** The sqlite3_trace_v2() interface is intended to replace the legacy |
| 3153 | 3153 | ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which |
| 3154 | 3154 | ** are deprecated. |
| 3155 | 3155 | */ |
| 3156 | -SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2( | |
| 3156 | +SQLITE_API int sqlite3_trace_v2( | |
| 3157 | 3157 | sqlite3*, |
| 3158 | 3158 | unsigned uMask, |
| 3159 | 3159 | int(*xCallback)(unsigned,void*,void*,void*), |
| 3160 | 3160 | void *pCtx |
| 3161 | 3161 | ); |
| @@ -3190,11 +3190,11 @@ | ||
| 3190 | 3190 | ** the database connection that invoked the progress handler. |
| 3191 | 3191 | ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their |
| 3192 | 3192 | ** database connections for the meaning of "modify" in this paragraph. |
| 3193 | 3193 | ** |
| 3194 | 3194 | */ |
| 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*); | |
| 3196 | 3196 | |
| 3197 | 3197 | /* |
| 3198 | 3198 | ** CAPI3REF: Opening A New Database Connection |
| 3199 | 3199 | ** CONSTRUCTOR: sqlite3 |
| 3200 | 3200 | ** |
| @@ -3419,19 +3419,19 @@ | ||
| 3419 | 3419 | ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various |
| 3420 | 3420 | ** features that require the use of temporary files may fail. |
| 3421 | 3421 | ** |
| 3422 | 3422 | ** See also: [sqlite3_temp_directory] |
| 3423 | 3423 | */ |
| 3424 | -SQLITE_API int SQLITE_STDCALL sqlite3_open( | |
| 3424 | +SQLITE_API int sqlite3_open( | |
| 3425 | 3425 | const char *filename, /* Database filename (UTF-8) */ |
| 3426 | 3426 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3427 | 3427 | ); |
| 3428 | -SQLITE_API int SQLITE_STDCALL sqlite3_open16( | |
| 3428 | +SQLITE_API int sqlite3_open16( | |
| 3429 | 3429 | const void *filename, /* Database filename (UTF-16) */ |
| 3430 | 3430 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3431 | 3431 | ); |
| 3432 | -SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( | |
| 3432 | +SQLITE_API int sqlite3_open_v2( | |
| 3433 | 3433 | const char *filename, /* Database filename (UTF-8) */ |
| 3434 | 3434 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 3435 | 3435 | int flags, /* Flags */ |
| 3436 | 3436 | const char *zVfs /* Name of VFS module to use */ |
| 3437 | 3437 | ); |
| @@ -3473,13 +3473,13 @@ | ||
| 3473 | 3473 | ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and |
| 3474 | 3474 | ** is not a database file pathname pointer that SQLite passed into the xOpen |
| 3475 | 3475 | ** VFS method, then the behavior of this routine is undefined and probably |
| 3476 | 3476 | ** undesirable. |
| 3477 | 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); | |
| 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 | 3481 | |
| 3482 | 3482 | |
| 3483 | 3483 | /* |
| 3484 | 3484 | ** CAPI3REF: Error Codes And Messages |
| 3485 | 3485 | ** METHOD: sqlite3 |
| @@ -3519,15 +3519,15 @@ | ||
| 3519 | 3519 | ** |
| 3520 | 3520 | ** If an interface fails with SQLITE_MISUSE, that means the interface |
| 3521 | 3521 | ** was invoked incorrectly by the application. In that case, the |
| 3522 | 3522 | ** error code and message may or may not be set. |
| 3523 | 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); | |
| 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 | 3529 | |
| 3530 | 3530 | /* |
| 3531 | 3531 | ** CAPI3REF: Prepared Statement Object |
| 3532 | 3532 | ** KEYWORDS: {prepared statement} {prepared statements} |
| 3533 | 3533 | ** |
| @@ -3591,11 +3591,11 @@ | ||
| 3591 | 3591 | ** created by an untrusted script can be contained using the |
| 3592 | 3592 | ** [max_page_count] [PRAGMA]. |
| 3593 | 3593 | ** |
| 3594 | 3594 | ** New run-time limit categories may be added in future releases. |
| 3595 | 3595 | */ |
| 3596 | -SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal); | |
| 3596 | +SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal); | |
| 3597 | 3597 | |
| 3598 | 3598 | /* |
| 3599 | 3599 | ** CAPI3REF: Run-Time Limit Categories |
| 3600 | 3600 | ** KEYWORDS: {limit category} {*limit categories} |
| 3601 | 3601 | ** |
| @@ -3743,32 +3743,32 @@ | ||
| 3743 | 3743 | ** or [GLOB] operator or if the parameter is compared to an indexed column |
| 3744 | 3744 | ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled. |
| 3745 | 3745 | ** </li> |
| 3746 | 3746 | ** </ol> |
| 3747 | 3747 | */ |
| 3748 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare( | |
| 3748 | +SQLITE_API int sqlite3_prepare( | |
| 3749 | 3749 | sqlite3 *db, /* Database handle */ |
| 3750 | 3750 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3751 | 3751 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3752 | 3752 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3753 | 3753 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3754 | 3754 | ); |
| 3755 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( | |
| 3755 | +SQLITE_API int sqlite3_prepare_v2( | |
| 3756 | 3756 | sqlite3 *db, /* Database handle */ |
| 3757 | 3757 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3758 | 3758 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3759 | 3759 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3760 | 3760 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3761 | 3761 | ); |
| 3762 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( | |
| 3762 | +SQLITE_API int sqlite3_prepare16( | |
| 3763 | 3763 | sqlite3 *db, /* Database handle */ |
| 3764 | 3764 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3765 | 3765 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3766 | 3766 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3767 | 3767 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3768 | 3768 | ); |
| 3769 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( | |
| 3769 | +SQLITE_API int sqlite3_prepare16_v2( | |
| 3770 | 3770 | sqlite3 *db, /* Database handle */ |
| 3771 | 3771 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3772 | 3772 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3773 | 3773 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3774 | 3774 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| @@ -3803,12 +3803,12 @@ | ||
| 3803 | 3803 | ** automatically freed when the prepared statement is finalized. |
| 3804 | 3804 | ** ^The string returned by sqlite3_expanded_sql(P), on the other hand, |
| 3805 | 3805 | ** is obtained from [sqlite3_malloc()] and must be free by the application |
| 3806 | 3806 | ** by passing it to [sqlite3_free()]. |
| 3807 | 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); | |
| 3808 | +SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); | |
| 3809 | +SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt); | |
| 3810 | 3810 | |
| 3811 | 3811 | /* |
| 3812 | 3812 | ** CAPI3REF: Determine If An SQL Statement Writes The Database |
| 3813 | 3813 | ** METHOD: sqlite3_stmt |
| 3814 | 3814 | ** |
| @@ -3836,11 +3836,11 @@ | ||
| 3836 | 3836 | ** database. ^The [ATTACH] and [DETACH] statements also cause |
| 3837 | 3837 | ** sqlite3_stmt_readonly() to return true since, while those statements |
| 3838 | 3838 | ** change the configuration of a database connection, they do not make |
| 3839 | 3839 | ** changes to the content of the database files on disk. |
| 3840 | 3840 | */ |
| 3841 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); | |
| 3841 | +SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); | |
| 3842 | 3842 | |
| 3843 | 3843 | /* |
| 3844 | 3844 | ** CAPI3REF: Determine If A Prepared Statement Has Been Reset |
| 3845 | 3845 | ** METHOD: sqlite3_stmt |
| 3846 | 3846 | ** |
| @@ -3857,11 +3857,11 @@ | ||
| 3857 | 3857 | ** to locate all prepared statements associated with a database |
| 3858 | 3858 | ** connection that are in need of being reset. This can be used, |
| 3859 | 3859 | ** for example, in diagnostic routines to search for prepared |
| 3860 | 3860 | ** statements that are holding a transaction open. |
| 3861 | 3861 | */ |
| 3862 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*); | |
| 3862 | +SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*); | |
| 3863 | 3863 | |
| 3864 | 3864 | /* |
| 3865 | 3865 | ** CAPI3REF: Dynamically Typed Value Object |
| 3866 | 3866 | ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} |
| 3867 | 3867 | ** |
| @@ -4021,24 +4021,24 @@ | ||
| 4021 | 4021 | ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. |
| 4022 | 4022 | ** |
| 4023 | 4023 | ** See also: [sqlite3_bind_parameter_count()], |
| 4024 | 4024 | ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. |
| 4025 | 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, | |
| 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 | 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, | |
| 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 | 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); | |
| 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 | 4040 | |
| 4041 | 4041 | /* |
| 4042 | 4042 | ** CAPI3REF: Number Of SQL Parameters |
| 4043 | 4043 | ** METHOD: sqlite3_stmt |
| 4044 | 4044 | ** |
| @@ -4055,11 +4055,11 @@ | ||
| 4055 | 4055 | ** |
| 4056 | 4056 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4057 | 4057 | ** [sqlite3_bind_parameter_name()], and |
| 4058 | 4058 | ** [sqlite3_bind_parameter_index()]. |
| 4059 | 4059 | */ |
| 4060 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*); | |
| 4060 | +SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*); | |
| 4061 | 4061 | |
| 4062 | 4062 | /* |
| 4063 | 4063 | ** CAPI3REF: Name Of A Host Parameter |
| 4064 | 4064 | ** METHOD: sqlite3_stmt |
| 4065 | 4065 | ** |
| @@ -4083,11 +4083,11 @@ | ||
| 4083 | 4083 | ** |
| 4084 | 4084 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4085 | 4085 | ** [sqlite3_bind_parameter_count()], and |
| 4086 | 4086 | ** [sqlite3_bind_parameter_index()]. |
| 4087 | 4087 | */ |
| 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); | |
| 4089 | 4089 | |
| 4090 | 4090 | /* |
| 4091 | 4091 | ** CAPI3REF: Index Of A Parameter With A Given Name |
| 4092 | 4092 | ** METHOD: sqlite3_stmt |
| 4093 | 4093 | ** |
| @@ -4100,21 +4100,21 @@ | ||
| 4100 | 4100 | ** |
| 4101 | 4101 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4102 | 4102 | ** [sqlite3_bind_parameter_count()], and |
| 4103 | 4103 | ** [sqlite3_bind_parameter_name()]. |
| 4104 | 4104 | */ |
| 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); | |
| 4106 | 4106 | |
| 4107 | 4107 | /* |
| 4108 | 4108 | ** CAPI3REF: Reset All Bindings On A Prepared Statement |
| 4109 | 4109 | ** METHOD: sqlite3_stmt |
| 4110 | 4110 | ** |
| 4111 | 4111 | ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset |
| 4112 | 4112 | ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. |
| 4113 | 4113 | ** ^Use this routine to reset all host parameters to NULL. |
| 4114 | 4114 | */ |
| 4115 | -SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*); | |
| 4115 | +SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*); | |
| 4116 | 4116 | |
| 4117 | 4117 | /* |
| 4118 | 4118 | ** CAPI3REF: Number Of Columns In A Result Set |
| 4119 | 4119 | ** METHOD: sqlite3_stmt |
| 4120 | 4120 | ** |
| @@ -4122,11 +4122,11 @@ | ||
| 4122 | 4122 | ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL |
| 4123 | 4123 | ** statement that does not return data (for example an [UPDATE]). |
| 4124 | 4124 | ** |
| 4125 | 4125 | ** See also: [sqlite3_data_count()] |
| 4126 | 4126 | */ |
| 4127 | -SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt); | |
| 4127 | +SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt); | |
| 4128 | 4128 | |
| 4129 | 4129 | /* |
| 4130 | 4130 | ** CAPI3REF: Column Names In A Result Set |
| 4131 | 4131 | ** METHOD: sqlite3_stmt |
| 4132 | 4132 | ** |
| @@ -4151,12 +4151,12 @@ | ||
| 4151 | 4151 | ** ^The name of a result column is the value of the "AS" clause for |
| 4152 | 4152 | ** that column, if there is an AS clause. If there is no AS clause |
| 4153 | 4153 | ** then the name of the column is unspecified and may change from |
| 4154 | 4154 | ** one release of SQLite to the next. |
| 4155 | 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); | |
| 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 | 4158 | |
| 4159 | 4159 | /* |
| 4160 | 4160 | ** CAPI3REF: Source Of Data In A Query Result |
| 4161 | 4161 | ** METHOD: sqlite3_stmt |
| 4162 | 4162 | ** |
| @@ -4200,16 +4200,16 @@ | ||
| 4200 | 4200 | ** If two or more threads call one or more |
| 4201 | 4201 | ** [sqlite3_column_database_name | column metadata interfaces] |
| 4202 | 4202 | ** for the same [prepared statement] and result column |
| 4203 | 4203 | ** at the same time then the results are undefined. |
| 4204 | 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); | |
| 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 | 4211 | |
| 4212 | 4212 | /* |
| 4213 | 4213 | ** CAPI3REF: Declared Datatype Of A Query Result |
| 4214 | 4214 | ** METHOD: sqlite3_stmt |
| 4215 | 4215 | ** |
| @@ -4237,12 +4237,12 @@ | ||
| 4237 | 4237 | ** data stored in that column is of the declared type. SQLite is |
| 4238 | 4238 | ** strongly typed, but the typing is dynamic not static. ^Type |
| 4239 | 4239 | ** is associated with individual values, not with the containers |
| 4240 | 4240 | ** used to hold those values. |
| 4241 | 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); | |
| 4242 | +SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int); | |
| 4243 | +SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int); | |
| 4244 | 4244 | |
| 4245 | 4245 | /* |
| 4246 | 4246 | ** CAPI3REF: Evaluate An SQL Statement |
| 4247 | 4247 | ** METHOD: sqlite3_stmt |
| 4248 | 4248 | ** |
| @@ -4318,11 +4318,11 @@ | ||
| 4318 | 4318 | ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead |
| 4319 | 4319 | ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, |
| 4320 | 4320 | ** then the more specific [error codes] are returned directly |
| 4321 | 4321 | ** by sqlite3_step(). The use of the "v2" interface is recommended. |
| 4322 | 4322 | */ |
| 4323 | -SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*); | |
| 4323 | +SQLITE_API int sqlite3_step(sqlite3_stmt*); | |
| 4324 | 4324 | |
| 4325 | 4325 | /* |
| 4326 | 4326 | ** CAPI3REF: Number of columns in a result set |
| 4327 | 4327 | ** METHOD: sqlite3_stmt |
| 4328 | 4328 | ** |
| @@ -4339,11 +4339,11 @@ | ||
| 4339 | 4339 | ** where it always returns zero since each step of that multi-step |
| 4340 | 4340 | ** pragma returns 0 columns of data. |
| 4341 | 4341 | ** |
| 4342 | 4342 | ** See also: [sqlite3_column_count()] |
| 4343 | 4343 | */ |
| 4344 | -SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt); | |
| 4344 | +SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt); | |
| 4345 | 4345 | |
| 4346 | 4346 | /* |
| 4347 | 4347 | ** CAPI3REF: Fundamental Datatypes |
| 4348 | 4348 | ** KEYWORDS: SQLITE_TEXT |
| 4349 | 4349 | ** |
| @@ -4529,20 +4529,20 @@ | ||
| 4529 | 4529 | ** of these routines, a default value is returned. The default value |
| 4530 | 4530 | ** is either the integer 0, the floating point number 0.0, or a NULL |
| 4531 | 4531 | ** pointer. Subsequent calls to [sqlite3_errcode()] will return |
| 4532 | 4532 | ** [SQLITE_NOMEM].)^ |
| 4533 | 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); | |
| 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 | 4544 | |
| 4545 | 4545 | /* |
| 4546 | 4546 | ** CAPI3REF: Destroy A Prepared Statement Object |
| 4547 | 4547 | ** DESTRUCTOR: sqlite3_stmt |
| 4548 | 4548 | ** |
| @@ -4566,11 +4566,11 @@ | ||
| 4566 | 4566 | ** resource leaks. It is a grievous error for the application to try to use |
| 4567 | 4567 | ** a prepared statement after it has been finalized. Any use of a prepared |
| 4568 | 4568 | ** statement after it has been finalized can result in undefined and |
| 4569 | 4569 | ** undesirable behavior such as segfaults and heap corruption. |
| 4570 | 4570 | */ |
| 4571 | -SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt); | |
| 4571 | +SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); | |
| 4572 | 4572 | |
| 4573 | 4573 | /* |
| 4574 | 4574 | ** CAPI3REF: Reset A Prepared Statement Object |
| 4575 | 4575 | ** METHOD: sqlite3_stmt |
| 4576 | 4576 | ** |
| @@ -4593,11 +4593,11 @@ | ||
| 4593 | 4593 | ** [sqlite3_reset(S)] returns an appropriate [error code]. |
| 4594 | 4594 | ** |
| 4595 | 4595 | ** ^The [sqlite3_reset(S)] interface does not change the values |
| 4596 | 4596 | ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. |
| 4597 | 4597 | */ |
| 4598 | -SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt); | |
| 4598 | +SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); | |
| 4599 | 4599 | |
| 4600 | 4600 | /* |
| 4601 | 4601 | ** CAPI3REF: Create Or Redefine SQL Functions |
| 4602 | 4602 | ** KEYWORDS: {function creation routines} |
| 4603 | 4603 | ** KEYWORDS: {application-defined SQL function} |
| @@ -4693,31 +4693,31 @@ | ||
| 4693 | 4693 | ** ^An application-defined function is permitted to call other |
| 4694 | 4694 | ** SQLite interfaces. However, such calls must not |
| 4695 | 4695 | ** close the database connection nor finalize or reset the prepared |
| 4696 | 4696 | ** statement in which the function is running. |
| 4697 | 4697 | */ |
| 4698 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function( | |
| 4698 | +SQLITE_API int sqlite3_create_function( | |
| 4699 | 4699 | sqlite3 *db, |
| 4700 | 4700 | const char *zFunctionName, |
| 4701 | 4701 | int nArg, |
| 4702 | 4702 | int eTextRep, |
| 4703 | 4703 | void *pApp, |
| 4704 | 4704 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4705 | 4705 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4706 | 4706 | void (*xFinal)(sqlite3_context*) |
| 4707 | 4707 | ); |
| 4708 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( | |
| 4708 | +SQLITE_API int sqlite3_create_function16( | |
| 4709 | 4709 | sqlite3 *db, |
| 4710 | 4710 | const void *zFunctionName, |
| 4711 | 4711 | int nArg, |
| 4712 | 4712 | int eTextRep, |
| 4713 | 4713 | void *pApp, |
| 4714 | 4714 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4715 | 4715 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4716 | 4716 | void (*xFinal)(sqlite3_context*) |
| 4717 | 4717 | ); |
| 4718 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( | |
| 4718 | +SQLITE_API int sqlite3_create_function_v2( | |
| 4719 | 4719 | sqlite3 *db, |
| 4720 | 4720 | const char *zFunctionName, |
| 4721 | 4721 | int nArg, |
| 4722 | 4722 | int eTextRep, |
| 4723 | 4723 | void *pApp, |
| @@ -4759,16 +4759,16 @@ | ||
| 4759 | 4759 | ** to be supported. However, new applications should avoid |
| 4760 | 4760 | ** the use of these functions. To encourage programmers to avoid |
| 4761 | 4761 | ** these functions, we will not explain what they do. |
| 4762 | 4762 | */ |
| 4763 | 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), | |
| 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 | 4770 | void*,sqlite3_int64); |
| 4771 | 4771 | #endif |
| 4772 | 4772 | |
| 4773 | 4773 | /* |
| 4774 | 4774 | ** CAPI3REF: Obtaining SQL Values |
| @@ -4814,22 +4814,22 @@ | ||
| 4814 | 4814 | ** or [sqlite3_value_text16()]. |
| 4815 | 4815 | ** |
| 4816 | 4816 | ** These routines must be called from the same thread as |
| 4817 | 4817 | ** the SQL function that supplied the [sqlite3_value*] parameters. |
| 4818 | 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*); | |
| 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 | 4831 | |
| 4832 | 4832 | /* |
| 4833 | 4833 | ** CAPI3REF: Finding The Subtype Of SQL Values |
| 4834 | 4834 | ** METHOD: sqlite3_value |
| 4835 | 4835 | ** |
| @@ -4841,11 +4841,11 @@ | ||
| 4841 | 4841 | ** |
| 4842 | 4842 | ** SQLite makes no use of subtype itself. It merely passes the subtype |
| 4843 | 4843 | ** from the result of one [application-defined SQL function] into the |
| 4844 | 4844 | ** input of another. |
| 4845 | 4845 | */ |
| 4846 | -SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*); | |
| 4846 | +SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*); | |
| 4847 | 4847 | |
| 4848 | 4848 | /* |
| 4849 | 4849 | ** CAPI3REF: Copy And Free SQL Values |
| 4850 | 4850 | ** METHOD: sqlite3_value |
| 4851 | 4851 | ** |
| @@ -4857,12 +4857,12 @@ | ||
| 4857 | 4857 | ** |
| 4858 | 4858 | ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object |
| 4859 | 4859 | ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer |
| 4860 | 4860 | ** then sqlite3_value_free(V) is a harmless no-op. |
| 4861 | 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*); | |
| 4862 | +SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*); | |
| 4863 | +SQLITE_API void sqlite3_value_free(sqlite3_value*); | |
| 4864 | 4864 | |
| 4865 | 4865 | /* |
| 4866 | 4866 | ** CAPI3REF: Obtain Aggregate Function Context |
| 4867 | 4867 | ** METHOD: sqlite3_context |
| 4868 | 4868 | ** |
| @@ -4903,11 +4903,11 @@ | ||
| 4903 | 4903 | ** function. |
| 4904 | 4904 | ** |
| 4905 | 4905 | ** This routine must be called from the same thread in which |
| 4906 | 4906 | ** the aggregate SQL function is running. |
| 4907 | 4907 | */ |
| 4908 | -SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); | |
| 4908 | +SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes); | |
| 4909 | 4909 | |
| 4910 | 4910 | /* |
| 4911 | 4911 | ** CAPI3REF: User Data For Functions |
| 4912 | 4912 | ** METHOD: sqlite3_context |
| 4913 | 4913 | ** |
| @@ -4918,11 +4918,11 @@ | ||
| 4918 | 4918 | ** registered the application defined function. |
| 4919 | 4919 | ** |
| 4920 | 4920 | ** This routine must be called from the same thread in which |
| 4921 | 4921 | ** the application-defined function is running. |
| 4922 | 4922 | */ |
| 4923 | -SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*); | |
| 4923 | +SQLITE_API void *sqlite3_user_data(sqlite3_context*); | |
| 4924 | 4924 | |
| 4925 | 4925 | /* |
| 4926 | 4926 | ** CAPI3REF: Database Connection For Functions |
| 4927 | 4927 | ** METHOD: sqlite3_context |
| 4928 | 4928 | ** |
| @@ -4930,11 +4930,11 @@ | ||
| 4930 | 4930 | ** the pointer to the [database connection] (the 1st parameter) |
| 4931 | 4931 | ** of the [sqlite3_create_function()] |
| 4932 | 4932 | ** and [sqlite3_create_function16()] routines that originally |
| 4933 | 4933 | ** registered the application defined function. |
| 4934 | 4934 | */ |
| 4935 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); | |
| 4935 | +SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*); | |
| 4936 | 4936 | |
| 4937 | 4937 | /* |
| 4938 | 4938 | ** CAPI3REF: Function Auxiliary Data |
| 4939 | 4939 | ** METHOD: sqlite3_context |
| 4940 | 4940 | ** |
| @@ -4984,12 +4984,12 @@ | ||
| 4984 | 4984 | ** values and [parameters] and expressions composed from the same.)^ |
| 4985 | 4985 | ** |
| 4986 | 4986 | ** These routines must be called from the same thread in which |
| 4987 | 4987 | ** the SQL function is running. |
| 4988 | 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*)); | |
| 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 | 4991 | |
| 4992 | 4992 | |
| 4993 | 4993 | /* |
| 4994 | 4994 | ** CAPI3REF: Constants Defining Special Destructor Behavior |
| 4995 | 4995 | ** |
| @@ -5121,31 +5121,31 @@ | ||
| 5121 | 5121 | ** |
| 5122 | 5122 | ** If these routines are called from within the different thread |
| 5123 | 5123 | ** than the one containing the application-defined function that received |
| 5124 | 5124 | ** the [sqlite3_context] pointer, the results are undefined. |
| 5125 | 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*, | |
| 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 | 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, | |
| 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 | 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); | |
| 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 | 5147 | |
| 5148 | 5148 | |
| 5149 | 5149 | /* |
| 5150 | 5150 | ** CAPI3REF: Setting The Subtype Of An SQL Function |
| 5151 | 5151 | ** METHOD: sqlite3_context |
| @@ -5156,11 +5156,11 @@ | ||
| 5156 | 5156 | ** of the subtype T are preserved in current versions of SQLite; |
| 5157 | 5157 | ** higher order bits are discarded. |
| 5158 | 5158 | ** The number of subtype bytes preserved by SQLite might increase |
| 5159 | 5159 | ** in future releases of SQLite. |
| 5160 | 5160 | */ |
| 5161 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int); | |
| 5161 | +SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int); | |
| 5162 | 5162 | |
| 5163 | 5163 | /* |
| 5164 | 5164 | ** CAPI3REF: Define New Collating Sequences |
| 5165 | 5165 | ** METHOD: sqlite3 |
| 5166 | 5166 | ** |
| @@ -5238,26 +5238,26 @@ | ||
| 5238 | 5238 | ** is unfortunate but cannot be changed without breaking backwards |
| 5239 | 5239 | ** compatibility. |
| 5240 | 5240 | ** |
| 5241 | 5241 | ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. |
| 5242 | 5242 | */ |
| 5243 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( | |
| 5243 | +SQLITE_API int sqlite3_create_collation( | |
| 5244 | 5244 | sqlite3*, |
| 5245 | 5245 | const char *zName, |
| 5246 | 5246 | int eTextRep, |
| 5247 | 5247 | void *pArg, |
| 5248 | 5248 | int(*xCompare)(void*,int,const void*,int,const void*) |
| 5249 | 5249 | ); |
| 5250 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( | |
| 5250 | +SQLITE_API int sqlite3_create_collation_v2( | |
| 5251 | 5251 | sqlite3*, |
| 5252 | 5252 | const char *zName, |
| 5253 | 5253 | int eTextRep, |
| 5254 | 5254 | void *pArg, |
| 5255 | 5255 | int(*xCompare)(void*,int,const void*,int,const void*), |
| 5256 | 5256 | void(*xDestroy)(void*) |
| 5257 | 5257 | ); |
| 5258 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( | |
| 5258 | +SQLITE_API int sqlite3_create_collation16( | |
| 5259 | 5259 | sqlite3*, |
| 5260 | 5260 | const void *zName, |
| 5261 | 5261 | int eTextRep, |
| 5262 | 5262 | void *pArg, |
| 5263 | 5263 | int(*xCompare)(void*,int,const void*,int,const void*) |
| @@ -5288,16 +5288,16 @@ | ||
| 5288 | 5288 | ** |
| 5289 | 5289 | ** The callback function should register the desired collation using |
| 5290 | 5290 | ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or |
| 5291 | 5291 | ** [sqlite3_create_collation_v2()]. |
| 5292 | 5292 | */ |
| 5293 | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( | |
| 5293 | +SQLITE_API int sqlite3_collation_needed( | |
| 5294 | 5294 | sqlite3*, |
| 5295 | 5295 | void*, |
| 5296 | 5296 | void(*)(void*,sqlite3*,int eTextRep,const char*) |
| 5297 | 5297 | ); |
| 5298 | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( | |
| 5298 | +SQLITE_API int sqlite3_collation_needed16( | |
| 5299 | 5299 | sqlite3*, |
| 5300 | 5300 | void*, |
| 5301 | 5301 | void(*)(void*,sqlite3*,int eTextRep,const void*) |
| 5302 | 5302 | ); |
| 5303 | 5303 | |
| @@ -5307,15 +5307,15 @@ | ||
| 5307 | 5307 | ** called right after sqlite3_open(). |
| 5308 | 5308 | ** |
| 5309 | 5309 | ** The code to implement this API is not available in the public release |
| 5310 | 5310 | ** of SQLite. |
| 5311 | 5311 | */ |
| 5312 | -SQLITE_API int SQLITE_STDCALL sqlite3_key( | |
| 5312 | +SQLITE_API int sqlite3_key( | |
| 5313 | 5313 | sqlite3 *db, /* Database to be rekeyed */ |
| 5314 | 5314 | const void *pKey, int nKey /* The key */ |
| 5315 | 5315 | ); |
| 5316 | -SQLITE_API int SQLITE_STDCALL sqlite3_key_v2( | |
| 5316 | +SQLITE_API int sqlite3_key_v2( | |
| 5317 | 5317 | sqlite3 *db, /* Database to be rekeyed */ |
| 5318 | 5318 | const char *zDbName, /* Name of the database */ |
| 5319 | 5319 | const void *pKey, int nKey /* The key */ |
| 5320 | 5320 | ); |
| 5321 | 5321 | |
| @@ -5325,35 +5325,35 @@ | ||
| 5325 | 5325 | ** database is decrypted. |
| 5326 | 5326 | ** |
| 5327 | 5327 | ** The code to implement this API is not available in the public release |
| 5328 | 5328 | ** of SQLite. |
| 5329 | 5329 | */ |
| 5330 | -SQLITE_API int SQLITE_STDCALL sqlite3_rekey( | |
| 5330 | +SQLITE_API int sqlite3_rekey( | |
| 5331 | 5331 | sqlite3 *db, /* Database to be rekeyed */ |
| 5332 | 5332 | const void *pKey, int nKey /* The new key */ |
| 5333 | 5333 | ); |
| 5334 | -SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2( | |
| 5334 | +SQLITE_API int sqlite3_rekey_v2( | |
| 5335 | 5335 | sqlite3 *db, /* Database to be rekeyed */ |
| 5336 | 5336 | const char *zDbName, /* Name of the database */ |
| 5337 | 5337 | const void *pKey, int nKey /* The new key */ |
| 5338 | 5338 | ); |
| 5339 | 5339 | |
| 5340 | 5340 | /* |
| 5341 | 5341 | ** Specify the activation key for a SEE database. Unless |
| 5342 | 5342 | ** activated, none of the SEE routines will work. |
| 5343 | 5343 | */ |
| 5344 | -SQLITE_API void SQLITE_STDCALL sqlite3_activate_see( | |
| 5344 | +SQLITE_API void sqlite3_activate_see( | |
| 5345 | 5345 | const char *zPassPhrase /* Activation phrase */ |
| 5346 | 5346 | ); |
| 5347 | 5347 | #endif |
| 5348 | 5348 | |
| 5349 | 5349 | #ifdef SQLITE_ENABLE_CEROD |
| 5350 | 5350 | /* |
| 5351 | 5351 | ** Specify the activation key for a CEROD database. Unless |
| 5352 | 5352 | ** activated, none of the CEROD routines will work. |
| 5353 | 5353 | */ |
| 5354 | -SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod( | |
| 5354 | +SQLITE_API void sqlite3_activate_cerod( | |
| 5355 | 5355 | const char *zPassPhrase /* Activation phrase */ |
| 5356 | 5356 | ); |
| 5357 | 5357 | #endif |
| 5358 | 5358 | |
| 5359 | 5359 | /* |
| @@ -5371,11 +5371,11 @@ | ||
| 5371 | 5371 | ** method of the default [sqlite3_vfs] object. If the xSleep() method |
| 5372 | 5372 | ** of the default VFS is not implemented correctly, or not implemented at |
| 5373 | 5373 | ** all, then the behavior of sqlite3_sleep() may deviate from the description |
| 5374 | 5374 | ** in the previous paragraphs. |
| 5375 | 5375 | */ |
| 5376 | -SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int); | |
| 5376 | +SQLITE_API int sqlite3_sleep(int); | |
| 5377 | 5377 | |
| 5378 | 5378 | /* |
| 5379 | 5379 | ** CAPI3REF: Name Of The Folder Holding Temporary Files |
| 5380 | 5380 | ** |
| 5381 | 5381 | ** ^(If this global variable is made to point to a string which is |
| @@ -5490,11 +5490,11 @@ | ||
| 5490 | 5490 | ** |
| 5491 | 5491 | ** If another thread changes the autocommit status of the database |
| 5492 | 5492 | ** connection while this routine is running, then the return value |
| 5493 | 5493 | ** is undefined. |
| 5494 | 5494 | */ |
| 5495 | -SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*); | |
| 5495 | +SQLITE_API int sqlite3_get_autocommit(sqlite3*); | |
| 5496 | 5496 | |
| 5497 | 5497 | /* |
| 5498 | 5498 | ** CAPI3REF: Find The Database Handle Of A Prepared Statement |
| 5499 | 5499 | ** METHOD: sqlite3_stmt |
| 5500 | 5500 | ** |
| @@ -5503,11 +5503,11 @@ | ||
| 5503 | 5503 | ** returned by sqlite3_db_handle is the same [database connection] |
| 5504 | 5504 | ** that was the first argument |
| 5505 | 5505 | ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to |
| 5506 | 5506 | ** create the statement in the first place. |
| 5507 | 5507 | */ |
| 5508 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*); | |
| 5508 | +SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); | |
| 5509 | 5509 | |
| 5510 | 5510 | /* |
| 5511 | 5511 | ** CAPI3REF: Return The Filename For A Database Connection |
| 5512 | 5512 | ** METHOD: sqlite3 |
| 5513 | 5513 | ** |
| @@ -5520,21 +5520,21 @@ | ||
| 5520 | 5520 | ** ^The filename returned by this function is the output of the |
| 5521 | 5521 | ** xFullPathname method of the [VFS]. ^In other words, the filename |
| 5522 | 5522 | ** will be an absolute pathname, even if the filename used |
| 5523 | 5523 | ** to open the database originally was a URI or relative pathname. |
| 5524 | 5524 | */ |
| 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); | |
| 5526 | 5526 | |
| 5527 | 5527 | /* |
| 5528 | 5528 | ** CAPI3REF: Determine if a database is read-only |
| 5529 | 5529 | ** METHOD: sqlite3 |
| 5530 | 5530 | ** |
| 5531 | 5531 | ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N |
| 5532 | 5532 | ** of connection D is read-only, 0 if it is read/write, or -1 if N is not |
| 5533 | 5533 | ** the name of a database on connection D. |
| 5534 | 5534 | */ |
| 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); | |
| 5536 | 5536 | |
| 5537 | 5537 | /* |
| 5538 | 5538 | ** CAPI3REF: Find the next prepared statement |
| 5539 | 5539 | ** METHOD: sqlite3 |
| 5540 | 5540 | ** |
| @@ -5546,11 +5546,11 @@ | ||
| 5546 | 5546 | ** |
| 5547 | 5547 | ** The [database connection] pointer D in a call to |
| 5548 | 5548 | ** [sqlite3_next_stmt(D,S)] must refer to an open database |
| 5549 | 5549 | ** connection and in particular must not be a NULL pointer. |
| 5550 | 5550 | */ |
| 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); | |
| 5552 | 5552 | |
| 5553 | 5553 | /* |
| 5554 | 5554 | ** CAPI3REF: Commit And Rollback Notification Callbacks |
| 5555 | 5555 | ** METHOD: sqlite3 |
| 5556 | 5556 | ** |
| @@ -5595,12 +5595,12 @@ | ||
| 5595 | 5595 | ** ^The rollback callback is not invoked if a transaction is |
| 5596 | 5596 | ** automatically rolled back because the database connection is closed. |
| 5597 | 5597 | ** |
| 5598 | 5598 | ** See also the [sqlite3_update_hook()] interface. |
| 5599 | 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*); | |
| 5600 | +SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); | |
| 5601 | +SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); | |
| 5602 | 5602 | |
| 5603 | 5603 | /* |
| 5604 | 5604 | ** CAPI3REF: Data Change Notification Callbacks |
| 5605 | 5605 | ** METHOD: sqlite3 |
| 5606 | 5606 | ** |
| @@ -5647,11 +5647,11 @@ | ||
| 5647 | 5647 | ** the first call on D. |
| 5648 | 5648 | ** |
| 5649 | 5649 | ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], |
| 5650 | 5650 | ** and [sqlite3_preupdate_hook()] interfaces. |
| 5651 | 5651 | */ |
| 5652 | -SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( | |
| 5652 | +SQLITE_API void *sqlite3_update_hook( | |
| 5653 | 5653 | sqlite3*, |
| 5654 | 5654 | void(*)(void *,int ,char const *,char const *,sqlite3_int64), |
| 5655 | 5655 | void* |
| 5656 | 5656 | ); |
| 5657 | 5657 | |
| @@ -5687,11 +5687,11 @@ | ||
| 5687 | 5687 | ** This interface is threadsafe on processors where writing a |
| 5688 | 5688 | ** 32-bit integer is atomic. |
| 5689 | 5689 | ** |
| 5690 | 5690 | ** See Also: [SQLite Shared-Cache Mode] |
| 5691 | 5691 | */ |
| 5692 | -SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int); | |
| 5692 | +SQLITE_API int sqlite3_enable_shared_cache(int); | |
| 5693 | 5693 | |
| 5694 | 5694 | /* |
| 5695 | 5695 | ** CAPI3REF: Attempt To Free Heap Memory |
| 5696 | 5696 | ** |
| 5697 | 5697 | ** ^The sqlite3_release_memory() interface attempts to free N bytes |
| @@ -5703,11 +5703,11 @@ | ||
| 5703 | 5703 | ** ^The sqlite3_release_memory() routine is a no-op returning zero |
| 5704 | 5704 | ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5705 | 5705 | ** |
| 5706 | 5706 | ** See also: [sqlite3_db_release_memory()] |
| 5707 | 5707 | */ |
| 5708 | -SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int); | |
| 5708 | +SQLITE_API int sqlite3_release_memory(int); | |
| 5709 | 5709 | |
| 5710 | 5710 | /* |
| 5711 | 5711 | ** CAPI3REF: Free Memory Used By A Database Connection |
| 5712 | 5712 | ** METHOD: sqlite3 |
| 5713 | 5713 | ** |
| @@ -5717,11 +5717,11 @@ | ||
| 5717 | 5717 | ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is |
| 5718 | 5718 | ** omitted. |
| 5719 | 5719 | ** |
| 5720 | 5720 | ** See also: [sqlite3_release_memory()] |
| 5721 | 5721 | */ |
| 5722 | -SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*); | |
| 5722 | +SQLITE_API int sqlite3_db_release_memory(sqlite3*); | |
| 5723 | 5723 | |
| 5724 | 5724 | /* |
| 5725 | 5725 | ** CAPI3REF: Impose A Limit On Heap Size |
| 5726 | 5726 | ** |
| 5727 | 5727 | ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the |
| @@ -5769,11 +5769,11 @@ | ||
| 5769 | 5769 | ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5770 | 5770 | ** |
| 5771 | 5771 | ** The circumstances under which SQLite will enforce the soft heap limit may |
| 5772 | 5772 | ** changes in future releases of SQLite. |
| 5773 | 5773 | */ |
| 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); | |
| 5775 | 5775 | |
| 5776 | 5776 | /* |
| 5777 | 5777 | ** CAPI3REF: Deprecated Soft Heap Limit Interface |
| 5778 | 5778 | ** DEPRECATED |
| 5779 | 5779 | ** |
| @@ -5780,11 +5780,11 @@ | ||
| 5780 | 5780 | ** This is a deprecated version of the [sqlite3_soft_heap_limit64()] |
| 5781 | 5781 | ** interface. This routine is provided for historical compatibility |
| 5782 | 5782 | ** only. All new applications should use the |
| 5783 | 5783 | ** [sqlite3_soft_heap_limit64()] interface rather than this one. |
| 5784 | 5784 | */ |
| 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); | |
| 5786 | 5786 | |
| 5787 | 5787 | |
| 5788 | 5788 | /* |
| 5789 | 5789 | ** CAPI3REF: Extract Metadata About A Column Of A Table |
| 5790 | 5790 | ** METHOD: sqlite3 |
| @@ -5850,11 +5850,11 @@ | ||
| 5850 | 5850 | ** |
| 5851 | 5851 | ** ^This function causes all database schemas to be read from disk and |
| 5852 | 5852 | ** parsed, if that has not already been done, and returns an error if |
| 5853 | 5853 | ** any errors are encountered while loading the schema. |
| 5854 | 5854 | */ |
| 5855 | -SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( | |
| 5855 | +SQLITE_API int sqlite3_table_column_metadata( | |
| 5856 | 5856 | sqlite3 *db, /* Connection handle */ |
| 5857 | 5857 | const char *zDbName, /* Database name or NULL */ |
| 5858 | 5858 | const char *zTableName, /* Table name */ |
| 5859 | 5859 | const char *zColumnName, /* Column name */ |
| 5860 | 5860 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -5906,11 +5906,11 @@ | ||
| 5906 | 5906 | ** disabled and prevent SQL injections from giving attackers |
| 5907 | 5907 | ** access to extension loading capabilities. |
| 5908 | 5908 | ** |
| 5909 | 5909 | ** See also the [load_extension() SQL function]. |
| 5910 | 5910 | */ |
| 5911 | -SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( | |
| 5911 | +SQLITE_API int sqlite3_load_extension( | |
| 5912 | 5912 | sqlite3 *db, /* Load the extension into this database connection */ |
| 5913 | 5913 | const char *zFile, /* Name of the shared library containing extension */ |
| 5914 | 5914 | const char *zProc, /* Entry point. Derived from zFile if 0 */ |
| 5915 | 5915 | char **pzErrMsg /* Put error message here if not 0 */ |
| 5916 | 5916 | ); |
| @@ -5938,11 +5938,11 @@ | ||
| 5938 | 5938 | ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method |
| 5939 | 5939 | ** rather than this interface, so the [load_extension()] SQL function |
| 5940 | 5940 | ** remains disabled. This will prevent SQL injections from giving attackers |
| 5941 | 5941 | ** access to extension loading capabilities. |
| 5942 | 5942 | */ |
| 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); | |
| 5944 | 5944 | |
| 5945 | 5945 | /* |
| 5946 | 5946 | ** CAPI3REF: Automatically Load Statically Linked Extensions |
| 5947 | 5947 | ** |
| 5948 | 5948 | ** ^This interface causes the xEntryPoint() function to be invoked for |
| @@ -5976,11 +5976,11 @@ | ||
| 5976 | 5976 | ** will be called more than once for each database connection that is opened. |
| 5977 | 5977 | ** |
| 5978 | 5978 | ** See also: [sqlite3_reset_auto_extension()] |
| 5979 | 5979 | ** and [sqlite3_cancel_auto_extension()] |
| 5980 | 5980 | */ |
| 5981 | -SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void)); | |
| 5981 | +SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void)); | |
| 5982 | 5982 | |
| 5983 | 5983 | /* |
| 5984 | 5984 | ** CAPI3REF: Cancel Automatic Extension Loading |
| 5985 | 5985 | ** |
| 5986 | 5986 | ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the |
| @@ -5988,19 +5988,19 @@ | ||
| 5988 | 5988 | ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] |
| 5989 | 5989 | ** routine returns 1 if initialization routine X was successfully |
| 5990 | 5990 | ** unregistered and it returns 0 if X was not on the list of initialization |
| 5991 | 5991 | ** routines. |
| 5992 | 5992 | */ |
| 5993 | -SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); | |
| 5993 | +SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); | |
| 5994 | 5994 | |
| 5995 | 5995 | /* |
| 5996 | 5996 | ** CAPI3REF: Reset Automatic Extension Loading |
| 5997 | 5997 | ** |
| 5998 | 5998 | ** ^This interface disables all automatic extensions previously |
| 5999 | 5999 | ** registered using [sqlite3_auto_extension()]. |
| 6000 | 6000 | */ |
| 6001 | -SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void); | |
| 6001 | +SQLITE_API void sqlite3_reset_auto_extension(void); | |
| 6002 | 6002 | |
| 6003 | 6003 | /* |
| 6004 | 6004 | ** The interface to the virtual-table mechanism is currently considered |
| 6005 | 6005 | ** to be experimental. The interface might change in incompatible ways. |
| 6006 | 6006 | ** If this is a problem for you, do not use the interface at this time. |
| @@ -6241,17 +6241,17 @@ | ||
| 6241 | 6241 | ** be invoked if the call to sqlite3_create_module_v2() fails. |
| 6242 | 6242 | ** ^The sqlite3_create_module() |
| 6243 | 6243 | ** interface is equivalent to sqlite3_create_module_v2() with a NULL |
| 6244 | 6244 | ** destructor. |
| 6245 | 6245 | */ |
| 6246 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module( | |
| 6246 | +SQLITE_API int sqlite3_create_module( | |
| 6247 | 6247 | sqlite3 *db, /* SQLite connection to register module with */ |
| 6248 | 6248 | const char *zName, /* Name of the module */ |
| 6249 | 6249 | const sqlite3_module *p, /* Methods for the module */ |
| 6250 | 6250 | void *pClientData /* Client data for xCreate/xConnect */ |
| 6251 | 6251 | ); |
| 6252 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( | |
| 6252 | +SQLITE_API int sqlite3_create_module_v2( | |
| 6253 | 6253 | sqlite3 *db, /* SQLite connection to register module with */ |
| 6254 | 6254 | const char *zName, /* Name of the module */ |
| 6255 | 6255 | const sqlite3_module *p, /* Methods for the module */ |
| 6256 | 6256 | void *pClientData, /* Client data for xCreate/xConnect */ |
| 6257 | 6257 | void(*xDestroy)(void*) /* Module destructor function */ |
| @@ -6310,11 +6310,11 @@ | ||
| 6310 | 6310 | ** ^The [xCreate] and [xConnect] methods of a |
| 6311 | 6311 | ** [virtual table module] call this interface |
| 6312 | 6312 | ** to declare the format (the names and datatypes of the columns) of |
| 6313 | 6313 | ** the virtual tables they implement. |
| 6314 | 6314 | */ |
| 6315 | -SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); | |
| 6315 | +SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL); | |
| 6316 | 6316 | |
| 6317 | 6317 | /* |
| 6318 | 6318 | ** CAPI3REF: Overload A Function For A Virtual Table |
| 6319 | 6319 | ** METHOD: sqlite3 |
| 6320 | 6320 | ** |
| @@ -6329,11 +6329,11 @@ | ||
| 6329 | 6329 | ** of the new function always causes an exception to be thrown. So |
| 6330 | 6330 | ** the new function is not good for anything by itself. Its only |
| 6331 | 6331 | ** purpose is to be a placeholder function that can be overloaded |
| 6332 | 6332 | ** by a [virtual table]. |
| 6333 | 6333 | */ |
| 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); | |
| 6335 | 6335 | |
| 6336 | 6336 | /* |
| 6337 | 6337 | ** The interface to the virtual-table mechanism defined above (back up |
| 6338 | 6338 | ** to a comment remarkably similar to this one) is currently considered |
| 6339 | 6339 | ** to be experimental. The interface might change in incompatible ways. |
| @@ -6428,11 +6428,11 @@ | ||
| 6428 | 6428 | ** zero-filled blob to read or write using the incremental-blob interface. |
| 6429 | 6429 | ** |
| 6430 | 6430 | ** To avoid a resource leak, every open [BLOB handle] should eventually |
| 6431 | 6431 | ** be released by a call to [sqlite3_blob_close()]. |
| 6432 | 6432 | */ |
| 6433 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( | |
| 6433 | +SQLITE_API int sqlite3_blob_open( | |
| 6434 | 6434 | sqlite3*, |
| 6435 | 6435 | const char *zDb, |
| 6436 | 6436 | const char *zTable, |
| 6437 | 6437 | const char *zColumn, |
| 6438 | 6438 | sqlite3_int64 iRow, |
| @@ -6461,11 +6461,11 @@ | ||
| 6461 | 6461 | ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle |
| 6462 | 6462 | ** always returns zero. |
| 6463 | 6463 | ** |
| 6464 | 6464 | ** ^This function sets the database handle error code and message. |
| 6465 | 6465 | */ |
| 6466 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); | |
| 6466 | +SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); | |
| 6467 | 6467 | |
| 6468 | 6468 | /* |
| 6469 | 6469 | ** CAPI3REF: Close A BLOB Handle |
| 6470 | 6470 | ** DESTRUCTOR: sqlite3_blob |
| 6471 | 6471 | ** |
| @@ -6484,11 +6484,11 @@ | ||
| 6484 | 6484 | ** with a null pointer (such as would be returned by a failed call to |
| 6485 | 6485 | ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function |
| 6486 | 6486 | ** is passed a valid open blob handle, the values returned by the |
| 6487 | 6487 | ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. |
| 6488 | 6488 | */ |
| 6489 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *); | |
| 6489 | +SQLITE_API int sqlite3_blob_close(sqlite3_blob *); | |
| 6490 | 6490 | |
| 6491 | 6491 | /* |
| 6492 | 6492 | ** CAPI3REF: Return The Size Of An Open BLOB |
| 6493 | 6493 | ** METHOD: sqlite3_blob |
| 6494 | 6494 | ** |
| @@ -6500,11 +6500,11 @@ | ||
| 6500 | 6500 | ** This routine only works on a [BLOB handle] which has been created |
| 6501 | 6501 | ** by a prior successful call to [sqlite3_blob_open()] and which has not |
| 6502 | 6502 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6503 | 6503 | ** to this routine results in undefined and probably undesirable behavior. |
| 6504 | 6504 | */ |
| 6505 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *); | |
| 6505 | +SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *); | |
| 6506 | 6506 | |
| 6507 | 6507 | /* |
| 6508 | 6508 | ** CAPI3REF: Read Data From A BLOB Incrementally |
| 6509 | 6509 | ** METHOD: sqlite3_blob |
| 6510 | 6510 | ** |
| @@ -6529,11 +6529,11 @@ | ||
| 6529 | 6529 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6530 | 6530 | ** to this routine results in undefined and probably undesirable behavior. |
| 6531 | 6531 | ** |
| 6532 | 6532 | ** See also: [sqlite3_blob_write()]. |
| 6533 | 6533 | */ |
| 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); | |
| 6535 | 6535 | |
| 6536 | 6536 | /* |
| 6537 | 6537 | ** CAPI3REF: Write Data Into A BLOB Incrementally |
| 6538 | 6538 | ** METHOD: sqlite3_blob |
| 6539 | 6539 | ** |
| @@ -6571,11 +6571,11 @@ | ||
| 6571 | 6571 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6572 | 6572 | ** to this routine results in undefined and probably undesirable behavior. |
| 6573 | 6573 | ** |
| 6574 | 6574 | ** See also: [sqlite3_blob_read()]. |
| 6575 | 6575 | */ |
| 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); | |
| 6577 | 6577 | |
| 6578 | 6578 | /* |
| 6579 | 6579 | ** CAPI3REF: Virtual File System Objects |
| 6580 | 6580 | ** |
| 6581 | 6581 | ** A virtual filesystem (VFS) is an [sqlite3_vfs] object |
| @@ -6602,13 +6602,13 @@ | ||
| 6602 | 6602 | ** |
| 6603 | 6603 | ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. |
| 6604 | 6604 | ** ^(If the default VFS is unregistered, another VFS is chosen as |
| 6605 | 6605 | ** the default. The choice for the new VFS is arbitrary.)^ |
| 6606 | 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*); | |
| 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 | 6610 | |
| 6611 | 6611 | /* |
| 6612 | 6612 | ** CAPI3REF: Mutexes |
| 6613 | 6613 | ** |
| 6614 | 6614 | ** The SQLite core uses these routines for thread |
| @@ -6720,15 +6720,15 @@ | ||
| 6720 | 6720 | ** sqlite3_mutex_leave() is a NULL pointer, then all three routines |
| 6721 | 6721 | ** behave as no-ops. |
| 6722 | 6722 | ** |
| 6723 | 6723 | ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
| 6724 | 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*); | |
| 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 | 6730 | |
| 6731 | 6731 | /* |
| 6732 | 6732 | ** CAPI3REF: Mutex Methods Object |
| 6733 | 6733 | ** |
| 6734 | 6734 | ** An instance of this structure defines the low-level routines |
| @@ -6834,12 +6834,12 @@ | ||
| 6834 | 6834 | ** call to sqlite3_mutex_held() to fail, so a non-zero return is |
| 6835 | 6835 | ** the appropriate thing to do. The sqlite3_mutex_notheld() |
| 6836 | 6836 | ** interface should also return 1 when given a NULL pointer. |
| 6837 | 6837 | */ |
| 6838 | 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*); | |
| 6839 | +SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*); | |
| 6840 | +SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*); | |
| 6841 | 6841 | #endif |
| 6842 | 6842 | |
| 6843 | 6843 | /* |
| 6844 | 6844 | ** CAPI3REF: Mutex Types |
| 6845 | 6845 | ** |
| @@ -6875,11 +6875,11 @@ | ||
| 6875 | 6875 | ** serializes access to the [database connection] given in the argument |
| 6876 | 6876 | ** when the [threading mode] is Serialized. |
| 6877 | 6877 | ** ^If the [threading mode] is Single-thread or Multi-thread then this |
| 6878 | 6878 | ** routine returns a NULL pointer. |
| 6879 | 6879 | */ |
| 6880 | -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*); | |
| 6880 | +SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*); | |
| 6881 | 6881 | |
| 6882 | 6882 | /* |
| 6883 | 6883 | ** CAPI3REF: Low-Level Control Of Database Files |
| 6884 | 6884 | ** METHOD: sqlite3 |
| 6885 | 6885 | ** |
| @@ -6910,11 +6910,11 @@ | ||
| 6910 | 6910 | ** an incorrect zDbName and an SQLITE_ERROR return from the underlying |
| 6911 | 6911 | ** xFileControl method. |
| 6912 | 6912 | ** |
| 6913 | 6913 | ** See also: [SQLITE_FCNTL_LOCKSTATE] |
| 6914 | 6914 | */ |
| 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*); | |
| 6916 | 6916 | |
| 6917 | 6917 | /* |
| 6918 | 6918 | ** CAPI3REF: Testing Interface |
| 6919 | 6919 | ** |
| 6920 | 6920 | ** ^The sqlite3_test_control() interface is used to read out internal |
| @@ -6929,11 +6929,11 @@ | ||
| 6929 | 6929 | ** The details of the operation codes, their meanings, the parameters |
| 6930 | 6930 | ** they take, and what they do are all subject to change without notice. |
| 6931 | 6931 | ** Unlike most of the SQLite API, this function is not guaranteed to |
| 6932 | 6932 | ** operate consistently from one release to the next. |
| 6933 | 6933 | */ |
| 6934 | -SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...); | |
| 6934 | +SQLITE_API int sqlite3_test_control(int op, ...); | |
| 6935 | 6935 | |
| 6936 | 6936 | /* |
| 6937 | 6937 | ** CAPI3REF: Testing Interface Operation Codes |
| 6938 | 6938 | ** |
| 6939 | 6939 | ** These constants are the valid operation code parameters used |
| @@ -6992,12 +6992,12 @@ | ||
| 6992 | 6992 | ** be represented by a 32-bit integer, then the values returned by |
| 6993 | 6993 | ** sqlite3_status() are undefined. |
| 6994 | 6994 | ** |
| 6995 | 6995 | ** See also: [sqlite3_db_status()] |
| 6996 | 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( | |
| 6997 | +SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); | |
| 6998 | +SQLITE_API int sqlite3_status64( | |
| 6999 | 6999 | int op, |
| 7000 | 7000 | sqlite3_int64 *pCurrent, |
| 7001 | 7001 | sqlite3_int64 *pHighwater, |
| 7002 | 7002 | int resetFlag |
| 7003 | 7003 | ); |
| @@ -7118,11 +7118,11 @@ | ||
| 7118 | 7118 | ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a |
| 7119 | 7119 | ** non-zero [error code] on failure. |
| 7120 | 7120 | ** |
| 7121 | 7121 | ** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. |
| 7122 | 7122 | */ |
| 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); | |
| 7124 | 7124 | |
| 7125 | 7125 | /* |
| 7126 | 7126 | ** CAPI3REF: Status Parameters for database connections |
| 7127 | 7127 | ** KEYWORDS: {SQLITE_DBSTATUS options} |
| 7128 | 7128 | ** |
| @@ -7261,11 +7261,11 @@ | ||
| 7261 | 7261 | ** ^If the resetFlg is true, then the counter is reset to zero after this |
| 7262 | 7262 | ** interface call returns. |
| 7263 | 7263 | ** |
| 7264 | 7264 | ** See also: [sqlite3_status()] and [sqlite3_db_status()]. |
| 7265 | 7265 | */ |
| 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); | |
| 7267 | 7267 | |
| 7268 | 7268 | /* |
| 7269 | 7269 | ** CAPI3REF: Status Parameters for prepared statements |
| 7270 | 7270 | ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} |
| 7271 | 7271 | ** |
| @@ -7730,20 +7730,20 @@ | ||
| 7730 | 7730 | ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() |
| 7731 | 7731 | ** APIs are not strictly speaking threadsafe. If they are invoked at the |
| 7732 | 7732 | ** same time as another thread is invoking sqlite3_backup_step() it is |
| 7733 | 7733 | ** possible that they return invalid values. |
| 7734 | 7734 | */ |
| 7735 | -SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( | |
| 7735 | +SQLITE_API sqlite3_backup *sqlite3_backup_init( | |
| 7736 | 7736 | sqlite3 *pDest, /* Destination database handle */ |
| 7737 | 7737 | const char *zDestName, /* Destination database name */ |
| 7738 | 7738 | sqlite3 *pSource, /* Source database handle */ |
| 7739 | 7739 | const char *zSourceName /* Source database name */ |
| 7740 | 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); | |
| 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 | 7745 | |
| 7746 | 7746 | /* |
| 7747 | 7747 | ** CAPI3REF: Unlock Notification |
| 7748 | 7748 | ** METHOD: sqlite3 |
| 7749 | 7749 | ** |
| @@ -7856,11 +7856,11 @@ | ||
| 7856 | 7856 | ** by an sqlite3_step() call. ^(If there is a blocking connection, then the |
| 7857 | 7857 | ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in |
| 7858 | 7858 | ** the special "DROP TABLE/INDEX" case, the extended error code is just |
| 7859 | 7859 | ** SQLITE_LOCKED.)^ |
| 7860 | 7860 | */ |
| 7861 | -SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( | |
| 7861 | +SQLITE_API int sqlite3_unlock_notify( | |
| 7862 | 7862 | sqlite3 *pBlocked, /* Waiting connection */ |
| 7863 | 7863 | void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ |
| 7864 | 7864 | void *pNotifyArg /* Argument to pass to xNotify */ |
| 7865 | 7865 | ); |
| 7866 | 7866 | |
| @@ -7871,12 +7871,12 @@ | ||
| 7871 | 7871 | ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications |
| 7872 | 7872 | ** and extensions to compare the contents of two buffers containing UTF-8 |
| 7873 | 7873 | ** strings in a case-independent fashion, using the same definition of "case |
| 7874 | 7874 | ** independence" that SQLite uses internally when comparing identifiers. |
| 7875 | 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); | |
| 7876 | +SQLITE_API int sqlite3_stricmp(const char *, const char *); | |
| 7877 | +SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); | |
| 7878 | 7878 | |
| 7879 | 7879 | /* |
| 7880 | 7880 | ** CAPI3REF: String Globbing |
| 7881 | 7881 | * |
| 7882 | 7882 | ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if |
| @@ -7889,11 +7889,11 @@ | ||
| 7889 | 7889 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7890 | 7890 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7891 | 7891 | ** |
| 7892 | 7892 | ** See also: [sqlite3_strlike()]. |
| 7893 | 7893 | */ |
| 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); | |
| 7895 | 7895 | |
| 7896 | 7896 | /* |
| 7897 | 7897 | ** CAPI3REF: String LIKE Matching |
| 7898 | 7898 | * |
| 7899 | 7899 | ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if |
| @@ -7912,11 +7912,11 @@ | ||
| 7912 | 7912 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7913 | 7913 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7914 | 7914 | ** |
| 7915 | 7915 | ** See also: [sqlite3_strglob()]. |
| 7916 | 7916 | */ |
| 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); | |
| 7918 | 7918 | |
| 7919 | 7919 | /* |
| 7920 | 7920 | ** CAPI3REF: Error Logging Interface |
| 7921 | 7921 | ** |
| 7922 | 7922 | ** ^The [sqlite3_log()] interface writes a message into the [error log] |
| @@ -7935,11 +7935,11 @@ | ||
| 7935 | 7935 | ** will not use dynamically allocated memory. The log message is stored in |
| 7936 | 7936 | ** a fixed-length buffer on the stack. If the log message is longer than |
| 7937 | 7937 | ** a few hundred characters, it will be truncated to the length of the |
| 7938 | 7938 | ** buffer. |
| 7939 | 7939 | */ |
| 7940 | -SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...); | |
| 7940 | +SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...); | |
| 7941 | 7941 | |
| 7942 | 7942 | /* |
| 7943 | 7943 | ** CAPI3REF: Write-Ahead Log Commit Hook |
| 7944 | 7944 | ** METHOD: sqlite3 |
| 7945 | 7945 | ** |
| @@ -7971,11 +7971,11 @@ | ||
| 7971 | 7971 | ** previously registered write-ahead log callback. ^Note that the |
| 7972 | 7972 | ** [sqlite3_wal_autocheckpoint()] interface and the |
| 7973 | 7973 | ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will |
| 7974 | 7974 | ** overwrite any prior [sqlite3_wal_hook()] settings. |
| 7975 | 7975 | */ |
| 7976 | -SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( | |
| 7976 | +SQLITE_API void *sqlite3_wal_hook( | |
| 7977 | 7977 | sqlite3*, |
| 7978 | 7978 | int(*)(void *,sqlite3*,const char*,int), |
| 7979 | 7979 | void* |
| 7980 | 7980 | ); |
| 7981 | 7981 | |
| @@ -8006,11 +8006,11 @@ | ||
| 8006 | 8006 | ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] |
| 8007 | 8007 | ** pages. The use of this interface |
| 8008 | 8008 | ** is only necessary if the default setting is found to be suboptimal |
| 8009 | 8009 | ** for a particular application. |
| 8010 | 8010 | */ |
| 8011 | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); | |
| 8011 | +SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N); | |
| 8012 | 8012 | |
| 8013 | 8013 | /* |
| 8014 | 8014 | ** CAPI3REF: Checkpoint a database |
| 8015 | 8015 | ** METHOD: sqlite3 |
| 8016 | 8016 | ** |
| @@ -8028,11 +8028,11 @@ | ||
| 8028 | 8028 | ** interface was added. This interface is retained for backwards |
| 8029 | 8029 | ** compatibility and as a convenience for applications that need to manually |
| 8030 | 8030 | ** start a callback but which do not need the full power (and corresponding |
| 8031 | 8031 | ** complication) of [sqlite3_wal_checkpoint_v2()]. |
| 8032 | 8032 | */ |
| 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); | |
| 8034 | 8034 | |
| 8035 | 8035 | /* |
| 8036 | 8036 | ** CAPI3REF: Checkpoint a database |
| 8037 | 8037 | ** METHOD: sqlite3 |
| 8038 | 8038 | ** |
| @@ -8122,11 +8122,11 @@ | ||
| 8122 | 8122 | ** [sqlite3_errcode()] and [sqlite3_errmsg()]. |
| 8123 | 8123 | ** |
| 8124 | 8124 | ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface |
| 8125 | 8125 | ** from SQL. |
| 8126 | 8126 | */ |
| 8127 | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( | |
| 8127 | +SQLITE_API int sqlite3_wal_checkpoint_v2( | |
| 8128 | 8128 | sqlite3 *db, /* Database handle */ |
| 8129 | 8129 | const char *zDb, /* Name of attached database (or NULL) */ |
| 8130 | 8130 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 8131 | 8131 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 8132 | 8132 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -8158,11 +8158,11 @@ | ||
| 8158 | 8158 | ** |
| 8159 | 8159 | ** At present, there is only one option that may be configured using |
| 8160 | 8160 | ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options |
| 8161 | 8161 | ** may be added in the future. |
| 8162 | 8162 | */ |
| 8163 | -SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...); | |
| 8163 | +SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); | |
| 8164 | 8164 | |
| 8165 | 8165 | /* |
| 8166 | 8166 | ** CAPI3REF: Virtual Table Configuration Options |
| 8167 | 8167 | ** |
| 8168 | 8168 | ** These macros define the various options to the |
| @@ -8211,11 +8211,11 @@ | ||
| 8211 | 8211 | ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], |
| 8212 | 8212 | ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode |
| 8213 | 8213 | ** of the SQL statement that triggered the call to the [xUpdate] method of the |
| 8214 | 8214 | ** [virtual table]. |
| 8215 | 8215 | */ |
| 8216 | -SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *); | |
| 8216 | +SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *); | |
| 8217 | 8217 | |
| 8218 | 8218 | /* |
| 8219 | 8219 | ** CAPI3REF: Conflict resolution modes |
| 8220 | 8220 | ** KEYWORDS: {conflict resolution mode} |
| 8221 | 8221 | ** |
| @@ -8316,11 +8316,11 @@ | ||
| 8316 | 8316 | ** as if the loop did not exist - it returns non-zero and leave the variable |
| 8317 | 8317 | ** that pOut points to unchanged. |
| 8318 | 8318 | ** |
| 8319 | 8319 | ** See also: [sqlite3_stmt_scanstatus_reset()] |
| 8320 | 8320 | */ |
| 8321 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( | |
| 8321 | +SQLITE_API int sqlite3_stmt_scanstatus( | |
| 8322 | 8322 | sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ |
| 8323 | 8323 | int idx, /* Index of loop to report on */ |
| 8324 | 8324 | int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
| 8325 | 8325 | void *pOut /* Result written here */ |
| 8326 | 8326 | ); |
| @@ -8332,11 +8332,11 @@ | ||
| 8332 | 8332 | ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters. |
| 8333 | 8333 | ** |
| 8334 | 8334 | ** This API is only available if the library is built with pre-processor |
| 8335 | 8335 | ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. |
| 8336 | 8336 | */ |
| 8337 | -SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); | |
| 8337 | +SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); | |
| 8338 | 8338 | |
| 8339 | 8339 | /* |
| 8340 | 8340 | ** CAPI3REF: Flush caches to disk mid-transaction |
| 8341 | 8341 | ** |
| 8342 | 8342 | ** ^If a write-transaction is open on [database connection] D when the |
| @@ -8364,11 +8364,11 @@ | ||
| 8364 | 8364 | ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. |
| 8365 | 8365 | ** |
| 8366 | 8366 | ** ^This function does not set the database handle error code or message |
| 8367 | 8367 | ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. |
| 8368 | 8368 | */ |
| 8369 | -SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); | |
| 8369 | +SQLITE_API int sqlite3_db_cacheflush(sqlite3*); | |
| 8370 | 8370 | |
| 8371 | 8371 | /* |
| 8372 | 8372 | ** CAPI3REF: The pre-update hook. |
| 8373 | 8373 | ** |
| 8374 | 8374 | ** ^These interfaces are only available if SQLite is compiled using the |
| @@ -8444,11 +8444,11 @@ | ||
| 8444 | 8444 | ** triggers; or 2 for changes resulting from triggers called by top-level |
| 8445 | 8445 | ** triggers; and so forth. |
| 8446 | 8446 | ** |
| 8447 | 8447 | ** See also: [sqlite3_update_hook()] |
| 8448 | 8448 | */ |
| 8449 | -SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook( | |
| 8449 | +SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook( | |
| 8450 | 8450 | sqlite3 *db, |
| 8451 | 8451 | void(*xPreUpdate)( |
| 8452 | 8452 | void *pCtx, /* Copy of third arg to preupdate_hook() */ |
| 8453 | 8453 | sqlite3 *db, /* Database handle */ |
| 8454 | 8454 | int op, /* SQLITE_UPDATE, DELETE or INSERT */ |
| @@ -8457,14 +8457,14 @@ | ||
| 8457 | 8457 | sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */ |
| 8458 | 8458 | sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */ |
| 8459 | 8459 | ), |
| 8460 | 8460 | void* |
| 8461 | 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 **); | |
| 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 | 8466 | |
| 8467 | 8467 | /* |
| 8468 | 8468 | ** CAPI3REF: Low-level system error code |
| 8469 | 8469 | ** |
| 8470 | 8470 | ** ^Attempt to return the underlying operating system error code or error |
| @@ -8472,11 +8472,11 @@ | ||
| 8472 | 8472 | ** The return value is OS-dependent. For example, on unix systems, after |
| 8473 | 8473 | ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be |
| 8474 | 8474 | ** called to get back the underlying "errno" that caused the problem, such |
| 8475 | 8475 | ** as ENOSPC, EAUTH, EISDIR, and so forth. |
| 8476 | 8476 | */ |
| 8477 | -SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*); | |
| 8477 | +SQLITE_API int sqlite3_system_errno(sqlite3*); | |
| 8478 | 8478 | |
| 8479 | 8479 | /* |
| 8480 | 8480 | ** CAPI3REF: Database Snapshot |
| 8481 | 8481 | ** KEYWORDS: {snapshot} |
| 8482 | 8482 | ** EXPERIMENTAL |
| @@ -8522,11 +8522,11 @@ | ||
| 8522 | 8522 | ** to avoid a memory leak. |
| 8523 | 8523 | ** |
| 8524 | 8524 | ** The [sqlite3_snapshot_get()] interface is only available when the |
| 8525 | 8525 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8526 | 8526 | */ |
| 8527 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get( | |
| 8527 | +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get( | |
| 8528 | 8528 | sqlite3 *db, |
| 8529 | 8529 | const char *zSchema, |
| 8530 | 8530 | sqlite3_snapshot **ppSnapshot |
| 8531 | 8531 | ); |
| 8532 | 8532 | |
| @@ -8560,11 +8560,11 @@ | ||
| 8560 | 8560 | ** database connection in order to make it ready to use snapshots.) |
| 8561 | 8561 | ** |
| 8562 | 8562 | ** The [sqlite3_snapshot_open()] interface is only available when the |
| 8563 | 8563 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8564 | 8564 | */ |
| 8565 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open( | |
| 8565 | +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open( | |
| 8566 | 8566 | sqlite3 *db, |
| 8567 | 8567 | const char *zSchema, |
| 8568 | 8568 | sqlite3_snapshot *pSnapshot |
| 8569 | 8569 | ); |
| 8570 | 8570 | |
| @@ -8577,11 +8577,11 @@ | ||
| 8577 | 8577 | ** using this routine to avoid a memory leak. |
| 8578 | 8578 | ** |
| 8579 | 8579 | ** The [sqlite3_snapshot_free()] interface is only available when the |
| 8580 | 8580 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8581 | 8581 | */ |
| 8582 | -SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*); | |
| 8582 | +SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*); | |
| 8583 | 8583 | |
| 8584 | 8584 | /* |
| 8585 | 8585 | ** CAPI3REF: Compare the ages of two snapshot handles. |
| 8586 | 8586 | ** EXPERIMENTAL |
| 8587 | 8587 | ** |
| @@ -8601,11 +8601,11 @@ | ||
| 8601 | 8601 | ** |
| 8602 | 8602 | ** Otherwise, this API returns a negative value if P1 refers to an older |
| 8603 | 8603 | ** snapshot than P2, zero if the two handles refer to the same database |
| 8604 | 8604 | ** snapshot, and a positive value if P1 is a newer snapshot than P2. |
| 8605 | 8605 | */ |
| 8606 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp( | |
| 8606 | +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp( | |
| 8607 | 8607 | sqlite3_snapshot *p1, |
| 8608 | 8608 | sqlite3_snapshot *p2 |
| 8609 | 8609 | ); |
| 8610 | 8610 | |
| 8611 | 8611 | /* |
| @@ -8659,11 +8659,11 @@ | ||
| 8659 | 8659 | ** Register a geometry callback named zGeom that can be used as part of an |
| 8660 | 8660 | ** R-Tree geometry query as follows: |
| 8661 | 8661 | ** |
| 8662 | 8662 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...) |
| 8663 | 8663 | */ |
| 8664 | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( | |
| 8664 | +SQLITE_API int sqlite3_rtree_geometry_callback( | |
| 8665 | 8665 | sqlite3 *db, |
| 8666 | 8666 | const char *zGeom, |
| 8667 | 8667 | int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), |
| 8668 | 8668 | void *pContext |
| 8669 | 8669 | ); |
| @@ -8685,11 +8685,11 @@ | ||
| 8685 | 8685 | ** Register a 2nd-generation geometry callback named zScore that can be |
| 8686 | 8686 | ** used as part of an R-Tree geometry query as follows: |
| 8687 | 8687 | ** |
| 8688 | 8688 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...) |
| 8689 | 8689 | */ |
| 8690 | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( | |
| 8690 | +SQLITE_API int sqlite3_rtree_query_callback( | |
| 8691 | 8691 | sqlite3 *db, |
| 8692 | 8692 | const char *zQueryFunc, |
| 8693 | 8693 | int (*xQueryFunc)(sqlite3_rtree_query_info*), |
| 8694 | 8694 | void *pContext, |
| 8695 | 8695 | void (*xDestructor)(void*) |
| @@ -11900,12 +11900,12 @@ | ||
| 11900 | 11900 | */ |
| 11901 | 11901 | #ifdef SQLITE_OMIT_WSD |
| 11902 | 11902 | #define SQLITE_WSD const |
| 11903 | 11903 | #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v))) |
| 11904 | 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); | |
| 11905 | +SQLITE_API int sqlite3_wsd_init(int N, int J); | |
| 11906 | +SQLITE_API void *sqlite3_wsd_find(void *K, int L); | |
| 11907 | 11907 | #else |
| 11908 | 11908 | #define SQLITE_WSD |
| 11909 | 11909 | #define GLOBAL(t,v) v |
| 11910 | 11910 | #define sqlite3GlobalConfig sqlite3Config |
| 11911 | 11911 | #endif |
| @@ -12559,16 +12559,16 @@ | ||
| 12559 | 12559 | #define OP_Found 31 /* synopsis: key=r[P3@P4] */ |
| 12560 | 12560 | #define OP_SeekRowid 32 /* synopsis: intkey=r[P3] */ |
| 12561 | 12561 | #define OP_NotExists 33 /* synopsis: intkey=r[P3] */ |
| 12562 | 12562 | #define OP_IsNull 34 /* same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */ |
| 12563 | 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 */ | |
| 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 | 12570 | #define OP_Last 42 |
| 12571 | 12571 | #define OP_BitAnd 43 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */ |
| 12572 | 12572 | #define OP_BitOr 44 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */ |
| 12573 | 12573 | #define OP_ShiftLeft 45 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */ |
| 12574 | 12574 | #define OP_ShiftRight 46 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */ |
| @@ -17561,11 +17561,11 @@ | ||
| 17561 | 17561 | ** was used and false if not. |
| 17562 | 17562 | ** |
| 17563 | 17563 | ** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix |
| 17564 | 17564 | ** is not required for a match. |
| 17565 | 17565 | */ |
| 17566 | -SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName){ | |
| 17566 | +SQLITE_API int sqlite3_compileoption_used(const char *zOptName){ | |
| 17567 | 17567 | int i, n; |
| 17568 | 17568 | |
| 17569 | 17569 | #if SQLITE_ENABLE_API_ARMOR |
| 17570 | 17570 | if( zOptName==0 ){ |
| 17571 | 17571 | (void)SQLITE_MISUSE_BKPT; |
| @@ -17589,11 +17589,11 @@ | ||
| 17589 | 17589 | |
| 17590 | 17590 | /* |
| 17591 | 17591 | ** Return the N-th compile-time option string. If N is out of range, |
| 17592 | 17592 | ** return a NULL pointer. |
| 17593 | 17593 | */ |
| 17594 | -SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N){ | |
| 17594 | +SQLITE_API const char *sqlite3_compileoption_get(int N){ | |
| 17595 | 17595 | if( N>=0 && N<ArraySize(azCompileOpt) ){ |
| 17596 | 17596 | return azCompileOpt[N]; |
| 17597 | 17597 | } |
| 17598 | 17598 | return 0; |
| 17599 | 17599 | } |
| @@ -18299,11 +18299,11 @@ | ||
| 18299 | 18299 | } |
| 18300 | 18300 | |
| 18301 | 18301 | /* |
| 18302 | 18302 | ** Query status information. |
| 18303 | 18303 | */ |
| 18304 | -SQLITE_API int SQLITE_STDCALL sqlite3_status64( | |
| 18304 | +SQLITE_API int sqlite3_status64( | |
| 18305 | 18305 | int op, |
| 18306 | 18306 | sqlite3_int64 *pCurrent, |
| 18307 | 18307 | sqlite3_int64 *pHighwater, |
| 18308 | 18308 | int resetFlag |
| 18309 | 18309 | ){ |
| @@ -18324,11 +18324,11 @@ | ||
| 18324 | 18324 | } |
| 18325 | 18325 | sqlite3_mutex_leave(pMutex); |
| 18326 | 18326 | (void)pMutex; /* Prevent warning when SQLITE_THREADSAFE=0 */ |
| 18327 | 18327 | return SQLITE_OK; |
| 18328 | 18328 | } |
| 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){ | |
| 18330 | 18330 | sqlite3_int64 iCur = 0, iHwtr = 0; |
| 18331 | 18331 | int rc; |
| 18332 | 18332 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 18333 | 18333 | if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT; |
| 18334 | 18334 | #endif |
| @@ -18341,11 +18341,11 @@ | ||
| 18341 | 18341 | } |
| 18342 | 18342 | |
| 18343 | 18343 | /* |
| 18344 | 18344 | ** Query status information for a single database connection |
| 18345 | 18345 | */ |
| 18346 | -SQLITE_API int SQLITE_STDCALL sqlite3_db_status( | |
| 18346 | +SQLITE_API int sqlite3_db_status( | |
| 18347 | 18347 | sqlite3 *db, /* The database connection whose status is desired */ |
| 18348 | 18348 | int op, /* Status verb */ |
| 18349 | 18349 | int *pCurrent, /* Write current value here */ |
| 18350 | 18350 | int *pHighwater, /* Write high-water mark here */ |
| 18351 | 18351 | int resetFlag /* Reset high-water mark if true */ |
| @@ -20018,11 +20018,11 @@ | ||
| 20018 | 20018 | |
| 20019 | 20019 | /* |
| 20020 | 20020 | ** Locate a VFS by name. If no name is given, simply return the |
| 20021 | 20021 | ** first VFS on the list. |
| 20022 | 20022 | */ |
| 20023 | -SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfs){ | |
| 20023 | +SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){ | |
| 20024 | 20024 | sqlite3_vfs *pVfs = 0; |
| 20025 | 20025 | #if SQLITE_THREADSAFE |
| 20026 | 20026 | sqlite3_mutex *mutex; |
| 20027 | 20027 | #endif |
| 20028 | 20028 | #ifndef SQLITE_OMIT_AUTOINIT |
| @@ -20064,11 +20064,11 @@ | ||
| 20064 | 20064 | /* |
| 20065 | 20065 | ** Register a VFS with the system. It is harmless to register the same |
| 20066 | 20066 | ** VFS multiple times. The new VFS becomes the default if makeDflt is |
| 20067 | 20067 | ** true. |
| 20068 | 20068 | */ |
| 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){ | |
| 20070 | 20070 | MUTEX_LOGIC(sqlite3_mutex *mutex;) |
| 20071 | 20071 | #ifndef SQLITE_OMIT_AUTOINIT |
| 20072 | 20072 | int rc = sqlite3_initialize(); |
| 20073 | 20073 | if( rc ) return rc; |
| 20074 | 20074 | #endif |
| @@ -20092,11 +20092,11 @@ | ||
| 20092 | 20092 | } |
| 20093 | 20093 | |
| 20094 | 20094 | /* |
| 20095 | 20095 | ** Unregister a VFS so that it is no longer accessible. |
| 20096 | 20096 | */ |
| 20097 | -SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ | |
| 20097 | +SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ | |
| 20098 | 20098 | #if SQLITE_THREADSAFE |
| 20099 | 20099 | sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); |
| 20100 | 20100 | #endif |
| 20101 | 20101 | sqlite3_mutex_enter(mutex); |
| 20102 | 20102 | vfsUnlink(pVfs); |
| @@ -22443,11 +22443,11 @@ | ||
| 22443 | 22443 | } |
| 22444 | 22444 | |
| 22445 | 22445 | /* |
| 22446 | 22446 | ** Retrieve a pointer to a static mutex or allocate a new dynamic one. |
| 22447 | 22447 | */ |
| 22448 | -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int id){ | |
| 22448 | +SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int id){ | |
| 22449 | 22449 | #ifndef SQLITE_OMIT_AUTOINIT |
| 22450 | 22450 | if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0; |
| 22451 | 22451 | if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0; |
| 22452 | 22452 | #endif |
| 22453 | 22453 | assert( sqlite3GlobalConfig.mutex.xMutexAlloc ); |
| @@ -22464,11 +22464,11 @@ | ||
| 22464 | 22464 | } |
| 22465 | 22465 | |
| 22466 | 22466 | /* |
| 22467 | 22467 | ** Free a dynamic mutex. |
| 22468 | 22468 | */ |
| 22469 | -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){ | |
| 22469 | +SQLITE_API void sqlite3_mutex_free(sqlite3_mutex *p){ | |
| 22470 | 22470 | if( p ){ |
| 22471 | 22471 | assert( sqlite3GlobalConfig.mutex.xMutexFree ); |
| 22472 | 22472 | sqlite3GlobalConfig.mutex.xMutexFree(p); |
| 22473 | 22473 | } |
| 22474 | 22474 | } |
| @@ -22475,11 +22475,11 @@ | ||
| 22475 | 22475 | |
| 22476 | 22476 | /* |
| 22477 | 22477 | ** Obtain the mutex p. If some other thread already has the mutex, block |
| 22478 | 22478 | ** until it can be obtained. |
| 22479 | 22479 | */ |
| 22480 | -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){ | |
| 22480 | +SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex *p){ | |
| 22481 | 22481 | if( p ){ |
| 22482 | 22482 | assert( sqlite3GlobalConfig.mutex.xMutexEnter ); |
| 22483 | 22483 | sqlite3GlobalConfig.mutex.xMutexEnter(p); |
| 22484 | 22484 | } |
| 22485 | 22485 | } |
| @@ -22486,11 +22486,11 @@ | ||
| 22486 | 22486 | |
| 22487 | 22487 | /* |
| 22488 | 22488 | ** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another |
| 22489 | 22489 | ** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. |
| 22490 | 22490 | */ |
| 22491 | -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){ | |
| 22491 | +SQLITE_API int sqlite3_mutex_try(sqlite3_mutex *p){ | |
| 22492 | 22492 | int rc = SQLITE_OK; |
| 22493 | 22493 | if( p ){ |
| 22494 | 22494 | assert( sqlite3GlobalConfig.mutex.xMutexTry ); |
| 22495 | 22495 | return sqlite3GlobalConfig.mutex.xMutexTry(p); |
| 22496 | 22496 | } |
| @@ -22501,11 +22501,11 @@ | ||
| 22501 | 22501 | ** The sqlite3_mutex_leave() routine exits a mutex that was previously |
| 22502 | 22502 | ** entered by the same thread. The behavior is undefined if the mutex |
| 22503 | 22503 | ** is not currently entered. If a NULL pointer is passed as an argument |
| 22504 | 22504 | ** this function is a no-op. |
| 22505 | 22505 | */ |
| 22506 | -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){ | |
| 22506 | +SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex *p){ | |
| 22507 | 22507 | if( p ){ |
| 22508 | 22508 | assert( sqlite3GlobalConfig.mutex.xMutexLeave ); |
| 22509 | 22509 | sqlite3GlobalConfig.mutex.xMutexLeave(p); |
| 22510 | 22510 | } |
| 22511 | 22511 | } |
| @@ -22513,15 +22513,15 @@ | ||
| 22513 | 22513 | #ifndef NDEBUG |
| 22514 | 22514 | /* |
| 22515 | 22515 | ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are |
| 22516 | 22516 | ** intended for use inside assert() statements. |
| 22517 | 22517 | */ |
| 22518 | -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex *p){ | |
| 22518 | +SQLITE_API int sqlite3_mutex_held(sqlite3_mutex *p){ | |
| 22519 | 22519 | assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld ); |
| 22520 | 22520 | return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p); |
| 22521 | 22521 | } |
| 22522 | -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex *p){ | |
| 22522 | +SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *p){ | |
| 22523 | 22523 | assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld ); |
| 22524 | 22524 | return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p); |
| 22525 | 22525 | } |
| 22526 | 22526 | #endif |
| 22527 | 22527 | |
| @@ -23549,12 +23549,12 @@ | ||
| 23549 | 23549 | ** of the sqlite3_initialize() and sqlite3_shutdown() processing, the |
| 23550 | 23550 | ** "interlocked" magic used here is probably not strictly necessary. |
| 23551 | 23551 | */ |
| 23552 | 23552 | static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0; |
| 23553 | 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 */ | |
| 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 | 23556 | |
| 23557 | 23557 | static int winMutexInit(void){ |
| 23558 | 23558 | /* The first to increment to 1 does actual initialization */ |
| 23559 | 23559 | if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){ |
| 23560 | 23560 | int i; |
| @@ -23850,11 +23850,11 @@ | ||
| 23850 | 23850 | /* |
| 23851 | 23851 | ** Attempt to release up to n bytes of non-essential memory currently |
| 23852 | 23852 | ** held by SQLite. An example of non-essential memory is memory used to |
| 23853 | 23853 | ** cache database pages that are not currently in use. |
| 23854 | 23854 | */ |
| 23855 | -SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int n){ | |
| 23855 | +SQLITE_API int sqlite3_release_memory(int n){ | |
| 23856 | 23856 | #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT |
| 23857 | 23857 | return sqlite3PcacheReleaseMemory(n); |
| 23858 | 23858 | #else |
| 23859 | 23859 | /* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine |
| 23860 | 23860 | ** is a no-op returning zero if SQLite is not compiled with |
| @@ -23909,11 +23909,11 @@ | ||
| 23909 | 23909 | /* |
| 23910 | 23910 | ** Deprecated external interface. It used to set an alarm callback |
| 23911 | 23911 | ** that was invoked when memory usage grew too large. Now it is a |
| 23912 | 23912 | ** no-op. |
| 23913 | 23913 | */ |
| 23914 | -SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm( | |
| 23914 | +SQLITE_API int sqlite3_memory_alarm( | |
| 23915 | 23915 | void(*xCallback)(void *pArg, sqlite3_int64 used,int N), |
| 23916 | 23916 | void *pArg, |
| 23917 | 23917 | sqlite3_int64 iThreshold |
| 23918 | 23918 | ){ |
| 23919 | 23919 | (void)xCallback; |
| @@ -23925,11 +23925,11 @@ | ||
| 23925 | 23925 | |
| 23926 | 23926 | /* |
| 23927 | 23927 | ** Set the soft heap-size limit for the library. Passing a zero or |
| 23928 | 23928 | ** negative value indicates no limit. |
| 23929 | 23929 | */ |
| 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){ | |
| 23931 | 23931 | sqlite3_int64 priorLimit; |
| 23932 | 23932 | sqlite3_int64 excess; |
| 23933 | 23933 | sqlite3_int64 nUsed; |
| 23934 | 23934 | #ifndef SQLITE_OMIT_AUTOINIT |
| 23935 | 23935 | int rc = sqlite3_initialize(); |
| @@ -23947,11 +23947,11 @@ | ||
| 23947 | 23947 | sqlite3_mutex_leave(mem0.mutex); |
| 23948 | 23948 | excess = sqlite3_memory_used() - n; |
| 23949 | 23949 | if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff)); |
| 23950 | 23950 | return priorLimit; |
| 23951 | 23951 | } |
| 23952 | -SQLITE_API void SQLITE_STDCALL sqlite3_soft_heap_limit(int n){ | |
| 23952 | +SQLITE_API void sqlite3_soft_heap_limit(int n){ | |
| 23953 | 23953 | if( n<0 ) n = 0; |
| 23954 | 23954 | sqlite3_soft_heap_limit64(n); |
| 23955 | 23955 | } |
| 23956 | 23956 | |
| 23957 | 23957 | /* |
| @@ -24016,11 +24016,11 @@ | ||
| 24016 | 24016 | } |
| 24017 | 24017 | |
| 24018 | 24018 | /* |
| 24019 | 24019 | ** Return the amount of memory currently checked out. |
| 24020 | 24020 | */ |
| 24021 | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){ | |
| 24021 | +SQLITE_API sqlite3_int64 sqlite3_memory_used(void){ | |
| 24022 | 24022 | sqlite3_int64 res, mx; |
| 24023 | 24023 | sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0); |
| 24024 | 24024 | return res; |
| 24025 | 24025 | } |
| 24026 | 24026 | |
| @@ -24027,11 +24027,11 @@ | ||
| 24027 | 24027 | /* |
| 24028 | 24028 | ** Return the maximum amount of memory that has ever been |
| 24029 | 24029 | ** checked out since either the beginning of this process |
| 24030 | 24030 | ** or since the most recent reset. |
| 24031 | 24031 | */ |
| 24032 | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag){ | |
| 24032 | +SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag){ | |
| 24033 | 24033 | sqlite3_int64 res, mx; |
| 24034 | 24034 | sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag); |
| 24035 | 24035 | return mx; |
| 24036 | 24036 | } |
| 24037 | 24037 | |
| @@ -24107,17 +24107,17 @@ | ||
| 24107 | 24107 | /* |
| 24108 | 24108 | ** This version of the memory allocation is for use by the application. |
| 24109 | 24109 | ** First make sure the memory subsystem is initialized, then do the |
| 24110 | 24110 | ** allocation. |
| 24111 | 24111 | */ |
| 24112 | -SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int n){ | |
| 24112 | +SQLITE_API void *sqlite3_malloc(int n){ | |
| 24113 | 24113 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24114 | 24114 | if( sqlite3_initialize() ) return 0; |
| 24115 | 24115 | #endif |
| 24116 | 24116 | return n<=0 ? 0 : sqlite3Malloc(n); |
| 24117 | 24117 | } |
| 24118 | -SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64 n){ | |
| 24118 | +SQLITE_API void *sqlite3_malloc64(sqlite3_uint64 n){ | |
| 24119 | 24119 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24120 | 24120 | if( sqlite3_initialize() ) return 0; |
| 24121 | 24121 | #endif |
| 24122 | 24122 | return sqlite3Malloc(n); |
| 24123 | 24123 | } |
| @@ -24256,20 +24256,20 @@ | ||
| 24256 | 24256 | }else{ |
| 24257 | 24257 | assert( sqlite3_mutex_held(db->mutex) ); |
| 24258 | 24258 | return db->lookaside.sz; |
| 24259 | 24259 | } |
| 24260 | 24260 | } |
| 24261 | -SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){ | |
| 24261 | +SQLITE_API sqlite3_uint64 sqlite3_msize(void *p){ | |
| 24262 | 24262 | assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); |
| 24263 | 24263 | assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); |
| 24264 | 24264 | return p ? sqlite3GlobalConfig.m.xSize(p) : 0; |
| 24265 | 24265 | } |
| 24266 | 24266 | |
| 24267 | 24267 | /* |
| 24268 | 24268 | ** Free memory previously obtained from sqlite3Malloc(). |
| 24269 | 24269 | */ |
| 24270 | -SQLITE_API void SQLITE_STDCALL sqlite3_free(void *p){ | |
| 24270 | +SQLITE_API void sqlite3_free(void *p){ | |
| 24271 | 24271 | if( p==0 ) return; /* IMP: R-49053-54554 */ |
| 24272 | 24272 | assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); |
| 24273 | 24273 | assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); |
| 24274 | 24274 | if( sqlite3GlobalConfig.bMemstat ){ |
| 24275 | 24275 | sqlite3_mutex_enter(mem0.mutex); |
| @@ -24374,18 +24374,18 @@ | ||
| 24374 | 24374 | |
| 24375 | 24375 | /* |
| 24376 | 24376 | ** The public interface to sqlite3Realloc. Make sure that the memory |
| 24377 | 24377 | ** subsystem is initialized prior to invoking sqliteRealloc. |
| 24378 | 24378 | */ |
| 24379 | -SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void *pOld, int n){ | |
| 24379 | +SQLITE_API void *sqlite3_realloc(void *pOld, int n){ | |
| 24380 | 24380 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24381 | 24381 | if( sqlite3_initialize() ) return 0; |
| 24382 | 24382 | #endif |
| 24383 | 24383 | if( n<0 ) n = 0; /* IMP: R-26507-47431 */ |
| 24384 | 24384 | return sqlite3Realloc(pOld, n); |
| 24385 | 24385 | } |
| 24386 | -SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){ | |
| 24386 | +SQLITE_API void *sqlite3_realloc64(void *pOld, sqlite3_uint64 n){ | |
| 24387 | 24387 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24388 | 24388 | if( sqlite3_initialize() ) return 0; |
| 24389 | 24389 | #endif |
| 24390 | 24390 | return sqlite3Realloc(pOld, n); |
| 24391 | 24391 | } |
| @@ -25608,11 +25608,11 @@ | ||
| 25608 | 25608 | |
| 25609 | 25609 | /* |
| 25610 | 25610 | ** Print into memory obtained from sqlite3_malloc(). Omit the internal |
| 25611 | 25611 | ** %-conversion extensions. |
| 25612 | 25612 | */ |
| 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){ | |
| 25614 | 25614 | char *z; |
| 25615 | 25615 | char zBase[SQLITE_PRINT_BUF_SIZE]; |
| 25616 | 25616 | StrAccum acc; |
| 25617 | 25617 | |
| 25618 | 25618 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -25632,11 +25632,11 @@ | ||
| 25632 | 25632 | |
| 25633 | 25633 | /* |
| 25634 | 25634 | ** Print into memory obtained from sqlite3_malloc()(). Omit the internal |
| 25635 | 25635 | ** %-conversion extensions. |
| 25636 | 25636 | */ |
| 25637 | -SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char *zFormat, ...){ | |
| 25637 | +SQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){ | |
| 25638 | 25638 | va_list ap; |
| 25639 | 25639 | char *z; |
| 25640 | 25640 | #ifndef SQLITE_OMIT_AUTOINIT |
| 25641 | 25641 | if( sqlite3_initialize() ) return 0; |
| 25642 | 25642 | #endif |
| @@ -25657,11 +25657,11 @@ | ||
| 25657 | 25657 | ** this without breaking compatibility, so we just have to live with the |
| 25658 | 25658 | ** mistake. |
| 25659 | 25659 | ** |
| 25660 | 25660 | ** sqlite3_vsnprintf() is the varargs version. |
| 25661 | 25661 | */ |
| 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){ | |
| 25663 | 25663 | StrAccum acc; |
| 25664 | 25664 | if( n<=0 ) return zBuf; |
| 25665 | 25665 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 25666 | 25666 | if( zBuf==0 || zFormat==0 ) { |
| 25667 | 25667 | (void)SQLITE_MISUSE_BKPT; |
| @@ -25671,11 +25671,11 @@ | ||
| 25671 | 25671 | #endif |
| 25672 | 25672 | sqlite3StrAccumInit(&acc, 0, zBuf, n, 0); |
| 25673 | 25673 | sqlite3VXPrintf(&acc, zFormat, ap); |
| 25674 | 25674 | return sqlite3StrAccumFinish(&acc); |
| 25675 | 25675 | } |
| 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, ...){ | |
| 25677 | 25677 | char *z; |
| 25678 | 25678 | va_list ap; |
| 25679 | 25679 | va_start(ap,zFormat); |
| 25680 | 25680 | z = sqlite3_vsnprintf(n, zBuf, zFormat, ap); |
| 25681 | 25681 | va_end(ap); |
| @@ -25707,11 +25707,11 @@ | ||
| 25707 | 25707 | } |
| 25708 | 25708 | |
| 25709 | 25709 | /* |
| 25710 | 25710 | ** Format and write a message to the log if logging is enabled. |
| 25711 | 25711 | */ |
| 25712 | -SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...){ | |
| 25712 | +SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...){ | |
| 25713 | 25713 | va_list ap; /* Vararg list */ |
| 25714 | 25714 | if( sqlite3GlobalConfig.xLog ){ |
| 25715 | 25715 | va_start(ap, zFormat); |
| 25716 | 25716 | renderLogMsg(iErrCode, zFormat, ap); |
| 25717 | 25717 | va_end(ap); |
| @@ -26284,11 +26284,11 @@ | ||
| 26284 | 26284 | } sqlite3Prng; |
| 26285 | 26285 | |
| 26286 | 26286 | /* |
| 26287 | 26287 | ** Return N random bytes. |
| 26288 | 26288 | */ |
| 26289 | -SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *pBuf){ | |
| 26289 | +SQLITE_API void sqlite3_randomness(int N, void *pBuf){ | |
| 26290 | 26290 | unsigned char t; |
| 26291 | 26291 | unsigned char *zBuf = pBuf; |
| 26292 | 26292 | |
| 26293 | 26293 | /* The "wsdPrng" macro will resolve to the pseudo-random number generator |
| 26294 | 26294 | ** state vector. If writable static data is unsupported on the target, |
| @@ -27487,11 +27487,11 @@ | ||
| 27487 | 27487 | ** sqlite3_strnicmp() APIs allow applications and extensions to compare |
| 27488 | 27488 | ** the contents of two buffers containing UTF-8 strings in a |
| 27489 | 27489 | ** case-independent fashion, using the same definition of "case |
| 27490 | 27490 | ** independence" that SQLite uses internally when comparing identifiers. |
| 27491 | 27491 | */ |
| 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){ | |
| 27493 | 27493 | if( zLeft==0 ){ |
| 27494 | 27494 | return zRight ? -1 : 0; |
| 27495 | 27495 | }else if( zRight==0 ){ |
| 27496 | 27496 | return 1; |
| 27497 | 27497 | } |
| @@ -27508,11 +27508,11 @@ | ||
| 27508 | 27508 | a++; |
| 27509 | 27509 | b++; |
| 27510 | 27510 | } |
| 27511 | 27511 | return c; |
| 27512 | 27512 | } |
| 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){ | |
| 27514 | 27514 | register unsigned char *a, *b; |
| 27515 | 27515 | if( zLeft==0 ){ |
| 27516 | 27516 | return zRight ? -1 : 0; |
| 27517 | 27517 | }else if( zRight==0 ){ |
| 27518 | 27518 | return 1; |
| @@ -28990,16 +28990,16 @@ | ||
| 28990 | 28990 | /* 31 */ "Found" OpHelp("key=r[P3@P4]"), |
| 28991 | 28991 | /* 32 */ "SeekRowid" OpHelp("intkey=r[P3]"), |
| 28992 | 28992 | /* 33 */ "NotExists" OpHelp("intkey=r[P3]"), |
| 28993 | 28993 | /* 34 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"), |
| 28994 | 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"), | |
| 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 | 29001 | /* 42 */ "Last" OpHelp(""), |
| 29002 | 29002 | /* 43 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"), |
| 29003 | 29003 | /* 44 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"), |
| 29004 | 29004 | /* 45 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"), |
| 29005 | 29005 | /* 46 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"), |
| @@ -36807,11 +36807,11 @@ | ||
| 36807 | 36807 | ** This routine is called once during SQLite initialization and by a |
| 36808 | 36808 | ** single thread. The memory allocation and mutex subsystems have not |
| 36809 | 36809 | ** necessarily been initialized when this routine is called, and so they |
| 36810 | 36810 | ** should not be used. |
| 36811 | 36811 | */ |
| 36812 | -SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ | |
| 36812 | +SQLITE_API int sqlite3_os_init(void){ | |
| 36813 | 36813 | /* |
| 36814 | 36814 | ** The following macro defines an initializer for an sqlite3_vfs object. |
| 36815 | 36815 | ** The name of the VFS is NAME. The pAppData is a pointer to a pointer |
| 36816 | 36816 | ** to the "finder" function. (pAppData is a pointer to a pointer because |
| 36817 | 36817 | ** silly C90 rules prohibit a void* from being cast to a function pointer |
| @@ -36906,11 +36906,11 @@ | ||
| 36906 | 36906 | ** |
| 36907 | 36907 | ** Some operating systems might need to do some cleanup in this routine, |
| 36908 | 36908 | ** to release dynamically allocated objects. But not on unix. |
| 36909 | 36909 | ** This routine is a no-op for unix. |
| 36910 | 36910 | */ |
| 36911 | -SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ | |
| 36911 | +SQLITE_API int sqlite3_os_end(void){ | |
| 36912 | 36912 | return SQLITE_OK; |
| 36913 | 36913 | } |
| 36914 | 36914 | |
| 36915 | 36915 | #endif /* SQLITE_OS_UNIX */ |
| 36916 | 36916 | |
| @@ -38341,11 +38341,11 @@ | ||
| 38341 | 38341 | ** compact it. Upon success, SQLITE_OK will be returned. Upon failure, one |
| 38342 | 38342 | ** of SQLITE_NOMEM, SQLITE_ERROR, or SQLITE_NOTFOUND will be returned. The |
| 38343 | 38343 | ** "pnLargest" argument, if non-zero, will be used to return the size of the |
| 38344 | 38344 | ** largest committed free block in the heap, in bytes. |
| 38345 | 38345 | */ |
| 38346 | -SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){ | |
| 38346 | +SQLITE_API int sqlite3_win32_compact_heap(LPUINT pnLargest){ | |
| 38347 | 38347 | int rc = SQLITE_OK; |
| 38348 | 38348 | UINT nLargest = 0; |
| 38349 | 38349 | HANDLE hHeap; |
| 38350 | 38350 | |
| 38351 | 38351 | winMemAssertMagic(); |
| @@ -38381,11 +38381,11 @@ | ||
| 38381 | 38381 | ** If a Win32 native heap has been configured, this function will attempt to |
| 38382 | 38382 | ** destroy and recreate it. If the Win32 native heap is not isolated and/or |
| 38383 | 38383 | ** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will |
| 38384 | 38384 | ** be returned and no changes will be made to the Win32 native heap. |
| 38385 | 38385 | */ |
| 38386 | -SQLITE_API int SQLITE_STDCALL sqlite3_win32_reset_heap(){ | |
| 38386 | +SQLITE_API int sqlite3_win32_reset_heap(){ | |
| 38387 | 38387 | int rc; |
| 38388 | 38388 | MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ |
| 38389 | 38389 | MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */ |
| 38390 | 38390 | MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); ) |
| 38391 | 38391 | MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); ) |
| @@ -38426,11 +38426,11 @@ | ||
| 38426 | 38426 | /* |
| 38427 | 38427 | ** This function outputs the specified (ANSI) string to the Win32 debugger |
| 38428 | 38428 | ** (if available). |
| 38429 | 38429 | */ |
| 38430 | 38430 | |
| 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){ | |
| 38432 | 38432 | char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE]; |
| 38433 | 38433 | int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */ |
| 38434 | 38434 | if( nMin<-1 ) nMin = -1; /* all negative values become -1. */ |
| 38435 | 38435 | assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE ); |
| 38436 | 38436 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -38472,11 +38472,11 @@ | ||
| 38472 | 38472 | */ |
| 38473 | 38473 | #if SQLITE_OS_WINRT |
| 38474 | 38474 | static HANDLE sleepObj = NULL; |
| 38475 | 38475 | #endif |
| 38476 | 38476 | |
| 38477 | -SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds){ | |
| 38477 | +SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds){ | |
| 38478 | 38478 | #if SQLITE_OS_WINRT |
| 38479 | 38479 | if ( sleepObj==NULL ){ |
| 38480 | 38480 | sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET, |
| 38481 | 38481 | SYNCHRONIZE); |
| 38482 | 38482 | } |
| @@ -38521,11 +38521,11 @@ | ||
| 38521 | 38521 | |
| 38522 | 38522 | /* |
| 38523 | 38523 | ** This function determines if the machine is running a version of Windows |
| 38524 | 38524 | ** based on the NT kernel. |
| 38525 | 38525 | */ |
| 38526 | -SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void){ | |
| 38526 | +SQLITE_API int sqlite3_win32_is_nt(void){ | |
| 38527 | 38527 | #if SQLITE_OS_WINRT |
| 38528 | 38528 | /* |
| 38529 | 38529 | ** NOTE: The WinRT sub-platform is always assumed to be based on the NT |
| 38530 | 38530 | ** kernel. |
| 38531 | 38531 | */ |
| @@ -38909,11 +38909,11 @@ | ||
| 38909 | 38909 | } |
| 38910 | 38910 | |
| 38911 | 38911 | /* |
| 38912 | 38912 | ** This is a public wrapper for the winUtf8ToUnicode() function. |
| 38913 | 38913 | */ |
| 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){ | |
| 38915 | 38915 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38916 | 38916 | if( !zText ){ |
| 38917 | 38917 | (void)SQLITE_MISUSE_BKPT; |
| 38918 | 38918 | return 0; |
| 38919 | 38919 | } |
| @@ -38925,11 +38925,11 @@ | ||
| 38925 | 38925 | } |
| 38926 | 38926 | |
| 38927 | 38927 | /* |
| 38928 | 38928 | ** This is a public wrapper for the winUnicodeToUtf8() function. |
| 38929 | 38929 | */ |
| 38930 | -SQLITE_API char *SQLITE_STDCALL sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){ | |
| 38930 | +SQLITE_API char *sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){ | |
| 38931 | 38931 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38932 | 38932 | if( !zWideText ){ |
| 38933 | 38933 | (void)SQLITE_MISUSE_BKPT; |
| 38934 | 38934 | return 0; |
| 38935 | 38935 | } |
| @@ -38941,11 +38941,11 @@ | ||
| 38941 | 38941 | } |
| 38942 | 38942 | |
| 38943 | 38943 | /* |
| 38944 | 38944 | ** This is a public wrapper for the winMbcsToUtf8() function. |
| 38945 | 38945 | */ |
| 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){ | |
| 38947 | 38947 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38948 | 38948 | if( !zText ){ |
| 38949 | 38949 | (void)SQLITE_MISUSE_BKPT; |
| 38950 | 38950 | return 0; |
| 38951 | 38951 | } |
| @@ -38957,11 +38957,11 @@ | ||
| 38957 | 38957 | } |
| 38958 | 38958 | |
| 38959 | 38959 | /* |
| 38960 | 38960 | ** This is a public wrapper for the winMbcsToUtf8() function. |
| 38961 | 38961 | */ |
| 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){ | |
| 38963 | 38963 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38964 | 38964 | if( !zText ){ |
| 38965 | 38965 | (void)SQLITE_MISUSE_BKPT; |
| 38966 | 38966 | return 0; |
| 38967 | 38967 | } |
| @@ -38973,11 +38973,11 @@ | ||
| 38973 | 38973 | } |
| 38974 | 38974 | |
| 38975 | 38975 | /* |
| 38976 | 38976 | ** This is a public wrapper for the winUtf8ToMbcs() function. |
| 38977 | 38977 | */ |
| 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){ | |
| 38979 | 38979 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38980 | 38980 | if( !zText ){ |
| 38981 | 38981 | (void)SQLITE_MISUSE_BKPT; |
| 38982 | 38982 | return 0; |
| 38983 | 38983 | } |
| @@ -38989,11 +38989,11 @@ | ||
| 38989 | 38989 | } |
| 38990 | 38990 | |
| 38991 | 38991 | /* |
| 38992 | 38992 | ** This is a public wrapper for the winUtf8ToMbcs() function. |
| 38993 | 38993 | */ |
| 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){ | |
| 38995 | 38995 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38996 | 38996 | if( !zText ){ |
| 38997 | 38997 | (void)SQLITE_MISUSE_BKPT; |
| 38998 | 38998 | return 0; |
| 38999 | 38999 | } |
| @@ -39009,11 +39009,11 @@ | ||
| 39009 | 39009 | ** the provided arguments. The type argument must be 1 in order to set the |
| 39010 | 39010 | ** data directory or 2 in order to set the temporary directory. The zValue |
| 39011 | 39011 | ** argument is the name of the directory to use. The return value will be |
| 39012 | 39012 | ** SQLITE_OK if successful. |
| 39013 | 39013 | */ |
| 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){ | |
| 39015 | 39015 | char **ppDirectory = 0; |
| 39016 | 39016 | #ifndef SQLITE_OMIT_AUTOINIT |
| 39017 | 39017 | int rc = sqlite3_initialize(); |
| 39018 | 39018 | if( rc ) return rc; |
| 39019 | 39019 | #endif |
| @@ -42927,11 +42927,11 @@ | ||
| 42927 | 42927 | } |
| 42928 | 42928 | |
| 42929 | 42929 | /* |
| 42930 | 42930 | ** Initialize and deinitialize the operating system interface. |
| 42931 | 42931 | */ |
| 42932 | -SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ | |
| 42932 | +SQLITE_API int sqlite3_os_init(void){ | |
| 42933 | 42933 | static sqlite3_vfs winVfs = { |
| 42934 | 42934 | 3, /* iVersion */ |
| 42935 | 42935 | sizeof(winFile), /* szOsFile */ |
| 42936 | 42936 | SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */ |
| 42937 | 42937 | 0, /* pNext */ |
| @@ -43058,11 +43058,11 @@ | ||
| 43058 | 43058 | #endif |
| 43059 | 43059 | |
| 43060 | 43060 | return SQLITE_OK; |
| 43061 | 43061 | } |
| 43062 | 43062 | |
| 43063 | -SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ | |
| 43063 | +SQLITE_API int sqlite3_os_end(void){ | |
| 43064 | 43064 | #if SQLITE_OS_WINRT |
| 43065 | 43065 | if( sleepObj!=NULL ){ |
| 43066 | 43066 | osCloseHandle(sleepObj); |
| 43067 | 43067 | sleepObj = NULL; |
| 43068 | 43068 | } |
| @@ -57083,11 +57083,11 @@ | ||
| 57083 | 57083 | |
| 57084 | 57084 | /* |
| 57085 | 57085 | ** Return a +ve value if snapshot p1 is newer than p2. A -ve value if |
| 57086 | 57086 | ** p1 is older than p2 and zero if p1 and p2 are the same snapshot. |
| 57087 | 57087 | */ |
| 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){ | |
| 57089 | 57089 | WalIndexHdr *pHdr1 = (WalIndexHdr*)p1; |
| 57090 | 57090 | WalIndexHdr *pHdr2 = (WalIndexHdr*)p2; |
| 57091 | 57091 | |
| 57092 | 57092 | /* aSalt[0] is a copy of the value stored in the wal file header. It |
| 57093 | 57093 | ** is incremented each time the wal file is restarted. */ |
| @@ -58220,11 +58220,11 @@ | ||
| 58220 | 58220 | ** |
| 58221 | 58221 | ** This routine has no effect on existing database connections. |
| 58222 | 58222 | ** The shared cache setting effects only future calls to |
| 58223 | 58223 | ** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). |
| 58224 | 58224 | */ |
| 58225 | -SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int enable){ | |
| 58225 | +SQLITE_API int sqlite3_enable_shared_cache(int enable){ | |
| 58226 | 58226 | sqlite3GlobalConfig.sharedCacheEnabled = enable; |
| 58227 | 58227 | return SQLITE_OK; |
| 58228 | 58228 | } |
| 58229 | 58229 | #endif |
| 58230 | 58230 | |
| @@ -67993,11 +67993,11 @@ | ||
| 67993 | 67993 | ** a pointer to the new sqlite3_backup object. |
| 67994 | 67994 | ** |
| 67995 | 67995 | ** If an error occurs, NULL is returned and an error code and error message |
| 67996 | 67996 | ** stored in database handle pDestDb. |
| 67997 | 67997 | */ |
| 67998 | -SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( | |
| 67998 | +SQLITE_API sqlite3_backup *sqlite3_backup_init( | |
| 67999 | 67999 | sqlite3* pDestDb, /* Database to write to */ |
| 68000 | 68000 | const char *zDestDb, /* Name of database within pDestDb */ |
| 68001 | 68001 | sqlite3* pSrcDb, /* Database connection to read from */ |
| 68002 | 68002 | const char *zSrcDb /* Name of database within pSrcDb */ |
| 68003 | 68003 | ){ |
| @@ -68201,11 +68201,11 @@ | ||
| 68201 | 68201 | } |
| 68202 | 68202 | |
| 68203 | 68203 | /* |
| 68204 | 68204 | ** Copy nPage pages from the source b-tree to the destination. |
| 68205 | 68205 | */ |
| 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){ | |
| 68207 | 68207 | int rc; |
| 68208 | 68208 | int destMode; /* Destination journal mode */ |
| 68209 | 68209 | int pgszSrc = 0; /* Source page size */ |
| 68210 | 68210 | int pgszDest = 0; /* Destination page size */ |
| 68211 | 68211 | |
| @@ -68445,11 +68445,11 @@ | ||
| 68445 | 68445 | } |
| 68446 | 68446 | |
| 68447 | 68447 | /* |
| 68448 | 68448 | ** Release all resources associated with an sqlite3_backup* handle. |
| 68449 | 68449 | */ |
| 68450 | -SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p){ | |
| 68450 | +SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p){ | |
| 68451 | 68451 | sqlite3_backup **pp; /* Ptr to head of pagers backup list */ |
| 68452 | 68452 | sqlite3 *pSrcDb; /* Source database connection */ |
| 68453 | 68453 | int rc; /* Value to return */ |
| 68454 | 68454 | |
| 68455 | 68455 | /* Enter the mutexes */ |
| @@ -68497,11 +68497,11 @@ | ||
| 68497 | 68497 | |
| 68498 | 68498 | /* |
| 68499 | 68499 | ** Return the number of pages still to be backed up as of the most recent |
| 68500 | 68500 | ** call to sqlite3_backup_step(). |
| 68501 | 68501 | */ |
| 68502 | -SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p){ | |
| 68502 | +SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p){ | |
| 68503 | 68503 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 68504 | 68504 | if( p==0 ){ |
| 68505 | 68505 | (void)SQLITE_MISUSE_BKPT; |
| 68506 | 68506 | return 0; |
| 68507 | 68507 | } |
| @@ -68511,11 +68511,11 @@ | ||
| 68511 | 68511 | |
| 68512 | 68512 | /* |
| 68513 | 68513 | ** Return the total number of pages in the source database as of the most |
| 68514 | 68514 | ** recent call to sqlite3_backup_step(). |
| 68515 | 68515 | */ |
| 68516 | -SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p){ | |
| 68516 | +SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p){ | |
| 68517 | 68517 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 68518 | 68518 | if( p==0 ){ |
| 68519 | 68519 | (void)SQLITE_MISUSE_BKPT; |
| 68520 | 68520 | return 0; |
| 68521 | 68521 | } |
| @@ -71450,16 +71450,25 @@ | ||
| 71450 | 71450 | ){ |
| 71451 | 71451 | const char *zOpName; |
| 71452 | 71452 | const char *zSynopsis; |
| 71453 | 71453 | int nOpName; |
| 71454 | 71454 | int ii, jj; |
| 71455 | + char zAlt[50]; | |
| 71455 | 71456 | zOpName = sqlite3OpcodeName(pOp->opcode); |
| 71456 | 71457 | nOpName = sqlite3Strlen30(zOpName); |
| 71457 | 71458 | if( zOpName[nOpName+1] ){ |
| 71458 | 71459 | int seenCom = 0; |
| 71459 | 71460 | char c; |
| 71460 | 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 | + } | |
| 71461 | 71470 | for(ii=jj=0; jj<nTemp-1 && (c = zSynopsis[ii])!=0; ii++){ |
| 71462 | 71471 | if( c=='P' ){ |
| 71463 | 71472 | c = zSynopsis[++ii]; |
| 71464 | 71473 | if( c=='4' ){ |
| 71465 | 71474 | sqlite3_snprintf(nTemp-jj, zTemp+jj, "%s", zP4); |
| @@ -74967,11 +74976,11 @@ | ||
| 74967 | 74976 | ** execution environment changes in a way that would alter the program |
| 74968 | 74977 | ** that sqlite3_prepare() generates. For example, if new functions or |
| 74969 | 74978 | ** collating sequences are registered or if an authorizer function is |
| 74970 | 74979 | ** added or changed. |
| 74971 | 74980 | */ |
| 74972 | -SQLITE_API int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt *pStmt){ | |
| 74981 | +SQLITE_API int sqlite3_expired(sqlite3_stmt *pStmt){ | |
| 74973 | 74982 | Vdbe *p = (Vdbe*)pStmt; |
| 74974 | 74983 | return p==0 || p->expired; |
| 74975 | 74984 | } |
| 74976 | 74985 | #endif |
| 74977 | 74986 | |
| @@ -75036,11 +75045,11 @@ | ||
| 75036 | 75045 | ** machine. |
| 75037 | 75046 | ** |
| 75038 | 75047 | ** This routine sets the error code and string returned by |
| 75039 | 75048 | ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). |
| 75040 | 75049 | */ |
| 75041 | -SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt){ | |
| 75050 | +SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt){ | |
| 75042 | 75051 | int rc; |
| 75043 | 75052 | if( pStmt==0 ){ |
| 75044 | 75053 | /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL |
| 75045 | 75054 | ** pointer is a harmless no-op. */ |
| 75046 | 75055 | rc = SQLITE_OK; |
| @@ -75063,11 +75072,11 @@ | ||
| 75063 | 75072 | ** the prior execution is returned. |
| 75064 | 75073 | ** |
| 75065 | 75074 | ** This routine sets the error code and string returned by |
| 75066 | 75075 | ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). |
| 75067 | 75076 | */ |
| 75068 | -SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt){ | |
| 75077 | +SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt){ | |
| 75069 | 75078 | int rc; |
| 75070 | 75079 | if( pStmt==0 ){ |
| 75071 | 75080 | rc = SQLITE_OK; |
| 75072 | 75081 | }else{ |
| 75073 | 75082 | Vdbe *v = (Vdbe*)pStmt; |
| @@ -75084,11 +75093,11 @@ | ||
| 75084 | 75093 | } |
| 75085 | 75094 | |
| 75086 | 75095 | /* |
| 75087 | 75096 | ** Set all the parameters in the compiled SQL statement to NULL. |
| 75088 | 75097 | */ |
| 75089 | -SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){ | |
| 75098 | +SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *pStmt){ | |
| 75090 | 75099 | int i; |
| 75091 | 75100 | int rc = SQLITE_OK; |
| 75092 | 75101 | Vdbe *p = (Vdbe*)pStmt; |
| 75093 | 75102 | #if SQLITE_THREADSAFE |
| 75094 | 75103 | sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex; |
| @@ -75108,11 +75117,11 @@ | ||
| 75108 | 75117 | |
| 75109 | 75118 | /**************************** sqlite3_value_ ******************************* |
| 75110 | 75119 | ** The following routines extract information from a Mem or sqlite3_value |
| 75111 | 75120 | ** structure. |
| 75112 | 75121 | */ |
| 75113 | -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){ | |
| 75122 | +SQLITE_API const void *sqlite3_value_blob(sqlite3_value *pVal){ | |
| 75114 | 75123 | Mem *p = (Mem*)pVal; |
| 75115 | 75124 | if( p->flags & (MEM_Blob|MEM_Str) ){ |
| 75116 | 75125 | if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){ |
| 75117 | 75126 | assert( p->flags==MEM_Null && p->z==0 ); |
| 75118 | 75127 | return 0; |
| @@ -75121,48 +75130,48 @@ | ||
| 75121 | 75130 | return p->n ? p->z : 0; |
| 75122 | 75131 | }else{ |
| 75123 | 75132 | return sqlite3_value_text(pVal); |
| 75124 | 75133 | } |
| 75125 | 75134 | } |
| 75126 | -SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value *pVal){ | |
| 75135 | +SQLITE_API int sqlite3_value_bytes(sqlite3_value *pVal){ | |
| 75127 | 75136 | return sqlite3ValueBytes(pVal, SQLITE_UTF8); |
| 75128 | 75137 | } |
| 75129 | -SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value *pVal){ | |
| 75138 | +SQLITE_API int sqlite3_value_bytes16(sqlite3_value *pVal){ | |
| 75130 | 75139 | return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE); |
| 75131 | 75140 | } |
| 75132 | -SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value *pVal){ | |
| 75141 | +SQLITE_API double sqlite3_value_double(sqlite3_value *pVal){ | |
| 75133 | 75142 | return sqlite3VdbeRealValue((Mem*)pVal); |
| 75134 | 75143 | } |
| 75135 | -SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value *pVal){ | |
| 75144 | +SQLITE_API int sqlite3_value_int(sqlite3_value *pVal){ | |
| 75136 | 75145 | return (int)sqlite3VdbeIntValue((Mem*)pVal); |
| 75137 | 75146 | } |
| 75138 | -SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value *pVal){ | |
| 75147 | +SQLITE_API sqlite_int64 sqlite3_value_int64(sqlite3_value *pVal){ | |
| 75139 | 75148 | return sqlite3VdbeIntValue((Mem*)pVal); |
| 75140 | 75149 | } |
| 75141 | -SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value *pVal){ | |
| 75150 | +SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value *pVal){ | |
| 75142 | 75151 | Mem *pMem = (Mem*)pVal; |
| 75143 | 75152 | return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0); |
| 75144 | 75153 | } |
| 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){ | |
| 75146 | 75155 | return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8); |
| 75147 | 75156 | } |
| 75148 | 75157 | #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){ | |
| 75150 | 75159 | return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE); |
| 75151 | 75160 | } |
| 75152 | -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value *pVal){ | |
| 75161 | +SQLITE_API const void *sqlite3_value_text16be(sqlite3_value *pVal){ | |
| 75153 | 75162 | return sqlite3ValueText(pVal, SQLITE_UTF16BE); |
| 75154 | 75163 | } |
| 75155 | -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value *pVal){ | |
| 75164 | +SQLITE_API const void *sqlite3_value_text16le(sqlite3_value *pVal){ | |
| 75156 | 75165 | return sqlite3ValueText(pVal, SQLITE_UTF16LE); |
| 75157 | 75166 | } |
| 75158 | 75167 | #endif /* SQLITE_OMIT_UTF16 */ |
| 75159 | 75168 | /* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five |
| 75160 | 75169 | ** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating |
| 75161 | 75170 | ** point number string BLOB NULL |
| 75162 | 75171 | */ |
| 75163 | -SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value* pVal){ | |
| 75172 | +SQLITE_API int sqlite3_value_type(sqlite3_value* pVal){ | |
| 75164 | 75173 | static const u8 aType[] = { |
| 75165 | 75174 | SQLITE_BLOB, /* 0x00 */ |
| 75166 | 75175 | SQLITE_NULL, /* 0x01 */ |
| 75167 | 75176 | SQLITE_TEXT, /* 0x02 */ |
| 75168 | 75177 | SQLITE_NULL, /* 0x03 */ |
| @@ -75198,11 +75207,11 @@ | ||
| 75198 | 75207 | return aType[pVal->flags&MEM_AffMask]; |
| 75199 | 75208 | } |
| 75200 | 75209 | |
| 75201 | 75210 | /* Make a copy of an sqlite3_value object |
| 75202 | 75211 | */ |
| 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){ | |
| 75204 | 75213 | sqlite3_value *pNew; |
| 75205 | 75214 | if( pOrig==0 ) return 0; |
| 75206 | 75215 | pNew = sqlite3_malloc( sizeof(*pNew) ); |
| 75207 | 75216 | if( pNew==0 ) return 0; |
| 75208 | 75217 | memset(pNew, 0, sizeof(*pNew)); |
| @@ -75221,11 +75230,11 @@ | ||
| 75221 | 75230 | } |
| 75222 | 75231 | |
| 75223 | 75232 | /* Destroy an sqlite3_value object previously obtained from |
| 75224 | 75233 | ** sqlite3_value_dup(). |
| 75225 | 75234 | */ |
| 75226 | -SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value *pOld){ | |
| 75235 | +SQLITE_API void sqlite3_value_free(sqlite3_value *pOld){ | |
| 75227 | 75236 | sqlite3ValueFree(pOld); |
| 75228 | 75237 | } |
| 75229 | 75238 | |
| 75230 | 75239 | |
| 75231 | 75240 | /**************************** sqlite3_result_ ******************************* |
| @@ -75264,21 +75273,21 @@ | ||
| 75264 | 75273 | xDel((void*)p); |
| 75265 | 75274 | } |
| 75266 | 75275 | if( pCtx ) sqlite3_result_error_toobig(pCtx); |
| 75267 | 75276 | return SQLITE_TOOBIG; |
| 75268 | 75277 | } |
| 75269 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_blob( | |
| 75278 | +SQLITE_API void sqlite3_result_blob( | |
| 75270 | 75279 | sqlite3_context *pCtx, |
| 75271 | 75280 | const void *z, |
| 75272 | 75281 | int n, |
| 75273 | 75282 | void (*xDel)(void *) |
| 75274 | 75283 | ){ |
| 75275 | 75284 | assert( n>=0 ); |
| 75276 | 75285 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75277 | 75286 | setResultStrOrError(pCtx, z, n, 0, xDel); |
| 75278 | 75287 | } |
| 75279 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64( | |
| 75288 | +SQLITE_API void sqlite3_result_blob64( | |
| 75280 | 75289 | sqlite3_context *pCtx, |
| 75281 | 75290 | const void *z, |
| 75282 | 75291 | sqlite3_uint64 n, |
| 75283 | 75292 | void (*xDel)(void *) |
| 75284 | 75293 | ){ |
| @@ -75288,56 +75297,56 @@ | ||
| 75288 | 75297 | (void)invokeValueDestructor(z, xDel, pCtx); |
| 75289 | 75298 | }else{ |
| 75290 | 75299 | setResultStrOrError(pCtx, z, (int)n, 0, xDel); |
| 75291 | 75300 | } |
| 75292 | 75301 | } |
| 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){ | |
| 75294 | 75303 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75295 | 75304 | sqlite3VdbeMemSetDouble(pCtx->pOut, rVal); |
| 75296 | 75305 | } |
| 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){ | |
| 75298 | 75307 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75299 | 75308 | pCtx->isError = SQLITE_ERROR; |
| 75300 | 75309 | pCtx->fErrorOrAux = 1; |
| 75301 | 75310 | sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT); |
| 75302 | 75311 | } |
| 75303 | 75312 | #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){ | |
| 75305 | 75314 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75306 | 75315 | pCtx->isError = SQLITE_ERROR; |
| 75307 | 75316 | pCtx->fErrorOrAux = 1; |
| 75308 | 75317 | sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT); |
| 75309 | 75318 | } |
| 75310 | 75319 | #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){ | |
| 75312 | 75321 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75313 | 75322 | sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal); |
| 75314 | 75323 | } |
| 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){ | |
| 75316 | 75325 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75317 | 75326 | sqlite3VdbeMemSetInt64(pCtx->pOut, iVal); |
| 75318 | 75327 | } |
| 75319 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context *pCtx){ | |
| 75328 | +SQLITE_API void sqlite3_result_null(sqlite3_context *pCtx){ | |
| 75320 | 75329 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75321 | 75330 | sqlite3VdbeMemSetNull(pCtx->pOut); |
| 75322 | 75331 | } |
| 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){ | |
| 75324 | 75333 | Mem *pOut = pCtx->pOut; |
| 75325 | 75334 | assert( sqlite3_mutex_held(pOut->db->mutex) ); |
| 75326 | 75335 | pOut->eSubtype = eSubtype & 0xff; |
| 75327 | 75336 | pOut->flags |= MEM_Subtype; |
| 75328 | 75337 | } |
| 75329 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text( | |
| 75338 | +SQLITE_API void sqlite3_result_text( | |
| 75330 | 75339 | sqlite3_context *pCtx, |
| 75331 | 75340 | const char *z, |
| 75332 | 75341 | int n, |
| 75333 | 75342 | void (*xDel)(void *) |
| 75334 | 75343 | ){ |
| 75335 | 75344 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75336 | 75345 | setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel); |
| 75337 | 75346 | } |
| 75338 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text64( | |
| 75347 | +SQLITE_API void sqlite3_result_text64( | |
| 75339 | 75348 | sqlite3_context *pCtx, |
| 75340 | 75349 | const char *z, |
| 75341 | 75350 | sqlite3_uint64 n, |
| 75342 | 75351 | void (*xDel)(void *), |
| 75343 | 75352 | unsigned char enc |
| @@ -75350,56 +75359,56 @@ | ||
| 75350 | 75359 | }else{ |
| 75351 | 75360 | setResultStrOrError(pCtx, z, (int)n, enc, xDel); |
| 75352 | 75361 | } |
| 75353 | 75362 | } |
| 75354 | 75363 | #ifndef SQLITE_OMIT_UTF16 |
| 75355 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16( | |
| 75364 | +SQLITE_API void sqlite3_result_text16( | |
| 75356 | 75365 | sqlite3_context *pCtx, |
| 75357 | 75366 | const void *z, |
| 75358 | 75367 | int n, |
| 75359 | 75368 | void (*xDel)(void *) |
| 75360 | 75369 | ){ |
| 75361 | 75370 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75362 | 75371 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel); |
| 75363 | 75372 | } |
| 75364 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be( | |
| 75373 | +SQLITE_API void sqlite3_result_text16be( | |
| 75365 | 75374 | sqlite3_context *pCtx, |
| 75366 | 75375 | const void *z, |
| 75367 | 75376 | int n, |
| 75368 | 75377 | void (*xDel)(void *) |
| 75369 | 75378 | ){ |
| 75370 | 75379 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75371 | 75380 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel); |
| 75372 | 75381 | } |
| 75373 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le( | |
| 75382 | +SQLITE_API void sqlite3_result_text16le( | |
| 75374 | 75383 | sqlite3_context *pCtx, |
| 75375 | 75384 | const void *z, |
| 75376 | 75385 | int n, |
| 75377 | 75386 | void (*xDel)(void *) |
| 75378 | 75387 | ){ |
| 75379 | 75388 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75380 | 75389 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel); |
| 75381 | 75390 | } |
| 75382 | 75391 | #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){ | |
| 75384 | 75393 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75385 | 75394 | sqlite3VdbeMemCopy(pCtx->pOut, pValue); |
| 75386 | 75395 | } |
| 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){ | |
| 75388 | 75397 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75389 | 75398 | sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n); |
| 75390 | 75399 | } |
| 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){ | |
| 75392 | 75401 | Mem *pOut = pCtx->pOut; |
| 75393 | 75402 | assert( sqlite3_mutex_held(pOut->db->mutex) ); |
| 75394 | 75403 | if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){ |
| 75395 | 75404 | return SQLITE_TOOBIG; |
| 75396 | 75405 | } |
| 75397 | 75406 | sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n); |
| 75398 | 75407 | return SQLITE_OK; |
| 75399 | 75408 | } |
| 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){ | |
| 75401 | 75410 | pCtx->isError = errCode; |
| 75402 | 75411 | pCtx->fErrorOrAux = 1; |
| 75403 | 75412 | #ifdef SQLITE_DEBUG |
| 75404 | 75413 | if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode; |
| 75405 | 75414 | #endif |
| @@ -75408,20 +75417,20 @@ | ||
| 75408 | 75417 | SQLITE_UTF8, SQLITE_STATIC); |
| 75409 | 75418 | } |
| 75410 | 75419 | } |
| 75411 | 75420 | |
| 75412 | 75421 | /* 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){ | |
| 75414 | 75423 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75415 | 75424 | pCtx->isError = SQLITE_TOOBIG; |
| 75416 | 75425 | pCtx->fErrorOrAux = 1; |
| 75417 | 75426 | sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1, |
| 75418 | 75427 | SQLITE_UTF8, SQLITE_STATIC); |
| 75419 | 75428 | } |
| 75420 | 75429 | |
| 75421 | 75430 | /* 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){ | |
| 75423 | 75432 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75424 | 75433 | sqlite3VdbeMemSetNull(pCtx->pOut); |
| 75425 | 75434 | pCtx->isError = SQLITE_NOMEM_BKPT; |
| 75426 | 75435 | pCtx->fErrorOrAux = 1; |
| 75427 | 75436 | sqlite3OomFault(pCtx->pOut->db); |
| @@ -75589,11 +75598,11 @@ | ||
| 75589 | 75598 | /* |
| 75590 | 75599 | ** This is the top-level implementation of sqlite3_step(). Call |
| 75591 | 75600 | ** sqlite3Step() to do most of the work. If a schema error occurs, |
| 75592 | 75601 | ** call sqlite3Reprepare() and try again. |
| 75593 | 75602 | */ |
| 75594 | -SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt *pStmt){ | |
| 75603 | +SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){ | |
| 75595 | 75604 | int rc = SQLITE_OK; /* Result from sqlite3Step() */ |
| 75596 | 75605 | int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */ |
| 75597 | 75606 | Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */ |
| 75598 | 75607 | int cnt = 0; /* Counter to prevent infinite loop of reprepares */ |
| 75599 | 75608 | sqlite3 *db; /* The database connection */ |
| @@ -75640,11 +75649,11 @@ | ||
| 75640 | 75649 | |
| 75641 | 75650 | /* |
| 75642 | 75651 | ** Extract the user data from a sqlite3_context structure and return a |
| 75643 | 75652 | ** pointer to it. |
| 75644 | 75653 | */ |
| 75645 | -SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context *p){ | |
| 75654 | +SQLITE_API void *sqlite3_user_data(sqlite3_context *p){ | |
| 75646 | 75655 | assert( p && p->pFunc ); |
| 75647 | 75656 | return p->pFunc->pUserData; |
| 75648 | 75657 | } |
| 75649 | 75658 | |
| 75650 | 75659 | /* |
| @@ -75655,11 +75664,11 @@ | ||
| 75655 | 75664 | ** returns a copy of the pointer to the database connection (the 1st |
| 75656 | 75665 | ** parameter) of the sqlite3_create_function() and |
| 75657 | 75666 | ** sqlite3_create_function16() routines that originally registered the |
| 75658 | 75667 | ** application defined function. |
| 75659 | 75668 | */ |
| 75660 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context *p){ | |
| 75669 | +SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){ | |
| 75661 | 75670 | assert( p && p->pOut ); |
| 75662 | 75671 | return p->pOut->db; |
| 75663 | 75672 | } |
| 75664 | 75673 | |
| 75665 | 75674 | /* |
| @@ -75731,11 +75740,11 @@ | ||
| 75731 | 75740 | /* |
| 75732 | 75741 | ** Allocate or return the aggregate context for a user function. A new |
| 75733 | 75742 | ** context is allocated on the first call. Subsequent calls return the |
| 75734 | 75743 | ** same context that was returned on prior calls. |
| 75735 | 75744 | */ |
| 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){ | |
| 75737 | 75746 | assert( p && p->pFunc && p->pFunc->xFinalize ); |
| 75738 | 75747 | assert( sqlite3_mutex_held(p->pOut->db->mutex) ); |
| 75739 | 75748 | testcase( nByte<0 ); |
| 75740 | 75749 | if( (p->pMem->flags & MEM_Agg)==0 ){ |
| 75741 | 75750 | return createAggContext(p, nByte); |
| @@ -75746,11 +75755,11 @@ | ||
| 75746 | 75755 | |
| 75747 | 75756 | /* |
| 75748 | 75757 | ** Return the auxiliary data pointer, if any, for the iArg'th argument to |
| 75749 | 75758 | ** the user-function defined by pCtx. |
| 75750 | 75759 | */ |
| 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){ | |
| 75752 | 75761 | AuxData *pAuxData; |
| 75753 | 75762 | |
| 75754 | 75763 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75755 | 75764 | #if SQLITE_ENABLE_STAT3_OR_STAT4 |
| 75756 | 75765 | if( pCtx->pVdbe==0 ) return 0; |
| @@ -75767,11 +75776,11 @@ | ||
| 75767 | 75776 | /* |
| 75768 | 75777 | ** Set the auxiliary data pointer and delete function, for the iArg'th |
| 75769 | 75778 | ** argument to the user-function defined by pCtx. Any previous value is |
| 75770 | 75779 | ** deleted by calling the delete function specified when it was set. |
| 75771 | 75780 | */ |
| 75772 | -SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata( | |
| 75781 | +SQLITE_API void sqlite3_set_auxdata( | |
| 75773 | 75782 | sqlite3_context *pCtx, |
| 75774 | 75783 | int iArg, |
| 75775 | 75784 | void *pAux, |
| 75776 | 75785 | void (*xDelete)(void*) |
| 75777 | 75786 | ){ |
| @@ -75822,29 +75831,29 @@ | ||
| 75822 | 75831 | ** This function is deprecated. Do not use it for new code. It is |
| 75823 | 75832 | ** provide only to avoid breaking legacy code. New aggregate function |
| 75824 | 75833 | ** implementations should keep their own counts within their aggregate |
| 75825 | 75834 | ** context. |
| 75826 | 75835 | */ |
| 75827 | -SQLITE_API int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context *p){ | |
| 75836 | +SQLITE_API int sqlite3_aggregate_count(sqlite3_context *p){ | |
| 75828 | 75837 | assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize ); |
| 75829 | 75838 | return p->pMem->n; |
| 75830 | 75839 | } |
| 75831 | 75840 | #endif |
| 75832 | 75841 | |
| 75833 | 75842 | /* |
| 75834 | 75843 | ** Return the number of columns in the result set for the statement pStmt. |
| 75835 | 75844 | */ |
| 75836 | -SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt){ | |
| 75845 | +SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt){ | |
| 75837 | 75846 | Vdbe *pVm = (Vdbe *)pStmt; |
| 75838 | 75847 | return pVm ? pVm->nResColumn : 0; |
| 75839 | 75848 | } |
| 75840 | 75849 | |
| 75841 | 75850 | /* |
| 75842 | 75851 | ** Return the number of values available from the current row of the |
| 75843 | 75852 | ** currently executing statement pStmt. |
| 75844 | 75853 | */ |
| 75845 | -SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt){ | |
| 75854 | +SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt){ | |
| 75846 | 75855 | Vdbe *pVm = (Vdbe *)pStmt; |
| 75847 | 75856 | if( pVm==0 || pVm->pResultSet==0 ) return 0; |
| 75848 | 75857 | return pVm->nResColumn; |
| 75849 | 75858 | } |
| 75850 | 75859 | |
| @@ -75943,67 +75952,67 @@ | ||
| 75943 | 75952 | |
| 75944 | 75953 | /**************************** sqlite3_column_ ******************************* |
| 75945 | 75954 | ** The following routines are used to access elements of the current row |
| 75946 | 75955 | ** in the result set. |
| 75947 | 75956 | */ |
| 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){ | |
| 75949 | 75958 | const void *val; |
| 75950 | 75959 | val = sqlite3_value_blob( columnMem(pStmt,i) ); |
| 75951 | 75960 | /* Even though there is no encoding conversion, value_blob() might |
| 75952 | 75961 | ** need to call malloc() to expand the result of a zeroblob() |
| 75953 | 75962 | ** expression. |
| 75954 | 75963 | */ |
| 75955 | 75964 | columnMallocFailure(pStmt); |
| 75956 | 75965 | return val; |
| 75957 | 75966 | } |
| 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){ | |
| 75959 | 75968 | int val = sqlite3_value_bytes( columnMem(pStmt,i) ); |
| 75960 | 75969 | columnMallocFailure(pStmt); |
| 75961 | 75970 | return val; |
| 75962 | 75971 | } |
| 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){ | |
| 75964 | 75973 | int val = sqlite3_value_bytes16( columnMem(pStmt,i) ); |
| 75965 | 75974 | columnMallocFailure(pStmt); |
| 75966 | 75975 | return val; |
| 75967 | 75976 | } |
| 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){ | |
| 75969 | 75978 | double val = sqlite3_value_double( columnMem(pStmt,i) ); |
| 75970 | 75979 | columnMallocFailure(pStmt); |
| 75971 | 75980 | return val; |
| 75972 | 75981 | } |
| 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){ | |
| 75974 | 75983 | int val = sqlite3_value_int( columnMem(pStmt,i) ); |
| 75975 | 75984 | columnMallocFailure(pStmt); |
| 75976 | 75985 | return val; |
| 75977 | 75986 | } |
| 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){ | |
| 75979 | 75988 | sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) ); |
| 75980 | 75989 | columnMallocFailure(pStmt); |
| 75981 | 75990 | return val; |
| 75982 | 75991 | } |
| 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){ | |
| 75984 | 75993 | const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) ); |
| 75985 | 75994 | columnMallocFailure(pStmt); |
| 75986 | 75995 | return val; |
| 75987 | 75996 | } |
| 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){ | |
| 75989 | 75998 | Mem *pOut = columnMem(pStmt, i); |
| 75990 | 75999 | if( pOut->flags&MEM_Static ){ |
| 75991 | 76000 | pOut->flags &= ~MEM_Static; |
| 75992 | 76001 | pOut->flags |= MEM_Ephem; |
| 75993 | 76002 | } |
| 75994 | 76003 | columnMallocFailure(pStmt); |
| 75995 | 76004 | return (sqlite3_value *)pOut; |
| 75996 | 76005 | } |
| 75997 | 76006 | #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){ | |
| 75999 | 76008 | const void *val = sqlite3_value_text16( columnMem(pStmt,i) ); |
| 76000 | 76009 | columnMallocFailure(pStmt); |
| 76001 | 76010 | return val; |
| 76002 | 76011 | } |
| 76003 | 76012 | #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){ | |
| 76005 | 76014 | int iType = sqlite3_value_type( columnMem(pStmt,i) ); |
| 76006 | 76015 | columnMallocFailure(pStmt); |
| 76007 | 76016 | return iType; |
| 76008 | 76017 | } |
| 76009 | 76018 | |
| @@ -76063,16 +76072,16 @@ | ||
| 76063 | 76072 | |
| 76064 | 76073 | /* |
| 76065 | 76074 | ** Return the name of the Nth column of the result set returned by SQL |
| 76066 | 76075 | ** statement pStmt. |
| 76067 | 76076 | */ |
| 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){ | |
| 76069 | 76078 | return columnName( |
| 76070 | 76079 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME); |
| 76071 | 76080 | } |
| 76072 | 76081 | #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){ | |
| 76074 | 76083 | return columnName( |
| 76075 | 76084 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME); |
| 76076 | 76085 | } |
| 76077 | 76086 | #endif |
| 76078 | 76087 | |
| @@ -76088,16 +76097,16 @@ | ||
| 76088 | 76097 | #ifndef SQLITE_OMIT_DECLTYPE |
| 76089 | 76098 | /* |
| 76090 | 76099 | ** Return the column declaration type (if applicable) of the 'i'th column |
| 76091 | 76100 | ** of the result set of SQL statement pStmt. |
| 76092 | 76101 | */ |
| 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){ | |
| 76094 | 76103 | return columnName( |
| 76095 | 76104 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE); |
| 76096 | 76105 | } |
| 76097 | 76106 | #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){ | |
| 76099 | 76108 | return columnName( |
| 76100 | 76109 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE); |
| 76101 | 76110 | } |
| 76102 | 76111 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76103 | 76112 | #endif /* SQLITE_OMIT_DECLTYPE */ |
| @@ -76106,16 +76115,16 @@ | ||
| 76106 | 76115 | /* |
| 76107 | 76116 | ** Return the name of the database from which a result column derives. |
| 76108 | 76117 | ** NULL is returned if the result column is an expression or constant or |
| 76109 | 76118 | ** anything else which is not an unambiguous reference to a database column. |
| 76110 | 76119 | */ |
| 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){ | |
| 76112 | 76121 | return columnName( |
| 76113 | 76122 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE); |
| 76114 | 76123 | } |
| 76115 | 76124 | #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){ | |
| 76117 | 76126 | return columnName( |
| 76118 | 76127 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE); |
| 76119 | 76128 | } |
| 76120 | 76129 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76121 | 76130 | |
| @@ -76122,16 +76131,16 @@ | ||
| 76122 | 76131 | /* |
| 76123 | 76132 | ** Return the name of the table from which a result column derives. |
| 76124 | 76133 | ** NULL is returned if the result column is an expression or constant or |
| 76125 | 76134 | ** anything else which is not an unambiguous reference to a database column. |
| 76126 | 76135 | */ |
| 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){ | |
| 76128 | 76137 | return columnName( |
| 76129 | 76138 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE); |
| 76130 | 76139 | } |
| 76131 | 76140 | #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){ | |
| 76133 | 76142 | return columnName( |
| 76134 | 76143 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE); |
| 76135 | 76144 | } |
| 76136 | 76145 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76137 | 76146 | |
| @@ -76138,16 +76147,16 @@ | ||
| 76138 | 76147 | /* |
| 76139 | 76148 | ** Return the name of the table column from which a result column derives. |
| 76140 | 76149 | ** NULL is returned if the result column is an expression or constant or |
| 76141 | 76150 | ** anything else which is not an unambiguous reference to a database column. |
| 76142 | 76151 | */ |
| 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){ | |
| 76144 | 76153 | return columnName( |
| 76145 | 76154 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN); |
| 76146 | 76155 | } |
| 76147 | 76156 | #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){ | |
| 76149 | 76158 | return columnName( |
| 76150 | 76159 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN); |
| 76151 | 76160 | } |
| 76152 | 76161 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76153 | 76162 | #endif /* SQLITE_ENABLE_COLUMN_METADATA */ |
| @@ -76244,11 +76253,11 @@ | ||
| 76244 | 76253 | |
| 76245 | 76254 | |
| 76246 | 76255 | /* |
| 76247 | 76256 | ** Bind a blob value to an SQL statement variable. |
| 76248 | 76257 | */ |
| 76249 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob( | |
| 76258 | +SQLITE_API int sqlite3_bind_blob( | |
| 76250 | 76259 | sqlite3_stmt *pStmt, |
| 76251 | 76260 | int i, |
| 76252 | 76261 | const void *zData, |
| 76253 | 76262 | int nData, |
| 76254 | 76263 | void (*xDel)(void*) |
| @@ -76256,11 +76265,11 @@ | ||
| 76256 | 76265 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76257 | 76266 | if( nData<0 ) return SQLITE_MISUSE_BKPT; |
| 76258 | 76267 | #endif |
| 76259 | 76268 | return bindText(pStmt, i, zData, nData, xDel, 0); |
| 76260 | 76269 | } |
| 76261 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64( | |
| 76270 | +SQLITE_API int sqlite3_bind_blob64( | |
| 76262 | 76271 | sqlite3_stmt *pStmt, |
| 76263 | 76272 | int i, |
| 76264 | 76273 | const void *zData, |
| 76265 | 76274 | sqlite3_uint64 nData, |
| 76266 | 76275 | void (*xDel)(void*) |
| @@ -76270,52 +76279,52 @@ | ||
| 76270 | 76279 | return invokeValueDestructor(zData, xDel, 0); |
| 76271 | 76280 | }else{ |
| 76272 | 76281 | return bindText(pStmt, i, zData, (int)nData, xDel, 0); |
| 76273 | 76282 | } |
| 76274 | 76283 | } |
| 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){ | |
| 76276 | 76285 | int rc; |
| 76277 | 76286 | Vdbe *p = (Vdbe *)pStmt; |
| 76278 | 76287 | rc = vdbeUnbind(p, i); |
| 76279 | 76288 | if( rc==SQLITE_OK ){ |
| 76280 | 76289 | sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue); |
| 76281 | 76290 | sqlite3_mutex_leave(p->db->mutex); |
| 76282 | 76291 | } |
| 76283 | 76292 | return rc; |
| 76284 | 76293 | } |
| 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){ | |
| 76286 | 76295 | return sqlite3_bind_int64(p, i, (i64)iValue); |
| 76287 | 76296 | } |
| 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){ | |
| 76289 | 76298 | int rc; |
| 76290 | 76299 | Vdbe *p = (Vdbe *)pStmt; |
| 76291 | 76300 | rc = vdbeUnbind(p, i); |
| 76292 | 76301 | if( rc==SQLITE_OK ){ |
| 76293 | 76302 | sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue); |
| 76294 | 76303 | sqlite3_mutex_leave(p->db->mutex); |
| 76295 | 76304 | } |
| 76296 | 76305 | return rc; |
| 76297 | 76306 | } |
| 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){ | |
| 76299 | 76308 | int rc; |
| 76300 | 76309 | Vdbe *p = (Vdbe*)pStmt; |
| 76301 | 76310 | rc = vdbeUnbind(p, i); |
| 76302 | 76311 | if( rc==SQLITE_OK ){ |
| 76303 | 76312 | sqlite3_mutex_leave(p->db->mutex); |
| 76304 | 76313 | } |
| 76305 | 76314 | return rc; |
| 76306 | 76315 | } |
| 76307 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text( | |
| 76316 | +SQLITE_API int sqlite3_bind_text( | |
| 76308 | 76317 | sqlite3_stmt *pStmt, |
| 76309 | 76318 | int i, |
| 76310 | 76319 | const char *zData, |
| 76311 | 76320 | int nData, |
| 76312 | 76321 | void (*xDel)(void*) |
| 76313 | 76322 | ){ |
| 76314 | 76323 | return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8); |
| 76315 | 76324 | } |
| 76316 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64( | |
| 76325 | +SQLITE_API int sqlite3_bind_text64( | |
| 76317 | 76326 | sqlite3_stmt *pStmt, |
| 76318 | 76327 | int i, |
| 76319 | 76328 | const char *zData, |
| 76320 | 76329 | sqlite3_uint64 nData, |
| 76321 | 76330 | void (*xDel)(void*), |
| @@ -76328,21 +76337,21 @@ | ||
| 76328 | 76337 | if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE; |
| 76329 | 76338 | return bindText(pStmt, i, zData, (int)nData, xDel, enc); |
| 76330 | 76339 | } |
| 76331 | 76340 | } |
| 76332 | 76341 | #ifndef SQLITE_OMIT_UTF16 |
| 76333 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16( | |
| 76342 | +SQLITE_API int sqlite3_bind_text16( | |
| 76334 | 76343 | sqlite3_stmt *pStmt, |
| 76335 | 76344 | int i, |
| 76336 | 76345 | const void *zData, |
| 76337 | 76346 | int nData, |
| 76338 | 76347 | void (*xDel)(void*) |
| 76339 | 76348 | ){ |
| 76340 | 76349 | return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE); |
| 76341 | 76350 | } |
| 76342 | 76351 | #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){ | |
| 76344 | 76353 | int rc; |
| 76345 | 76354 | switch( sqlite3_value_type((sqlite3_value*)pValue) ){ |
| 76346 | 76355 | case SQLITE_INTEGER: { |
| 76347 | 76356 | rc = sqlite3_bind_int64(pStmt, i, pValue->u.i); |
| 76348 | 76357 | break; |
| @@ -76369,21 +76378,21 @@ | ||
| 76369 | 76378 | break; |
| 76370 | 76379 | } |
| 76371 | 76380 | } |
| 76372 | 76381 | return rc; |
| 76373 | 76382 | } |
| 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){ | |
| 76375 | 76384 | int rc; |
| 76376 | 76385 | Vdbe *p = (Vdbe *)pStmt; |
| 76377 | 76386 | rc = vdbeUnbind(p, i); |
| 76378 | 76387 | if( rc==SQLITE_OK ){ |
| 76379 | 76388 | sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n); |
| 76380 | 76389 | sqlite3_mutex_leave(p->db->mutex); |
| 76381 | 76390 | } |
| 76382 | 76391 | return rc; |
| 76383 | 76392 | } |
| 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){ | |
| 76385 | 76394 | int rc; |
| 76386 | 76395 | Vdbe *p = (Vdbe *)pStmt; |
| 76387 | 76396 | sqlite3_mutex_enter(p->db->mutex); |
| 76388 | 76397 | if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){ |
| 76389 | 76398 | rc = SQLITE_TOOBIG; |
| @@ -76398,11 +76407,11 @@ | ||
| 76398 | 76407 | |
| 76399 | 76408 | /* |
| 76400 | 76409 | ** Return the number of wildcards that can be potentially bound to. |
| 76401 | 76410 | ** This routine is added to support DBD::SQLite. |
| 76402 | 76411 | */ |
| 76403 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ | |
| 76412 | +SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ | |
| 76404 | 76413 | Vdbe *p = (Vdbe*)pStmt; |
| 76405 | 76414 | return p ? p->nVar : 0; |
| 76406 | 76415 | } |
| 76407 | 76416 | |
| 76408 | 76417 | /* |
| @@ -76409,11 +76418,11 @@ | ||
| 76409 | 76418 | ** Return the name of a wildcard parameter. Return NULL if the index |
| 76410 | 76419 | ** is out of range or if the wildcard is unnamed. |
| 76411 | 76420 | ** |
| 76412 | 76421 | ** The result is always UTF-8. |
| 76413 | 76422 | */ |
| 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){ | |
| 76415 | 76424 | Vdbe *p = (Vdbe*)pStmt; |
| 76416 | 76425 | if( p==0 || i<1 || i>p->nzVar ){ |
| 76417 | 76426 | return 0; |
| 76418 | 76427 | } |
| 76419 | 76428 | return p->azVar[i-1]; |
| @@ -76437,11 +76446,11 @@ | ||
| 76437 | 76446 | } |
| 76438 | 76447 | } |
| 76439 | 76448 | } |
| 76440 | 76449 | return 0; |
| 76441 | 76450 | } |
| 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){ | |
| 76443 | 76452 | return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName)); |
| 76444 | 76453 | } |
| 76445 | 76454 | |
| 76446 | 76455 | /* |
| 76447 | 76456 | ** Transfer all bindings from the first statement over to the second. |
| @@ -76471,11 +76480,11 @@ | ||
| 76471 | 76480 | ** |
| 76472 | 76481 | ** If the two statements contain a different number of bindings, then |
| 76473 | 76482 | ** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise |
| 76474 | 76483 | ** SQLITE_OK is returned. |
| 76475 | 76484 | */ |
| 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){ | |
| 76477 | 76486 | Vdbe *pFrom = (Vdbe*)pFromStmt; |
| 76478 | 76487 | Vdbe *pTo = (Vdbe*)pToStmt; |
| 76479 | 76488 | if( pFrom->nVar!=pTo->nVar ){ |
| 76480 | 76489 | return SQLITE_ERROR; |
| 76481 | 76490 | } |
| @@ -76493,26 +76502,26 @@ | ||
| 76493 | 76502 | ** Return the sqlite3* database handle to which the prepared statement given |
| 76494 | 76503 | ** in the argument belongs. This is the same database handle that was |
| 76495 | 76504 | ** the first argument to the sqlite3_prepare() that was used to create |
| 76496 | 76505 | ** the statement in the first place. |
| 76497 | 76506 | */ |
| 76498 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt *pStmt){ | |
| 76507 | +SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *pStmt){ | |
| 76499 | 76508 | return pStmt ? ((Vdbe*)pStmt)->db : 0; |
| 76500 | 76509 | } |
| 76501 | 76510 | |
| 76502 | 76511 | /* |
| 76503 | 76512 | ** Return true if the prepared statement is guaranteed to not modify the |
| 76504 | 76513 | ** database. |
| 76505 | 76514 | */ |
| 76506 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt){ | |
| 76515 | +SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt){ | |
| 76507 | 76516 | return pStmt ? ((Vdbe*)pStmt)->readOnly : 1; |
| 76508 | 76517 | } |
| 76509 | 76518 | |
| 76510 | 76519 | /* |
| 76511 | 76520 | ** Return true if the prepared statement is in need of being reset. |
| 76512 | 76521 | */ |
| 76513 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){ | |
| 76522 | +SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt *pStmt){ | |
| 76514 | 76523 | Vdbe *v = (Vdbe*)pStmt; |
| 76515 | 76524 | return v!=0 && v->pc>=0 && v->magic==VDBE_MAGIC_RUN; |
| 76516 | 76525 | } |
| 76517 | 76526 | |
| 76518 | 76527 | /* |
| @@ -76519,11 +76528,11 @@ | ||
| 76519 | 76528 | ** Return a pointer to the next prepared statement after pStmt associated |
| 76520 | 76529 | ** with database connection pDb. If pStmt is NULL, return the first |
| 76521 | 76530 | ** prepared statement for the database connection. Return NULL if there |
| 76522 | 76531 | ** are no more. |
| 76523 | 76532 | */ |
| 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){ | |
| 76525 | 76534 | sqlite3_stmt *pNext; |
| 76526 | 76535 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76527 | 76536 | if( !sqlite3SafetyCheckOk(pDb) ){ |
| 76528 | 76537 | (void)SQLITE_MISUSE_BKPT; |
| 76529 | 76538 | return 0; |
| @@ -76540,11 +76549,11 @@ | ||
| 76540 | 76549 | } |
| 76541 | 76550 | |
| 76542 | 76551 | /* |
| 76543 | 76552 | ** Return the value of a status counter for a prepared statement |
| 76544 | 76553 | */ |
| 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){ | |
| 76546 | 76555 | Vdbe *pVdbe = (Vdbe*)pStmt; |
| 76547 | 76556 | u32 v; |
| 76548 | 76557 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76549 | 76558 | if( !pStmt ){ |
| 76550 | 76559 | (void)SQLITE_MISUSE_BKPT; |
| @@ -76557,11 +76566,11 @@ | ||
| 76557 | 76566 | } |
| 76558 | 76567 | |
| 76559 | 76568 | /* |
| 76560 | 76569 | ** Return the SQL associated with a prepared statement |
| 76561 | 76570 | */ |
| 76562 | -SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt){ | |
| 76571 | +SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt){ | |
| 76563 | 76572 | Vdbe *p = (Vdbe *)pStmt; |
| 76564 | 76573 | return p ? p->zSql : 0; |
| 76565 | 76574 | } |
| 76566 | 76575 | |
| 76567 | 76576 | /* |
| @@ -76571,11 +76580,11 @@ | ||
| 76571 | 76580 | ** freeing the returned string by passing it to sqlite3_free(). |
| 76572 | 76581 | ** |
| 76573 | 76582 | ** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of |
| 76574 | 76583 | ** expanded bound parameters. |
| 76575 | 76584 | */ |
| 76576 | -SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt){ | |
| 76585 | +SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt){ | |
| 76577 | 76586 | #ifdef SQLITE_OMIT_TRACE |
| 76578 | 76587 | return 0; |
| 76579 | 76588 | #else |
| 76580 | 76589 | char *z = 0; |
| 76581 | 76590 | const char *zSql = sqlite3_sql(pStmt); |
| @@ -76613,11 +76622,11 @@ | ||
| 76613 | 76622 | |
| 76614 | 76623 | /* |
| 76615 | 76624 | ** This function is called from within a pre-update callback to retrieve |
| 76616 | 76625 | ** a field of the row currently being updated or deleted. |
| 76617 | 76626 | */ |
| 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){ | |
| 76619 | 76628 | PreUpdate *p = db->pPreUpdate; |
| 76620 | 76629 | int rc = SQLITE_OK; |
| 76621 | 76630 | |
| 76622 | 76631 | /* Test that this call is being made from within an SQLITE_DELETE or |
| 76623 | 76632 | ** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */ |
| @@ -76668,11 +76677,11 @@ | ||
| 76668 | 76677 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 76669 | 76678 | /* |
| 76670 | 76679 | ** This function is called from within a pre-update callback to retrieve |
| 76671 | 76680 | ** the number of columns in the row being updated, deleted or inserted. |
| 76672 | 76681 | */ |
| 76673 | -SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *db){ | |
| 76682 | +SQLITE_API int sqlite3_preupdate_count(sqlite3 *db){ | |
| 76674 | 76683 | PreUpdate *p = db->pPreUpdate; |
| 76675 | 76684 | return (p ? p->keyinfo.nField : 0); |
| 76676 | 76685 | } |
| 76677 | 76686 | #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */ |
| 76678 | 76687 | |
| @@ -76686,11 +76695,11 @@ | ||
| 76686 | 76695 | ** top-level trigger etc.). |
| 76687 | 76696 | ** |
| 76688 | 76697 | ** For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL |
| 76689 | 76698 | ** or SET DEFAULT action is considered a trigger. |
| 76690 | 76699 | */ |
| 76691 | -SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *db){ | |
| 76700 | +SQLITE_API int sqlite3_preupdate_depth(sqlite3 *db){ | |
| 76692 | 76701 | PreUpdate *p = db->pPreUpdate; |
| 76693 | 76702 | return (p ? p->v->nFrame : 0); |
| 76694 | 76703 | } |
| 76695 | 76704 | #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */ |
| 76696 | 76705 | |
| @@ -76697,11 +76706,11 @@ | ||
| 76697 | 76706 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 76698 | 76707 | /* |
| 76699 | 76708 | ** This function is called from within a pre-update callback to retrieve |
| 76700 | 76709 | ** a field of the row currently being updated or inserted. |
| 76701 | 76710 | */ |
| 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){ | |
| 76703 | 76712 | PreUpdate *p = db->pPreUpdate; |
| 76704 | 76713 | int rc = SQLITE_OK; |
| 76705 | 76714 | Mem *pMem; |
| 76706 | 76715 | |
| 76707 | 76716 | if( !p || p->op==SQLITE_DELETE ){ |
| @@ -76771,11 +76780,11 @@ | ||
| 76771 | 76780 | |
| 76772 | 76781 | #ifdef SQLITE_ENABLE_STMT_SCANSTATUS |
| 76773 | 76782 | /* |
| 76774 | 76783 | ** Return status data for a single loop within query pStmt. |
| 76775 | 76784 | */ |
| 76776 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( | |
| 76785 | +SQLITE_API int sqlite3_stmt_scanstatus( | |
| 76777 | 76786 | sqlite3_stmt *pStmt, /* Prepared statement being queried */ |
| 76778 | 76787 | int idx, /* Index of loop to report on */ |
| 76779 | 76788 | int iScanStatusOp, /* Which metric to return */ |
| 76780 | 76789 | void *pOut /* OUT: Write the answer here */ |
| 76781 | 76790 | ){ |
| @@ -76830,11 +76839,11 @@ | ||
| 76830 | 76839 | } |
| 76831 | 76840 | |
| 76832 | 76841 | /* |
| 76833 | 76842 | ** Zero all counters associated with the sqlite3_stmt_scanstatus() data. |
| 76834 | 76843 | */ |
| 76835 | -SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ | |
| 76844 | +SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ | |
| 76836 | 76845 | Vdbe *p = (Vdbe*)pStmt; |
| 76837 | 76846 | memset(p->anExec, 0, p->nOp * sizeof(i64)); |
| 76838 | 76847 | } |
| 76839 | 76848 | #endif /* SQLITE_ENABLE_STMT_SCANSTATUS */ |
| 76840 | 76849 | |
| @@ -77357,11 +77366,11 @@ | ||
| 77357 | 77366 | ** Try to convert the type of a function argument or a result column |
| 77358 | 77367 | ** into a numeric representation. Use either INTEGER or REAL whichever |
| 77359 | 77368 | ** is appropriate. But only do the conversion if it is possible without |
| 77360 | 77369 | ** loss of information and return the revised type of the argument. |
| 77361 | 77370 | */ |
| 77362 | -SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value *pVal){ | |
| 77371 | +SQLITE_API int sqlite3_value_numeric_type(sqlite3_value *pVal){ | |
| 77363 | 77372 | int eType = sqlite3_value_type(pVal); |
| 77364 | 77373 | if( eType==SQLITE_TEXT ){ |
| 77365 | 77374 | Mem *pMem = (Mem*)pVal; |
| 77366 | 77375 | applyNumericAffinity(pMem, 0); |
| 77367 | 77376 | eType = sqlite3_value_type(pVal); |
| @@ -79007,11 +79016,11 @@ | ||
| 79007 | 79016 | break; |
| 79008 | 79017 | } |
| 79009 | 79018 | #endif /* SQLITE_OMIT_CAST */ |
| 79010 | 79019 | |
| 79011 | 79020 | /* Opcode: Lt P1 P2 P3 P4 P5 |
| 79012 | -** Synopsis: if r[P1]<r[P3] goto P2 | |
| 79021 | +** Synopsis: IF r[P3]<r[P1] | |
| 79013 | 79022 | ** |
| 79014 | 79023 | ** Compare the values in register P1 and P3. If reg(P3)<reg(P1) then |
| 79015 | 79024 | ** jump to address P2. |
| 79016 | 79025 | ** |
| 79017 | 79026 | ** If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or |
| @@ -79042,11 +79051,11 @@ | ||
| 79042 | 79051 | ** If the SQLITE_NULLEQ bit is set in P5, then NULL values are considered |
| 79043 | 79052 | ** equal to one another, provided that they do not have their MEM_Cleared |
| 79044 | 79053 | ** bit set. |
| 79045 | 79054 | */ |
| 79046 | 79055 | /* Opcode: Ne P1 P2 P3 P4 P5 |
| 79047 | -** Synopsis: if r[P1]!=r[P3] goto P2 | |
| 79056 | +** Synopsis: IF r[P3]!=r[P1] | |
| 79048 | 79057 | ** |
| 79049 | 79058 | ** This works just like the Lt opcode except that the jump is taken if |
| 79050 | 79059 | ** the operands in registers P1 and P3 are not equal. See the Lt opcode for |
| 79051 | 79060 | ** additional information. |
| 79052 | 79061 | ** |
| @@ -79055,11 +79064,11 @@ | ||
| 79055 | 79064 | ** of comparison is false. If either operand is NULL then the result is true. |
| 79056 | 79065 | ** If neither operand is NULL the result is the same as it would be if |
| 79057 | 79066 | ** the SQLITE_NULLEQ flag were omitted from P5. |
| 79058 | 79067 | */ |
| 79059 | 79068 | /* Opcode: Eq P1 P2 P3 P4 P5 |
| 79060 | -** Synopsis: if r[P1]==r[P3] goto P2 | |
| 79069 | +** Synopsis: IF r[P3]==r[P1] | |
| 79061 | 79070 | ** |
| 79062 | 79071 | ** This works just like the Lt opcode except that the jump is taken if |
| 79063 | 79072 | ** the operands in registers P1 and P3 are equal. |
| 79064 | 79073 | ** See the Lt opcode for additional information. |
| 79065 | 79074 | ** |
| @@ -79068,25 +79077,25 @@ | ||
| 79068 | 79077 | ** of comparison is true. If either operand is NULL then the result is false. |
| 79069 | 79078 | ** If neither operand is NULL the result is the same as it would be if |
| 79070 | 79079 | ** the SQLITE_NULLEQ flag were omitted from P5. |
| 79071 | 79080 | */ |
| 79072 | 79081 | /* Opcode: Le P1 P2 P3 P4 P5 |
| 79073 | -** Synopsis: if r[P1]<=r[P3] goto P2 | |
| 79082 | +** Synopsis: IF r[P3]<=r[P1] | |
| 79074 | 79083 | ** |
| 79075 | 79084 | ** This works just like the Lt opcode except that the jump is taken if |
| 79076 | 79085 | ** the content of register P3 is less than or equal to the content of |
| 79077 | 79086 | ** register P1. See the Lt opcode for additional information. |
| 79078 | 79087 | */ |
| 79079 | 79088 | /* Opcode: Gt P1 P2 P3 P4 P5 |
| 79080 | -** Synopsis: if r[P1]>r[P3] goto P2 | |
| 79089 | +** Synopsis: IF r[P3]>r[P1] | |
| 79081 | 79090 | ** |
| 79082 | 79091 | ** This works just like the Lt opcode except that the jump is taken if |
| 79083 | 79092 | ** the content of register P3 is greater than the content of |
| 79084 | 79093 | ** register P1. See the Lt opcode for additional information. |
| 79085 | 79094 | */ |
| 79086 | 79095 | /* Opcode: Ge P1 P2 P3 P4 P5 |
| 79087 | -** Synopsis: if r[P1]>=r[P3] goto P2 | |
| 79096 | +** Synopsis: IF r[P3]>=r[P1] | |
| 79088 | 79097 | ** |
| 79089 | 79098 | ** This works just like the Lt opcode except that the jump is taken if |
| 79090 | 79099 | ** the content of register P3 is greater than or equal to the content of |
| 79091 | 79100 | ** register P1. See the Lt opcode for additional information. |
| 79092 | 79101 | */ |
| @@ -84209,11 +84218,11 @@ | ||
| 84209 | 84218 | } |
| 84210 | 84219 | |
| 84211 | 84220 | /* |
| 84212 | 84221 | ** Open a blob handle. |
| 84213 | 84222 | */ |
| 84214 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( | |
| 84223 | +SQLITE_API int sqlite3_blob_open( | |
| 84215 | 84224 | sqlite3* db, /* The database connection */ |
| 84216 | 84225 | const char *zDb, /* The attached database containing the blob */ |
| 84217 | 84226 | const char *zTable, /* The table containing the blob */ |
| 84218 | 84227 | const char *zColumn, /* The column containing the blob */ |
| 84219 | 84228 | sqlite_int64 iRow, /* The row containing the glob */ |
| @@ -84450,11 +84459,11 @@ | ||
| 84450 | 84459 | |
| 84451 | 84460 | /* |
| 84452 | 84461 | ** Close a blob handle that was previously created using |
| 84453 | 84462 | ** sqlite3_blob_open(). |
| 84454 | 84463 | */ |
| 84455 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *pBlob){ | |
| 84464 | +SQLITE_API int sqlite3_blob_close(sqlite3_blob *pBlob){ | |
| 84456 | 84465 | Incrblob *p = (Incrblob *)pBlob; |
| 84457 | 84466 | int rc; |
| 84458 | 84467 | sqlite3 *db; |
| 84459 | 84468 | |
| 84460 | 84469 | if( p ){ |
| @@ -84543,28 +84552,28 @@ | ||
| 84543 | 84552 | } |
| 84544 | 84553 | |
| 84545 | 84554 | /* |
| 84546 | 84555 | ** Read data from a blob handle. |
| 84547 | 84556 | */ |
| 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){ | |
| 84549 | 84558 | return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData); |
| 84550 | 84559 | } |
| 84551 | 84560 | |
| 84552 | 84561 | /* |
| 84553 | 84562 | ** Write data to a blob handle. |
| 84554 | 84563 | */ |
| 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){ | |
| 84556 | 84565 | return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData); |
| 84557 | 84566 | } |
| 84558 | 84567 | |
| 84559 | 84568 | /* |
| 84560 | 84569 | ** Query a blob handle for the size of the data. |
| 84561 | 84570 | ** |
| 84562 | 84571 | ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob |
| 84563 | 84572 | ** so no mutex is required for access. |
| 84564 | 84573 | */ |
| 84565 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *pBlob){ | |
| 84574 | +SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *pBlob){ | |
| 84566 | 84575 | Incrblob *p = (Incrblob *)pBlob; |
| 84567 | 84576 | return (p && p->pStmt) ? p->nByte : 0; |
| 84568 | 84577 | } |
| 84569 | 84578 | |
| 84570 | 84579 | /* |
| @@ -84575,11 +84584,11 @@ | ||
| 84575 | 84584 | ** contain a blob or text value, then an error code is returned and the |
| 84576 | 84585 | ** database handle error code and message set. If this happens, then all |
| 84577 | 84586 | ** subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) |
| 84578 | 84587 | ** immediately return SQLITE_ABORT. |
| 84579 | 84588 | */ |
| 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){ | |
| 84581 | 84590 | int rc; |
| 84582 | 84591 | Incrblob *p = (Incrblob *)pBlob; |
| 84583 | 84592 | sqlite3 *db; |
| 84584 | 84593 | |
| 84585 | 84594 | if( p==0 ) return SQLITE_MISUSE_BKPT; |
| @@ -97188,11 +97197,11 @@ | ||
| 97188 | 97197 | ** and attempts to write the column will be ignored. |
| 97189 | 97198 | ** |
| 97190 | 97199 | ** Setting the auth function to NULL disables this hook. The default |
| 97191 | 97200 | ** setting of the auth function is NULL. |
| 97192 | 97201 | */ |
| 97193 | -SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( | |
| 97202 | +SQLITE_API int sqlite3_set_authorizer( | |
| 97194 | 97203 | sqlite3 *db, |
| 97195 | 97204 | int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 97196 | 97205 | void *pArg |
| 97197 | 97206 | ){ |
| 97198 | 97207 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -103958,18 +103967,18 @@ | ||
| 103958 | 103967 | } |
| 103959 | 103968 | |
| 103960 | 103969 | /* |
| 103961 | 103970 | ** The sqlite3_strglob() interface. |
| 103962 | 103971 | */ |
| 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){ | |
| 103964 | 103973 | return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, '[')==0; |
| 103965 | 103974 | } |
| 103966 | 103975 | |
| 103967 | 103976 | /* |
| 103968 | 103977 | ** The sqlite3_strlike() interface. |
| 103969 | 103978 | */ |
| 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){ | |
| 103971 | 103980 | return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc)==0; |
| 103972 | 103981 | } |
| 103973 | 103982 | |
| 103974 | 103983 | /* |
| 103975 | 103984 | ** Count the number of times that the LIKE operator (or GLOB which is |
| @@ -108244,19 +108253,19 @@ | ||
| 108244 | 108253 | } |
| 108245 | 108254 | if( piIdxCur ) *piIdxCur = iBase; |
| 108246 | 108255 | for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){ |
| 108247 | 108256 | int iIdxCur = iBase++; |
| 108248 | 108257 | assert( pIdx->pSchema==pTab->pSchema ); |
| 108258 | + if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){ | |
| 108259 | + if( piDataCur ) *piDataCur = iIdxCur; | |
| 108260 | + p5 = 0; | |
| 108261 | + } | |
| 108249 | 108262 | if( aToOpen==0 || aToOpen[i+1] ){ |
| 108250 | 108263 | sqlite3VdbeAddOp3(v, op, iIdxCur, pIdx->tnum, iDb); |
| 108251 | 108264 | sqlite3VdbeSetP4KeyInfo(pParse, pIdx); |
| 108252 | - VdbeComment((v, "%s", pIdx->zName)); | |
| 108253 | - } | |
| 108254 | - if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){ | |
| 108255 | - if( piDataCur ) *piDataCur = iIdxCur; | |
| 108256 | - }else{ | |
| 108257 | 108265 | sqlite3VdbeChangeP5(v, p5); |
| 108266 | + VdbeComment((v, "%s", pIdx->zName)); | |
| 108258 | 108267 | } |
| 108259 | 108268 | } |
| 108260 | 108269 | if( iBase>pParse->nTab ) pParse->nTab = iBase; |
| 108261 | 108270 | return i; |
| 108262 | 108271 | } |
| @@ -108684,11 +108693,11 @@ | ||
| 108684 | 108693 | ** If the SQL is a query, then for each row in the query result |
| 108685 | 108694 | ** the xCallback() function is called. pArg becomes the first |
| 108686 | 108695 | ** argument to xCallback(). If xCallback=NULL then no callback |
| 108687 | 108696 | ** is invoked, even for queries. |
| 108688 | 108697 | */ |
| 108689 | -SQLITE_API int SQLITE_STDCALL sqlite3_exec( | |
| 108698 | +SQLITE_API int sqlite3_exec( | |
| 108690 | 108699 | sqlite3 *db, /* The database on which the SQL executes */ |
| 108691 | 108700 | const char *zSql, /* The SQL to be executed */ |
| 108692 | 108701 | sqlite3_callback xCallback, /* Invoke this callback routine */ |
| 108693 | 108702 | void *pArg, /* First argument to xCallback() */ |
| 108694 | 108703 | char **pzErrMsg /* Write error messages here */ |
| @@ -109946,11 +109955,11 @@ | ||
| 109946 | 109955 | db->aExtension = aHandle; |
| 109947 | 109956 | |
| 109948 | 109957 | db->aExtension[db->nExtension++] = handle; |
| 109949 | 109958 | return SQLITE_OK; |
| 109950 | 109959 | } |
| 109951 | -SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( | |
| 109960 | +SQLITE_API int sqlite3_load_extension( | |
| 109952 | 109961 | sqlite3 *db, /* Load the extension into this database connection */ |
| 109953 | 109962 | const char *zFile, /* Name of the shared library containing extension */ |
| 109954 | 109963 | const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */ |
| 109955 | 109964 | char **pzErrMsg /* Put error message here if not 0 */ |
| 109956 | 109965 | ){ |
| @@ -109977,11 +109986,11 @@ | ||
| 109977 | 109986 | |
| 109978 | 109987 | /* |
| 109979 | 109988 | ** Enable or disable extension loading. Extension loading is disabled by |
| 109980 | 109989 | ** default so as not to open security holes in older applications. |
| 109981 | 109990 | */ |
| 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){ | |
| 109983 | 109992 | sqlite3_mutex_enter(db->mutex); |
| 109984 | 109993 | if( onoff ){ |
| 109985 | 109994 | db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc; |
| 109986 | 109995 | }else{ |
| 109987 | 109996 | db->flags &= ~(SQLITE_LoadExtension|SQLITE_LoadExtFunc); |
| @@ -110034,11 +110043,11 @@ | ||
| 110034 | 110043 | |
| 110035 | 110044 | /* |
| 110036 | 110045 | ** Register a statically linked extension that is automatically |
| 110037 | 110046 | ** loaded by every new database connection. |
| 110038 | 110047 | */ |
| 110039 | -SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension( | |
| 110048 | +SQLITE_API int sqlite3_auto_extension( | |
| 110040 | 110049 | void (*xInit)(void) |
| 110041 | 110050 | ){ |
| 110042 | 110051 | int rc = SQLITE_OK; |
| 110043 | 110052 | #ifndef SQLITE_OMIT_AUTOINIT |
| 110044 | 110053 | rc = sqlite3_initialize(); |
| @@ -110081,11 +110090,11 @@ | ||
| 110081 | 110090 | ** routine is a no-op. |
| 110082 | 110091 | ** |
| 110083 | 110092 | ** Return 1 if xInit was found on the list and removed. Return 0 if xInit |
| 110084 | 110093 | ** was not on the list. |
| 110085 | 110094 | */ |
| 110086 | -SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension( | |
| 110095 | +SQLITE_API int sqlite3_cancel_auto_extension( | |
| 110087 | 110096 | void (*xInit)(void) |
| 110088 | 110097 | ){ |
| 110089 | 110098 | #if SQLITE_THREADSAFE |
| 110090 | 110099 | sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); |
| 110091 | 110100 | #endif |
| @@ -110106,11 +110115,11 @@ | ||
| 110106 | 110115 | } |
| 110107 | 110116 | |
| 110108 | 110117 | /* |
| 110109 | 110118 | ** Reset the automatic extension loading mechanism. |
| 110110 | 110119 | */ |
| 110111 | -SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void){ | |
| 110120 | +SQLITE_API void sqlite3_reset_auto_extension(void){ | |
| 110112 | 110121 | #ifndef SQLITE_OMIT_AUTOINIT |
| 110113 | 110122 | if( sqlite3_initialize()==SQLITE_OK ) |
| 110114 | 110123 | #endif |
| 110115 | 110124 | { |
| 110116 | 110125 | #if SQLITE_THREADSAFE |
| @@ -113367,11 +113376,11 @@ | ||
| 113367 | 113376 | ** and so if a schema change occurs, SQLITE_SCHEMA is returned by |
| 113368 | 113377 | ** sqlite3_step(). In the new version, the original SQL text is retained |
| 113369 | 113378 | ** and the statement is automatically recompiled if an schema change |
| 113370 | 113379 | ** occurs. |
| 113371 | 113380 | */ |
| 113372 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare( | |
| 113381 | +SQLITE_API int sqlite3_prepare( | |
| 113373 | 113382 | sqlite3 *db, /* Database handle. */ |
| 113374 | 113383 | const char *zSql, /* UTF-8 encoded SQL statement. */ |
| 113375 | 113384 | int nBytes, /* Length of zSql in bytes. */ |
| 113376 | 113385 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113377 | 113386 | const char **pzTail /* OUT: End of parsed string */ |
| @@ -113379,11 +113388,11 @@ | ||
| 113379 | 113388 | int rc; |
| 113380 | 113389 | rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail); |
| 113381 | 113390 | assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ |
| 113382 | 113391 | return rc; |
| 113383 | 113392 | } |
| 113384 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( | |
| 113393 | +SQLITE_API int sqlite3_prepare_v2( | |
| 113385 | 113394 | sqlite3 *db, /* Database handle. */ |
| 113386 | 113395 | const char *zSql, /* UTF-8 encoded SQL statement. */ |
| 113387 | 113396 | int nBytes, /* Length of zSql in bytes. */ |
| 113388 | 113397 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113389 | 113398 | const char **pzTail /* OUT: End of parsed string */ |
| @@ -113455,11 +113464,11 @@ | ||
| 113455 | 113464 | ** and so if a schema change occurs, SQLITE_SCHEMA is returned by |
| 113456 | 113465 | ** sqlite3_step(). In the new version, the original SQL text is retained |
| 113457 | 113466 | ** and the statement is automatically recompiled if an schema change |
| 113458 | 113467 | ** occurs. |
| 113459 | 113468 | */ |
| 113460 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( | |
| 113469 | +SQLITE_API int sqlite3_prepare16( | |
| 113461 | 113470 | sqlite3 *db, /* Database handle. */ |
| 113462 | 113471 | const void *zSql, /* UTF-16 encoded SQL statement. */ |
| 113463 | 113472 | int nBytes, /* Length of zSql in bytes. */ |
| 113464 | 113473 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113465 | 113474 | const void **pzTail /* OUT: End of parsed string */ |
| @@ -113467,11 +113476,11 @@ | ||
| 113467 | 113476 | int rc; |
| 113468 | 113477 | rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail); |
| 113469 | 113478 | assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ |
| 113470 | 113479 | return rc; |
| 113471 | 113480 | } |
| 113472 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( | |
| 113481 | +SQLITE_API int sqlite3_prepare16_v2( | |
| 113473 | 113482 | sqlite3 *db, /* Database handle. */ |
| 113474 | 113483 | const void *zSql, /* UTF-16 encoded SQL statement. */ |
| 113475 | 113484 | int nBytes, /* Length of zSql in bytes. */ |
| 113476 | 113485 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113477 | 113486 | const void **pzTail /* OUT: End of parsed string */ |
| @@ -119310,11 +119319,11 @@ | ||
| 119310 | 119319 | ** The result that is written to ***pazResult is held in memory obtained |
| 119311 | 119320 | ** from malloc(). But the caller cannot free this memory directly. |
| 119312 | 119321 | ** Instead, the entire table should be passed to sqlite3_free_table() when |
| 119313 | 119322 | ** the calling procedure is finished using it. |
| 119314 | 119323 | */ |
| 119315 | -SQLITE_API int SQLITE_STDCALL sqlite3_get_table( | |
| 119324 | +SQLITE_API int sqlite3_get_table( | |
| 119316 | 119325 | sqlite3 *db, /* The database on which the SQL executes */ |
| 119317 | 119326 | const char *zSql, /* The SQL to be executed */ |
| 119318 | 119327 | char ***pazResult, /* Write the result table here */ |
| 119319 | 119328 | int *pnRow, /* Write the number of rows in the result here */ |
| 119320 | 119329 | int *pnColumn, /* Write the number of columns of result here */ |
| @@ -119379,11 +119388,11 @@ | ||
| 119379 | 119388 | } |
| 119380 | 119389 | |
| 119381 | 119390 | /* |
| 119382 | 119391 | ** This routine frees the space the sqlite3_get_table() malloced. |
| 119383 | 119392 | */ |
| 119384 | -SQLITE_API void SQLITE_STDCALL sqlite3_free_table( | |
| 119393 | +SQLITE_API void sqlite3_free_table( | |
| 119385 | 119394 | char **azResult /* Result returned from sqlite3_get_table() */ |
| 119386 | 119395 | ){ |
| 119387 | 119396 | if( azResult ){ |
| 119388 | 119397 | int i, n; |
| 119389 | 119398 | azResult--; |
| @@ -121789,11 +121798,11 @@ | ||
| 121789 | 121798 | |
| 121790 | 121799 | |
| 121791 | 121800 | /* |
| 121792 | 121801 | ** External API function used to create a new virtual-table module. |
| 121793 | 121802 | */ |
| 121794 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module( | |
| 121803 | +SQLITE_API int sqlite3_create_module( | |
| 121795 | 121804 | sqlite3 *db, /* Database in which module is registered */ |
| 121796 | 121805 | const char *zName, /* Name assigned to this module */ |
| 121797 | 121806 | const sqlite3_module *pModule, /* The definition of the module */ |
| 121798 | 121807 | void *pAux /* Context pointer for xCreate/xConnect */ |
| 121799 | 121808 | ){ |
| @@ -121804,11 +121813,11 @@ | ||
| 121804 | 121813 | } |
| 121805 | 121814 | |
| 121806 | 121815 | /* |
| 121807 | 121816 | ** External API function used to create a new virtual-table module. |
| 121808 | 121817 | */ |
| 121809 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( | |
| 121818 | +SQLITE_API int sqlite3_create_module_v2( | |
| 121810 | 121819 | sqlite3 *db, /* Database in which module is registered */ |
| 121811 | 121820 | const char *zName, /* Name assigned to this module */ |
| 121812 | 121821 | const sqlite3_module *pModule, /* The definition of the module */ |
| 121813 | 121822 | void *pAux, /* Context pointer for xCreate/xConnect */ |
| 121814 | 121823 | void (*xDestroy)(void *) /* Module destructor function */ |
| @@ -122428,11 +122437,11 @@ | ||
| 122428 | 122437 | /* |
| 122429 | 122438 | ** This function is used to set the schema of a virtual table. It is only |
| 122430 | 122439 | ** valid to call this function from within the xCreate() or xConnect() of a |
| 122431 | 122440 | ** virtual table module. |
| 122432 | 122441 | */ |
| 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){ | |
| 122434 | 122443 | VtabCtx *pCtx; |
| 122435 | 122444 | Parse *pParse; |
| 122436 | 122445 | int rc = SQLITE_OK; |
| 122437 | 122446 | Table *pTab; |
| 122438 | 122447 | char *zErr = 0; |
| @@ -122885,11 +122894,11 @@ | ||
| 122885 | 122894 | ** table update operation currently in progress. |
| 122886 | 122895 | ** |
| 122887 | 122896 | ** The results of this routine are undefined unless it is called from |
| 122888 | 122897 | ** within an xUpdate method. |
| 122889 | 122898 | */ |
| 122890 | -SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *db){ | |
| 122899 | +SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *db){ | |
| 122891 | 122900 | static const unsigned char aMap[] = { |
| 122892 | 122901 | SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE |
| 122893 | 122902 | }; |
| 122894 | 122903 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 122895 | 122904 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| @@ -122903,11 +122912,11 @@ | ||
| 122903 | 122912 | /* |
| 122904 | 122913 | ** Call from within the xCreate() or xConnect() methods to provide |
| 122905 | 122914 | ** the SQLite core with additional information about the behavior |
| 122906 | 122915 | ** of the virtual table being implemented. |
| 122907 | 122916 | */ |
| 122908 | -SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3 *db, int op, ...){ | |
| 122917 | +SQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){ | |
| 122909 | 122918 | va_list ap; |
| 122910 | 122919 | int rc = SQLITE_OK; |
| 122911 | 122920 | |
| 122912 | 122921 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 122913 | 122922 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| @@ -124028,13 +124037,19 @@ | ||
| 124028 | 124037 | regBase = r1; |
| 124029 | 124038 | }else{ |
| 124030 | 124039 | sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j); |
| 124031 | 124040 | } |
| 124032 | 124041 | } |
| 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 ){ | |
| 124036 | 124051 | Expr *pRight = pTerm->pExpr->pRight; |
| 124037 | 124052 | if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){ |
| 124038 | 124053 | sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk); |
| 124039 | 124054 | VdbeCoverage(v); |
| 124040 | 124055 | } |
| @@ -130105,10 +130120,18 @@ | ||
| 130105 | 130120 | if( pOBExpr->op!=TK_COLUMN ) continue; |
| 130106 | 130121 | if( pOBExpr->iTable!=iCur ) continue; |
| 130107 | 130122 | pTerm = sqlite3WhereFindTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn, |
| 130108 | 130123 | ~ready, eqOpMask, 0); |
| 130109 | 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 | + } | |
| 130110 | 130133 | if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0 && pOBExpr->iColumn>=0 ){ |
| 130111 | 130134 | const char *z1, *z2; |
| 130112 | 130135 | pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr); |
| 130113 | 130136 | if( !pColl ) pColl = db->pDfltColl; |
| 130114 | 130137 | z1 = pColl->zName; |
| @@ -136210,11 +136233,11 @@ | ||
| 136210 | 136233 | ** |
| 136211 | 136234 | ** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed |
| 136212 | 136235 | ** to recognize the end of a trigger can be omitted. All we have to do |
| 136213 | 136236 | ** is look for a semicolon that is not part of an string or comment. |
| 136214 | 136237 | */ |
| 136215 | -SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *zSql){ | |
| 136238 | +SQLITE_API int sqlite3_complete(const char *zSql){ | |
| 136216 | 136239 | u8 state = 0; /* Current state, using numbers defined in header comment */ |
| 136217 | 136240 | u8 token; /* Value of the next token */ |
| 136218 | 136241 | |
| 136219 | 136242 | #ifndef SQLITE_OMIT_TRIGGER |
| 136220 | 136243 | /* A complex statement machine used to detect the end of a CREATE TRIGGER |
| @@ -136375,11 +136398,11 @@ | ||
| 136375 | 136398 | /* |
| 136376 | 136399 | ** This routine is the same as the sqlite3_complete() routine described |
| 136377 | 136400 | ** above, except that the parameter is required to be UTF-16 encoded, not |
| 136378 | 136401 | ** UTF-8. |
| 136379 | 136402 | */ |
| 136380 | -SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *zSql){ | |
| 136403 | +SQLITE_API int sqlite3_complete16(const void *zSql){ | |
| 136381 | 136404 | sqlite3_value *pVal; |
| 136382 | 136405 | char const *zSql8; |
| 136383 | 136406 | int rc; |
| 136384 | 136407 | |
| 136385 | 136408 | #ifndef SQLITE_OMIT_AUTOINIT |
| @@ -136535,28 +136558,28 @@ | ||
| 136535 | 136558 | #endif |
| 136536 | 136559 | |
| 136537 | 136560 | /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns |
| 136538 | 136561 | ** a pointer to the to the sqlite3_version[] string constant. |
| 136539 | 136562 | */ |
| 136540 | -SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void){ return sqlite3_version; } | |
| 136563 | +SQLITE_API const char *sqlite3_libversion(void){ return sqlite3_version; } | |
| 136541 | 136564 | |
| 136542 | 136565 | /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a |
| 136543 | 136566 | ** pointer to a string constant whose value is the same as the |
| 136544 | 136567 | ** SQLITE_SOURCE_ID C preprocessor macro. |
| 136545 | 136568 | */ |
| 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; } | |
| 136547 | 136570 | |
| 136548 | 136571 | /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function |
| 136549 | 136572 | ** returns an integer equal to SQLITE_VERSION_NUMBER. |
| 136550 | 136573 | */ |
| 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; } | |
| 136552 | 136575 | |
| 136553 | 136576 | /* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns |
| 136554 | 136577 | ** zero if and only if SQLite was compiled with mutexing code omitted due to |
| 136555 | 136578 | ** the SQLITE_THREADSAFE compile-time option being set to 0. |
| 136556 | 136579 | */ |
| 136557 | -SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } | |
| 136580 | +SQLITE_API int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } | |
| 136558 | 136581 | |
| 136559 | 136582 | /* |
| 136560 | 136583 | ** When compiling the test fixture or with debugging enabled (on Win32), |
| 136561 | 136584 | ** this variable being set to non-zero will cause OSTRACE macros to emit |
| 136562 | 136585 | ** extra diagnostic information. |
| @@ -136625,11 +136648,11 @@ | ||
| 136625 | 136648 | ** call by X completes. |
| 136626 | 136649 | ** |
| 136627 | 136650 | ** * Recursive calls to this routine from thread X return immediately |
| 136628 | 136651 | ** without blocking. |
| 136629 | 136652 | */ |
| 136630 | -SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void){ | |
| 136653 | +SQLITE_API int sqlite3_initialize(void){ | |
| 136631 | 136654 | MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ |
| 136632 | 136655 | int rc; /* Result code */ |
| 136633 | 136656 | #ifdef SQLITE_EXTRA_INIT |
| 136634 | 136657 | int bRunExtraInit = 0; /* Extra initialization needed */ |
| 136635 | 136658 | #endif |
| @@ -136791,11 +136814,11 @@ | ||
| 136791 | 136814 | ** while any part of SQLite is otherwise in use in any thread. This |
| 136792 | 136815 | ** routine is not threadsafe. But it is safe to invoke this routine |
| 136793 | 136816 | ** on when SQLite is already shut down. If SQLite is already shut down |
| 136794 | 136817 | ** when this routine is invoked, then this routine is a harmless no-op. |
| 136795 | 136818 | */ |
| 136796 | -SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void){ | |
| 136819 | +SQLITE_API int sqlite3_shutdown(void){ | |
| 136797 | 136820 | #ifdef SQLITE_OMIT_WSD |
| 136798 | 136821 | int rc = sqlite3_wsd_init(4096, 24); |
| 136799 | 136822 | if( rc!=SQLITE_OK ){ |
| 136800 | 136823 | return rc; |
| 136801 | 136824 | } |
| @@ -136845,11 +136868,11 @@ | ||
| 136845 | 136868 | ** This routine should only be called when there are no outstanding |
| 136846 | 136869 | ** database connections or memory allocations. This routine is not |
| 136847 | 136870 | ** threadsafe. Failure to heed these warnings can lead to unpredictable |
| 136848 | 136871 | ** behavior. |
| 136849 | 136872 | */ |
| 136850 | -SQLITE_API int SQLITE_CDECL sqlite3_config(int op, ...){ | |
| 136873 | +SQLITE_API int sqlite3_config(int op, ...){ | |
| 136851 | 136874 | va_list ap; |
| 136852 | 136875 | int rc = SQLITE_OK; |
| 136853 | 136876 | |
| 136854 | 136877 | /* sqlite3_config() shall return SQLITE_MISUSE if it is invoked while |
| 136855 | 136878 | ** the SQLite library is in use. */ |
| @@ -137210,11 +137233,11 @@ | ||
| 137210 | 137233 | } |
| 137211 | 137234 | |
| 137212 | 137235 | /* |
| 137213 | 137236 | ** Return the mutex associated with a database connection. |
| 137214 | 137237 | */ |
| 137215 | -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3 *db){ | |
| 137238 | +SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){ | |
| 137216 | 137239 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137217 | 137240 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137218 | 137241 | (void)SQLITE_MISUSE_BKPT; |
| 137219 | 137242 | return 0; |
| 137220 | 137243 | } |
| @@ -137224,11 +137247,11 @@ | ||
| 137224 | 137247 | |
| 137225 | 137248 | /* |
| 137226 | 137249 | ** Free up as much memory as we can from the given database |
| 137227 | 137250 | ** connection. |
| 137228 | 137251 | */ |
| 137229 | -SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3 *db){ | |
| 137252 | +SQLITE_API int sqlite3_db_release_memory(sqlite3 *db){ | |
| 137230 | 137253 | int i; |
| 137231 | 137254 | |
| 137232 | 137255 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137233 | 137256 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 137234 | 137257 | #endif |
| @@ -137248,11 +137271,11 @@ | ||
| 137248 | 137271 | |
| 137249 | 137272 | /* |
| 137250 | 137273 | ** Flush any dirty pages in the pager-cache for any attached database |
| 137251 | 137274 | ** to disk. |
| 137252 | 137275 | */ |
| 137253 | -SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3 *db){ | |
| 137276 | +SQLITE_API int sqlite3_db_cacheflush(sqlite3 *db){ | |
| 137254 | 137277 | int i; |
| 137255 | 137278 | int rc = SQLITE_OK; |
| 137256 | 137279 | int bSeenBusy = 0; |
| 137257 | 137280 | |
| 137258 | 137281 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -137277,11 +137300,11 @@ | ||
| 137277 | 137300 | } |
| 137278 | 137301 | |
| 137279 | 137302 | /* |
| 137280 | 137303 | ** Configuration settings for an individual database connection |
| 137281 | 137304 | */ |
| 137282 | -SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3 *db, int op, ...){ | |
| 137305 | +SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){ | |
| 137283 | 137306 | va_list ap; |
| 137284 | 137307 | int rc; |
| 137285 | 137308 | va_start(ap, op); |
| 137286 | 137309 | switch( op ){ |
| 137287 | 137310 | case SQLITE_DBCONFIG_LOOKASIDE: { |
| @@ -137398,11 +137421,11 @@ | ||
| 137398 | 137421 | } |
| 137399 | 137422 | |
| 137400 | 137423 | /* |
| 137401 | 137424 | ** Return the ROWID of the most recent insert |
| 137402 | 137425 | */ |
| 137403 | -SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3 *db){ | |
| 137426 | +SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){ | |
| 137404 | 137427 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137405 | 137428 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137406 | 137429 | (void)SQLITE_MISUSE_BKPT; |
| 137407 | 137430 | return 0; |
| 137408 | 137431 | } |
| @@ -137411,11 +137434,11 @@ | ||
| 137411 | 137434 | } |
| 137412 | 137435 | |
| 137413 | 137436 | /* |
| 137414 | 137437 | ** Return the number of changes in the most recent call to sqlite3_exec(). |
| 137415 | 137438 | */ |
| 137416 | -SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3 *db){ | |
| 137439 | +SQLITE_API int sqlite3_changes(sqlite3 *db){ | |
| 137417 | 137440 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137418 | 137441 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137419 | 137442 | (void)SQLITE_MISUSE_BKPT; |
| 137420 | 137443 | return 0; |
| 137421 | 137444 | } |
| @@ -137424,11 +137447,11 @@ | ||
| 137424 | 137447 | } |
| 137425 | 137448 | |
| 137426 | 137449 | /* |
| 137427 | 137450 | ** Return the number of changes since the database handle was opened. |
| 137428 | 137451 | */ |
| 137429 | -SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3 *db){ | |
| 137452 | +SQLITE_API int sqlite3_total_changes(sqlite3 *db){ | |
| 137430 | 137453 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137431 | 137454 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137432 | 137455 | (void)SQLITE_MISUSE_BKPT; |
| 137433 | 137456 | return 0; |
| 137434 | 137457 | } |
| @@ -137575,12 +137598,12 @@ | ||
| 137575 | 137598 | ** statements or unfinished sqlite3_backups. The sqlite3_close_v2() |
| 137576 | 137599 | ** version forces the connection to become a zombie if there are |
| 137577 | 137600 | ** unclosed resources, and arranges for deallocation when the last |
| 137578 | 137601 | ** prepare statement or sqlite3_backup closes. |
| 137579 | 137602 | */ |
| 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); } | |
| 137582 | 137605 | |
| 137583 | 137606 | |
| 137584 | 137607 | /* |
| 137585 | 137608 | ** Close the mutex on database connection db. |
| 137586 | 137609 | ** |
| @@ -137983,11 +138006,11 @@ | ||
| 137983 | 138006 | |
| 137984 | 138007 | /* |
| 137985 | 138008 | ** This routine sets the busy callback for an Sqlite database to the |
| 137986 | 138009 | ** given callback function with the given argument. |
| 137987 | 138010 | */ |
| 137988 | -SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler( | |
| 138011 | +SQLITE_API int sqlite3_busy_handler( | |
| 137989 | 138012 | sqlite3 *db, |
| 137990 | 138013 | int (*xBusy)(void*,int), |
| 137991 | 138014 | void *pArg |
| 137992 | 138015 | ){ |
| 137993 | 138016 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -138006,11 +138029,11 @@ | ||
| 138006 | 138029 | /* |
| 138007 | 138030 | ** This routine sets the progress callback for an Sqlite database to the |
| 138008 | 138031 | ** given callback function with the given argument. The progress callback will |
| 138009 | 138032 | ** be invoked every nOps opcodes. |
| 138010 | 138033 | */ |
| 138011 | -SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler( | |
| 138034 | +SQLITE_API void sqlite3_progress_handler( | |
| 138012 | 138035 | sqlite3 *db, |
| 138013 | 138036 | int nOps, |
| 138014 | 138037 | int (*xProgress)(void*), |
| 138015 | 138038 | void *pArg |
| 138016 | 138039 | ){ |
| @@ -138037,11 +138060,11 @@ | ||
| 138037 | 138060 | |
| 138038 | 138061 | /* |
| 138039 | 138062 | ** This routine installs a default busy handler that waits for the |
| 138040 | 138063 | ** specified number of milliseconds before returning 0. |
| 138041 | 138064 | */ |
| 138042 | -SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3 *db, int ms){ | |
| 138065 | +SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){ | |
| 138043 | 138066 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138044 | 138067 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 138045 | 138068 | #endif |
| 138046 | 138069 | if( ms>0 ){ |
| 138047 | 138070 | sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db); |
| @@ -138053,11 +138076,11 @@ | ||
| 138053 | 138076 | } |
| 138054 | 138077 | |
| 138055 | 138078 | /* |
| 138056 | 138079 | ** Cause any pending operation to stop at its earliest opportunity. |
| 138057 | 138080 | */ |
| 138058 | -SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3 *db){ | |
| 138081 | +SQLITE_API void sqlite3_interrupt(sqlite3 *db){ | |
| 138059 | 138082 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138060 | 138083 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138061 | 138084 | (void)SQLITE_MISUSE_BKPT; |
| 138062 | 138085 | return; |
| 138063 | 138086 | } |
| @@ -138169,11 +138192,11 @@ | ||
| 138169 | 138192 | } |
| 138170 | 138193 | |
| 138171 | 138194 | /* |
| 138172 | 138195 | ** Create new user functions. |
| 138173 | 138196 | */ |
| 138174 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function( | |
| 138197 | +SQLITE_API int sqlite3_create_function( | |
| 138175 | 138198 | sqlite3 *db, |
| 138176 | 138199 | const char *zFunc, |
| 138177 | 138200 | int nArg, |
| 138178 | 138201 | int enc, |
| 138179 | 138202 | void *p, |
| @@ -138183,11 +138206,11 @@ | ||
| 138183 | 138206 | ){ |
| 138184 | 138207 | return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xSFunc, xStep, |
| 138185 | 138208 | xFinal, 0); |
| 138186 | 138209 | } |
| 138187 | 138210 | |
| 138188 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( | |
| 138211 | +SQLITE_API int sqlite3_create_function_v2( | |
| 138189 | 138212 | sqlite3 *db, |
| 138190 | 138213 | const char *zFunc, |
| 138191 | 138214 | int nArg, |
| 138192 | 138215 | int enc, |
| 138193 | 138216 | void *p, |
| @@ -138226,11 +138249,11 @@ | ||
| 138226 | 138249 | sqlite3_mutex_leave(db->mutex); |
| 138227 | 138250 | return rc; |
| 138228 | 138251 | } |
| 138229 | 138252 | |
| 138230 | 138253 | #ifndef SQLITE_OMIT_UTF16 |
| 138231 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( | |
| 138254 | +SQLITE_API int sqlite3_create_function16( | |
| 138232 | 138255 | sqlite3 *db, |
| 138233 | 138256 | const void *zFunctionName, |
| 138234 | 138257 | int nArg, |
| 138235 | 138258 | int eTextRep, |
| 138236 | 138259 | void *p, |
| @@ -138266,11 +138289,11 @@ | ||
| 138266 | 138289 | ** When virtual tables intend to provide an overloaded function, they |
| 138267 | 138290 | ** should call this routine to make sure the global function exists. |
| 138268 | 138291 | ** A global function must exist in order for name resolution to work |
| 138269 | 138292 | ** properly. |
| 138270 | 138293 | */ |
| 138271 | -SQLITE_API int SQLITE_STDCALL sqlite3_overload_function( | |
| 138294 | +SQLITE_API int sqlite3_overload_function( | |
| 138272 | 138295 | sqlite3 *db, |
| 138273 | 138296 | const char *zName, |
| 138274 | 138297 | int nArg |
| 138275 | 138298 | ){ |
| 138276 | 138299 | int rc = SQLITE_OK; |
| @@ -138298,11 +138321,11 @@ | ||
| 138298 | 138321 | ** A NULL trace function means that no tracing is executes. A non-NULL |
| 138299 | 138322 | ** trace is a pointer to a function that is invoked at the start of each |
| 138300 | 138323 | ** SQL statement. |
| 138301 | 138324 | */ |
| 138302 | 138325 | #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){ | |
| 138304 | 138327 | void *pOld; |
| 138305 | 138328 | |
| 138306 | 138329 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138307 | 138330 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138308 | 138331 | (void)SQLITE_MISUSE_BKPT; |
| @@ -138319,11 +138342,11 @@ | ||
| 138319 | 138342 | } |
| 138320 | 138343 | #endif /* SQLITE_OMIT_DEPRECATED */ |
| 138321 | 138344 | |
| 138322 | 138345 | /* Register a trace callback using the version-2 interface. |
| 138323 | 138346 | */ |
| 138324 | -SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2( | |
| 138347 | +SQLITE_API int sqlite3_trace_v2( | |
| 138325 | 138348 | sqlite3 *db, /* Trace this connection */ |
| 138326 | 138349 | unsigned mTrace, /* Mask of events to be traced */ |
| 138327 | 138350 | int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */ |
| 138328 | 138351 | void *pArg /* Context */ |
| 138329 | 138352 | ){ |
| @@ -138331,10 +138354,12 @@ | ||
| 138331 | 138354 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138332 | 138355 | return SQLITE_MISUSE_BKPT; |
| 138333 | 138356 | } |
| 138334 | 138357 | #endif |
| 138335 | 138358 | sqlite3_mutex_enter(db->mutex); |
| 138359 | + if( mTrace==0 ) xTrace = 0; | |
| 138360 | + if( xTrace==0 ) mTrace = 0; | |
| 138336 | 138361 | db->mTrace = mTrace; |
| 138337 | 138362 | db->xTrace = xTrace; |
| 138338 | 138363 | db->pTraceArg = pArg; |
| 138339 | 138364 | sqlite3_mutex_leave(db->mutex); |
| 138340 | 138365 | return SQLITE_OK; |
| @@ -138347,11 +138372,11 @@ | ||
| 138347 | 138372 | ** |
| 138348 | 138373 | ** A NULL profile function means that no profiling is executes. A non-NULL |
| 138349 | 138374 | ** profile is a pointer to a function that is invoked at the conclusion of |
| 138350 | 138375 | ** each SQL statement that is run. |
| 138351 | 138376 | */ |
| 138352 | -SQLITE_API void *SQLITE_STDCALL sqlite3_profile( | |
| 138377 | +SQLITE_API void *sqlite3_profile( | |
| 138353 | 138378 | sqlite3 *db, |
| 138354 | 138379 | void (*xProfile)(void*,const char*,sqlite_uint64), |
| 138355 | 138380 | void *pArg |
| 138356 | 138381 | ){ |
| 138357 | 138382 | void *pOld; |
| @@ -138375,11 +138400,11 @@ | ||
| 138375 | 138400 | /* |
| 138376 | 138401 | ** Register a function to be invoked when a transaction commits. |
| 138377 | 138402 | ** If the invoked function returns non-zero, then the commit becomes a |
| 138378 | 138403 | ** rollback. |
| 138379 | 138404 | */ |
| 138380 | -SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook( | |
| 138405 | +SQLITE_API void *sqlite3_commit_hook( | |
| 138381 | 138406 | sqlite3 *db, /* Attach the hook to this database */ |
| 138382 | 138407 | int (*xCallback)(void*), /* Function to invoke on each commit */ |
| 138383 | 138408 | void *pArg /* Argument to the function */ |
| 138384 | 138409 | ){ |
| 138385 | 138410 | void *pOld; |
| @@ -138400,11 +138425,11 @@ | ||
| 138400 | 138425 | |
| 138401 | 138426 | /* |
| 138402 | 138427 | ** Register a callback to be invoked each time a row is updated, |
| 138403 | 138428 | ** inserted or deleted using this database connection. |
| 138404 | 138429 | */ |
| 138405 | -SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( | |
| 138430 | +SQLITE_API void *sqlite3_update_hook( | |
| 138406 | 138431 | sqlite3 *db, /* Attach the hook to this database */ |
| 138407 | 138432 | void (*xCallback)(void*,int,char const *,char const *,sqlite_int64), |
| 138408 | 138433 | void *pArg /* Argument to the function */ |
| 138409 | 138434 | ){ |
| 138410 | 138435 | void *pRet; |
| @@ -138425,11 +138450,11 @@ | ||
| 138425 | 138450 | |
| 138426 | 138451 | /* |
| 138427 | 138452 | ** Register a callback to be invoked each time a transaction is rolled |
| 138428 | 138453 | ** back by this database connection. |
| 138429 | 138454 | */ |
| 138430 | -SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook( | |
| 138455 | +SQLITE_API void *sqlite3_rollback_hook( | |
| 138431 | 138456 | sqlite3 *db, /* Attach the hook to this database */ |
| 138432 | 138457 | void (*xCallback)(void*), /* Callback function */ |
| 138433 | 138458 | void *pArg /* Argument to the function */ |
| 138434 | 138459 | ){ |
| 138435 | 138460 | void *pRet; |
| @@ -138451,11 +138476,11 @@ | ||
| 138451 | 138476 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 138452 | 138477 | /* |
| 138453 | 138478 | ** Register a callback to be invoked each time a row is updated, |
| 138454 | 138479 | ** inserted or deleted using this database connection. |
| 138455 | 138480 | */ |
| 138456 | -SQLITE_API void *SQLITE_STDCALL sqlite3_preupdate_hook( | |
| 138481 | +SQLITE_API void *sqlite3_preupdate_hook( | |
| 138457 | 138482 | sqlite3 *db, /* Attach the hook to this database */ |
| 138458 | 138483 | void(*xCallback)( /* Callback function */ |
| 138459 | 138484 | void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64), |
| 138460 | 138485 | void *pArg /* First callback argument */ |
| 138461 | 138486 | ){ |
| @@ -138500,11 +138525,11 @@ | ||
| 138500 | 138525 | ** The callback registered by this function replaces any existing callback |
| 138501 | 138526 | ** registered using sqlite3_wal_hook(). Likewise, registering a callback |
| 138502 | 138527 | ** using sqlite3_wal_hook() disables the automatic checkpoint mechanism |
| 138503 | 138528 | ** configured by this function. |
| 138504 | 138529 | */ |
| 138505 | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){ | |
| 138530 | +SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){ | |
| 138506 | 138531 | #ifdef SQLITE_OMIT_WAL |
| 138507 | 138532 | UNUSED_PARAMETER(db); |
| 138508 | 138533 | UNUSED_PARAMETER(nFrame); |
| 138509 | 138534 | #else |
| 138510 | 138535 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -138521,11 +138546,11 @@ | ||
| 138521 | 138546 | |
| 138522 | 138547 | /* |
| 138523 | 138548 | ** Register a callback to be invoked each time a transaction is written |
| 138524 | 138549 | ** into the write-ahead-log by this database connection. |
| 138525 | 138550 | */ |
| 138526 | -SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( | |
| 138551 | +SQLITE_API void *sqlite3_wal_hook( | |
| 138527 | 138552 | sqlite3 *db, /* Attach the hook to this db handle */ |
| 138528 | 138553 | int(*xCallback)(void *, sqlite3*, const char*, int), |
| 138529 | 138554 | void *pArg /* First argument passed to xCallback() */ |
| 138530 | 138555 | ){ |
| 138531 | 138556 | #ifndef SQLITE_OMIT_WAL |
| @@ -138548,11 +138573,11 @@ | ||
| 138548 | 138573 | } |
| 138549 | 138574 | |
| 138550 | 138575 | /* |
| 138551 | 138576 | ** Checkpoint database zDb. |
| 138552 | 138577 | */ |
| 138553 | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( | |
| 138578 | +SQLITE_API int sqlite3_wal_checkpoint_v2( | |
| 138554 | 138579 | sqlite3 *db, /* Database handle */ |
| 138555 | 138580 | const char *zDb, /* Name of attached database (or NULL) */ |
| 138556 | 138581 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 138557 | 138582 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 138558 | 138583 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -138603,11 +138628,11 @@ | ||
| 138603 | 138628 | /* |
| 138604 | 138629 | ** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points |
| 138605 | 138630 | ** to contains a zero-length string, all attached databases are |
| 138606 | 138631 | ** checkpointed. |
| 138607 | 138632 | */ |
| 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){ | |
| 138609 | 138634 | /* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to |
| 138610 | 138635 | ** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */ |
| 138611 | 138636 | return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0); |
| 138612 | 138637 | } |
| 138613 | 138638 | |
| @@ -138694,11 +138719,11 @@ | ||
| 138694 | 138719 | |
| 138695 | 138720 | /* |
| 138696 | 138721 | ** Return UTF-8 encoded English language explanation of the most recent |
| 138697 | 138722 | ** error. |
| 138698 | 138723 | */ |
| 138699 | -SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3 *db){ | |
| 138724 | +SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){ | |
| 138700 | 138725 | const char *z; |
| 138701 | 138726 | if( !db ){ |
| 138702 | 138727 | return sqlite3ErrStr(SQLITE_NOMEM_BKPT); |
| 138703 | 138728 | } |
| 138704 | 138729 | if( !sqlite3SafetyCheckSickOrOk(db) ){ |
| @@ -138722,11 +138747,11 @@ | ||
| 138722 | 138747 | #ifndef SQLITE_OMIT_UTF16 |
| 138723 | 138748 | /* |
| 138724 | 138749 | ** Return UTF-16 encoded English language explanation of the most recent |
| 138725 | 138750 | ** error. |
| 138726 | 138751 | */ |
| 138727 | -SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3 *db){ | |
| 138752 | +SQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){ | |
| 138728 | 138753 | static const u16 outOfMem[] = { |
| 138729 | 138754 | 'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0 |
| 138730 | 138755 | }; |
| 138731 | 138756 | static const u16 misuse[] = { |
| 138732 | 138757 | 'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ', |
| @@ -138767,38 +138792,38 @@ | ||
| 138767 | 138792 | |
| 138768 | 138793 | /* |
| 138769 | 138794 | ** Return the most recent error code generated by an SQLite routine. If NULL is |
| 138770 | 138795 | ** passed to this function, we assume a malloc() failed during sqlite3_open(). |
| 138771 | 138796 | */ |
| 138772 | -SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db){ | |
| 138797 | +SQLITE_API int sqlite3_errcode(sqlite3 *db){ | |
| 138773 | 138798 | if( db && !sqlite3SafetyCheckSickOrOk(db) ){ |
| 138774 | 138799 | return SQLITE_MISUSE_BKPT; |
| 138775 | 138800 | } |
| 138776 | 138801 | if( !db || db->mallocFailed ){ |
| 138777 | 138802 | return SQLITE_NOMEM_BKPT; |
| 138778 | 138803 | } |
| 138779 | 138804 | return db->errCode & db->errMask; |
| 138780 | 138805 | } |
| 138781 | -SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db){ | |
| 138806 | +SQLITE_API int sqlite3_extended_errcode(sqlite3 *db){ | |
| 138782 | 138807 | if( db && !sqlite3SafetyCheckSickOrOk(db) ){ |
| 138783 | 138808 | return SQLITE_MISUSE_BKPT; |
| 138784 | 138809 | } |
| 138785 | 138810 | if( !db || db->mallocFailed ){ |
| 138786 | 138811 | return SQLITE_NOMEM_BKPT; |
| 138787 | 138812 | } |
| 138788 | 138813 | return db->errCode; |
| 138789 | 138814 | } |
| 138790 | -SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3 *db){ | |
| 138815 | +SQLITE_API int sqlite3_system_errno(sqlite3 *db){ | |
| 138791 | 138816 | return db ? db->iSysErrno : 0; |
| 138792 | 138817 | } |
| 138793 | 138818 | |
| 138794 | 138819 | /* |
| 138795 | 138820 | ** Return a string that describes the kind of error specified in the |
| 138796 | 138821 | ** argument. For now, this simply calls the internal sqlite3ErrStr() |
| 138797 | 138822 | ** function. |
| 138798 | 138823 | */ |
| 138799 | -SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int rc){ | |
| 138824 | +SQLITE_API const char *sqlite3_errstr(int rc){ | |
| 138800 | 138825 | return sqlite3ErrStr(rc); |
| 138801 | 138826 | } |
| 138802 | 138827 | |
| 138803 | 138828 | /* |
| 138804 | 138829 | ** Create a new collating function for database "db". The name is zName |
| @@ -138942,11 +138967,11 @@ | ||
| 138942 | 138967 | ** |
| 138943 | 138968 | ** A new lower limit does not shrink existing constructs. |
| 138944 | 138969 | ** It merely prevents new constructs that exceed the limit |
| 138945 | 138970 | ** from forming. |
| 138946 | 138971 | */ |
| 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){ | |
| 138948 | 138973 | int oldLimit; |
| 138949 | 138974 | |
| 138950 | 138975 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138951 | 138976 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138952 | 138977 | (void)SQLITE_MISUSE_BKPT; |
| @@ -139566,18 +139591,18 @@ | ||
| 139566 | 139591 | } |
| 139567 | 139592 | |
| 139568 | 139593 | /* |
| 139569 | 139594 | ** Open a new database handle. |
| 139570 | 139595 | */ |
| 139571 | -SQLITE_API int SQLITE_STDCALL sqlite3_open( | |
| 139596 | +SQLITE_API int sqlite3_open( | |
| 139572 | 139597 | const char *zFilename, |
| 139573 | 139598 | sqlite3 **ppDb |
| 139574 | 139599 | ){ |
| 139575 | 139600 | return openDatabase(zFilename, ppDb, |
| 139576 | 139601 | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0); |
| 139577 | 139602 | } |
| 139578 | -SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( | |
| 139603 | +SQLITE_API int sqlite3_open_v2( | |
| 139579 | 139604 | const char *filename, /* Database filename (UTF-8) */ |
| 139580 | 139605 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 139581 | 139606 | int flags, /* Flags */ |
| 139582 | 139607 | const char *zVfs /* Name of VFS module to use */ |
| 139583 | 139608 | ){ |
| @@ -139586,11 +139611,11 @@ | ||
| 139586 | 139611 | |
| 139587 | 139612 | #ifndef SQLITE_OMIT_UTF16 |
| 139588 | 139613 | /* |
| 139589 | 139614 | ** Open a new database handle. |
| 139590 | 139615 | */ |
| 139591 | -SQLITE_API int SQLITE_STDCALL sqlite3_open16( | |
| 139616 | +SQLITE_API int sqlite3_open16( | |
| 139592 | 139617 | const void *zFilename, |
| 139593 | 139618 | sqlite3 **ppDb |
| 139594 | 139619 | ){ |
| 139595 | 139620 | char const *zFilename8; /* zFilename encoded in UTF-8 instead of UTF-16 */ |
| 139596 | 139621 | sqlite3_value *pVal; |
| @@ -139625,11 +139650,11 @@ | ||
| 139625 | 139650 | #endif /* SQLITE_OMIT_UTF16 */ |
| 139626 | 139651 | |
| 139627 | 139652 | /* |
| 139628 | 139653 | ** Register a new collation sequence with the database handle db. |
| 139629 | 139654 | */ |
| 139630 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( | |
| 139655 | +SQLITE_API int sqlite3_create_collation( | |
| 139631 | 139656 | sqlite3* db, |
| 139632 | 139657 | const char *zName, |
| 139633 | 139658 | int enc, |
| 139634 | 139659 | void* pCtx, |
| 139635 | 139660 | int(*xCompare)(void*,int,const void*,int,const void*) |
| @@ -139638,11 +139663,11 @@ | ||
| 139638 | 139663 | } |
| 139639 | 139664 | |
| 139640 | 139665 | /* |
| 139641 | 139666 | ** Register a new collation sequence with the database handle db. |
| 139642 | 139667 | */ |
| 139643 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( | |
| 139668 | +SQLITE_API int sqlite3_create_collation_v2( | |
| 139644 | 139669 | sqlite3* db, |
| 139645 | 139670 | const char *zName, |
| 139646 | 139671 | int enc, |
| 139647 | 139672 | void* pCtx, |
| 139648 | 139673 | int(*xCompare)(void*,int,const void*,int,const void*), |
| @@ -139663,11 +139688,11 @@ | ||
| 139663 | 139688 | |
| 139664 | 139689 | #ifndef SQLITE_OMIT_UTF16 |
| 139665 | 139690 | /* |
| 139666 | 139691 | ** Register a new collation sequence with the database handle db. |
| 139667 | 139692 | */ |
| 139668 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( | |
| 139693 | +SQLITE_API int sqlite3_create_collation16( | |
| 139669 | 139694 | sqlite3* db, |
| 139670 | 139695 | const void *zName, |
| 139671 | 139696 | int enc, |
| 139672 | 139697 | void* pCtx, |
| 139673 | 139698 | int(*xCompare)(void*,int,const void*,int,const void*) |
| @@ -139693,11 +139718,11 @@ | ||
| 139693 | 139718 | |
| 139694 | 139719 | /* |
| 139695 | 139720 | ** Register a collation sequence factory callback with the database handle |
| 139696 | 139721 | ** db. Replace any previously installed collation sequence factory. |
| 139697 | 139722 | */ |
| 139698 | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( | |
| 139723 | +SQLITE_API int sqlite3_collation_needed( | |
| 139699 | 139724 | sqlite3 *db, |
| 139700 | 139725 | void *pCollNeededArg, |
| 139701 | 139726 | void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*) |
| 139702 | 139727 | ){ |
| 139703 | 139728 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -139714,11 +139739,11 @@ | ||
| 139714 | 139739 | #ifndef SQLITE_OMIT_UTF16 |
| 139715 | 139740 | /* |
| 139716 | 139741 | ** Register a collation sequence factory callback with the database handle |
| 139717 | 139742 | ** db. Replace any previously installed collation sequence factory. |
| 139718 | 139743 | */ |
| 139719 | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( | |
| 139744 | +SQLITE_API int sqlite3_collation_needed16( | |
| 139720 | 139745 | sqlite3 *db, |
| 139721 | 139746 | void *pCollNeededArg, |
| 139722 | 139747 | void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*) |
| 139723 | 139748 | ){ |
| 139724 | 139749 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -139736,11 +139761,11 @@ | ||
| 139736 | 139761 | #ifndef SQLITE_OMIT_DEPRECATED |
| 139737 | 139762 | /* |
| 139738 | 139763 | ** This function is now an anachronism. It used to be used to recover from a |
| 139739 | 139764 | ** malloc() failure, but SQLite now does this automatically. |
| 139740 | 139765 | */ |
| 139741 | -SQLITE_API int SQLITE_STDCALL sqlite3_global_recover(void){ | |
| 139766 | +SQLITE_API int sqlite3_global_recover(void){ | |
| 139742 | 139767 | return SQLITE_OK; |
| 139743 | 139768 | } |
| 139744 | 139769 | #endif |
| 139745 | 139770 | |
| 139746 | 139771 | /* |
| @@ -139747,11 +139772,11 @@ | ||
| 139747 | 139772 | ** Test to see whether or not the database connection is in autocommit |
| 139748 | 139773 | ** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on |
| 139749 | 139774 | ** by default. Autocommit is disabled by a BEGIN statement and reenabled |
| 139750 | 139775 | ** by the next COMMIT or ROLLBACK. |
| 139751 | 139776 | */ |
| 139752 | -SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3 *db){ | |
| 139777 | +SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){ | |
| 139753 | 139778 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139754 | 139779 | if( !sqlite3SafetyCheckOk(db) ){ |
| 139755 | 139780 | (void)SQLITE_MISUSE_BKPT; |
| 139756 | 139781 | return 0; |
| 139757 | 139782 | } |
| @@ -139804,19 +139829,19 @@ | ||
| 139804 | 139829 | ** data for this thread has been deallocated. |
| 139805 | 139830 | ** |
| 139806 | 139831 | ** SQLite no longer uses thread-specific data so this routine is now a |
| 139807 | 139832 | ** no-op. It is retained for historical compatibility. |
| 139808 | 139833 | */ |
| 139809 | -SQLITE_API void SQLITE_STDCALL sqlite3_thread_cleanup(void){ | |
| 139834 | +SQLITE_API void sqlite3_thread_cleanup(void){ | |
| 139810 | 139835 | } |
| 139811 | 139836 | #endif |
| 139812 | 139837 | |
| 139813 | 139838 | /* |
| 139814 | 139839 | ** Return meta information about a specific column of a database table. |
| 139815 | 139840 | ** See comment in sqlite3.h (sqlite.h.in) for details. |
| 139816 | 139841 | */ |
| 139817 | -SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( | |
| 139842 | +SQLITE_API int sqlite3_table_column_metadata( | |
| 139818 | 139843 | sqlite3 *db, /* Connection handle */ |
| 139819 | 139844 | const char *zDbName, /* Database name or NULL */ |
| 139820 | 139845 | const char *zTableName, /* Table name */ |
| 139821 | 139846 | const char *zColumnName, /* Column name */ |
| 139822 | 139847 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -139930,11 +139955,11 @@ | ||
| 139930 | 139955 | } |
| 139931 | 139956 | |
| 139932 | 139957 | /* |
| 139933 | 139958 | ** Sleep for a little while. Return the amount of time slept. |
| 139934 | 139959 | */ |
| 139935 | -SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int ms){ | |
| 139960 | +SQLITE_API int sqlite3_sleep(int ms){ | |
| 139936 | 139961 | sqlite3_vfs *pVfs; |
| 139937 | 139962 | int rc; |
| 139938 | 139963 | pVfs = sqlite3_vfs_find(0); |
| 139939 | 139964 | if( pVfs==0 ) return 0; |
| 139940 | 139965 | |
| @@ -139946,11 +139971,11 @@ | ||
| 139946 | 139971 | } |
| 139947 | 139972 | |
| 139948 | 139973 | /* |
| 139949 | 139974 | ** Enable or disable the extended result codes. |
| 139950 | 139975 | */ |
| 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){ | |
| 139952 | 139977 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139953 | 139978 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 139954 | 139979 | #endif |
| 139955 | 139980 | sqlite3_mutex_enter(db->mutex); |
| 139956 | 139981 | db->errMask = onoff ? 0xffffffff : 0xff; |
| @@ -139959,11 +139984,11 @@ | ||
| 139959 | 139984 | } |
| 139960 | 139985 | |
| 139961 | 139986 | /* |
| 139962 | 139987 | ** Invoke the xFileControl method on a particular database. |
| 139963 | 139988 | */ |
| 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){ | |
| 139965 | 139990 | int rc = SQLITE_ERROR; |
| 139966 | 139991 | Btree *pBtree; |
| 139967 | 139992 | |
| 139968 | 139993 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139969 | 139994 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| @@ -139999,11 +140024,11 @@ | ||
| 139999 | 140024 | } |
| 140000 | 140025 | |
| 140001 | 140026 | /* |
| 140002 | 140027 | ** Interface to the testing logic. |
| 140003 | 140028 | */ |
| 140004 | -SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...){ | |
| 140029 | +SQLITE_API int sqlite3_test_control(int op, ...){ | |
| 140005 | 140030 | int rc = 0; |
| 140006 | 140031 | #ifdef SQLITE_OMIT_BUILTIN_TEST |
| 140007 | 140032 | UNUSED_PARAMETER(op); |
| 140008 | 140033 | #else |
| 140009 | 140034 | va_list ap; |
| @@ -140344,11 +140369,11 @@ | ||
| 140344 | 140369 | ** method of a VFS implementation. The zParam argument is the name of the |
| 140345 | 140370 | ** query parameter we seek. This routine returns the value of the zParam |
| 140346 | 140371 | ** parameter if it exists. If the parameter does not exist, this routine |
| 140347 | 140372 | ** returns a NULL pointer. |
| 140348 | 140373 | */ |
| 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){ | |
| 140350 | 140375 | if( zFilename==0 || zParam==0 ) return 0; |
| 140351 | 140376 | zFilename += sqlite3Strlen30(zFilename) + 1; |
| 140352 | 140377 | while( zFilename[0] ){ |
| 140353 | 140378 | int x = strcmp(zFilename, zParam); |
| 140354 | 140379 | zFilename += sqlite3Strlen30(zFilename) + 1; |
| @@ -140359,20 +140384,20 @@ | ||
| 140359 | 140384 | } |
| 140360 | 140385 | |
| 140361 | 140386 | /* |
| 140362 | 140387 | ** Return a boolean value for a query parameter. |
| 140363 | 140388 | */ |
| 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){ | |
| 140365 | 140390 | const char *z = sqlite3_uri_parameter(zFilename, zParam); |
| 140366 | 140391 | bDflt = bDflt!=0; |
| 140367 | 140392 | return z ? sqlite3GetBoolean(z, bDflt) : bDflt; |
| 140368 | 140393 | } |
| 140369 | 140394 | |
| 140370 | 140395 | /* |
| 140371 | 140396 | ** Return a 64-bit integer value for a query parameter. |
| 140372 | 140397 | */ |
| 140373 | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64( | |
| 140398 | +SQLITE_API sqlite3_int64 sqlite3_uri_int64( | |
| 140374 | 140399 | const char *zFilename, /* Filename as passed to xOpen */ |
| 140375 | 140400 | const char *zParam, /* URI parameter sought */ |
| 140376 | 140401 | sqlite3_int64 bDflt /* return if parameter is missing */ |
| 140377 | 140402 | ){ |
| 140378 | 140403 | const char *z = sqlite3_uri_parameter(zFilename, zParam); |
| @@ -140400,11 +140425,11 @@ | ||
| 140400 | 140425 | |
| 140401 | 140426 | /* |
| 140402 | 140427 | ** Return the filename of the database associated with a database |
| 140403 | 140428 | ** connection. |
| 140404 | 140429 | */ |
| 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){ | |
| 140406 | 140431 | Btree *pBt; |
| 140407 | 140432 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 140408 | 140433 | if( !sqlite3SafetyCheckOk(db) ){ |
| 140409 | 140434 | (void)SQLITE_MISUSE_BKPT; |
| 140410 | 140435 | return 0; |
| @@ -140416,11 +140441,11 @@ | ||
| 140416 | 140441 | |
| 140417 | 140442 | /* |
| 140418 | 140443 | ** Return 1 if database is read-only or 0 if read/write. Return -1 if |
| 140419 | 140444 | ** no such database exists. |
| 140420 | 140445 | */ |
| 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){ | |
| 140422 | 140447 | Btree *pBt; |
| 140423 | 140448 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 140424 | 140449 | if( !sqlite3SafetyCheckOk(db) ){ |
| 140425 | 140450 | (void)SQLITE_MISUSE_BKPT; |
| 140426 | 140451 | return -1; |
| @@ -140433,11 +140458,11 @@ | ||
| 140433 | 140458 | #ifdef SQLITE_ENABLE_SNAPSHOT |
| 140434 | 140459 | /* |
| 140435 | 140460 | ** Obtain a snapshot handle for the snapshot of database zDb currently |
| 140436 | 140461 | ** being read by handle db. |
| 140437 | 140462 | */ |
| 140438 | -SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_get( | |
| 140463 | +SQLITE_API int sqlite3_snapshot_get( | |
| 140439 | 140464 | sqlite3 *db, |
| 140440 | 140465 | const char *zDb, |
| 140441 | 140466 | sqlite3_snapshot **ppSnapshot |
| 140442 | 140467 | ){ |
| 140443 | 140468 | int rc = SQLITE_ERROR; |
| @@ -140468,11 +140493,11 @@ | ||
| 140468 | 140493 | } |
| 140469 | 140494 | |
| 140470 | 140495 | /* |
| 140471 | 140496 | ** Open a read-transaction on the snapshot idendified by pSnapshot. |
| 140472 | 140497 | */ |
| 140473 | -SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_open( | |
| 140498 | +SQLITE_API int sqlite3_snapshot_open( | |
| 140474 | 140499 | sqlite3 *db, |
| 140475 | 140500 | const char *zDb, |
| 140476 | 140501 | sqlite3_snapshot *pSnapshot |
| 140477 | 140502 | ){ |
| 140478 | 140503 | int rc = SQLITE_ERROR; |
| @@ -140505,11 +140530,11 @@ | ||
| 140505 | 140530 | } |
| 140506 | 140531 | |
| 140507 | 140532 | /* |
| 140508 | 140533 | ** Free a snapshot handle obtained from sqlite3_snapshot_get(). |
| 140509 | 140534 | */ |
| 140510 | -SQLITE_API void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){ | |
| 140535 | +SQLITE_API void sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){ | |
| 140511 | 140536 | sqlite3_free(pSnapshot); |
| 140512 | 140537 | } |
| 140513 | 140538 | #endif /* SQLITE_ENABLE_SNAPSHOT */ |
| 140514 | 140539 | |
| 140515 | 140540 | /************** End of main.c ************************************************/ |
| @@ -140659,11 +140684,11 @@ | ||
| 140659 | 140684 | ** |
| 140660 | 140685 | ** Each call to this routine overrides any prior callbacks registered |
| 140661 | 140686 | ** on the same "db". If xNotify==0 then any prior callbacks are immediately |
| 140662 | 140687 | ** cancelled. |
| 140663 | 140688 | */ |
| 140664 | -SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( | |
| 140689 | +SQLITE_API int sqlite3_unlock_notify( | |
| 140665 | 140690 | sqlite3 *db, |
| 140666 | 140691 | void (*xNotify)(void **, int), |
| 140667 | 140692 | void *pArg |
| 140668 | 140693 | ){ |
| 140669 | 140694 | int rc = SQLITE_OK; |
| @@ -147662,11 +147687,11 @@ | ||
| 147662 | 147687 | ** Initialize API pointer table, if required. |
| 147663 | 147688 | */ |
| 147664 | 147689 | #ifdef _WIN32 |
| 147665 | 147690 | __declspec(dllexport) |
| 147666 | 147691 | #endif |
| 147667 | -SQLITE_API int SQLITE_STDCALL sqlite3_fts3_init( | |
| 147692 | +SQLITE_API int sqlite3_fts3_init( | |
| 147668 | 147693 | sqlite3 *db, |
| 147669 | 147694 | char **pzErrMsg, |
| 147670 | 147695 | const sqlite3_api_routines *pApi |
| 147671 | 147696 | ){ |
| 147672 | 147697 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -163463,11 +163488,11 @@ | ||
| 163463 | 163488 | } |
| 163464 | 163489 | |
| 163465 | 163490 | /* |
| 163466 | 163491 | ** Register a new geometry function for use with the r-tree MATCH operator. |
| 163467 | 163492 | */ |
| 163468 | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( | |
| 163493 | +SQLITE_API int sqlite3_rtree_geometry_callback( | |
| 163469 | 163494 | sqlite3 *db, /* Register SQL function on this connection */ |
| 163470 | 163495 | const char *zGeom, /* Name of the new SQL function */ |
| 163471 | 163496 | int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */ |
| 163472 | 163497 | void *pContext /* Extra data associated with the callback */ |
| 163473 | 163498 | ){ |
| @@ -163487,11 +163512,11 @@ | ||
| 163487 | 163512 | |
| 163488 | 163513 | /* |
| 163489 | 163514 | ** Register a new 2nd-generation geometry function for use with the |
| 163490 | 163515 | ** r-tree MATCH operator. |
| 163491 | 163516 | */ |
| 163492 | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( | |
| 163517 | +SQLITE_API int sqlite3_rtree_query_callback( | |
| 163493 | 163518 | sqlite3 *db, /* Register SQL function on this connection */ |
| 163494 | 163519 | const char *zQueryFunc, /* Name of new SQL function */ |
| 163495 | 163520 | int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */ |
| 163496 | 163521 | void *pContext, /* Extra data passed into the callback */ |
| 163497 | 163522 | void (*xDestructor)(void*) /* Destructor for the extra data */ |
| @@ -163512,11 +163537,11 @@ | ||
| 163512 | 163537 | |
| 163513 | 163538 | #if !SQLITE_CORE |
| 163514 | 163539 | #ifdef _WIN32 |
| 163515 | 163540 | __declspec(dllexport) |
| 163516 | 163541 | #endif |
| 163517 | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_init( | |
| 163542 | +SQLITE_API int sqlite3_rtree_init( | |
| 163518 | 163543 | sqlite3 *db, |
| 163519 | 163544 | char **pzErrMsg, |
| 163520 | 163545 | const sqlite3_api_routines *pApi |
| 163521 | 163546 | ){ |
| 163522 | 163547 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -164063,11 +164088,11 @@ | ||
| 164063 | 164088 | |
| 164064 | 164089 | #if !SQLITE_CORE |
| 164065 | 164090 | #ifdef _WIN32 |
| 164066 | 164091 | __declspec(dllexport) |
| 164067 | 164092 | #endif |
| 164068 | -SQLITE_API int SQLITE_STDCALL sqlite3_icu_init( | |
| 164093 | +SQLITE_API int sqlite3_icu_init( | |
| 164069 | 164094 | sqlite3 *db, |
| 164070 | 164095 | char **pzErrMsg, |
| 164071 | 164096 | const sqlite3_api_routines *pApi |
| 164072 | 164097 | ){ |
| 164073 | 164098 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -164743,11 +164768,11 @@ | ||
| 164743 | 164768 | ** IMPORTANT NOTE FOR ZIPVFS USERS: The RBU extension works with all of |
| 164744 | 164769 | ** SQLite's built-in VFSs, including the multiplexor VFS. However it does |
| 164745 | 164770 | ** not work out of the box with zipvfs. Refer to the comment describing |
| 164746 | 164771 | ** the zipvfs_create_vfs() API below for details on using RBU with zipvfs. |
| 164747 | 164772 | */ |
| 164748 | -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open( | |
| 164773 | +SQLITE_API sqlite3rbu *sqlite3rbu_open( | |
| 164749 | 164774 | const char *zTarget, |
| 164750 | 164775 | const char *zRbu, |
| 164751 | 164776 | const char *zState |
| 164752 | 164777 | ); |
| 164753 | 164778 | |
| @@ -164776,11 +164801,11 @@ | ||
| 164776 | 164801 | ** As with sqlite3rbu_open(), Zipvfs users should rever to the comment |
| 164777 | 164802 | ** describing the sqlite3rbu_create_vfs() API function below for |
| 164778 | 164803 | ** a description of the complications associated with using RBU with |
| 164779 | 164804 | ** zipvfs databases. |
| 164780 | 164805 | */ |
| 164781 | -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum( | |
| 164806 | +SQLITE_API sqlite3rbu *sqlite3rbu_vacuum( | |
| 164782 | 164807 | const char *zTarget, |
| 164783 | 164808 | const char *zState |
| 164784 | 164809 | ); |
| 164785 | 164810 | |
| 164786 | 164811 | /* |
| @@ -164812,11 +164837,11 @@ | ||
| 164812 | 164837 | ** when sqlite3rbu_close() is called. |
| 164813 | 164838 | ** |
| 164814 | 164839 | ** Database handles returned by this function remain valid until the next |
| 164815 | 164840 | ** call to any sqlite3rbu_xxx() function other than sqlite3rbu_db(). |
| 164816 | 164841 | */ |
| 164817 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu*, int bRbu); | |
| 164842 | +SQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu*, int bRbu); | |
| 164818 | 164843 | |
| 164819 | 164844 | /* |
| 164820 | 164845 | ** Do some work towards applying the RBU update to the target db. |
| 164821 | 164846 | ** |
| 164822 | 164847 | ** Return SQLITE_DONE if the update has been completely applied, or |
| @@ -164826,11 +164851,11 @@ | ||
| 164826 | 164851 | ** |
| 164827 | 164852 | ** Once a call to sqlite3rbu_step() has returned a value other than |
| 164828 | 164853 | ** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops |
| 164829 | 164854 | ** that immediately return the same value. |
| 164830 | 164855 | */ |
| 164831 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *pRbu); | |
| 164856 | +SQLITE_API int sqlite3rbu_step(sqlite3rbu *pRbu); | |
| 164832 | 164857 | |
| 164833 | 164858 | /* |
| 164834 | 164859 | ** Force RBU to save its state to disk. |
| 164835 | 164860 | ** |
| 164836 | 164861 | ** If a power failure or application crash occurs during an update, following |
| @@ -164838,11 +164863,11 @@ | ||
| 164838 | 164863 | ** was last saved. In other words, from the most recent successful call to |
| 164839 | 164864 | ** sqlite3rbu_close() or this function. |
| 164840 | 164865 | ** |
| 164841 | 164866 | ** SQLITE_OK is returned if successful, or an SQLite error code otherwise. |
| 164842 | 164867 | */ |
| 164843 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *pRbu); | |
| 164868 | +SQLITE_API int sqlite3rbu_savestate(sqlite3rbu *pRbu); | |
| 164844 | 164869 | |
| 164845 | 164870 | /* |
| 164846 | 164871 | ** Close an RBU handle. |
| 164847 | 164872 | ** |
| 164848 | 164873 | ** If the RBU update has been completely applied, mark the RBU database |
| @@ -164858,18 +164883,18 @@ | ||
| 164858 | 164883 | ** |
| 164859 | 164884 | ** Otherwise, if no error occurs, this function returns SQLITE_OK if the |
| 164860 | 164885 | ** update has been partially applied, or SQLITE_DONE if it has been |
| 164861 | 164886 | ** completely applied. |
| 164862 | 164887 | */ |
| 164863 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg); | |
| 164888 | +SQLITE_API int sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg); | |
| 164864 | 164889 | |
| 164865 | 164890 | /* |
| 164866 | 164891 | ** Return the total number of key-value operations (inserts, deletes or |
| 164867 | 164892 | ** updates) that have been performed on the target database since the |
| 164868 | 164893 | ** current RBU update was started. |
| 164869 | 164894 | */ |
| 164870 | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu); | |
| 164895 | +SQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu); | |
| 164871 | 164896 | |
| 164872 | 164897 | /* |
| 164873 | 164898 | ** Obtain permyriadage (permyriadage is to 10000 as percentage is to 100) |
| 164874 | 164899 | ** progress indications for the two stages of an RBU update. This API may |
| 164875 | 164900 | ** be useful for driving GUI progress indicators and similar. |
| @@ -164907,11 +164932,11 @@ | ||
| 164907 | 164932 | ** permyriadage progress of the same stage. If the rbu_count table does |
| 164908 | 164933 | ** not exist, then (*pnOne) is set to -1 during stage 1. If the rbu_count |
| 164909 | 164934 | ** table exists but is not correctly populated, the value of the *pnOne |
| 164910 | 164935 | ** output variable during stage 1 is undefined. |
| 164911 | 164936 | */ |
| 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); | |
| 164913 | 164938 | |
| 164914 | 164939 | /* |
| 164915 | 164940 | ** Obtain an indication as to the current stage of an RBU update or vacuum. |
| 164916 | 164941 | ** This function always returns one of the SQLITE_RBU_STATE_XXX constants |
| 164917 | 164942 | ** defined in this file. Return values should be interpreted as follows: |
| @@ -164945,11 +164970,11 @@ | ||
| 164945 | 164970 | #define SQLITE_RBU_STATE_MOVE 2 |
| 164946 | 164971 | #define SQLITE_RBU_STATE_CHECKPOINT 3 |
| 164947 | 164972 | #define SQLITE_RBU_STATE_DONE 4 |
| 164948 | 164973 | #define SQLITE_RBU_STATE_ERROR 5 |
| 164949 | 164974 | |
| 164950 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *pRbu); | |
| 164975 | +SQLITE_API int sqlite3rbu_state(sqlite3rbu *pRbu); | |
| 164951 | 164976 | |
| 164952 | 164977 | /* |
| 164953 | 164978 | ** Create an RBU VFS named zName that accesses the underlying file-system |
| 164954 | 164979 | ** via existing VFS zParent. Or, if the zParent parameter is passed NULL, |
| 164955 | 164980 | ** then the new RBU VFS uses the default system VFS to access the file-system. |
| @@ -164989,21 +165014,21 @@ | ||
| 164989 | 165014 | ** The overhead of adding the "rbu" VFS to the system is negligible for |
| 164990 | 165015 | ** non-RBU users. There is no harm in an application accessing the |
| 164991 | 165016 | ** file-system via "rbu" all the time, even if it only uses RBU functionality |
| 164992 | 165017 | ** occasionally. |
| 164993 | 165018 | */ |
| 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); | |
| 164995 | 165020 | |
| 164996 | 165021 | /* |
| 164997 | 165022 | ** Deregister and destroy an RBU vfs created by an earlier call to |
| 164998 | 165023 | ** sqlite3rbu_create_vfs(). |
| 164999 | 165024 | ** |
| 165000 | 165025 | ** VFS objects are not reference counted. If a VFS object is destroyed |
| 165001 | 165026 | ** before all database handles that use it have been closed, the results |
| 165002 | 165027 | ** are undefined. |
| 165003 | 165028 | */ |
| 165004 | -SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName); | |
| 165029 | +SQLITE_API void sqlite3rbu_destroy_vfs(const char *zName); | |
| 165005 | 165030 | |
| 165006 | 165031 | #if 0 |
| 165007 | 165032 | } /* end of the 'extern "C"' block */ |
| 165008 | 165033 | #endif |
| 165009 | 165034 | |
| @@ -168093,11 +168118,11 @@ | ||
| 168093 | 168118 | } |
| 168094 | 168119 | |
| 168095 | 168120 | /* |
| 168096 | 168121 | ** Step the RBU object. |
| 168097 | 168122 | */ |
| 168098 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *p){ | |
| 168123 | +SQLITE_API int sqlite3rbu_step(sqlite3rbu *p){ | |
| 168099 | 168124 | if( p ){ |
| 168100 | 168125 | switch( p->eStage ){ |
| 168101 | 168126 | case RBU_STAGE_OAL: { |
| 168102 | 168127 | RbuObjIter *pIter = &p->objiter; |
| 168103 | 168128 | |
| @@ -168535,11 +168560,11 @@ | ||
| 168535 | 168560 | } |
| 168536 | 168561 | |
| 168537 | 168562 | /* |
| 168538 | 168563 | ** Open and return a new RBU handle. |
| 168539 | 168564 | */ |
| 168540 | -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open( | |
| 168565 | +SQLITE_API sqlite3rbu *sqlite3rbu_open( | |
| 168541 | 168566 | const char *zTarget, |
| 168542 | 168567 | const char *zRbu, |
| 168543 | 168568 | const char *zState |
| 168544 | 168569 | ){ |
| 168545 | 168570 | /* TODO: Check that zTarget and zRbu are non-NULL */ |
| @@ -168547,11 +168572,11 @@ | ||
| 168547 | 168572 | } |
| 168548 | 168573 | |
| 168549 | 168574 | /* |
| 168550 | 168575 | ** Open a handle to begin or resume an RBU VACUUM operation. |
| 168551 | 168576 | */ |
| 168552 | -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum( | |
| 168577 | +SQLITE_API sqlite3rbu *sqlite3rbu_vacuum( | |
| 168553 | 168578 | const char *zTarget, |
| 168554 | 168579 | const char *zState |
| 168555 | 168580 | ){ |
| 168556 | 168581 | /* TODO: Check that both arguments are non-NULL */ |
| 168557 | 168582 | return openRbuHandle(0, zTarget, zState); |
| @@ -168558,11 +168583,11 @@ | ||
| 168558 | 168583 | } |
| 168559 | 168584 | |
| 168560 | 168585 | /* |
| 168561 | 168586 | ** Return the database handle used by pRbu. |
| 168562 | 168587 | */ |
| 168563 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){ | |
| 168588 | +SQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){ | |
| 168564 | 168589 | sqlite3 *db = 0; |
| 168565 | 168590 | if( pRbu ){ |
| 168566 | 168591 | db = (bRbu ? pRbu->dbRbu : pRbu->dbMain); |
| 168567 | 168592 | } |
| 168568 | 168593 | return db; |
| @@ -168590,11 +168615,11 @@ | ||
| 168590 | 168615 | } |
| 168591 | 168616 | |
| 168592 | 168617 | /* |
| 168593 | 168618 | ** Close the RBU handle. |
| 168594 | 168619 | */ |
| 168595 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){ | |
| 168620 | +SQLITE_API int sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){ | |
| 168596 | 168621 | int rc; |
| 168597 | 168622 | if( p ){ |
| 168598 | 168623 | |
| 168599 | 168624 | /* Commit the transaction to the *-oal file. */ |
| 168600 | 168625 | if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){ |
| @@ -168641,19 +168666,19 @@ | ||
| 168641 | 168666 | /* |
| 168642 | 168667 | ** Return the total number of key-value operations (inserts, deletes or |
| 168643 | 168668 | ** updates) that have been performed on the target database since the |
| 168644 | 168669 | ** current RBU update was started. |
| 168645 | 168670 | */ |
| 168646 | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu){ | |
| 168671 | +SQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu){ | |
| 168647 | 168672 | return pRbu->nProgress; |
| 168648 | 168673 | } |
| 168649 | 168674 | |
| 168650 | 168675 | /* |
| 168651 | 168676 | ** Return permyriadage progress indications for the two main stages of |
| 168652 | 168677 | ** an RBU update. |
| 168653 | 168678 | */ |
| 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){ | |
| 168655 | 168680 | const int MAX_PROGRESS = 10000; |
| 168656 | 168681 | switch( p->eStage ){ |
| 168657 | 168682 | case RBU_STAGE_OAL: |
| 168658 | 168683 | if( p->nPhaseOneStep>0 ){ |
| 168659 | 168684 | *pnOne = (int)(MAX_PROGRESS * (i64)p->nProgress/(i64)p->nPhaseOneStep); |
| @@ -168684,11 +168709,11 @@ | ||
| 168684 | 168709 | } |
| 168685 | 168710 | |
| 168686 | 168711 | /* |
| 168687 | 168712 | ** Return the current state of the RBU vacuum or update operation. |
| 168688 | 168713 | */ |
| 168689 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *p){ | |
| 168714 | +SQLITE_API int sqlite3rbu_state(sqlite3rbu *p){ | |
| 168690 | 168715 | int aRes[] = { |
| 168691 | 168716 | 0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE, |
| 168692 | 168717 | 0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE |
| 168693 | 168718 | }; |
| 168694 | 168719 | |
| @@ -168712,11 +168737,11 @@ | ||
| 168712 | 168737 | ); |
| 168713 | 168738 | return aRes[p->eStage]; |
| 168714 | 168739 | } |
| 168715 | 168740 | } |
| 168716 | 168741 | |
| 168717 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *p){ | |
| 168742 | +SQLITE_API int sqlite3rbu_savestate(sqlite3rbu *p){ | |
| 168718 | 168743 | int rc = p->rc; |
| 168719 | 168744 | if( rc==SQLITE_DONE ) return SQLITE_OK; |
| 168720 | 168745 | |
| 168721 | 168746 | assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE ); |
| 168722 | 168747 | if( p->eStage==RBU_STAGE_OAL ){ |
| @@ -169539,11 +169564,11 @@ | ||
| 169539 | 169564 | |
| 169540 | 169565 | /* |
| 169541 | 169566 | ** Deregister and destroy an RBU vfs created by an earlier call to |
| 169542 | 169567 | ** sqlite3rbu_create_vfs(). |
| 169543 | 169568 | */ |
| 169544 | -SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName){ | |
| 169569 | +SQLITE_API void sqlite3rbu_destroy_vfs(const char *zName){ | |
| 169545 | 169570 | sqlite3_vfs *pVfs = sqlite3_vfs_find(zName); |
| 169546 | 169571 | if( pVfs && pVfs->xOpen==rbuVfsOpen ){ |
| 169547 | 169572 | sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex); |
| 169548 | 169573 | sqlite3_vfs_unregister(pVfs); |
| 169549 | 169574 | sqlite3_free(pVfs); |
| @@ -169553,11 +169578,11 @@ | ||
| 169553 | 169578 | /* |
| 169554 | 169579 | ** Create an RBU VFS named zName that accesses the underlying file-system |
| 169555 | 169580 | ** via existing VFS zParent. The new object is registered as a non-default |
| 169556 | 169581 | ** VFS with SQLite before returning. |
| 169557 | 169582 | */ |
| 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){ | |
| 169559 | 169584 | |
| 169560 | 169585 | /* Template for VFS */ |
| 169561 | 169586 | static sqlite3_vfs vfs_template = { |
| 169562 | 169587 | 1, /* iVersion */ |
| 169563 | 169588 | 0, /* szOsFile */ |
| @@ -171798,11 +171823,11 @@ | ||
| 171798 | 171823 | } |
| 171799 | 171824 | |
| 171800 | 171825 | return rc; |
| 171801 | 171826 | } |
| 171802 | 171827 | |
| 171803 | -SQLITE_API int SQLITE_STDCALL sqlite3session_diff( | |
| 171828 | +SQLITE_API int sqlite3session_diff( | |
| 171804 | 171829 | sqlite3_session *pSession, |
| 171805 | 171830 | const char *zFrom, |
| 171806 | 171831 | const char *zTbl, |
| 171807 | 171832 | char **pzErrMsg |
| 171808 | 171833 | ){ |
| @@ -171892,11 +171917,11 @@ | ||
| 171892 | 171917 | |
| 171893 | 171918 | /* |
| 171894 | 171919 | ** Create a session object. This session object will record changes to |
| 171895 | 171920 | ** database zDb attached to connection db. |
| 171896 | 171921 | */ |
| 171897 | -SQLITE_API int SQLITE_STDCALL sqlite3session_create( | |
| 171922 | +SQLITE_API int sqlite3session_create( | |
| 171898 | 171923 | sqlite3 *db, /* Database handle */ |
| 171899 | 171924 | const char *zDb, /* Name of db (e.g. "main") */ |
| 171900 | 171925 | sqlite3_session **ppSession /* OUT: New session object */ |
| 171901 | 171926 | ){ |
| 171902 | 171927 | sqlite3_session *pNew; /* Newly allocated session object */ |
| @@ -171954,11 +171979,11 @@ | ||
| 171954 | 171979 | } |
| 171955 | 171980 | |
| 171956 | 171981 | /* |
| 171957 | 171982 | ** Delete a session object previously allocated using sqlite3session_create(). |
| 171958 | 171983 | */ |
| 171959 | -SQLITE_API void SQLITE_STDCALL sqlite3session_delete(sqlite3_session *pSession){ | |
| 171984 | +SQLITE_API void sqlite3session_delete(sqlite3_session *pSession){ | |
| 171960 | 171985 | sqlite3 *db = pSession->db; |
| 171961 | 171986 | sqlite3_session *pHead; |
| 171962 | 171987 | sqlite3_session **pp; |
| 171963 | 171988 | |
| 171964 | 171989 | /* Unlink the session from the linked list of sessions attached to the |
| @@ -171983,11 +172008,11 @@ | ||
| 171983 | 172008 | } |
| 171984 | 172009 | |
| 171985 | 172010 | /* |
| 171986 | 172011 | ** Set a table filter on a Session Object. |
| 171987 | 172012 | */ |
| 171988 | -SQLITE_API void SQLITE_STDCALL sqlite3session_table_filter( | |
| 172013 | +SQLITE_API void sqlite3session_table_filter( | |
| 171989 | 172014 | sqlite3_session *pSession, |
| 171990 | 172015 | int(*xFilter)(void*, const char*), |
| 171991 | 172016 | void *pCtx /* First argument passed to xFilter */ |
| 171992 | 172017 | ){ |
| 171993 | 172018 | pSession->bAutoAttach = 1; |
| @@ -172001,11 +172026,11 @@ | ||
| 172001 | 172026 | ** |
| 172002 | 172027 | ** Only tables that have a PRIMARY KEY defined may be attached. It does |
| 172003 | 172028 | ** not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) |
| 172004 | 172029 | ** or not. |
| 172005 | 172030 | */ |
| 172006 | -SQLITE_API int SQLITE_STDCALL sqlite3session_attach( | |
| 172031 | +SQLITE_API int sqlite3session_attach( | |
| 172007 | 172032 | sqlite3_session *pSession, /* Session object */ |
| 172008 | 172033 | const char *zName /* Table name */ |
| 172009 | 172034 | ){ |
| 172010 | 172035 | int rc = SQLITE_OK; |
| 172011 | 172036 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| @@ -172691,11 +172716,11 @@ | ||
| 172691 | 172716 | ** session object passed as the first argument. |
| 172692 | 172717 | ** |
| 172693 | 172718 | ** It is the responsibility of the caller to eventually free the buffer |
| 172694 | 172719 | ** using sqlite3_free(). |
| 172695 | 172720 | */ |
| 172696 | -SQLITE_API int SQLITE_STDCALL sqlite3session_changeset( | |
| 172721 | +SQLITE_API int sqlite3session_changeset( | |
| 172697 | 172722 | sqlite3_session *pSession, /* Session object */ |
| 172698 | 172723 | int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */ |
| 172699 | 172724 | void **ppChangeset /* OUT: Buffer containing changeset */ |
| 172700 | 172725 | ){ |
| 172701 | 172726 | return sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset); |
| @@ -172702,11 +172727,11 @@ | ||
| 172702 | 172727 | } |
| 172703 | 172728 | |
| 172704 | 172729 | /* |
| 172705 | 172730 | ** Streaming version of sqlite3session_changeset(). |
| 172706 | 172731 | */ |
| 172707 | -SQLITE_API int SQLITE_STDCALL sqlite3session_changeset_strm( | |
| 172732 | +SQLITE_API int sqlite3session_changeset_strm( | |
| 172708 | 172733 | sqlite3_session *pSession, |
| 172709 | 172734 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 172710 | 172735 | void *pOut |
| 172711 | 172736 | ){ |
| 172712 | 172737 | return sessionGenerateChangeset(pSession, 0, xOutput, pOut, 0, 0); |
| @@ -172713,11 +172738,11 @@ | ||
| 172713 | 172738 | } |
| 172714 | 172739 | |
| 172715 | 172740 | /* |
| 172716 | 172741 | ** Streaming version of sqlite3session_patchset(). |
| 172717 | 172742 | */ |
| 172718 | -SQLITE_API int SQLITE_STDCALL sqlite3session_patchset_strm( | |
| 172743 | +SQLITE_API int sqlite3session_patchset_strm( | |
| 172719 | 172744 | sqlite3_session *pSession, |
| 172720 | 172745 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 172721 | 172746 | void *pOut |
| 172722 | 172747 | ){ |
| 172723 | 172748 | return sessionGenerateChangeset(pSession, 1, xOutput, pOut, 0, 0); |
| @@ -172728,11 +172753,11 @@ | ||
| 172728 | 172753 | ** session object passed as the first argument. |
| 172729 | 172754 | ** |
| 172730 | 172755 | ** It is the responsibility of the caller to eventually free the buffer |
| 172731 | 172756 | ** using sqlite3_free(). |
| 172732 | 172757 | */ |
| 172733 | -SQLITE_API int SQLITE_STDCALL sqlite3session_patchset( | |
| 172758 | +SQLITE_API int sqlite3session_patchset( | |
| 172734 | 172759 | sqlite3_session *pSession, /* Session object */ |
| 172735 | 172760 | int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */ |
| 172736 | 172761 | void **ppPatchset /* OUT: Buffer containing changeset */ |
| 172737 | 172762 | ){ |
| 172738 | 172763 | return sessionGenerateChangeset(pSession, 1, 0, 0, pnPatchset, ppPatchset); |
| @@ -172739,11 +172764,11 @@ | ||
| 172739 | 172764 | } |
| 172740 | 172765 | |
| 172741 | 172766 | /* |
| 172742 | 172767 | ** Enable or disable the session object passed as the first argument. |
| 172743 | 172768 | */ |
| 172744 | -SQLITE_API int SQLITE_STDCALL sqlite3session_enable(sqlite3_session *pSession, int bEnable){ | |
| 172769 | +SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable){ | |
| 172745 | 172770 | int ret; |
| 172746 | 172771 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172747 | 172772 | if( bEnable>=0 ){ |
| 172748 | 172773 | pSession->bEnable = bEnable; |
| 172749 | 172774 | } |
| @@ -172753,11 +172778,11 @@ | ||
| 172753 | 172778 | } |
| 172754 | 172779 | |
| 172755 | 172780 | /* |
| 172756 | 172781 | ** Enable or disable the session object passed as the first argument. |
| 172757 | 172782 | */ |
| 172758 | -SQLITE_API int SQLITE_STDCALL sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){ | |
| 172783 | +SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){ | |
| 172759 | 172784 | int ret; |
| 172760 | 172785 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172761 | 172786 | if( bIndirect>=0 ){ |
| 172762 | 172787 | pSession->bIndirect = bIndirect; |
| 172763 | 172788 | } |
| @@ -172768,11 +172793,11 @@ | ||
| 172768 | 172793 | |
| 172769 | 172794 | /* |
| 172770 | 172795 | ** Return true if there have been no changes to monitored tables recorded |
| 172771 | 172796 | ** by the session object passed as the only argument. |
| 172772 | 172797 | */ |
| 172773 | -SQLITE_API int SQLITE_STDCALL sqlite3session_isempty(sqlite3_session *pSession){ | |
| 172798 | +SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession){ | |
| 172774 | 172799 | int ret = 0; |
| 172775 | 172800 | SessionTable *pTab; |
| 172776 | 172801 | |
| 172777 | 172802 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172778 | 172803 | for(pTab=pSession->pTable; pTab && ret==0; pTab=pTab->pNext){ |
| @@ -172818,11 +172843,11 @@ | ||
| 172818 | 172843 | } |
| 172819 | 172844 | |
| 172820 | 172845 | /* |
| 172821 | 172846 | ** Create an iterator used to iterate through the contents of a changeset. |
| 172822 | 172847 | */ |
| 172823 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_start( | |
| 172848 | +SQLITE_API int sqlite3changeset_start( | |
| 172824 | 172849 | sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */ |
| 172825 | 172850 | int nChangeset, /* Size of buffer pChangeset in bytes */ |
| 172826 | 172851 | void *pChangeset /* Pointer to buffer containing changeset */ |
| 172827 | 172852 | ){ |
| 172828 | 172853 | return sessionChangesetStart(pp, 0, 0, nChangeset, pChangeset); |
| @@ -172829,11 +172854,11 @@ | ||
| 172829 | 172854 | } |
| 172830 | 172855 | |
| 172831 | 172856 | /* |
| 172832 | 172857 | ** Streaming version of sqlite3changeset_start(). |
| 172833 | 172858 | */ |
| 172834 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_start_strm( | |
| 172859 | +SQLITE_API int sqlite3changeset_start_strm( | |
| 172835 | 172860 | sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */ |
| 172836 | 172861 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 172837 | 172862 | void *pIn |
| 172838 | 172863 | ){ |
| 172839 | 172864 | return sessionChangesetStart(pp, xInput, pIn, 0, 0); |
| @@ -173250,20 +173275,20 @@ | ||
| 173250 | 173275 | ** or SQLITE_CORRUPT. |
| 173251 | 173276 | ** |
| 173252 | 173277 | ** This function may not be called on iterators passed to a conflict handler |
| 173253 | 173278 | ** callback by changeset_apply(). |
| 173254 | 173279 | */ |
| 173255 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_next(sqlite3_changeset_iter *p){ | |
| 173280 | +SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *p){ | |
| 173256 | 173281 | return sessionChangesetNext(p, 0, 0); |
| 173257 | 173282 | } |
| 173258 | 173283 | |
| 173259 | 173284 | /* |
| 173260 | 173285 | ** The following function extracts information on the current change |
| 173261 | 173286 | ** from a changeset iterator. It may only be called after changeset_next() |
| 173262 | 173287 | ** has returned SQLITE_ROW. |
| 173263 | 173288 | */ |
| 173264 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_op( | |
| 173289 | +SQLITE_API int sqlite3changeset_op( | |
| 173265 | 173290 | sqlite3_changeset_iter *pIter, /* Iterator handle */ |
| 173266 | 173291 | const char **pzTab, /* OUT: Pointer to table name */ |
| 173267 | 173292 | int *pnCol, /* OUT: Number of columns in table */ |
| 173268 | 173293 | int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */ |
| 173269 | 173294 | int *pbIndirect /* OUT: True if change is indirect */ |
| @@ -173279,11 +173304,11 @@ | ||
| 173279 | 173304 | ** Return information regarding the PRIMARY KEY and number of columns in |
| 173280 | 173305 | ** the database table affected by the change that pIter currently points |
| 173281 | 173306 | ** to. This function may only be called after changeset_next() returns |
| 173282 | 173307 | ** SQLITE_ROW. |
| 173283 | 173308 | */ |
| 173284 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_pk( | |
| 173309 | +SQLITE_API int sqlite3changeset_pk( | |
| 173285 | 173310 | sqlite3_changeset_iter *pIter, /* Iterator object */ |
| 173286 | 173311 | unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */ |
| 173287 | 173312 | int *pnCol /* OUT: Number of entries in output array */ |
| 173288 | 173313 | ){ |
| 173289 | 173314 | *pabPK = pIter->abPK; |
| @@ -173302,11 +173327,11 @@ | ||
| 173302 | 173327 | ** was not modified and is not a PK column), set *ppValue to NULL. |
| 173303 | 173328 | ** |
| 173304 | 173329 | ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is |
| 173305 | 173330 | ** not modified. Otherwise, SQLITE_OK. |
| 173306 | 173331 | */ |
| 173307 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_old( | |
| 173332 | +SQLITE_API int sqlite3changeset_old( | |
| 173308 | 173333 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173309 | 173334 | int iVal, /* Index of old.* value to retrieve */ |
| 173310 | 173335 | sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */ |
| 173311 | 173336 | ){ |
| 173312 | 173337 | if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_DELETE ){ |
| @@ -173330,11 +173355,11 @@ | ||
| 173330 | 173355 | ** was not modified), set *ppValue to NULL. |
| 173331 | 173356 | ** |
| 173332 | 173357 | ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is |
| 173333 | 173358 | ** not modified. Otherwise, SQLITE_OK. |
| 173334 | 173359 | */ |
| 173335 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_new( | |
| 173360 | +SQLITE_API int sqlite3changeset_new( | |
| 173336 | 173361 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173337 | 173362 | int iVal, /* Index of new.* value to retrieve */ |
| 173338 | 173363 | sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */ |
| 173339 | 173364 | ){ |
| 173340 | 173365 | if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_INSERT ){ |
| @@ -173364,11 +173389,11 @@ | ||
| 173364 | 173389 | ** containing the iVal'th value of the conflicting record. |
| 173365 | 173390 | ** |
| 173366 | 173391 | ** If value iVal is out-of-range or some other error occurs, an SQLite error |
| 173367 | 173392 | ** code is returned. Otherwise, SQLITE_OK. |
| 173368 | 173393 | */ |
| 173369 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_conflict( | |
| 173394 | +SQLITE_API int sqlite3changeset_conflict( | |
| 173370 | 173395 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173371 | 173396 | int iVal, /* Index of conflict record value to fetch */ |
| 173372 | 173397 | sqlite3_value **ppValue /* OUT: Value from conflicting row */ |
| 173373 | 173398 | ){ |
| 173374 | 173399 | if( !pIter->pConflict ){ |
| @@ -173387,11 +173412,11 @@ | ||
| 173387 | 173412 | ** it sets the output variable to the total number of known foreign key |
| 173388 | 173413 | ** violations in the destination database and returns SQLITE_OK. |
| 173389 | 173414 | ** |
| 173390 | 173415 | ** In all other cases this function returns SQLITE_MISUSE. |
| 173391 | 173416 | */ |
| 173392 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_fk_conflicts( | |
| 173417 | +SQLITE_API int sqlite3changeset_fk_conflicts( | |
| 173393 | 173418 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173394 | 173419 | int *pnOut /* OUT: Number of FK violations */ |
| 173395 | 173420 | ){ |
| 173396 | 173421 | if( pIter->pConflict || pIter->apValue ){ |
| 173397 | 173422 | return SQLITE_MISUSE; |
| @@ -173405,11 +173430,11 @@ | ||
| 173405 | 173430 | ** Finalize an iterator allocated with sqlite3changeset_start(). |
| 173406 | 173431 | ** |
| 173407 | 173432 | ** This function may not be called on iterators passed to a conflict handler |
| 173408 | 173433 | ** callback by changeset_apply(). |
| 173409 | 173434 | */ |
| 173410 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_finalize(sqlite3_changeset_iter *p){ | |
| 173435 | +SQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *p){ | |
| 173411 | 173436 | int rc = SQLITE_OK; |
| 173412 | 173437 | if( p ){ |
| 173413 | 173438 | int i; /* Used to iterate through p->apValue[] */ |
| 173414 | 173439 | rc = p->rc; |
| 173415 | 173440 | if( p->apValue ){ |
| @@ -173579,11 +173604,11 @@ | ||
| 173579 | 173604 | |
| 173580 | 173605 | |
| 173581 | 173606 | /* |
| 173582 | 173607 | ** Invert a changeset object. |
| 173583 | 173608 | */ |
| 173584 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert( | |
| 173609 | +SQLITE_API int sqlite3changeset_invert( | |
| 173585 | 173610 | int nChangeset, /* Number of bytes in input */ |
| 173586 | 173611 | const void *pChangeset, /* Input changeset */ |
| 173587 | 173612 | int *pnInverted, /* OUT: Number of bytes in output changeset */ |
| 173588 | 173613 | void **ppInverted /* OUT: Inverse of pChangeset */ |
| 173589 | 173614 | ){ |
| @@ -173598,11 +173623,11 @@ | ||
| 173598 | 173623 | } |
| 173599 | 173624 | |
| 173600 | 173625 | /* |
| 173601 | 173626 | ** Streaming version of sqlite3changeset_invert(). |
| 173602 | 173627 | */ |
| 173603 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert_strm( | |
| 173628 | +SQLITE_API int sqlite3changeset_invert_strm( | |
| 173604 | 173629 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 173605 | 173630 | void *pIn, |
| 173606 | 173631 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 173607 | 173632 | void *pOut |
| 173608 | 173633 | ){ |
| @@ -174478,11 +174503,11 @@ | ||
| 174478 | 174503 | /* |
| 174479 | 174504 | ** Apply the changeset passed via pChangeset/nChangeset to the main database |
| 174480 | 174505 | ** attached to handle "db". Invoke the supplied conflict handler callback |
| 174481 | 174506 | ** to resolve any conflicts encountered while applying the change. |
| 174482 | 174507 | */ |
| 174483 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply( | |
| 174508 | +SQLITE_API int sqlite3changeset_apply( | |
| 174484 | 174509 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 174485 | 174510 | int nChangeset, /* Size of changeset in bytes */ |
| 174486 | 174511 | void *pChangeset, /* Changeset blob */ |
| 174487 | 174512 | int(*xFilter)( |
| 174488 | 174513 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| @@ -174506,11 +174531,11 @@ | ||
| 174506 | 174531 | /* |
| 174507 | 174532 | ** Apply the changeset passed via xInput/pIn to the main database |
| 174508 | 174533 | ** attached to handle "db". Invoke the supplied conflict handler callback |
| 174509 | 174534 | ** to resolve any conflicts encountered while applying the change. |
| 174510 | 174535 | */ |
| 174511 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply_strm( | |
| 174536 | +SQLITE_API int sqlite3changeset_apply_strm( | |
| 174512 | 174537 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 174513 | 174538 | int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ |
| 174514 | 174539 | void *pIn, /* First arg for xInput */ |
| 174515 | 174540 | int(*xFilter)( |
| 174516 | 174541 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| @@ -174841,11 +174866,11 @@ | ||
| 174841 | 174866 | } |
| 174842 | 174867 | |
| 174843 | 174868 | /* |
| 174844 | 174869 | ** Allocate a new, empty, sqlite3_changegroup. |
| 174845 | 174870 | */ |
| 174846 | -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_new(sqlite3_changegroup **pp){ | |
| 174871 | +SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp){ | |
| 174847 | 174872 | int rc = SQLITE_OK; /* Return code */ |
| 174848 | 174873 | sqlite3_changegroup *p; /* New object */ |
| 174849 | 174874 | p = (sqlite3_changegroup*)sqlite3_malloc(sizeof(sqlite3_changegroup)); |
| 174850 | 174875 | if( p==0 ){ |
| 174851 | 174876 | rc = SQLITE_NOMEM; |
| @@ -174858,11 +174883,11 @@ | ||
| 174858 | 174883 | |
| 174859 | 174884 | /* |
| 174860 | 174885 | ** Add the changeset currently stored in buffer pData, size nData bytes, |
| 174861 | 174886 | ** to changeset-group p. |
| 174862 | 174887 | */ |
| 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){ | |
| 174864 | 174889 | sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */ |
| 174865 | 174890 | int rc; /* Return code */ |
| 174866 | 174891 | |
| 174867 | 174892 | rc = sqlite3changeset_start(&pIter, nData, pData); |
| 174868 | 174893 | if( rc==SQLITE_OK ){ |
| @@ -174874,11 +174899,11 @@ | ||
| 174874 | 174899 | |
| 174875 | 174900 | /* |
| 174876 | 174901 | ** Obtain a buffer containing a changeset representing the concatenation |
| 174877 | 174902 | ** of all changesets added to the group so far. |
| 174878 | 174903 | */ |
| 174879 | -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output( | |
| 174904 | +SQLITE_API int sqlite3changegroup_output( | |
| 174880 | 174905 | sqlite3_changegroup *pGrp, |
| 174881 | 174906 | int *pnData, |
| 174882 | 174907 | void **ppData |
| 174883 | 174908 | ){ |
| 174884 | 174909 | return sessionChangegroupOutput(pGrp, 0, 0, pnData, ppData); |
| @@ -174885,11 +174910,11 @@ | ||
| 174885 | 174910 | } |
| 174886 | 174911 | |
| 174887 | 174912 | /* |
| 174888 | 174913 | ** Streaming versions of changegroup_add(). |
| 174889 | 174914 | */ |
| 174890 | -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add_strm( | |
| 174915 | +SQLITE_API int sqlite3changegroup_add_strm( | |
| 174891 | 174916 | sqlite3_changegroup *pGrp, |
| 174892 | 174917 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 174893 | 174918 | void *pIn |
| 174894 | 174919 | ){ |
| 174895 | 174920 | sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */ |
| @@ -174904,11 +174929,11 @@ | ||
| 174904 | 174929 | } |
| 174905 | 174930 | |
| 174906 | 174931 | /* |
| 174907 | 174932 | ** Streaming versions of changegroup_output(). |
| 174908 | 174933 | */ |
| 174909 | -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output_strm( | |
| 174934 | +SQLITE_API int sqlite3changegroup_output_strm( | |
| 174910 | 174935 | sqlite3_changegroup *pGrp, |
| 174911 | 174936 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 174912 | 174937 | void *pOut |
| 174913 | 174938 | ){ |
| 174914 | 174939 | return sessionChangegroupOutput(pGrp, xOutput, pOut, 0, 0); |
| @@ -174915,21 +174940,21 @@ | ||
| 174915 | 174940 | } |
| 174916 | 174941 | |
| 174917 | 174942 | /* |
| 174918 | 174943 | ** Delete a changegroup object. |
| 174919 | 174944 | */ |
| 174920 | -SQLITE_API void SQLITE_STDCALL sqlite3changegroup_delete(sqlite3_changegroup *pGrp){ | |
| 174945 | +SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup *pGrp){ | |
| 174921 | 174946 | if( pGrp ){ |
| 174922 | 174947 | sessionDeleteTable(pGrp->pList); |
| 174923 | 174948 | sqlite3_free(pGrp); |
| 174924 | 174949 | } |
| 174925 | 174950 | } |
| 174926 | 174951 | |
| 174927 | 174952 | /* |
| 174928 | 174953 | ** Combine two changesets together. |
| 174929 | 174954 | */ |
| 174930 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat( | |
| 174955 | +SQLITE_API int sqlite3changeset_concat( | |
| 174931 | 174956 | int nLeft, /* Number of bytes in lhs input */ |
| 174932 | 174957 | void *pLeft, /* Lhs input changeset */ |
| 174933 | 174958 | int nRight /* Number of bytes in rhs input */, |
| 174934 | 174959 | void *pRight, /* Rhs input changeset */ |
| 174935 | 174960 | int *pnOut, /* OUT: Number of bytes in output changeset */ |
| @@ -174954,11 +174979,11 @@ | ||
| 174954 | 174979 | } |
| 174955 | 174980 | |
| 174956 | 174981 | /* |
| 174957 | 174982 | ** Streaming version of sqlite3changeset_concat(). |
| 174958 | 174983 | */ |
| 174959 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat_strm( | |
| 174984 | +SQLITE_API int sqlite3changeset_concat_strm( | |
| 174960 | 174985 | int (*xInputA)(void *pIn, void *pData, int *pnData), |
| 174961 | 174986 | void *pInA, |
| 174962 | 174987 | int (*xInputB)(void *pIn, void *pData, int *pnData), |
| 174963 | 174988 | void *pInB, |
| 174964 | 174989 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| @@ -177186,11 +177211,11 @@ | ||
| 177186 | 177211 | |
| 177187 | 177212 | #ifndef SQLITE_CORE |
| 177188 | 177213 | #ifdef _WIN32 |
| 177189 | 177214 | __declspec(dllexport) |
| 177190 | 177215 | #endif |
| 177191 | -SQLITE_API int SQLITE_STDCALL sqlite3_json_init( | |
| 177216 | +SQLITE_API int sqlite3_json_init( | |
| 177192 | 177217 | sqlite3 *db, |
| 177193 | 177218 | char **pzErrMsg, |
| 177194 | 177219 | const sqlite3_api_routines *pApi |
| 177195 | 177220 | ){ |
| 177196 | 177221 | SQLITE_EXTENSION_INIT2(pApi); |
| @@ -194018,11 +194043,11 @@ | ||
| 194018 | 194043 | int nArg, /* Number of args */ |
| 194019 | 194044 | sqlite3_value **apUnused /* Function arguments */ |
| 194020 | 194045 | ){ |
| 194021 | 194046 | assert( nArg==0 ); |
| 194022 | 194047 | 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); | |
| 194024 | 194049 | } |
| 194025 | 194050 | |
| 194026 | 194051 | static int fts5Init(sqlite3 *db){ |
| 194027 | 194052 | static const sqlite3_module fts5Mod = { |
| 194028 | 194053 | /* iVersion */ 2, |
| @@ -194106,11 +194131,11 @@ | ||
| 194106 | 194131 | */ |
| 194107 | 194132 | #ifndef SQLITE_CORE |
| 194108 | 194133 | #ifdef _WIN32 |
| 194109 | 194134 | __declspec(dllexport) |
| 194110 | 194135 | #endif |
| 194111 | -SQLITE_API int SQLITE_STDCALL sqlite3_fts_init( | |
| 194136 | +SQLITE_API int sqlite3_fts_init( | |
| 194112 | 194137 | sqlite3 *db, |
| 194113 | 194138 | char **pzErrMsg, |
| 194114 | 194139 | const sqlite3_api_routines *pApi |
| 194115 | 194140 | ){ |
| 194116 | 194141 | SQLITE_EXTENSION_INIT2(pApi); |
| @@ -194119,11 +194144,11 @@ | ||
| 194119 | 194144 | } |
| 194120 | 194145 | |
| 194121 | 194146 | #ifdef _WIN32 |
| 194122 | 194147 | __declspec(dllexport) |
| 194123 | 194148 | #endif |
| 194124 | -SQLITE_API int SQLITE_STDCALL sqlite3_fts5_init( | |
| 194149 | +SQLITE_API int sqlite3_fts5_init( | |
| 194125 | 194150 | sqlite3 *db, |
| 194126 | 194151 | char **pzErrMsg, |
| 194127 | 194152 | const sqlite3_api_routines *pApi |
| 194128 | 194153 | ){ |
| 194129 | 194154 | SQLITE_EXTENSION_INIT2(pApi); |
| 194130 | 194155 |
| --- 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 @@ | ||
| 1 | 1 | /****************************************************************************** |
| 2 | 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 | |
| 3 | +** version 3.14.2. By combining all the individual C code files into this | |
| 4 | 4 | ** single large file, the entire code can be compiled as a single translation |
| 5 | 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | 7 | ** of 5% or more are commonly seen when SQLite is compiled as a single |
| 8 | 8 | ** translation unit. |
| 9 | 9 | ** |
| 10 | 10 | ** This file is all you need to compile SQLite. To use SQLite in other |
| 11 | 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 | |
| 12 | +** the programming interface to the SQLite library. (If you do not have | |
| 13 | 13 | ** the "sqlite3.h" header file at hand, you will find a copy embedded within |
| 14 | 14 | ** the text of this file. Search for "Begin file sqlite3.h" to find the start |
| 15 | 15 | ** of the embedded sqlite3.h header file.) Additional code files may be needed |
| 16 | 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| @@ -378,13 +378,13 @@ | ||
| 378 | 378 | ** |
| 379 | 379 | ** See also: [sqlite3_libversion()], |
| 380 | 380 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 381 | 381 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 382 | 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" | |
| 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 | 386 | |
| 387 | 387 | /* |
| 388 | 388 | ** CAPI3REF: Run-Time Library Version Numbers |
| 389 | 389 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 390 | 390 | ** |
| @@ -413,13 +413,13 @@ | ||
| 413 | 413 | ** [SQLITE_SOURCE_ID] C preprocessor macro. |
| 414 | 414 | ** |
| 415 | 415 | ** See also: [sqlite_version()] and [sqlite_source_id()]. |
| 416 | 416 | */ |
| 417 | 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); | |
| 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 | 421 | |
| 422 | 422 | /* |
| 423 | 423 | ** CAPI3REF: Run-Time Library Compilation Options Diagnostics |
| 424 | 424 | ** |
| 425 | 425 | ** ^The sqlite3_compileoption_used() function returns 0 or 1 |
| @@ -440,12 +440,12 @@ | ||
| 440 | 440 | ** |
| 441 | 441 | ** See also: SQL functions [sqlite_compileoption_used()] and |
| 442 | 442 | ** [sqlite_compileoption_get()] and the [compile_options pragma]. |
| 443 | 443 | */ |
| 444 | 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); | |
| 445 | +SQLITE_API int sqlite3_compileoption_used(const char *zOptName); | |
| 446 | +SQLITE_API const char *sqlite3_compileoption_get(int N); | |
| 447 | 447 | #endif |
| 448 | 448 | |
| 449 | 449 | /* |
| 450 | 450 | ** CAPI3REF: Test To See If The Library Is Threadsafe |
| 451 | 451 | ** |
| @@ -480,11 +480,11 @@ | ||
| 480 | 480 | ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() |
| 481 | 481 | ** is unchanged by calls to sqlite3_config().)^ |
| 482 | 482 | ** |
| 483 | 483 | ** See the [threading mode] documentation for additional information. |
| 484 | 484 | */ |
| 485 | -SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void); | |
| 485 | +SQLITE_API int sqlite3_threadsafe(void); | |
| 486 | 486 | |
| 487 | 487 | /* |
| 488 | 488 | ** CAPI3REF: Database Connection Handle |
| 489 | 489 | ** KEYWORDS: {database connection} {database connections} |
| 490 | 490 | ** |
| @@ -577,12 +577,12 @@ | ||
| 577 | 577 | ** from [sqlite3_open()], [sqlite3_open16()], or |
| 578 | 578 | ** [sqlite3_open_v2()], and not previously closed. |
| 579 | 579 | ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer |
| 580 | 580 | ** argument is a harmless no-op. |
| 581 | 581 | */ |
| 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*); | |
| 584 | 584 | |
| 585 | 585 | /* |
| 586 | 586 | ** The type for a callback function. |
| 587 | 587 | ** This is legacy and deprecated. It is included for historical |
| 588 | 588 | ** compatibility and is not documented. |
| @@ -649,11 +649,11 @@ | ||
| 649 | 649 | ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. |
| 650 | 650 | ** <li> The application must not modify the SQL statement text passed into |
| 651 | 651 | ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. |
| 652 | 652 | ** </ul> |
| 653 | 653 | */ |
| 654 | -SQLITE_API int SQLITE_STDCALL sqlite3_exec( | |
| 654 | +SQLITE_API int sqlite3_exec( | |
| 655 | 655 | sqlite3*, /* An open database */ |
| 656 | 656 | const char *sql, /* SQL to be evaluated */ |
| 657 | 657 | int (*callback)(void*,int,char**,char**), /* Callback function */ |
| 658 | 658 | void *, /* 1st argument to callback */ |
| 659 | 659 | char **errmsg /* Error msg written here */ |
| @@ -1648,14 +1648,14 @@ | ||
| 1648 | 1648 | ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied |
| 1649 | 1649 | ** implementation of sqlite3_os_init() or sqlite3_os_end() |
| 1650 | 1650 | ** must return [SQLITE_OK] on success and some other [error code] upon |
| 1651 | 1651 | ** failure. |
| 1652 | 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); | |
| 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 | 1657 | |
| 1658 | 1658 | /* |
| 1659 | 1659 | ** CAPI3REF: Configuring The SQLite Library |
| 1660 | 1660 | ** |
| 1661 | 1661 | ** The sqlite3_config() interface is used to make global configuration |
| @@ -1684,11 +1684,11 @@ | ||
| 1684 | 1684 | ** |
| 1685 | 1685 | ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. |
| 1686 | 1686 | ** ^If the option is unknown or SQLite is unable to set the option |
| 1687 | 1687 | ** then this routine returns a non-zero [error code]. |
| 1688 | 1688 | */ |
| 1689 | -SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...); | |
| 1689 | +SQLITE_API int sqlite3_config(int, ...); | |
| 1690 | 1690 | |
| 1691 | 1691 | /* |
| 1692 | 1692 | ** CAPI3REF: Configure database connections |
| 1693 | 1693 | ** METHOD: sqlite3 |
| 1694 | 1694 | ** |
| @@ -1703,11 +1703,11 @@ | ||
| 1703 | 1703 | ** Subsequent arguments vary depending on the configuration verb. |
| 1704 | 1704 | ** |
| 1705 | 1705 | ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if |
| 1706 | 1706 | ** the call is considered successful. |
| 1707 | 1707 | */ |
| 1708 | -SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...); | |
| 1708 | +SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...); | |
| 1709 | 1709 | |
| 1710 | 1710 | /* |
| 1711 | 1711 | ** CAPI3REF: Memory Allocation Routines |
| 1712 | 1712 | ** |
| 1713 | 1713 | ** An instance of this object defines the interface between SQLite |
| @@ -2244,11 +2244,11 @@ | ||
| 2244 | 2244 | ** |
| 2245 | 2245 | ** ^The sqlite3_extended_result_codes() routine enables or disables the |
| 2246 | 2246 | ** [extended result codes] feature of SQLite. ^The extended result |
| 2247 | 2247 | ** codes are disabled by default for historical compatibility. |
| 2248 | 2248 | */ |
| 2249 | -SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff); | |
| 2249 | +SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff); | |
| 2250 | 2250 | |
| 2251 | 2251 | /* |
| 2252 | 2252 | ** CAPI3REF: Last Insert Rowid |
| 2253 | 2253 | ** METHOD: sqlite3 |
| 2254 | 2254 | ** |
| @@ -2296,11 +2296,11 @@ | ||
| 2296 | 2296 | ** function is running and thus changes the last insert [rowid], |
| 2297 | 2297 | ** then the value returned by [sqlite3_last_insert_rowid()] is |
| 2298 | 2298 | ** unpredictable and might not equal either the old or the new |
| 2299 | 2299 | ** last insert [rowid]. |
| 2300 | 2300 | */ |
| 2301 | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); | |
| 2301 | +SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); | |
| 2302 | 2302 | |
| 2303 | 2303 | /* |
| 2304 | 2304 | ** CAPI3REF: Count The Number Of Rows Modified |
| 2305 | 2305 | ** METHOD: sqlite3 |
| 2306 | 2306 | ** |
| @@ -2349,11 +2349,11 @@ | ||
| 2349 | 2349 | ** |
| 2350 | 2350 | ** If a separate thread makes changes on the same database connection |
| 2351 | 2351 | ** while [sqlite3_changes()] is running then the value returned |
| 2352 | 2352 | ** is unpredictable and not meaningful. |
| 2353 | 2353 | */ |
| 2354 | -SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*); | |
| 2354 | +SQLITE_API int sqlite3_changes(sqlite3*); | |
| 2355 | 2355 | |
| 2356 | 2356 | /* |
| 2357 | 2357 | ** CAPI3REF: Total Number Of Rows Modified |
| 2358 | 2358 | ** METHOD: sqlite3 |
| 2359 | 2359 | ** |
| @@ -2373,11 +2373,11 @@ | ||
| 2373 | 2373 | ** |
| 2374 | 2374 | ** If a separate thread makes changes on the same database connection |
| 2375 | 2375 | ** while [sqlite3_total_changes()] is running then the value |
| 2376 | 2376 | ** returned is unpredictable and not meaningful. |
| 2377 | 2377 | */ |
| 2378 | -SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*); | |
| 2378 | +SQLITE_API int sqlite3_total_changes(sqlite3*); | |
| 2379 | 2379 | |
| 2380 | 2380 | /* |
| 2381 | 2381 | ** CAPI3REF: Interrupt A Long-Running Query |
| 2382 | 2382 | ** METHOD: sqlite3 |
| 2383 | 2383 | ** |
| @@ -2413,11 +2413,11 @@ | ||
| 2413 | 2413 | ** that are started after the sqlite3_interrupt() call returns. |
| 2414 | 2414 | ** |
| 2415 | 2415 | ** If the database connection closes while [sqlite3_interrupt()] |
| 2416 | 2416 | ** is running then bad things will likely happen. |
| 2417 | 2417 | */ |
| 2418 | -SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*); | |
| 2418 | +SQLITE_API void sqlite3_interrupt(sqlite3*); | |
| 2419 | 2419 | |
| 2420 | 2420 | /* |
| 2421 | 2421 | ** CAPI3REF: Determine If An SQL Statement Is Complete |
| 2422 | 2422 | ** |
| 2423 | 2423 | ** These routines are useful during command-line input to determine if the |
| @@ -2448,12 +2448,12 @@ | ||
| 2448 | 2448 | ** UTF-8 string. |
| 2449 | 2449 | ** |
| 2450 | 2450 | ** The input to [sqlite3_complete16()] must be a zero-terminated |
| 2451 | 2451 | ** UTF-16 string in native byte order. |
| 2452 | 2452 | */ |
| 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); | |
| 2455 | 2455 | |
| 2456 | 2456 | /* |
| 2457 | 2457 | ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors |
| 2458 | 2458 | ** KEYWORDS: {busy-handler callback} {busy handler} |
| 2459 | 2459 | ** METHOD: sqlite3 |
| @@ -2510,11 +2510,11 @@ | ||
| 2510 | 2510 | ** result in undefined behavior. |
| 2511 | 2511 | ** |
| 2512 | 2512 | ** A busy handler must not close the database connection |
| 2513 | 2513 | ** or [prepared statement] that invoked the busy handler. |
| 2514 | 2514 | */ |
| 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*); | |
| 2516 | 2516 | |
| 2517 | 2517 | /* |
| 2518 | 2518 | ** CAPI3REF: Set A Busy Timeout |
| 2519 | 2519 | ** METHOD: sqlite3 |
| 2520 | 2520 | ** |
| @@ -2533,11 +2533,11 @@ | ||
| 2533 | 2533 | ** was defined (using [sqlite3_busy_handler()]) prior to calling |
| 2534 | 2534 | ** this routine, that other busy handler is cleared.)^ |
| 2535 | 2535 | ** |
| 2536 | 2536 | ** See also: [PRAGMA busy_timeout] |
| 2537 | 2537 | */ |
| 2538 | -SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms); | |
| 2538 | +SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms); | |
| 2539 | 2539 | |
| 2540 | 2540 | /* |
| 2541 | 2541 | ** CAPI3REF: Convenience Routines For Running Queries |
| 2542 | 2542 | ** METHOD: sqlite3 |
| 2543 | 2543 | ** |
| @@ -2608,19 +2608,19 @@ | ||
| 2608 | 2608 | ** interface defined here. As a consequence, errors that occur in the |
| 2609 | 2609 | ** wrapper layer outside of the internal [sqlite3_exec()] call are not |
| 2610 | 2610 | ** reflected in subsequent calls to [sqlite3_errcode()] or |
| 2611 | 2611 | ** [sqlite3_errmsg()]. |
| 2612 | 2612 | */ |
| 2613 | -SQLITE_API int SQLITE_STDCALL sqlite3_get_table( | |
| 2613 | +SQLITE_API int sqlite3_get_table( | |
| 2614 | 2614 | sqlite3 *db, /* An open database */ |
| 2615 | 2615 | const char *zSql, /* SQL to be evaluated */ |
| 2616 | 2616 | char ***pazResult, /* Results of the query */ |
| 2617 | 2617 | int *pnRow, /* Number of result rows written here */ |
| 2618 | 2618 | int *pnColumn, /* Number of result columns written here */ |
| 2619 | 2619 | char **pzErrmsg /* Error msg written here */ |
| 2620 | 2620 | ); |
| 2621 | -SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result); | |
| 2621 | +SQLITE_API void sqlite3_free_table(char **result); | |
| 2622 | 2622 | |
| 2623 | 2623 | /* |
| 2624 | 2624 | ** CAPI3REF: Formatted String Printing Functions |
| 2625 | 2625 | ** |
| 2626 | 2626 | ** These routines are work-alikes of the "printf()" family of functions |
| @@ -2722,14 +2722,14 @@ | ||
| 2722 | 2722 | ** |
| 2723 | 2723 | ** ^(The "%z" formatting option works like "%s" but with the |
| 2724 | 2724 | ** addition that after the string has been read and copied into |
| 2725 | 2725 | ** the result, [sqlite3_free()] is called on the input string.)^ |
| 2726 | 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); | |
| 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 | 2731 | |
| 2732 | 2732 | /* |
| 2733 | 2733 | ** CAPI3REF: Memory Allocation Subsystem |
| 2734 | 2734 | ** |
| 2735 | 2735 | ** The SQLite core uses these three routines for all of its own |
| @@ -2815,16 +2815,16 @@ | ||
| 2815 | 2815 | ** |
| 2816 | 2816 | ** The application must not read or write any part of |
| 2817 | 2817 | ** a block of memory after it has been released using |
| 2818 | 2818 | ** [sqlite3_free()] or [sqlite3_realloc()]. |
| 2819 | 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*); | |
| 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 | 2826 | |
| 2827 | 2827 | /* |
| 2828 | 2828 | ** CAPI3REF: Memory Allocator Statistics |
| 2829 | 2829 | ** |
| 2830 | 2830 | ** SQLite provides these two interfaces for reporting on the status |
| @@ -2845,12 +2845,12 @@ | ||
| 2845 | 2845 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 2846 | 2846 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| 2847 | 2847 | ** by [sqlite3_memory_highwater(1)] is the high-water mark |
| 2848 | 2848 | ** prior to the reset. |
| 2849 | 2849 | */ |
| 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); | |
| 2852 | 2852 | |
| 2853 | 2853 | /* |
| 2854 | 2854 | ** CAPI3REF: Pseudo-Random Number Generator |
| 2855 | 2855 | ** |
| 2856 | 2856 | ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to |
| @@ -2869,11 +2869,11 @@ | ||
| 2869 | 2869 | ** ^If the previous call to this routine had an N of 1 or more and a |
| 2870 | 2870 | ** non-NULL P then the pseudo-randomness is generated |
| 2871 | 2871 | ** internally and without recourse to the [sqlite3_vfs] xRandomness |
| 2872 | 2872 | ** method. |
| 2873 | 2873 | */ |
| 2874 | -SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P); | |
| 2874 | +SQLITE_API void sqlite3_randomness(int N, void *P); | |
| 2875 | 2875 | |
| 2876 | 2876 | /* |
| 2877 | 2877 | ** CAPI3REF: Compile-Time Authorization Callbacks |
| 2878 | 2878 | ** METHOD: sqlite3 |
| 2879 | 2879 | ** |
| @@ -2952,11 +2952,11 @@ | ||
| 2952 | 2952 | ** [sqlite3_prepare()] or its variants. Authorization is not |
| 2953 | 2953 | ** performed during statement evaluation in [sqlite3_step()], unless |
| 2954 | 2954 | ** as stated in the previous paragraph, sqlite3_step() invokes |
| 2955 | 2955 | ** sqlite3_prepare_v2() to reprepare a statement after a schema change. |
| 2956 | 2956 | */ |
| 2957 | -SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( | |
| 2957 | +SQLITE_API int sqlite3_set_authorizer( | |
| 2958 | 2958 | sqlite3*, |
| 2959 | 2959 | int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 2960 | 2960 | void *pUserData |
| 2961 | 2961 | ); |
| 2962 | 2962 | |
| @@ -3060,13 +3060,13 @@ | ||
| 3060 | 3060 | ** digits in the time are meaningless. Future versions of SQLite |
| 3061 | 3061 | ** might provide greater resolution on the profiler callback. The |
| 3062 | 3062 | ** sqlite3_profile() function is considered experimental and is |
| 3063 | 3063 | ** subject to change in future versions of SQLite. |
| 3064 | 3064 | */ |
| 3065 | -SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*, | |
| 3065 | +SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*, | |
| 3066 | 3066 | 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*, | |
| 3068 | 3068 | void(*xProfile)(void*,const char*,sqlite3_uint64), void*); |
| 3069 | 3069 | |
| 3070 | 3070 | /* |
| 3071 | 3071 | ** CAPI3REF: SQL Trace Event Codes |
| 3072 | 3072 | ** KEYWORDS: SQLITE_TRACE |
| @@ -3151,11 +3151,11 @@ | ||
| 3151 | 3151 | ** |
| 3152 | 3152 | ** The sqlite3_trace_v2() interface is intended to replace the legacy |
| 3153 | 3153 | ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which |
| 3154 | 3154 | ** are deprecated. |
| 3155 | 3155 | */ |
| 3156 | -SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2( | |
| 3156 | +SQLITE_API int sqlite3_trace_v2( | |
| 3157 | 3157 | sqlite3*, |
| 3158 | 3158 | unsigned uMask, |
| 3159 | 3159 | int(*xCallback)(unsigned,void*,void*,void*), |
| 3160 | 3160 | void *pCtx |
| 3161 | 3161 | ); |
| @@ -3190,11 +3190,11 @@ | ||
| 3190 | 3190 | ** the database connection that invoked the progress handler. |
| 3191 | 3191 | ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their |
| 3192 | 3192 | ** database connections for the meaning of "modify" in this paragraph. |
| 3193 | 3193 | ** |
| 3194 | 3194 | */ |
| 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*); | |
| 3196 | 3196 | |
| 3197 | 3197 | /* |
| 3198 | 3198 | ** CAPI3REF: Opening A New Database Connection |
| 3199 | 3199 | ** CONSTRUCTOR: sqlite3 |
| 3200 | 3200 | ** |
| @@ -3419,19 +3419,19 @@ | ||
| 3419 | 3419 | ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various |
| 3420 | 3420 | ** features that require the use of temporary files may fail. |
| 3421 | 3421 | ** |
| 3422 | 3422 | ** See also: [sqlite3_temp_directory] |
| 3423 | 3423 | */ |
| 3424 | -SQLITE_API int SQLITE_STDCALL sqlite3_open( | |
| 3424 | +SQLITE_API int sqlite3_open( | |
| 3425 | 3425 | const char *filename, /* Database filename (UTF-8) */ |
| 3426 | 3426 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3427 | 3427 | ); |
| 3428 | -SQLITE_API int SQLITE_STDCALL sqlite3_open16( | |
| 3428 | +SQLITE_API int sqlite3_open16( | |
| 3429 | 3429 | const void *filename, /* Database filename (UTF-16) */ |
| 3430 | 3430 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3431 | 3431 | ); |
| 3432 | -SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( | |
| 3432 | +SQLITE_API int sqlite3_open_v2( | |
| 3433 | 3433 | const char *filename, /* Database filename (UTF-8) */ |
| 3434 | 3434 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 3435 | 3435 | int flags, /* Flags */ |
| 3436 | 3436 | const char *zVfs /* Name of VFS module to use */ |
| 3437 | 3437 | ); |
| @@ -3473,13 +3473,13 @@ | ||
| 3473 | 3473 | ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and |
| 3474 | 3474 | ** is not a database file pathname pointer that SQLite passed into the xOpen |
| 3475 | 3475 | ** VFS method, then the behavior of this routine is undefined and probably |
| 3476 | 3476 | ** undesirable. |
| 3477 | 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); | |
| 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 | 3481 | |
| 3482 | 3482 | |
| 3483 | 3483 | /* |
| 3484 | 3484 | ** CAPI3REF: Error Codes And Messages |
| 3485 | 3485 | ** METHOD: sqlite3 |
| @@ -3519,15 +3519,15 @@ | ||
| 3519 | 3519 | ** |
| 3520 | 3520 | ** If an interface fails with SQLITE_MISUSE, that means the interface |
| 3521 | 3521 | ** was invoked incorrectly by the application. In that case, the |
| 3522 | 3522 | ** error code and message may or may not be set. |
| 3523 | 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); | |
| 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 | 3529 | |
| 3530 | 3530 | /* |
| 3531 | 3531 | ** CAPI3REF: Prepared Statement Object |
| 3532 | 3532 | ** KEYWORDS: {prepared statement} {prepared statements} |
| 3533 | 3533 | ** |
| @@ -3591,11 +3591,11 @@ | ||
| 3591 | 3591 | ** created by an untrusted script can be contained using the |
| 3592 | 3592 | ** [max_page_count] [PRAGMA]. |
| 3593 | 3593 | ** |
| 3594 | 3594 | ** New run-time limit categories may be added in future releases. |
| 3595 | 3595 | */ |
| 3596 | -SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal); | |
| 3596 | +SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal); | |
| 3597 | 3597 | |
| 3598 | 3598 | /* |
| 3599 | 3599 | ** CAPI3REF: Run-Time Limit Categories |
| 3600 | 3600 | ** KEYWORDS: {limit category} {*limit categories} |
| 3601 | 3601 | ** |
| @@ -3743,32 +3743,32 @@ | ||
| 3743 | 3743 | ** or [GLOB] operator or if the parameter is compared to an indexed column |
| 3744 | 3744 | ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled. |
| 3745 | 3745 | ** </li> |
| 3746 | 3746 | ** </ol> |
| 3747 | 3747 | */ |
| 3748 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare( | |
| 3748 | +SQLITE_API int sqlite3_prepare( | |
| 3749 | 3749 | sqlite3 *db, /* Database handle */ |
| 3750 | 3750 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3751 | 3751 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3752 | 3752 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3753 | 3753 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3754 | 3754 | ); |
| 3755 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( | |
| 3755 | +SQLITE_API int sqlite3_prepare_v2( | |
| 3756 | 3756 | sqlite3 *db, /* Database handle */ |
| 3757 | 3757 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3758 | 3758 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3759 | 3759 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3760 | 3760 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3761 | 3761 | ); |
| 3762 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( | |
| 3762 | +SQLITE_API int sqlite3_prepare16( | |
| 3763 | 3763 | sqlite3 *db, /* Database handle */ |
| 3764 | 3764 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3765 | 3765 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3766 | 3766 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3767 | 3767 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3768 | 3768 | ); |
| 3769 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( | |
| 3769 | +SQLITE_API int sqlite3_prepare16_v2( | |
| 3770 | 3770 | sqlite3 *db, /* Database handle */ |
| 3771 | 3771 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3772 | 3772 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3773 | 3773 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3774 | 3774 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| @@ -3803,12 +3803,12 @@ | ||
| 3803 | 3803 | ** automatically freed when the prepared statement is finalized. |
| 3804 | 3804 | ** ^The string returned by sqlite3_expanded_sql(P), on the other hand, |
| 3805 | 3805 | ** is obtained from [sqlite3_malloc()] and must be free by the application |
| 3806 | 3806 | ** by passing it to [sqlite3_free()]. |
| 3807 | 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); | |
| 3808 | +SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); | |
| 3809 | +SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt); | |
| 3810 | 3810 | |
| 3811 | 3811 | /* |
| 3812 | 3812 | ** CAPI3REF: Determine If An SQL Statement Writes The Database |
| 3813 | 3813 | ** METHOD: sqlite3_stmt |
| 3814 | 3814 | ** |
| @@ -3836,11 +3836,11 @@ | ||
| 3836 | 3836 | ** database. ^The [ATTACH] and [DETACH] statements also cause |
| 3837 | 3837 | ** sqlite3_stmt_readonly() to return true since, while those statements |
| 3838 | 3838 | ** change the configuration of a database connection, they do not make |
| 3839 | 3839 | ** changes to the content of the database files on disk. |
| 3840 | 3840 | */ |
| 3841 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); | |
| 3841 | +SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); | |
| 3842 | 3842 | |
| 3843 | 3843 | /* |
| 3844 | 3844 | ** CAPI3REF: Determine If A Prepared Statement Has Been Reset |
| 3845 | 3845 | ** METHOD: sqlite3_stmt |
| 3846 | 3846 | ** |
| @@ -3857,11 +3857,11 @@ | ||
| 3857 | 3857 | ** to locate all prepared statements associated with a database |
| 3858 | 3858 | ** connection that are in need of being reset. This can be used, |
| 3859 | 3859 | ** for example, in diagnostic routines to search for prepared |
| 3860 | 3860 | ** statements that are holding a transaction open. |
| 3861 | 3861 | */ |
| 3862 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*); | |
| 3862 | +SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*); | |
| 3863 | 3863 | |
| 3864 | 3864 | /* |
| 3865 | 3865 | ** CAPI3REF: Dynamically Typed Value Object |
| 3866 | 3866 | ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} |
| 3867 | 3867 | ** |
| @@ -4021,24 +4021,24 @@ | ||
| 4021 | 4021 | ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. |
| 4022 | 4022 | ** |
| 4023 | 4023 | ** See also: [sqlite3_bind_parameter_count()], |
| 4024 | 4024 | ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. |
| 4025 | 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, | |
| 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 | 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, | |
| 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 | 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); | |
| 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 | 4040 | |
| 4041 | 4041 | /* |
| 4042 | 4042 | ** CAPI3REF: Number Of SQL Parameters |
| 4043 | 4043 | ** METHOD: sqlite3_stmt |
| 4044 | 4044 | ** |
| @@ -4055,11 +4055,11 @@ | ||
| 4055 | 4055 | ** |
| 4056 | 4056 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4057 | 4057 | ** [sqlite3_bind_parameter_name()], and |
| 4058 | 4058 | ** [sqlite3_bind_parameter_index()]. |
| 4059 | 4059 | */ |
| 4060 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*); | |
| 4060 | +SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*); | |
| 4061 | 4061 | |
| 4062 | 4062 | /* |
| 4063 | 4063 | ** CAPI3REF: Name Of A Host Parameter |
| 4064 | 4064 | ** METHOD: sqlite3_stmt |
| 4065 | 4065 | ** |
| @@ -4083,11 +4083,11 @@ | ||
| 4083 | 4083 | ** |
| 4084 | 4084 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4085 | 4085 | ** [sqlite3_bind_parameter_count()], and |
| 4086 | 4086 | ** [sqlite3_bind_parameter_index()]. |
| 4087 | 4087 | */ |
| 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); | |
| 4089 | 4089 | |
| 4090 | 4090 | /* |
| 4091 | 4091 | ** CAPI3REF: Index Of A Parameter With A Given Name |
| 4092 | 4092 | ** METHOD: sqlite3_stmt |
| 4093 | 4093 | ** |
| @@ -4100,21 +4100,21 @@ | ||
| 4100 | 4100 | ** |
| 4101 | 4101 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4102 | 4102 | ** [sqlite3_bind_parameter_count()], and |
| 4103 | 4103 | ** [sqlite3_bind_parameter_name()]. |
| 4104 | 4104 | */ |
| 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); | |
| 4106 | 4106 | |
| 4107 | 4107 | /* |
| 4108 | 4108 | ** CAPI3REF: Reset All Bindings On A Prepared Statement |
| 4109 | 4109 | ** METHOD: sqlite3_stmt |
| 4110 | 4110 | ** |
| 4111 | 4111 | ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset |
| 4112 | 4112 | ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. |
| 4113 | 4113 | ** ^Use this routine to reset all host parameters to NULL. |
| 4114 | 4114 | */ |
| 4115 | -SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*); | |
| 4115 | +SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*); | |
| 4116 | 4116 | |
| 4117 | 4117 | /* |
| 4118 | 4118 | ** CAPI3REF: Number Of Columns In A Result Set |
| 4119 | 4119 | ** METHOD: sqlite3_stmt |
| 4120 | 4120 | ** |
| @@ -4122,11 +4122,11 @@ | ||
| 4122 | 4122 | ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL |
| 4123 | 4123 | ** statement that does not return data (for example an [UPDATE]). |
| 4124 | 4124 | ** |
| 4125 | 4125 | ** See also: [sqlite3_data_count()] |
| 4126 | 4126 | */ |
| 4127 | -SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt); | |
| 4127 | +SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt); | |
| 4128 | 4128 | |
| 4129 | 4129 | /* |
| 4130 | 4130 | ** CAPI3REF: Column Names In A Result Set |
| 4131 | 4131 | ** METHOD: sqlite3_stmt |
| 4132 | 4132 | ** |
| @@ -4151,12 +4151,12 @@ | ||
| 4151 | 4151 | ** ^The name of a result column is the value of the "AS" clause for |
| 4152 | 4152 | ** that column, if there is an AS clause. If there is no AS clause |
| 4153 | 4153 | ** then the name of the column is unspecified and may change from |
| 4154 | 4154 | ** one release of SQLite to the next. |
| 4155 | 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); | |
| 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 | 4158 | |
| 4159 | 4159 | /* |
| 4160 | 4160 | ** CAPI3REF: Source Of Data In A Query Result |
| 4161 | 4161 | ** METHOD: sqlite3_stmt |
| 4162 | 4162 | ** |
| @@ -4200,16 +4200,16 @@ | ||
| 4200 | 4200 | ** If two or more threads call one or more |
| 4201 | 4201 | ** [sqlite3_column_database_name | column metadata interfaces] |
| 4202 | 4202 | ** for the same [prepared statement] and result column |
| 4203 | 4203 | ** at the same time then the results are undefined. |
| 4204 | 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); | |
| 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 | 4211 | |
| 4212 | 4212 | /* |
| 4213 | 4213 | ** CAPI3REF: Declared Datatype Of A Query Result |
| 4214 | 4214 | ** METHOD: sqlite3_stmt |
| 4215 | 4215 | ** |
| @@ -4237,12 +4237,12 @@ | ||
| 4237 | 4237 | ** data stored in that column is of the declared type. SQLite is |
| 4238 | 4238 | ** strongly typed, but the typing is dynamic not static. ^Type |
| 4239 | 4239 | ** is associated with individual values, not with the containers |
| 4240 | 4240 | ** used to hold those values. |
| 4241 | 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); | |
| 4242 | +SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int); | |
| 4243 | +SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int); | |
| 4244 | 4244 | |
| 4245 | 4245 | /* |
| 4246 | 4246 | ** CAPI3REF: Evaluate An SQL Statement |
| 4247 | 4247 | ** METHOD: sqlite3_stmt |
| 4248 | 4248 | ** |
| @@ -4318,11 +4318,11 @@ | ||
| 4318 | 4318 | ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead |
| 4319 | 4319 | ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, |
| 4320 | 4320 | ** then the more specific [error codes] are returned directly |
| 4321 | 4321 | ** by sqlite3_step(). The use of the "v2" interface is recommended. |
| 4322 | 4322 | */ |
| 4323 | -SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*); | |
| 4323 | +SQLITE_API int sqlite3_step(sqlite3_stmt*); | |
| 4324 | 4324 | |
| 4325 | 4325 | /* |
| 4326 | 4326 | ** CAPI3REF: Number of columns in a result set |
| 4327 | 4327 | ** METHOD: sqlite3_stmt |
| 4328 | 4328 | ** |
| @@ -4339,11 +4339,11 @@ | ||
| 4339 | 4339 | ** where it always returns zero since each step of that multi-step |
| 4340 | 4340 | ** pragma returns 0 columns of data. |
| 4341 | 4341 | ** |
| 4342 | 4342 | ** See also: [sqlite3_column_count()] |
| 4343 | 4343 | */ |
| 4344 | -SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt); | |
| 4344 | +SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt); | |
| 4345 | 4345 | |
| 4346 | 4346 | /* |
| 4347 | 4347 | ** CAPI3REF: Fundamental Datatypes |
| 4348 | 4348 | ** KEYWORDS: SQLITE_TEXT |
| 4349 | 4349 | ** |
| @@ -4529,20 +4529,20 @@ | ||
| 4529 | 4529 | ** of these routines, a default value is returned. The default value |
| 4530 | 4530 | ** is either the integer 0, the floating point number 0.0, or a NULL |
| 4531 | 4531 | ** pointer. Subsequent calls to [sqlite3_errcode()] will return |
| 4532 | 4532 | ** [SQLITE_NOMEM].)^ |
| 4533 | 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); | |
| 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 | 4544 | |
| 4545 | 4545 | /* |
| 4546 | 4546 | ** CAPI3REF: Destroy A Prepared Statement Object |
| 4547 | 4547 | ** DESTRUCTOR: sqlite3_stmt |
| 4548 | 4548 | ** |
| @@ -4566,11 +4566,11 @@ | ||
| 4566 | 4566 | ** resource leaks. It is a grievous error for the application to try to use |
| 4567 | 4567 | ** a prepared statement after it has been finalized. Any use of a prepared |
| 4568 | 4568 | ** statement after it has been finalized can result in undefined and |
| 4569 | 4569 | ** undesirable behavior such as segfaults and heap corruption. |
| 4570 | 4570 | */ |
| 4571 | -SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt); | |
| 4571 | +SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); | |
| 4572 | 4572 | |
| 4573 | 4573 | /* |
| 4574 | 4574 | ** CAPI3REF: Reset A Prepared Statement Object |
| 4575 | 4575 | ** METHOD: sqlite3_stmt |
| 4576 | 4576 | ** |
| @@ -4593,11 +4593,11 @@ | ||
| 4593 | 4593 | ** [sqlite3_reset(S)] returns an appropriate [error code]. |
| 4594 | 4594 | ** |
| 4595 | 4595 | ** ^The [sqlite3_reset(S)] interface does not change the values |
| 4596 | 4596 | ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. |
| 4597 | 4597 | */ |
| 4598 | -SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt); | |
| 4598 | +SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); | |
| 4599 | 4599 | |
| 4600 | 4600 | /* |
| 4601 | 4601 | ** CAPI3REF: Create Or Redefine SQL Functions |
| 4602 | 4602 | ** KEYWORDS: {function creation routines} |
| 4603 | 4603 | ** KEYWORDS: {application-defined SQL function} |
| @@ -4693,31 +4693,31 @@ | ||
| 4693 | 4693 | ** ^An application-defined function is permitted to call other |
| 4694 | 4694 | ** SQLite interfaces. However, such calls must not |
| 4695 | 4695 | ** close the database connection nor finalize or reset the prepared |
| 4696 | 4696 | ** statement in which the function is running. |
| 4697 | 4697 | */ |
| 4698 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function( | |
| 4698 | +SQLITE_API int sqlite3_create_function( | |
| 4699 | 4699 | sqlite3 *db, |
| 4700 | 4700 | const char *zFunctionName, |
| 4701 | 4701 | int nArg, |
| 4702 | 4702 | int eTextRep, |
| 4703 | 4703 | void *pApp, |
| 4704 | 4704 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4705 | 4705 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4706 | 4706 | void (*xFinal)(sqlite3_context*) |
| 4707 | 4707 | ); |
| 4708 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( | |
| 4708 | +SQLITE_API int sqlite3_create_function16( | |
| 4709 | 4709 | sqlite3 *db, |
| 4710 | 4710 | const void *zFunctionName, |
| 4711 | 4711 | int nArg, |
| 4712 | 4712 | int eTextRep, |
| 4713 | 4713 | void *pApp, |
| 4714 | 4714 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4715 | 4715 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4716 | 4716 | void (*xFinal)(sqlite3_context*) |
| 4717 | 4717 | ); |
| 4718 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( | |
| 4718 | +SQLITE_API int sqlite3_create_function_v2( | |
| 4719 | 4719 | sqlite3 *db, |
| 4720 | 4720 | const char *zFunctionName, |
| 4721 | 4721 | int nArg, |
| 4722 | 4722 | int eTextRep, |
| 4723 | 4723 | void *pApp, |
| @@ -4759,16 +4759,16 @@ | ||
| 4759 | 4759 | ** to be supported. However, new applications should avoid |
| 4760 | 4760 | ** the use of these functions. To encourage programmers to avoid |
| 4761 | 4761 | ** these functions, we will not explain what they do. |
| 4762 | 4762 | */ |
| 4763 | 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), | |
| 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 | 4770 | void*,sqlite3_int64); |
| 4771 | 4771 | #endif |
| 4772 | 4772 | |
| 4773 | 4773 | /* |
| 4774 | 4774 | ** CAPI3REF: Obtaining SQL Values |
| @@ -4814,22 +4814,22 @@ | ||
| 4814 | 4814 | ** or [sqlite3_value_text16()]. |
| 4815 | 4815 | ** |
| 4816 | 4816 | ** These routines must be called from the same thread as |
| 4817 | 4817 | ** the SQL function that supplied the [sqlite3_value*] parameters. |
| 4818 | 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*); | |
| 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 | 4831 | |
| 4832 | 4832 | /* |
| 4833 | 4833 | ** CAPI3REF: Finding The Subtype Of SQL Values |
| 4834 | 4834 | ** METHOD: sqlite3_value |
| 4835 | 4835 | ** |
| @@ -4841,11 +4841,11 @@ | ||
| 4841 | 4841 | ** |
| 4842 | 4842 | ** SQLite makes no use of subtype itself. It merely passes the subtype |
| 4843 | 4843 | ** from the result of one [application-defined SQL function] into the |
| 4844 | 4844 | ** input of another. |
| 4845 | 4845 | */ |
| 4846 | -SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*); | |
| 4846 | +SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*); | |
| 4847 | 4847 | |
| 4848 | 4848 | /* |
| 4849 | 4849 | ** CAPI3REF: Copy And Free SQL Values |
| 4850 | 4850 | ** METHOD: sqlite3_value |
| 4851 | 4851 | ** |
| @@ -4857,12 +4857,12 @@ | ||
| 4857 | 4857 | ** |
| 4858 | 4858 | ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object |
| 4859 | 4859 | ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer |
| 4860 | 4860 | ** then sqlite3_value_free(V) is a harmless no-op. |
| 4861 | 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*); | |
| 4862 | +SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*); | |
| 4863 | +SQLITE_API void sqlite3_value_free(sqlite3_value*); | |
| 4864 | 4864 | |
| 4865 | 4865 | /* |
| 4866 | 4866 | ** CAPI3REF: Obtain Aggregate Function Context |
| 4867 | 4867 | ** METHOD: sqlite3_context |
| 4868 | 4868 | ** |
| @@ -4903,11 +4903,11 @@ | ||
| 4903 | 4903 | ** function. |
| 4904 | 4904 | ** |
| 4905 | 4905 | ** This routine must be called from the same thread in which |
| 4906 | 4906 | ** the aggregate SQL function is running. |
| 4907 | 4907 | */ |
| 4908 | -SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); | |
| 4908 | +SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes); | |
| 4909 | 4909 | |
| 4910 | 4910 | /* |
| 4911 | 4911 | ** CAPI3REF: User Data For Functions |
| 4912 | 4912 | ** METHOD: sqlite3_context |
| 4913 | 4913 | ** |
| @@ -4918,11 +4918,11 @@ | ||
| 4918 | 4918 | ** registered the application defined function. |
| 4919 | 4919 | ** |
| 4920 | 4920 | ** This routine must be called from the same thread in which |
| 4921 | 4921 | ** the application-defined function is running. |
| 4922 | 4922 | */ |
| 4923 | -SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*); | |
| 4923 | +SQLITE_API void *sqlite3_user_data(sqlite3_context*); | |
| 4924 | 4924 | |
| 4925 | 4925 | /* |
| 4926 | 4926 | ** CAPI3REF: Database Connection For Functions |
| 4927 | 4927 | ** METHOD: sqlite3_context |
| 4928 | 4928 | ** |
| @@ -4930,11 +4930,11 @@ | ||
| 4930 | 4930 | ** the pointer to the [database connection] (the 1st parameter) |
| 4931 | 4931 | ** of the [sqlite3_create_function()] |
| 4932 | 4932 | ** and [sqlite3_create_function16()] routines that originally |
| 4933 | 4933 | ** registered the application defined function. |
| 4934 | 4934 | */ |
| 4935 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); | |
| 4935 | +SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*); | |
| 4936 | 4936 | |
| 4937 | 4937 | /* |
| 4938 | 4938 | ** CAPI3REF: Function Auxiliary Data |
| 4939 | 4939 | ** METHOD: sqlite3_context |
| 4940 | 4940 | ** |
| @@ -4984,12 +4984,12 @@ | ||
| 4984 | 4984 | ** values and [parameters] and expressions composed from the same.)^ |
| 4985 | 4985 | ** |
| 4986 | 4986 | ** These routines must be called from the same thread in which |
| 4987 | 4987 | ** the SQL function is running. |
| 4988 | 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*)); | |
| 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 | 4991 | |
| 4992 | 4992 | |
| 4993 | 4993 | /* |
| 4994 | 4994 | ** CAPI3REF: Constants Defining Special Destructor Behavior |
| 4995 | 4995 | ** |
| @@ -5121,31 +5121,31 @@ | ||
| 5121 | 5121 | ** |
| 5122 | 5122 | ** If these routines are called from within the different thread |
| 5123 | 5123 | ** than the one containing the application-defined function that received |
| 5124 | 5124 | ** the [sqlite3_context] pointer, the results are undefined. |
| 5125 | 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*, | |
| 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 | 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, | |
| 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 | 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); | |
| 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 | 5147 | |
| 5148 | 5148 | |
| 5149 | 5149 | /* |
| 5150 | 5150 | ** CAPI3REF: Setting The Subtype Of An SQL Function |
| 5151 | 5151 | ** METHOD: sqlite3_context |
| @@ -5156,11 +5156,11 @@ | ||
| 5156 | 5156 | ** of the subtype T are preserved in current versions of SQLite; |
| 5157 | 5157 | ** higher order bits are discarded. |
| 5158 | 5158 | ** The number of subtype bytes preserved by SQLite might increase |
| 5159 | 5159 | ** in future releases of SQLite. |
| 5160 | 5160 | */ |
| 5161 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int); | |
| 5161 | +SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int); | |
| 5162 | 5162 | |
| 5163 | 5163 | /* |
| 5164 | 5164 | ** CAPI3REF: Define New Collating Sequences |
| 5165 | 5165 | ** METHOD: sqlite3 |
| 5166 | 5166 | ** |
| @@ -5238,26 +5238,26 @@ | ||
| 5238 | 5238 | ** is unfortunate but cannot be changed without breaking backwards |
| 5239 | 5239 | ** compatibility. |
| 5240 | 5240 | ** |
| 5241 | 5241 | ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. |
| 5242 | 5242 | */ |
| 5243 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( | |
| 5243 | +SQLITE_API int sqlite3_create_collation( | |
| 5244 | 5244 | sqlite3*, |
| 5245 | 5245 | const char *zName, |
| 5246 | 5246 | int eTextRep, |
| 5247 | 5247 | void *pArg, |
| 5248 | 5248 | int(*xCompare)(void*,int,const void*,int,const void*) |
| 5249 | 5249 | ); |
| 5250 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( | |
| 5250 | +SQLITE_API int sqlite3_create_collation_v2( | |
| 5251 | 5251 | sqlite3*, |
| 5252 | 5252 | const char *zName, |
| 5253 | 5253 | int eTextRep, |
| 5254 | 5254 | void *pArg, |
| 5255 | 5255 | int(*xCompare)(void*,int,const void*,int,const void*), |
| 5256 | 5256 | void(*xDestroy)(void*) |
| 5257 | 5257 | ); |
| 5258 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( | |
| 5258 | +SQLITE_API int sqlite3_create_collation16( | |
| 5259 | 5259 | sqlite3*, |
| 5260 | 5260 | const void *zName, |
| 5261 | 5261 | int eTextRep, |
| 5262 | 5262 | void *pArg, |
| 5263 | 5263 | int(*xCompare)(void*,int,const void*,int,const void*) |
| @@ -5288,16 +5288,16 @@ | ||
| 5288 | 5288 | ** |
| 5289 | 5289 | ** The callback function should register the desired collation using |
| 5290 | 5290 | ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or |
| 5291 | 5291 | ** [sqlite3_create_collation_v2()]. |
| 5292 | 5292 | */ |
| 5293 | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( | |
| 5293 | +SQLITE_API int sqlite3_collation_needed( | |
| 5294 | 5294 | sqlite3*, |
| 5295 | 5295 | void*, |
| 5296 | 5296 | void(*)(void*,sqlite3*,int eTextRep,const char*) |
| 5297 | 5297 | ); |
| 5298 | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( | |
| 5298 | +SQLITE_API int sqlite3_collation_needed16( | |
| 5299 | 5299 | sqlite3*, |
| 5300 | 5300 | void*, |
| 5301 | 5301 | void(*)(void*,sqlite3*,int eTextRep,const void*) |
| 5302 | 5302 | ); |
| 5303 | 5303 | |
| @@ -5307,15 +5307,15 @@ | ||
| 5307 | 5307 | ** called right after sqlite3_open(). |
| 5308 | 5308 | ** |
| 5309 | 5309 | ** The code to implement this API is not available in the public release |
| 5310 | 5310 | ** of SQLite. |
| 5311 | 5311 | */ |
| 5312 | -SQLITE_API int SQLITE_STDCALL sqlite3_key( | |
| 5312 | +SQLITE_API int sqlite3_key( | |
| 5313 | 5313 | sqlite3 *db, /* Database to be rekeyed */ |
| 5314 | 5314 | const void *pKey, int nKey /* The key */ |
| 5315 | 5315 | ); |
| 5316 | -SQLITE_API int SQLITE_STDCALL sqlite3_key_v2( | |
| 5316 | +SQLITE_API int sqlite3_key_v2( | |
| 5317 | 5317 | sqlite3 *db, /* Database to be rekeyed */ |
| 5318 | 5318 | const char *zDbName, /* Name of the database */ |
| 5319 | 5319 | const void *pKey, int nKey /* The key */ |
| 5320 | 5320 | ); |
| 5321 | 5321 | |
| @@ -5325,35 +5325,35 @@ | ||
| 5325 | 5325 | ** database is decrypted. |
| 5326 | 5326 | ** |
| 5327 | 5327 | ** The code to implement this API is not available in the public release |
| 5328 | 5328 | ** of SQLite. |
| 5329 | 5329 | */ |
| 5330 | -SQLITE_API int SQLITE_STDCALL sqlite3_rekey( | |
| 5330 | +SQLITE_API int sqlite3_rekey( | |
| 5331 | 5331 | sqlite3 *db, /* Database to be rekeyed */ |
| 5332 | 5332 | const void *pKey, int nKey /* The new key */ |
| 5333 | 5333 | ); |
| 5334 | -SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2( | |
| 5334 | +SQLITE_API int sqlite3_rekey_v2( | |
| 5335 | 5335 | sqlite3 *db, /* Database to be rekeyed */ |
| 5336 | 5336 | const char *zDbName, /* Name of the database */ |
| 5337 | 5337 | const void *pKey, int nKey /* The new key */ |
| 5338 | 5338 | ); |
| 5339 | 5339 | |
| 5340 | 5340 | /* |
| 5341 | 5341 | ** Specify the activation key for a SEE database. Unless |
| 5342 | 5342 | ** activated, none of the SEE routines will work. |
| 5343 | 5343 | */ |
| 5344 | -SQLITE_API void SQLITE_STDCALL sqlite3_activate_see( | |
| 5344 | +SQLITE_API void sqlite3_activate_see( | |
| 5345 | 5345 | const char *zPassPhrase /* Activation phrase */ |
| 5346 | 5346 | ); |
| 5347 | 5347 | #endif |
| 5348 | 5348 | |
| 5349 | 5349 | #ifdef SQLITE_ENABLE_CEROD |
| 5350 | 5350 | /* |
| 5351 | 5351 | ** Specify the activation key for a CEROD database. Unless |
| 5352 | 5352 | ** activated, none of the CEROD routines will work. |
| 5353 | 5353 | */ |
| 5354 | -SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod( | |
| 5354 | +SQLITE_API void sqlite3_activate_cerod( | |
| 5355 | 5355 | const char *zPassPhrase /* Activation phrase */ |
| 5356 | 5356 | ); |
| 5357 | 5357 | #endif |
| 5358 | 5358 | |
| 5359 | 5359 | /* |
| @@ -5371,11 +5371,11 @@ | ||
| 5371 | 5371 | ** method of the default [sqlite3_vfs] object. If the xSleep() method |
| 5372 | 5372 | ** of the default VFS is not implemented correctly, or not implemented at |
| 5373 | 5373 | ** all, then the behavior of sqlite3_sleep() may deviate from the description |
| 5374 | 5374 | ** in the previous paragraphs. |
| 5375 | 5375 | */ |
| 5376 | -SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int); | |
| 5376 | +SQLITE_API int sqlite3_sleep(int); | |
| 5377 | 5377 | |
| 5378 | 5378 | /* |
| 5379 | 5379 | ** CAPI3REF: Name Of The Folder Holding Temporary Files |
| 5380 | 5380 | ** |
| 5381 | 5381 | ** ^(If this global variable is made to point to a string which is |
| @@ -5490,11 +5490,11 @@ | ||
| 5490 | 5490 | ** |
| 5491 | 5491 | ** If another thread changes the autocommit status of the database |
| 5492 | 5492 | ** connection while this routine is running, then the return value |
| 5493 | 5493 | ** is undefined. |
| 5494 | 5494 | */ |
| 5495 | -SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*); | |
| 5495 | +SQLITE_API int sqlite3_get_autocommit(sqlite3*); | |
| 5496 | 5496 | |
| 5497 | 5497 | /* |
| 5498 | 5498 | ** CAPI3REF: Find The Database Handle Of A Prepared Statement |
| 5499 | 5499 | ** METHOD: sqlite3_stmt |
| 5500 | 5500 | ** |
| @@ -5503,11 +5503,11 @@ | ||
| 5503 | 5503 | ** returned by sqlite3_db_handle is the same [database connection] |
| 5504 | 5504 | ** that was the first argument |
| 5505 | 5505 | ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to |
| 5506 | 5506 | ** create the statement in the first place. |
| 5507 | 5507 | */ |
| 5508 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*); | |
| 5508 | +SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); | |
| 5509 | 5509 | |
| 5510 | 5510 | /* |
| 5511 | 5511 | ** CAPI3REF: Return The Filename For A Database Connection |
| 5512 | 5512 | ** METHOD: sqlite3 |
| 5513 | 5513 | ** |
| @@ -5520,21 +5520,21 @@ | ||
| 5520 | 5520 | ** ^The filename returned by this function is the output of the |
| 5521 | 5521 | ** xFullPathname method of the [VFS]. ^In other words, the filename |
| 5522 | 5522 | ** will be an absolute pathname, even if the filename used |
| 5523 | 5523 | ** to open the database originally was a URI or relative pathname. |
| 5524 | 5524 | */ |
| 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); | |
| 5526 | 5526 | |
| 5527 | 5527 | /* |
| 5528 | 5528 | ** CAPI3REF: Determine if a database is read-only |
| 5529 | 5529 | ** METHOD: sqlite3 |
| 5530 | 5530 | ** |
| 5531 | 5531 | ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N |
| 5532 | 5532 | ** of connection D is read-only, 0 if it is read/write, or -1 if N is not |
| 5533 | 5533 | ** the name of a database on connection D. |
| 5534 | 5534 | */ |
| 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); | |
| 5536 | 5536 | |
| 5537 | 5537 | /* |
| 5538 | 5538 | ** CAPI3REF: Find the next prepared statement |
| 5539 | 5539 | ** METHOD: sqlite3 |
| 5540 | 5540 | ** |
| @@ -5546,11 +5546,11 @@ | ||
| 5546 | 5546 | ** |
| 5547 | 5547 | ** The [database connection] pointer D in a call to |
| 5548 | 5548 | ** [sqlite3_next_stmt(D,S)] must refer to an open database |
| 5549 | 5549 | ** connection and in particular must not be a NULL pointer. |
| 5550 | 5550 | */ |
| 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); | |
| 5552 | 5552 | |
| 5553 | 5553 | /* |
| 5554 | 5554 | ** CAPI3REF: Commit And Rollback Notification Callbacks |
| 5555 | 5555 | ** METHOD: sqlite3 |
| 5556 | 5556 | ** |
| @@ -5595,12 +5595,12 @@ | ||
| 5595 | 5595 | ** ^The rollback callback is not invoked if a transaction is |
| 5596 | 5596 | ** automatically rolled back because the database connection is closed. |
| 5597 | 5597 | ** |
| 5598 | 5598 | ** See also the [sqlite3_update_hook()] interface. |
| 5599 | 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*); | |
| 5600 | +SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); | |
| 5601 | +SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); | |
| 5602 | 5602 | |
| 5603 | 5603 | /* |
| 5604 | 5604 | ** CAPI3REF: Data Change Notification Callbacks |
| 5605 | 5605 | ** METHOD: sqlite3 |
| 5606 | 5606 | ** |
| @@ -5647,11 +5647,11 @@ | ||
| 5647 | 5647 | ** the first call on D. |
| 5648 | 5648 | ** |
| 5649 | 5649 | ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], |
| 5650 | 5650 | ** and [sqlite3_preupdate_hook()] interfaces. |
| 5651 | 5651 | */ |
| 5652 | -SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( | |
| 5652 | +SQLITE_API void *sqlite3_update_hook( | |
| 5653 | 5653 | sqlite3*, |
| 5654 | 5654 | void(*)(void *,int ,char const *,char const *,sqlite3_int64), |
| 5655 | 5655 | void* |
| 5656 | 5656 | ); |
| 5657 | 5657 | |
| @@ -5687,11 +5687,11 @@ | ||
| 5687 | 5687 | ** This interface is threadsafe on processors where writing a |
| 5688 | 5688 | ** 32-bit integer is atomic. |
| 5689 | 5689 | ** |
| 5690 | 5690 | ** See Also: [SQLite Shared-Cache Mode] |
| 5691 | 5691 | */ |
| 5692 | -SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int); | |
| 5692 | +SQLITE_API int sqlite3_enable_shared_cache(int); | |
| 5693 | 5693 | |
| 5694 | 5694 | /* |
| 5695 | 5695 | ** CAPI3REF: Attempt To Free Heap Memory |
| 5696 | 5696 | ** |
| 5697 | 5697 | ** ^The sqlite3_release_memory() interface attempts to free N bytes |
| @@ -5703,11 +5703,11 @@ | ||
| 5703 | 5703 | ** ^The sqlite3_release_memory() routine is a no-op returning zero |
| 5704 | 5704 | ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5705 | 5705 | ** |
| 5706 | 5706 | ** See also: [sqlite3_db_release_memory()] |
| 5707 | 5707 | */ |
| 5708 | -SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int); | |
| 5708 | +SQLITE_API int sqlite3_release_memory(int); | |
| 5709 | 5709 | |
| 5710 | 5710 | /* |
| 5711 | 5711 | ** CAPI3REF: Free Memory Used By A Database Connection |
| 5712 | 5712 | ** METHOD: sqlite3 |
| 5713 | 5713 | ** |
| @@ -5717,11 +5717,11 @@ | ||
| 5717 | 5717 | ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is |
| 5718 | 5718 | ** omitted. |
| 5719 | 5719 | ** |
| 5720 | 5720 | ** See also: [sqlite3_release_memory()] |
| 5721 | 5721 | */ |
| 5722 | -SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*); | |
| 5722 | +SQLITE_API int sqlite3_db_release_memory(sqlite3*); | |
| 5723 | 5723 | |
| 5724 | 5724 | /* |
| 5725 | 5725 | ** CAPI3REF: Impose A Limit On Heap Size |
| 5726 | 5726 | ** |
| 5727 | 5727 | ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the |
| @@ -5769,11 +5769,11 @@ | ||
| 5769 | 5769 | ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5770 | 5770 | ** |
| 5771 | 5771 | ** The circumstances under which SQLite will enforce the soft heap limit may |
| 5772 | 5772 | ** changes in future releases of SQLite. |
| 5773 | 5773 | */ |
| 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); | |
| 5775 | 5775 | |
| 5776 | 5776 | /* |
| 5777 | 5777 | ** CAPI3REF: Deprecated Soft Heap Limit Interface |
| 5778 | 5778 | ** DEPRECATED |
| 5779 | 5779 | ** |
| @@ -5780,11 +5780,11 @@ | ||
| 5780 | 5780 | ** This is a deprecated version of the [sqlite3_soft_heap_limit64()] |
| 5781 | 5781 | ** interface. This routine is provided for historical compatibility |
| 5782 | 5782 | ** only. All new applications should use the |
| 5783 | 5783 | ** [sqlite3_soft_heap_limit64()] interface rather than this one. |
| 5784 | 5784 | */ |
| 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); | |
| 5786 | 5786 | |
| 5787 | 5787 | |
| 5788 | 5788 | /* |
| 5789 | 5789 | ** CAPI3REF: Extract Metadata About A Column Of A Table |
| 5790 | 5790 | ** METHOD: sqlite3 |
| @@ -5850,11 +5850,11 @@ | ||
| 5850 | 5850 | ** |
| 5851 | 5851 | ** ^This function causes all database schemas to be read from disk and |
| 5852 | 5852 | ** parsed, if that has not already been done, and returns an error if |
| 5853 | 5853 | ** any errors are encountered while loading the schema. |
| 5854 | 5854 | */ |
| 5855 | -SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( | |
| 5855 | +SQLITE_API int sqlite3_table_column_metadata( | |
| 5856 | 5856 | sqlite3 *db, /* Connection handle */ |
| 5857 | 5857 | const char *zDbName, /* Database name or NULL */ |
| 5858 | 5858 | const char *zTableName, /* Table name */ |
| 5859 | 5859 | const char *zColumnName, /* Column name */ |
| 5860 | 5860 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -5906,11 +5906,11 @@ | ||
| 5906 | 5906 | ** disabled and prevent SQL injections from giving attackers |
| 5907 | 5907 | ** access to extension loading capabilities. |
| 5908 | 5908 | ** |
| 5909 | 5909 | ** See also the [load_extension() SQL function]. |
| 5910 | 5910 | */ |
| 5911 | -SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( | |
| 5911 | +SQLITE_API int sqlite3_load_extension( | |
| 5912 | 5912 | sqlite3 *db, /* Load the extension into this database connection */ |
| 5913 | 5913 | const char *zFile, /* Name of the shared library containing extension */ |
| 5914 | 5914 | const char *zProc, /* Entry point. Derived from zFile if 0 */ |
| 5915 | 5915 | char **pzErrMsg /* Put error message here if not 0 */ |
| 5916 | 5916 | ); |
| @@ -5938,11 +5938,11 @@ | ||
| 5938 | 5938 | ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method |
| 5939 | 5939 | ** rather than this interface, so the [load_extension()] SQL function |
| 5940 | 5940 | ** remains disabled. This will prevent SQL injections from giving attackers |
| 5941 | 5941 | ** access to extension loading capabilities. |
| 5942 | 5942 | */ |
| 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); | |
| 5944 | 5944 | |
| 5945 | 5945 | /* |
| 5946 | 5946 | ** CAPI3REF: Automatically Load Statically Linked Extensions |
| 5947 | 5947 | ** |
| 5948 | 5948 | ** ^This interface causes the xEntryPoint() function to be invoked for |
| @@ -5976,11 +5976,11 @@ | ||
| 5976 | 5976 | ** will be called more than once for each database connection that is opened. |
| 5977 | 5977 | ** |
| 5978 | 5978 | ** See also: [sqlite3_reset_auto_extension()] |
| 5979 | 5979 | ** and [sqlite3_cancel_auto_extension()] |
| 5980 | 5980 | */ |
| 5981 | -SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void)); | |
| 5981 | +SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void)); | |
| 5982 | 5982 | |
| 5983 | 5983 | /* |
| 5984 | 5984 | ** CAPI3REF: Cancel Automatic Extension Loading |
| 5985 | 5985 | ** |
| 5986 | 5986 | ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the |
| @@ -5988,19 +5988,19 @@ | ||
| 5988 | 5988 | ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] |
| 5989 | 5989 | ** routine returns 1 if initialization routine X was successfully |
| 5990 | 5990 | ** unregistered and it returns 0 if X was not on the list of initialization |
| 5991 | 5991 | ** routines. |
| 5992 | 5992 | */ |
| 5993 | -SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); | |
| 5993 | +SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); | |
| 5994 | 5994 | |
| 5995 | 5995 | /* |
| 5996 | 5996 | ** CAPI3REF: Reset Automatic Extension Loading |
| 5997 | 5997 | ** |
| 5998 | 5998 | ** ^This interface disables all automatic extensions previously |
| 5999 | 5999 | ** registered using [sqlite3_auto_extension()]. |
| 6000 | 6000 | */ |
| 6001 | -SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void); | |
| 6001 | +SQLITE_API void sqlite3_reset_auto_extension(void); | |
| 6002 | 6002 | |
| 6003 | 6003 | /* |
| 6004 | 6004 | ** The interface to the virtual-table mechanism is currently considered |
| 6005 | 6005 | ** to be experimental. The interface might change in incompatible ways. |
| 6006 | 6006 | ** If this is a problem for you, do not use the interface at this time. |
| @@ -6241,17 +6241,17 @@ | ||
| 6241 | 6241 | ** be invoked if the call to sqlite3_create_module_v2() fails. |
| 6242 | 6242 | ** ^The sqlite3_create_module() |
| 6243 | 6243 | ** interface is equivalent to sqlite3_create_module_v2() with a NULL |
| 6244 | 6244 | ** destructor. |
| 6245 | 6245 | */ |
| 6246 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module( | |
| 6246 | +SQLITE_API int sqlite3_create_module( | |
| 6247 | 6247 | sqlite3 *db, /* SQLite connection to register module with */ |
| 6248 | 6248 | const char *zName, /* Name of the module */ |
| 6249 | 6249 | const sqlite3_module *p, /* Methods for the module */ |
| 6250 | 6250 | void *pClientData /* Client data for xCreate/xConnect */ |
| 6251 | 6251 | ); |
| 6252 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( | |
| 6252 | +SQLITE_API int sqlite3_create_module_v2( | |
| 6253 | 6253 | sqlite3 *db, /* SQLite connection to register module with */ |
| 6254 | 6254 | const char *zName, /* Name of the module */ |
| 6255 | 6255 | const sqlite3_module *p, /* Methods for the module */ |
| 6256 | 6256 | void *pClientData, /* Client data for xCreate/xConnect */ |
| 6257 | 6257 | void(*xDestroy)(void*) /* Module destructor function */ |
| @@ -6310,11 +6310,11 @@ | ||
| 6310 | 6310 | ** ^The [xCreate] and [xConnect] methods of a |
| 6311 | 6311 | ** [virtual table module] call this interface |
| 6312 | 6312 | ** to declare the format (the names and datatypes of the columns) of |
| 6313 | 6313 | ** the virtual tables they implement. |
| 6314 | 6314 | */ |
| 6315 | -SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); | |
| 6315 | +SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL); | |
| 6316 | 6316 | |
| 6317 | 6317 | /* |
| 6318 | 6318 | ** CAPI3REF: Overload A Function For A Virtual Table |
| 6319 | 6319 | ** METHOD: sqlite3 |
| 6320 | 6320 | ** |
| @@ -6329,11 +6329,11 @@ | ||
| 6329 | 6329 | ** of the new function always causes an exception to be thrown. So |
| 6330 | 6330 | ** the new function is not good for anything by itself. Its only |
| 6331 | 6331 | ** purpose is to be a placeholder function that can be overloaded |
| 6332 | 6332 | ** by a [virtual table]. |
| 6333 | 6333 | */ |
| 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); | |
| 6335 | 6335 | |
| 6336 | 6336 | /* |
| 6337 | 6337 | ** The interface to the virtual-table mechanism defined above (back up |
| 6338 | 6338 | ** to a comment remarkably similar to this one) is currently considered |
| 6339 | 6339 | ** to be experimental. The interface might change in incompatible ways. |
| @@ -6428,11 +6428,11 @@ | ||
| 6428 | 6428 | ** zero-filled blob to read or write using the incremental-blob interface. |
| 6429 | 6429 | ** |
| 6430 | 6430 | ** To avoid a resource leak, every open [BLOB handle] should eventually |
| 6431 | 6431 | ** be released by a call to [sqlite3_blob_close()]. |
| 6432 | 6432 | */ |
| 6433 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( | |
| 6433 | +SQLITE_API int sqlite3_blob_open( | |
| 6434 | 6434 | sqlite3*, |
| 6435 | 6435 | const char *zDb, |
| 6436 | 6436 | const char *zTable, |
| 6437 | 6437 | const char *zColumn, |
| 6438 | 6438 | sqlite3_int64 iRow, |
| @@ -6461,11 +6461,11 @@ | ||
| 6461 | 6461 | ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle |
| 6462 | 6462 | ** always returns zero. |
| 6463 | 6463 | ** |
| 6464 | 6464 | ** ^This function sets the database handle error code and message. |
| 6465 | 6465 | */ |
| 6466 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); | |
| 6466 | +SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); | |
| 6467 | 6467 | |
| 6468 | 6468 | /* |
| 6469 | 6469 | ** CAPI3REF: Close A BLOB Handle |
| 6470 | 6470 | ** DESTRUCTOR: sqlite3_blob |
| 6471 | 6471 | ** |
| @@ -6484,11 +6484,11 @@ | ||
| 6484 | 6484 | ** with a null pointer (such as would be returned by a failed call to |
| 6485 | 6485 | ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function |
| 6486 | 6486 | ** is passed a valid open blob handle, the values returned by the |
| 6487 | 6487 | ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. |
| 6488 | 6488 | */ |
| 6489 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *); | |
| 6489 | +SQLITE_API int sqlite3_blob_close(sqlite3_blob *); | |
| 6490 | 6490 | |
| 6491 | 6491 | /* |
| 6492 | 6492 | ** CAPI3REF: Return The Size Of An Open BLOB |
| 6493 | 6493 | ** METHOD: sqlite3_blob |
| 6494 | 6494 | ** |
| @@ -6500,11 +6500,11 @@ | ||
| 6500 | 6500 | ** This routine only works on a [BLOB handle] which has been created |
| 6501 | 6501 | ** by a prior successful call to [sqlite3_blob_open()] and which has not |
| 6502 | 6502 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6503 | 6503 | ** to this routine results in undefined and probably undesirable behavior. |
| 6504 | 6504 | */ |
| 6505 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *); | |
| 6505 | +SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *); | |
| 6506 | 6506 | |
| 6507 | 6507 | /* |
| 6508 | 6508 | ** CAPI3REF: Read Data From A BLOB Incrementally |
| 6509 | 6509 | ** METHOD: sqlite3_blob |
| 6510 | 6510 | ** |
| @@ -6529,11 +6529,11 @@ | ||
| 6529 | 6529 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6530 | 6530 | ** to this routine results in undefined and probably undesirable behavior. |
| 6531 | 6531 | ** |
| 6532 | 6532 | ** See also: [sqlite3_blob_write()]. |
| 6533 | 6533 | */ |
| 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); | |
| 6535 | 6535 | |
| 6536 | 6536 | /* |
| 6537 | 6537 | ** CAPI3REF: Write Data Into A BLOB Incrementally |
| 6538 | 6538 | ** METHOD: sqlite3_blob |
| 6539 | 6539 | ** |
| @@ -6571,11 +6571,11 @@ | ||
| 6571 | 6571 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6572 | 6572 | ** to this routine results in undefined and probably undesirable behavior. |
| 6573 | 6573 | ** |
| 6574 | 6574 | ** See also: [sqlite3_blob_read()]. |
| 6575 | 6575 | */ |
| 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); | |
| 6577 | 6577 | |
| 6578 | 6578 | /* |
| 6579 | 6579 | ** CAPI3REF: Virtual File System Objects |
| 6580 | 6580 | ** |
| 6581 | 6581 | ** A virtual filesystem (VFS) is an [sqlite3_vfs] object |
| @@ -6602,13 +6602,13 @@ | ||
| 6602 | 6602 | ** |
| 6603 | 6603 | ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. |
| 6604 | 6604 | ** ^(If the default VFS is unregistered, another VFS is chosen as |
| 6605 | 6605 | ** the default. The choice for the new VFS is arbitrary.)^ |
| 6606 | 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*); | |
| 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 | 6610 | |
| 6611 | 6611 | /* |
| 6612 | 6612 | ** CAPI3REF: Mutexes |
| 6613 | 6613 | ** |
| 6614 | 6614 | ** The SQLite core uses these routines for thread |
| @@ -6720,15 +6720,15 @@ | ||
| 6720 | 6720 | ** sqlite3_mutex_leave() is a NULL pointer, then all three routines |
| 6721 | 6721 | ** behave as no-ops. |
| 6722 | 6722 | ** |
| 6723 | 6723 | ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
| 6724 | 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*); | |
| 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 | 6730 | |
| 6731 | 6731 | /* |
| 6732 | 6732 | ** CAPI3REF: Mutex Methods Object |
| 6733 | 6733 | ** |
| 6734 | 6734 | ** An instance of this structure defines the low-level routines |
| @@ -6834,12 +6834,12 @@ | ||
| 6834 | 6834 | ** call to sqlite3_mutex_held() to fail, so a non-zero return is |
| 6835 | 6835 | ** the appropriate thing to do. The sqlite3_mutex_notheld() |
| 6836 | 6836 | ** interface should also return 1 when given a NULL pointer. |
| 6837 | 6837 | */ |
| 6838 | 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*); | |
| 6839 | +SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*); | |
| 6840 | +SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*); | |
| 6841 | 6841 | #endif |
| 6842 | 6842 | |
| 6843 | 6843 | /* |
| 6844 | 6844 | ** CAPI3REF: Mutex Types |
| 6845 | 6845 | ** |
| @@ -6875,11 +6875,11 @@ | ||
| 6875 | 6875 | ** serializes access to the [database connection] given in the argument |
| 6876 | 6876 | ** when the [threading mode] is Serialized. |
| 6877 | 6877 | ** ^If the [threading mode] is Single-thread or Multi-thread then this |
| 6878 | 6878 | ** routine returns a NULL pointer. |
| 6879 | 6879 | */ |
| 6880 | -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*); | |
| 6880 | +SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*); | |
| 6881 | 6881 | |
| 6882 | 6882 | /* |
| 6883 | 6883 | ** CAPI3REF: Low-Level Control Of Database Files |
| 6884 | 6884 | ** METHOD: sqlite3 |
| 6885 | 6885 | ** |
| @@ -6910,11 +6910,11 @@ | ||
| 6910 | 6910 | ** an incorrect zDbName and an SQLITE_ERROR return from the underlying |
| 6911 | 6911 | ** xFileControl method. |
| 6912 | 6912 | ** |
| 6913 | 6913 | ** See also: [SQLITE_FCNTL_LOCKSTATE] |
| 6914 | 6914 | */ |
| 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*); | |
| 6916 | 6916 | |
| 6917 | 6917 | /* |
| 6918 | 6918 | ** CAPI3REF: Testing Interface |
| 6919 | 6919 | ** |
| 6920 | 6920 | ** ^The sqlite3_test_control() interface is used to read out internal |
| @@ -6929,11 +6929,11 @@ | ||
| 6929 | 6929 | ** The details of the operation codes, their meanings, the parameters |
| 6930 | 6930 | ** they take, and what they do are all subject to change without notice. |
| 6931 | 6931 | ** Unlike most of the SQLite API, this function is not guaranteed to |
| 6932 | 6932 | ** operate consistently from one release to the next. |
| 6933 | 6933 | */ |
| 6934 | -SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...); | |
| 6934 | +SQLITE_API int sqlite3_test_control(int op, ...); | |
| 6935 | 6935 | |
| 6936 | 6936 | /* |
| 6937 | 6937 | ** CAPI3REF: Testing Interface Operation Codes |
| 6938 | 6938 | ** |
| 6939 | 6939 | ** These constants are the valid operation code parameters used |
| @@ -6992,12 +6992,12 @@ | ||
| 6992 | 6992 | ** be represented by a 32-bit integer, then the values returned by |
| 6993 | 6993 | ** sqlite3_status() are undefined. |
| 6994 | 6994 | ** |
| 6995 | 6995 | ** See also: [sqlite3_db_status()] |
| 6996 | 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( | |
| 6997 | +SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); | |
| 6998 | +SQLITE_API int sqlite3_status64( | |
| 6999 | 6999 | int op, |
| 7000 | 7000 | sqlite3_int64 *pCurrent, |
| 7001 | 7001 | sqlite3_int64 *pHighwater, |
| 7002 | 7002 | int resetFlag |
| 7003 | 7003 | ); |
| @@ -7118,11 +7118,11 @@ | ||
| 7118 | 7118 | ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a |
| 7119 | 7119 | ** non-zero [error code] on failure. |
| 7120 | 7120 | ** |
| 7121 | 7121 | ** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. |
| 7122 | 7122 | */ |
| 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); | |
| 7124 | 7124 | |
| 7125 | 7125 | /* |
| 7126 | 7126 | ** CAPI3REF: Status Parameters for database connections |
| 7127 | 7127 | ** KEYWORDS: {SQLITE_DBSTATUS options} |
| 7128 | 7128 | ** |
| @@ -7261,11 +7261,11 @@ | ||
| 7261 | 7261 | ** ^If the resetFlg is true, then the counter is reset to zero after this |
| 7262 | 7262 | ** interface call returns. |
| 7263 | 7263 | ** |
| 7264 | 7264 | ** See also: [sqlite3_status()] and [sqlite3_db_status()]. |
| 7265 | 7265 | */ |
| 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); | |
| 7267 | 7267 | |
| 7268 | 7268 | /* |
| 7269 | 7269 | ** CAPI3REF: Status Parameters for prepared statements |
| 7270 | 7270 | ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} |
| 7271 | 7271 | ** |
| @@ -7730,20 +7730,20 @@ | ||
| 7730 | 7730 | ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() |
| 7731 | 7731 | ** APIs are not strictly speaking threadsafe. If they are invoked at the |
| 7732 | 7732 | ** same time as another thread is invoking sqlite3_backup_step() it is |
| 7733 | 7733 | ** possible that they return invalid values. |
| 7734 | 7734 | */ |
| 7735 | -SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( | |
| 7735 | +SQLITE_API sqlite3_backup *sqlite3_backup_init( | |
| 7736 | 7736 | sqlite3 *pDest, /* Destination database handle */ |
| 7737 | 7737 | const char *zDestName, /* Destination database name */ |
| 7738 | 7738 | sqlite3 *pSource, /* Source database handle */ |
| 7739 | 7739 | const char *zSourceName /* Source database name */ |
| 7740 | 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); | |
| 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 | 7745 | |
| 7746 | 7746 | /* |
| 7747 | 7747 | ** CAPI3REF: Unlock Notification |
| 7748 | 7748 | ** METHOD: sqlite3 |
| 7749 | 7749 | ** |
| @@ -7856,11 +7856,11 @@ | ||
| 7856 | 7856 | ** by an sqlite3_step() call. ^(If there is a blocking connection, then the |
| 7857 | 7857 | ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in |
| 7858 | 7858 | ** the special "DROP TABLE/INDEX" case, the extended error code is just |
| 7859 | 7859 | ** SQLITE_LOCKED.)^ |
| 7860 | 7860 | */ |
| 7861 | -SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( | |
| 7861 | +SQLITE_API int sqlite3_unlock_notify( | |
| 7862 | 7862 | sqlite3 *pBlocked, /* Waiting connection */ |
| 7863 | 7863 | void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ |
| 7864 | 7864 | void *pNotifyArg /* Argument to pass to xNotify */ |
| 7865 | 7865 | ); |
| 7866 | 7866 | |
| @@ -7871,12 +7871,12 @@ | ||
| 7871 | 7871 | ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications |
| 7872 | 7872 | ** and extensions to compare the contents of two buffers containing UTF-8 |
| 7873 | 7873 | ** strings in a case-independent fashion, using the same definition of "case |
| 7874 | 7874 | ** independence" that SQLite uses internally when comparing identifiers. |
| 7875 | 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); | |
| 7876 | +SQLITE_API int sqlite3_stricmp(const char *, const char *); | |
| 7877 | +SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); | |
| 7878 | 7878 | |
| 7879 | 7879 | /* |
| 7880 | 7880 | ** CAPI3REF: String Globbing |
| 7881 | 7881 | * |
| 7882 | 7882 | ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if |
| @@ -7889,11 +7889,11 @@ | ||
| 7889 | 7889 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7890 | 7890 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7891 | 7891 | ** |
| 7892 | 7892 | ** See also: [sqlite3_strlike()]. |
| 7893 | 7893 | */ |
| 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); | |
| 7895 | 7895 | |
| 7896 | 7896 | /* |
| 7897 | 7897 | ** CAPI3REF: String LIKE Matching |
| 7898 | 7898 | * |
| 7899 | 7899 | ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if |
| @@ -7912,11 +7912,11 @@ | ||
| 7912 | 7912 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7913 | 7913 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7914 | 7914 | ** |
| 7915 | 7915 | ** See also: [sqlite3_strglob()]. |
| 7916 | 7916 | */ |
| 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); | |
| 7918 | 7918 | |
| 7919 | 7919 | /* |
| 7920 | 7920 | ** CAPI3REF: Error Logging Interface |
| 7921 | 7921 | ** |
| 7922 | 7922 | ** ^The [sqlite3_log()] interface writes a message into the [error log] |
| @@ -7935,11 +7935,11 @@ | ||
| 7935 | 7935 | ** will not use dynamically allocated memory. The log message is stored in |
| 7936 | 7936 | ** a fixed-length buffer on the stack. If the log message is longer than |
| 7937 | 7937 | ** a few hundred characters, it will be truncated to the length of the |
| 7938 | 7938 | ** buffer. |
| 7939 | 7939 | */ |
| 7940 | -SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...); | |
| 7940 | +SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...); | |
| 7941 | 7941 | |
| 7942 | 7942 | /* |
| 7943 | 7943 | ** CAPI3REF: Write-Ahead Log Commit Hook |
| 7944 | 7944 | ** METHOD: sqlite3 |
| 7945 | 7945 | ** |
| @@ -7971,11 +7971,11 @@ | ||
| 7971 | 7971 | ** previously registered write-ahead log callback. ^Note that the |
| 7972 | 7972 | ** [sqlite3_wal_autocheckpoint()] interface and the |
| 7973 | 7973 | ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will |
| 7974 | 7974 | ** overwrite any prior [sqlite3_wal_hook()] settings. |
| 7975 | 7975 | */ |
| 7976 | -SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( | |
| 7976 | +SQLITE_API void *sqlite3_wal_hook( | |
| 7977 | 7977 | sqlite3*, |
| 7978 | 7978 | int(*)(void *,sqlite3*,const char*,int), |
| 7979 | 7979 | void* |
| 7980 | 7980 | ); |
| 7981 | 7981 | |
| @@ -8006,11 +8006,11 @@ | ||
| 8006 | 8006 | ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] |
| 8007 | 8007 | ** pages. The use of this interface |
| 8008 | 8008 | ** is only necessary if the default setting is found to be suboptimal |
| 8009 | 8009 | ** for a particular application. |
| 8010 | 8010 | */ |
| 8011 | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); | |
| 8011 | +SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N); | |
| 8012 | 8012 | |
| 8013 | 8013 | /* |
| 8014 | 8014 | ** CAPI3REF: Checkpoint a database |
| 8015 | 8015 | ** METHOD: sqlite3 |
| 8016 | 8016 | ** |
| @@ -8028,11 +8028,11 @@ | ||
| 8028 | 8028 | ** interface was added. This interface is retained for backwards |
| 8029 | 8029 | ** compatibility and as a convenience for applications that need to manually |
| 8030 | 8030 | ** start a callback but which do not need the full power (and corresponding |
| 8031 | 8031 | ** complication) of [sqlite3_wal_checkpoint_v2()]. |
| 8032 | 8032 | */ |
| 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); | |
| 8034 | 8034 | |
| 8035 | 8035 | /* |
| 8036 | 8036 | ** CAPI3REF: Checkpoint a database |
| 8037 | 8037 | ** METHOD: sqlite3 |
| 8038 | 8038 | ** |
| @@ -8122,11 +8122,11 @@ | ||
| 8122 | 8122 | ** [sqlite3_errcode()] and [sqlite3_errmsg()]. |
| 8123 | 8123 | ** |
| 8124 | 8124 | ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface |
| 8125 | 8125 | ** from SQL. |
| 8126 | 8126 | */ |
| 8127 | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( | |
| 8127 | +SQLITE_API int sqlite3_wal_checkpoint_v2( | |
| 8128 | 8128 | sqlite3 *db, /* Database handle */ |
| 8129 | 8129 | const char *zDb, /* Name of attached database (or NULL) */ |
| 8130 | 8130 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 8131 | 8131 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 8132 | 8132 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -8158,11 +8158,11 @@ | ||
| 8158 | 8158 | ** |
| 8159 | 8159 | ** At present, there is only one option that may be configured using |
| 8160 | 8160 | ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options |
| 8161 | 8161 | ** may be added in the future. |
| 8162 | 8162 | */ |
| 8163 | -SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...); | |
| 8163 | +SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); | |
| 8164 | 8164 | |
| 8165 | 8165 | /* |
| 8166 | 8166 | ** CAPI3REF: Virtual Table Configuration Options |
| 8167 | 8167 | ** |
| 8168 | 8168 | ** These macros define the various options to the |
| @@ -8211,11 +8211,11 @@ | ||
| 8211 | 8211 | ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], |
| 8212 | 8212 | ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode |
| 8213 | 8213 | ** of the SQL statement that triggered the call to the [xUpdate] method of the |
| 8214 | 8214 | ** [virtual table]. |
| 8215 | 8215 | */ |
| 8216 | -SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *); | |
| 8216 | +SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *); | |
| 8217 | 8217 | |
| 8218 | 8218 | /* |
| 8219 | 8219 | ** CAPI3REF: Conflict resolution modes |
| 8220 | 8220 | ** KEYWORDS: {conflict resolution mode} |
| 8221 | 8221 | ** |
| @@ -8316,11 +8316,11 @@ | ||
| 8316 | 8316 | ** as if the loop did not exist - it returns non-zero and leave the variable |
| 8317 | 8317 | ** that pOut points to unchanged. |
| 8318 | 8318 | ** |
| 8319 | 8319 | ** See also: [sqlite3_stmt_scanstatus_reset()] |
| 8320 | 8320 | */ |
| 8321 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( | |
| 8321 | +SQLITE_API int sqlite3_stmt_scanstatus( | |
| 8322 | 8322 | sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ |
| 8323 | 8323 | int idx, /* Index of loop to report on */ |
| 8324 | 8324 | int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
| 8325 | 8325 | void *pOut /* Result written here */ |
| 8326 | 8326 | ); |
| @@ -8332,11 +8332,11 @@ | ||
| 8332 | 8332 | ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters. |
| 8333 | 8333 | ** |
| 8334 | 8334 | ** This API is only available if the library is built with pre-processor |
| 8335 | 8335 | ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. |
| 8336 | 8336 | */ |
| 8337 | -SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); | |
| 8337 | +SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); | |
| 8338 | 8338 | |
| 8339 | 8339 | /* |
| 8340 | 8340 | ** CAPI3REF: Flush caches to disk mid-transaction |
| 8341 | 8341 | ** |
| 8342 | 8342 | ** ^If a write-transaction is open on [database connection] D when the |
| @@ -8364,11 +8364,11 @@ | ||
| 8364 | 8364 | ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. |
| 8365 | 8365 | ** |
| 8366 | 8366 | ** ^This function does not set the database handle error code or message |
| 8367 | 8367 | ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. |
| 8368 | 8368 | */ |
| 8369 | -SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); | |
| 8369 | +SQLITE_API int sqlite3_db_cacheflush(sqlite3*); | |
| 8370 | 8370 | |
| 8371 | 8371 | /* |
| 8372 | 8372 | ** CAPI3REF: The pre-update hook. |
| 8373 | 8373 | ** |
| 8374 | 8374 | ** ^These interfaces are only available if SQLite is compiled using the |
| @@ -8444,11 +8444,11 @@ | ||
| 8444 | 8444 | ** triggers; or 2 for changes resulting from triggers called by top-level |
| 8445 | 8445 | ** triggers; and so forth. |
| 8446 | 8446 | ** |
| 8447 | 8447 | ** See also: [sqlite3_update_hook()] |
| 8448 | 8448 | */ |
| 8449 | -SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook( | |
| 8449 | +SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook( | |
| 8450 | 8450 | sqlite3 *db, |
| 8451 | 8451 | void(*xPreUpdate)( |
| 8452 | 8452 | void *pCtx, /* Copy of third arg to preupdate_hook() */ |
| 8453 | 8453 | sqlite3 *db, /* Database handle */ |
| 8454 | 8454 | int op, /* SQLITE_UPDATE, DELETE or INSERT */ |
| @@ -8457,14 +8457,14 @@ | ||
| 8457 | 8457 | sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */ |
| 8458 | 8458 | sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */ |
| 8459 | 8459 | ), |
| 8460 | 8460 | void* |
| 8461 | 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 **); | |
| 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 | 8466 | |
| 8467 | 8467 | /* |
| 8468 | 8468 | ** CAPI3REF: Low-level system error code |
| 8469 | 8469 | ** |
| 8470 | 8470 | ** ^Attempt to return the underlying operating system error code or error |
| @@ -8472,11 +8472,11 @@ | ||
| 8472 | 8472 | ** The return value is OS-dependent. For example, on unix systems, after |
| 8473 | 8473 | ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be |
| 8474 | 8474 | ** called to get back the underlying "errno" that caused the problem, such |
| 8475 | 8475 | ** as ENOSPC, EAUTH, EISDIR, and so forth. |
| 8476 | 8476 | */ |
| 8477 | -SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*); | |
| 8477 | +SQLITE_API int sqlite3_system_errno(sqlite3*); | |
| 8478 | 8478 | |
| 8479 | 8479 | /* |
| 8480 | 8480 | ** CAPI3REF: Database Snapshot |
| 8481 | 8481 | ** KEYWORDS: {snapshot} |
| 8482 | 8482 | ** EXPERIMENTAL |
| @@ -8522,11 +8522,11 @@ | ||
| 8522 | 8522 | ** to avoid a memory leak. |
| 8523 | 8523 | ** |
| 8524 | 8524 | ** The [sqlite3_snapshot_get()] interface is only available when the |
| 8525 | 8525 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8526 | 8526 | */ |
| 8527 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get( | |
| 8527 | +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get( | |
| 8528 | 8528 | sqlite3 *db, |
| 8529 | 8529 | const char *zSchema, |
| 8530 | 8530 | sqlite3_snapshot **ppSnapshot |
| 8531 | 8531 | ); |
| 8532 | 8532 | |
| @@ -8560,11 +8560,11 @@ | ||
| 8560 | 8560 | ** database connection in order to make it ready to use snapshots.) |
| 8561 | 8561 | ** |
| 8562 | 8562 | ** The [sqlite3_snapshot_open()] interface is only available when the |
| 8563 | 8563 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8564 | 8564 | */ |
| 8565 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open( | |
| 8565 | +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open( | |
| 8566 | 8566 | sqlite3 *db, |
| 8567 | 8567 | const char *zSchema, |
| 8568 | 8568 | sqlite3_snapshot *pSnapshot |
| 8569 | 8569 | ); |
| 8570 | 8570 | |
| @@ -8577,11 +8577,11 @@ | ||
| 8577 | 8577 | ** using this routine to avoid a memory leak. |
| 8578 | 8578 | ** |
| 8579 | 8579 | ** The [sqlite3_snapshot_free()] interface is only available when the |
| 8580 | 8580 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8581 | 8581 | */ |
| 8582 | -SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*); | |
| 8582 | +SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*); | |
| 8583 | 8583 | |
| 8584 | 8584 | /* |
| 8585 | 8585 | ** CAPI3REF: Compare the ages of two snapshot handles. |
| 8586 | 8586 | ** EXPERIMENTAL |
| 8587 | 8587 | ** |
| @@ -8601,11 +8601,11 @@ | ||
| 8601 | 8601 | ** |
| 8602 | 8602 | ** Otherwise, this API returns a negative value if P1 refers to an older |
| 8603 | 8603 | ** snapshot than P2, zero if the two handles refer to the same database |
| 8604 | 8604 | ** snapshot, and a positive value if P1 is a newer snapshot than P2. |
| 8605 | 8605 | */ |
| 8606 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp( | |
| 8606 | +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp( | |
| 8607 | 8607 | sqlite3_snapshot *p1, |
| 8608 | 8608 | sqlite3_snapshot *p2 |
| 8609 | 8609 | ); |
| 8610 | 8610 | |
| 8611 | 8611 | /* |
| @@ -8659,11 +8659,11 @@ | ||
| 8659 | 8659 | ** Register a geometry callback named zGeom that can be used as part of an |
| 8660 | 8660 | ** R-Tree geometry query as follows: |
| 8661 | 8661 | ** |
| 8662 | 8662 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...) |
| 8663 | 8663 | */ |
| 8664 | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( | |
| 8664 | +SQLITE_API int sqlite3_rtree_geometry_callback( | |
| 8665 | 8665 | sqlite3 *db, |
| 8666 | 8666 | const char *zGeom, |
| 8667 | 8667 | int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), |
| 8668 | 8668 | void *pContext |
| 8669 | 8669 | ); |
| @@ -8685,11 +8685,11 @@ | ||
| 8685 | 8685 | ** Register a 2nd-generation geometry callback named zScore that can be |
| 8686 | 8686 | ** used as part of an R-Tree geometry query as follows: |
| 8687 | 8687 | ** |
| 8688 | 8688 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...) |
| 8689 | 8689 | */ |
| 8690 | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( | |
| 8690 | +SQLITE_API int sqlite3_rtree_query_callback( | |
| 8691 | 8691 | sqlite3 *db, |
| 8692 | 8692 | const char *zQueryFunc, |
| 8693 | 8693 | int (*xQueryFunc)(sqlite3_rtree_query_info*), |
| 8694 | 8694 | void *pContext, |
| 8695 | 8695 | void (*xDestructor)(void*) |
| @@ -11900,12 +11900,12 @@ | ||
| 11900 | 11900 | */ |
| 11901 | 11901 | #ifdef SQLITE_OMIT_WSD |
| 11902 | 11902 | #define SQLITE_WSD const |
| 11903 | 11903 | #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v))) |
| 11904 | 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); | |
| 11905 | +SQLITE_API int sqlite3_wsd_init(int N, int J); | |
| 11906 | +SQLITE_API void *sqlite3_wsd_find(void *K, int L); | |
| 11907 | 11907 | #else |
| 11908 | 11908 | #define SQLITE_WSD |
| 11909 | 11909 | #define GLOBAL(t,v) v |
| 11910 | 11910 | #define sqlite3GlobalConfig sqlite3Config |
| 11911 | 11911 | #endif |
| @@ -12559,16 +12559,16 @@ | ||
| 12559 | 12559 | #define OP_Found 31 /* synopsis: key=r[P3@P4] */ |
| 12560 | 12560 | #define OP_SeekRowid 32 /* synopsis: intkey=r[P3] */ |
| 12561 | 12561 | #define OP_NotExists 33 /* synopsis: intkey=r[P3] */ |
| 12562 | 12562 | #define OP_IsNull 34 /* same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */ |
| 12563 | 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 */ | |
| 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 | 12570 | #define OP_Last 42 |
| 12571 | 12571 | #define OP_BitAnd 43 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */ |
| 12572 | 12572 | #define OP_BitOr 44 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */ |
| 12573 | 12573 | #define OP_ShiftLeft 45 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */ |
| 12574 | 12574 | #define OP_ShiftRight 46 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */ |
| @@ -17561,11 +17561,11 @@ | ||
| 17561 | 17561 | ** was used and false if not. |
| 17562 | 17562 | ** |
| 17563 | 17563 | ** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix |
| 17564 | 17564 | ** is not required for a match. |
| 17565 | 17565 | */ |
| 17566 | -SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName){ | |
| 17566 | +SQLITE_API int sqlite3_compileoption_used(const char *zOptName){ | |
| 17567 | 17567 | int i, n; |
| 17568 | 17568 | |
| 17569 | 17569 | #if SQLITE_ENABLE_API_ARMOR |
| 17570 | 17570 | if( zOptName==0 ){ |
| 17571 | 17571 | (void)SQLITE_MISUSE_BKPT; |
| @@ -17589,11 +17589,11 @@ | ||
| 17589 | 17589 | |
| 17590 | 17590 | /* |
| 17591 | 17591 | ** Return the N-th compile-time option string. If N is out of range, |
| 17592 | 17592 | ** return a NULL pointer. |
| 17593 | 17593 | */ |
| 17594 | -SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N){ | |
| 17594 | +SQLITE_API const char *sqlite3_compileoption_get(int N){ | |
| 17595 | 17595 | if( N>=0 && N<ArraySize(azCompileOpt) ){ |
| 17596 | 17596 | return azCompileOpt[N]; |
| 17597 | 17597 | } |
| 17598 | 17598 | return 0; |
| 17599 | 17599 | } |
| @@ -18299,11 +18299,11 @@ | ||
| 18299 | 18299 | } |
| 18300 | 18300 | |
| 18301 | 18301 | /* |
| 18302 | 18302 | ** Query status information. |
| 18303 | 18303 | */ |
| 18304 | -SQLITE_API int SQLITE_STDCALL sqlite3_status64( | |
| 18304 | +SQLITE_API int sqlite3_status64( | |
| 18305 | 18305 | int op, |
| 18306 | 18306 | sqlite3_int64 *pCurrent, |
| 18307 | 18307 | sqlite3_int64 *pHighwater, |
| 18308 | 18308 | int resetFlag |
| 18309 | 18309 | ){ |
| @@ -18324,11 +18324,11 @@ | ||
| 18324 | 18324 | } |
| 18325 | 18325 | sqlite3_mutex_leave(pMutex); |
| 18326 | 18326 | (void)pMutex; /* Prevent warning when SQLITE_THREADSAFE=0 */ |
| 18327 | 18327 | return SQLITE_OK; |
| 18328 | 18328 | } |
| 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){ | |
| 18330 | 18330 | sqlite3_int64 iCur = 0, iHwtr = 0; |
| 18331 | 18331 | int rc; |
| 18332 | 18332 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 18333 | 18333 | if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT; |
| 18334 | 18334 | #endif |
| @@ -18341,11 +18341,11 @@ | ||
| 18341 | 18341 | } |
| 18342 | 18342 | |
| 18343 | 18343 | /* |
| 18344 | 18344 | ** Query status information for a single database connection |
| 18345 | 18345 | */ |
| 18346 | -SQLITE_API int SQLITE_STDCALL sqlite3_db_status( | |
| 18346 | +SQLITE_API int sqlite3_db_status( | |
| 18347 | 18347 | sqlite3 *db, /* The database connection whose status is desired */ |
| 18348 | 18348 | int op, /* Status verb */ |
| 18349 | 18349 | int *pCurrent, /* Write current value here */ |
| 18350 | 18350 | int *pHighwater, /* Write high-water mark here */ |
| 18351 | 18351 | int resetFlag /* Reset high-water mark if true */ |
| @@ -20018,11 +20018,11 @@ | ||
| 20018 | 20018 | |
| 20019 | 20019 | /* |
| 20020 | 20020 | ** Locate a VFS by name. If no name is given, simply return the |
| 20021 | 20021 | ** first VFS on the list. |
| 20022 | 20022 | */ |
| 20023 | -SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfs){ | |
| 20023 | +SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){ | |
| 20024 | 20024 | sqlite3_vfs *pVfs = 0; |
| 20025 | 20025 | #if SQLITE_THREADSAFE |
| 20026 | 20026 | sqlite3_mutex *mutex; |
| 20027 | 20027 | #endif |
| 20028 | 20028 | #ifndef SQLITE_OMIT_AUTOINIT |
| @@ -20064,11 +20064,11 @@ | ||
| 20064 | 20064 | /* |
| 20065 | 20065 | ** Register a VFS with the system. It is harmless to register the same |
| 20066 | 20066 | ** VFS multiple times. The new VFS becomes the default if makeDflt is |
| 20067 | 20067 | ** true. |
| 20068 | 20068 | */ |
| 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){ | |
| 20070 | 20070 | MUTEX_LOGIC(sqlite3_mutex *mutex;) |
| 20071 | 20071 | #ifndef SQLITE_OMIT_AUTOINIT |
| 20072 | 20072 | int rc = sqlite3_initialize(); |
| 20073 | 20073 | if( rc ) return rc; |
| 20074 | 20074 | #endif |
| @@ -20092,11 +20092,11 @@ | ||
| 20092 | 20092 | } |
| 20093 | 20093 | |
| 20094 | 20094 | /* |
| 20095 | 20095 | ** Unregister a VFS so that it is no longer accessible. |
| 20096 | 20096 | */ |
| 20097 | -SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ | |
| 20097 | +SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ | |
| 20098 | 20098 | #if SQLITE_THREADSAFE |
| 20099 | 20099 | sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); |
| 20100 | 20100 | #endif |
| 20101 | 20101 | sqlite3_mutex_enter(mutex); |
| 20102 | 20102 | vfsUnlink(pVfs); |
| @@ -22443,11 +22443,11 @@ | ||
| 22443 | 22443 | } |
| 22444 | 22444 | |
| 22445 | 22445 | /* |
| 22446 | 22446 | ** Retrieve a pointer to a static mutex or allocate a new dynamic one. |
| 22447 | 22447 | */ |
| 22448 | -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int id){ | |
| 22448 | +SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int id){ | |
| 22449 | 22449 | #ifndef SQLITE_OMIT_AUTOINIT |
| 22450 | 22450 | if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0; |
| 22451 | 22451 | if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0; |
| 22452 | 22452 | #endif |
| 22453 | 22453 | assert( sqlite3GlobalConfig.mutex.xMutexAlloc ); |
| @@ -22464,11 +22464,11 @@ | ||
| 22464 | 22464 | } |
| 22465 | 22465 | |
| 22466 | 22466 | /* |
| 22467 | 22467 | ** Free a dynamic mutex. |
| 22468 | 22468 | */ |
| 22469 | -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){ | |
| 22469 | +SQLITE_API void sqlite3_mutex_free(sqlite3_mutex *p){ | |
| 22470 | 22470 | if( p ){ |
| 22471 | 22471 | assert( sqlite3GlobalConfig.mutex.xMutexFree ); |
| 22472 | 22472 | sqlite3GlobalConfig.mutex.xMutexFree(p); |
| 22473 | 22473 | } |
| 22474 | 22474 | } |
| @@ -22475,11 +22475,11 @@ | ||
| 22475 | 22475 | |
| 22476 | 22476 | /* |
| 22477 | 22477 | ** Obtain the mutex p. If some other thread already has the mutex, block |
| 22478 | 22478 | ** until it can be obtained. |
| 22479 | 22479 | */ |
| 22480 | -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){ | |
| 22480 | +SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex *p){ | |
| 22481 | 22481 | if( p ){ |
| 22482 | 22482 | assert( sqlite3GlobalConfig.mutex.xMutexEnter ); |
| 22483 | 22483 | sqlite3GlobalConfig.mutex.xMutexEnter(p); |
| 22484 | 22484 | } |
| 22485 | 22485 | } |
| @@ -22486,11 +22486,11 @@ | ||
| 22486 | 22486 | |
| 22487 | 22487 | /* |
| 22488 | 22488 | ** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another |
| 22489 | 22489 | ** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. |
| 22490 | 22490 | */ |
| 22491 | -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){ | |
| 22491 | +SQLITE_API int sqlite3_mutex_try(sqlite3_mutex *p){ | |
| 22492 | 22492 | int rc = SQLITE_OK; |
| 22493 | 22493 | if( p ){ |
| 22494 | 22494 | assert( sqlite3GlobalConfig.mutex.xMutexTry ); |
| 22495 | 22495 | return sqlite3GlobalConfig.mutex.xMutexTry(p); |
| 22496 | 22496 | } |
| @@ -22501,11 +22501,11 @@ | ||
| 22501 | 22501 | ** The sqlite3_mutex_leave() routine exits a mutex that was previously |
| 22502 | 22502 | ** entered by the same thread. The behavior is undefined if the mutex |
| 22503 | 22503 | ** is not currently entered. If a NULL pointer is passed as an argument |
| 22504 | 22504 | ** this function is a no-op. |
| 22505 | 22505 | */ |
| 22506 | -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){ | |
| 22506 | +SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex *p){ | |
| 22507 | 22507 | if( p ){ |
| 22508 | 22508 | assert( sqlite3GlobalConfig.mutex.xMutexLeave ); |
| 22509 | 22509 | sqlite3GlobalConfig.mutex.xMutexLeave(p); |
| 22510 | 22510 | } |
| 22511 | 22511 | } |
| @@ -22513,15 +22513,15 @@ | ||
| 22513 | 22513 | #ifndef NDEBUG |
| 22514 | 22514 | /* |
| 22515 | 22515 | ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are |
| 22516 | 22516 | ** intended for use inside assert() statements. |
| 22517 | 22517 | */ |
| 22518 | -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex *p){ | |
| 22518 | +SQLITE_API int sqlite3_mutex_held(sqlite3_mutex *p){ | |
| 22519 | 22519 | assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld ); |
| 22520 | 22520 | return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p); |
| 22521 | 22521 | } |
| 22522 | -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex *p){ | |
| 22522 | +SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *p){ | |
| 22523 | 22523 | assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld ); |
| 22524 | 22524 | return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p); |
| 22525 | 22525 | } |
| 22526 | 22526 | #endif |
| 22527 | 22527 | |
| @@ -23549,12 +23549,12 @@ | ||
| 23549 | 23549 | ** of the sqlite3_initialize() and sqlite3_shutdown() processing, the |
| 23550 | 23550 | ** "interlocked" magic used here is probably not strictly necessary. |
| 23551 | 23551 | */ |
| 23552 | 23552 | static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0; |
| 23553 | 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 */ | |
| 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 | 23556 | |
| 23557 | 23557 | static int winMutexInit(void){ |
| 23558 | 23558 | /* The first to increment to 1 does actual initialization */ |
| 23559 | 23559 | if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){ |
| 23560 | 23560 | int i; |
| @@ -23850,11 +23850,11 @@ | ||
| 23850 | 23850 | /* |
| 23851 | 23851 | ** Attempt to release up to n bytes of non-essential memory currently |
| 23852 | 23852 | ** held by SQLite. An example of non-essential memory is memory used to |
| 23853 | 23853 | ** cache database pages that are not currently in use. |
| 23854 | 23854 | */ |
| 23855 | -SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int n){ | |
| 23855 | +SQLITE_API int sqlite3_release_memory(int n){ | |
| 23856 | 23856 | #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT |
| 23857 | 23857 | return sqlite3PcacheReleaseMemory(n); |
| 23858 | 23858 | #else |
| 23859 | 23859 | /* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine |
| 23860 | 23860 | ** is a no-op returning zero if SQLite is not compiled with |
| @@ -23909,11 +23909,11 @@ | ||
| 23909 | 23909 | /* |
| 23910 | 23910 | ** Deprecated external interface. It used to set an alarm callback |
| 23911 | 23911 | ** that was invoked when memory usage grew too large. Now it is a |
| 23912 | 23912 | ** no-op. |
| 23913 | 23913 | */ |
| 23914 | -SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm( | |
| 23914 | +SQLITE_API int sqlite3_memory_alarm( | |
| 23915 | 23915 | void(*xCallback)(void *pArg, sqlite3_int64 used,int N), |
| 23916 | 23916 | void *pArg, |
| 23917 | 23917 | sqlite3_int64 iThreshold |
| 23918 | 23918 | ){ |
| 23919 | 23919 | (void)xCallback; |
| @@ -23925,11 +23925,11 @@ | ||
| 23925 | 23925 | |
| 23926 | 23926 | /* |
| 23927 | 23927 | ** Set the soft heap-size limit for the library. Passing a zero or |
| 23928 | 23928 | ** negative value indicates no limit. |
| 23929 | 23929 | */ |
| 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){ | |
| 23931 | 23931 | sqlite3_int64 priorLimit; |
| 23932 | 23932 | sqlite3_int64 excess; |
| 23933 | 23933 | sqlite3_int64 nUsed; |
| 23934 | 23934 | #ifndef SQLITE_OMIT_AUTOINIT |
| 23935 | 23935 | int rc = sqlite3_initialize(); |
| @@ -23947,11 +23947,11 @@ | ||
| 23947 | 23947 | sqlite3_mutex_leave(mem0.mutex); |
| 23948 | 23948 | excess = sqlite3_memory_used() - n; |
| 23949 | 23949 | if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff)); |
| 23950 | 23950 | return priorLimit; |
| 23951 | 23951 | } |
| 23952 | -SQLITE_API void SQLITE_STDCALL sqlite3_soft_heap_limit(int n){ | |
| 23952 | +SQLITE_API void sqlite3_soft_heap_limit(int n){ | |
| 23953 | 23953 | if( n<0 ) n = 0; |
| 23954 | 23954 | sqlite3_soft_heap_limit64(n); |
| 23955 | 23955 | } |
| 23956 | 23956 | |
| 23957 | 23957 | /* |
| @@ -24016,11 +24016,11 @@ | ||
| 24016 | 24016 | } |
| 24017 | 24017 | |
| 24018 | 24018 | /* |
| 24019 | 24019 | ** Return the amount of memory currently checked out. |
| 24020 | 24020 | */ |
| 24021 | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){ | |
| 24021 | +SQLITE_API sqlite3_int64 sqlite3_memory_used(void){ | |
| 24022 | 24022 | sqlite3_int64 res, mx; |
| 24023 | 24023 | sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0); |
| 24024 | 24024 | return res; |
| 24025 | 24025 | } |
| 24026 | 24026 | |
| @@ -24027,11 +24027,11 @@ | ||
| 24027 | 24027 | /* |
| 24028 | 24028 | ** Return the maximum amount of memory that has ever been |
| 24029 | 24029 | ** checked out since either the beginning of this process |
| 24030 | 24030 | ** or since the most recent reset. |
| 24031 | 24031 | */ |
| 24032 | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag){ | |
| 24032 | +SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag){ | |
| 24033 | 24033 | sqlite3_int64 res, mx; |
| 24034 | 24034 | sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag); |
| 24035 | 24035 | return mx; |
| 24036 | 24036 | } |
| 24037 | 24037 | |
| @@ -24107,17 +24107,17 @@ | ||
| 24107 | 24107 | /* |
| 24108 | 24108 | ** This version of the memory allocation is for use by the application. |
| 24109 | 24109 | ** First make sure the memory subsystem is initialized, then do the |
| 24110 | 24110 | ** allocation. |
| 24111 | 24111 | */ |
| 24112 | -SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int n){ | |
| 24112 | +SQLITE_API void *sqlite3_malloc(int n){ | |
| 24113 | 24113 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24114 | 24114 | if( sqlite3_initialize() ) return 0; |
| 24115 | 24115 | #endif |
| 24116 | 24116 | return n<=0 ? 0 : sqlite3Malloc(n); |
| 24117 | 24117 | } |
| 24118 | -SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64 n){ | |
| 24118 | +SQLITE_API void *sqlite3_malloc64(sqlite3_uint64 n){ | |
| 24119 | 24119 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24120 | 24120 | if( sqlite3_initialize() ) return 0; |
| 24121 | 24121 | #endif |
| 24122 | 24122 | return sqlite3Malloc(n); |
| 24123 | 24123 | } |
| @@ -24256,20 +24256,20 @@ | ||
| 24256 | 24256 | }else{ |
| 24257 | 24257 | assert( sqlite3_mutex_held(db->mutex) ); |
| 24258 | 24258 | return db->lookaside.sz; |
| 24259 | 24259 | } |
| 24260 | 24260 | } |
| 24261 | -SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){ | |
| 24261 | +SQLITE_API sqlite3_uint64 sqlite3_msize(void *p){ | |
| 24262 | 24262 | assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); |
| 24263 | 24263 | assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); |
| 24264 | 24264 | return p ? sqlite3GlobalConfig.m.xSize(p) : 0; |
| 24265 | 24265 | } |
| 24266 | 24266 | |
| 24267 | 24267 | /* |
| 24268 | 24268 | ** Free memory previously obtained from sqlite3Malloc(). |
| 24269 | 24269 | */ |
| 24270 | -SQLITE_API void SQLITE_STDCALL sqlite3_free(void *p){ | |
| 24270 | +SQLITE_API void sqlite3_free(void *p){ | |
| 24271 | 24271 | if( p==0 ) return; /* IMP: R-49053-54554 */ |
| 24272 | 24272 | assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); |
| 24273 | 24273 | assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); |
| 24274 | 24274 | if( sqlite3GlobalConfig.bMemstat ){ |
| 24275 | 24275 | sqlite3_mutex_enter(mem0.mutex); |
| @@ -24374,18 +24374,18 @@ | ||
| 24374 | 24374 | |
| 24375 | 24375 | /* |
| 24376 | 24376 | ** The public interface to sqlite3Realloc. Make sure that the memory |
| 24377 | 24377 | ** subsystem is initialized prior to invoking sqliteRealloc. |
| 24378 | 24378 | */ |
| 24379 | -SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void *pOld, int n){ | |
| 24379 | +SQLITE_API void *sqlite3_realloc(void *pOld, int n){ | |
| 24380 | 24380 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24381 | 24381 | if( sqlite3_initialize() ) return 0; |
| 24382 | 24382 | #endif |
| 24383 | 24383 | if( n<0 ) n = 0; /* IMP: R-26507-47431 */ |
| 24384 | 24384 | return sqlite3Realloc(pOld, n); |
| 24385 | 24385 | } |
| 24386 | -SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){ | |
| 24386 | +SQLITE_API void *sqlite3_realloc64(void *pOld, sqlite3_uint64 n){ | |
| 24387 | 24387 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24388 | 24388 | if( sqlite3_initialize() ) return 0; |
| 24389 | 24389 | #endif |
| 24390 | 24390 | return sqlite3Realloc(pOld, n); |
| 24391 | 24391 | } |
| @@ -25608,11 +25608,11 @@ | ||
| 25608 | 25608 | |
| 25609 | 25609 | /* |
| 25610 | 25610 | ** Print into memory obtained from sqlite3_malloc(). Omit the internal |
| 25611 | 25611 | ** %-conversion extensions. |
| 25612 | 25612 | */ |
| 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){ | |
| 25614 | 25614 | char *z; |
| 25615 | 25615 | char zBase[SQLITE_PRINT_BUF_SIZE]; |
| 25616 | 25616 | StrAccum acc; |
| 25617 | 25617 | |
| 25618 | 25618 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -25632,11 +25632,11 @@ | ||
| 25632 | 25632 | |
| 25633 | 25633 | /* |
| 25634 | 25634 | ** Print into memory obtained from sqlite3_malloc()(). Omit the internal |
| 25635 | 25635 | ** %-conversion extensions. |
| 25636 | 25636 | */ |
| 25637 | -SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char *zFormat, ...){ | |
| 25637 | +SQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){ | |
| 25638 | 25638 | va_list ap; |
| 25639 | 25639 | char *z; |
| 25640 | 25640 | #ifndef SQLITE_OMIT_AUTOINIT |
| 25641 | 25641 | if( sqlite3_initialize() ) return 0; |
| 25642 | 25642 | #endif |
| @@ -25657,11 +25657,11 @@ | ||
| 25657 | 25657 | ** this without breaking compatibility, so we just have to live with the |
| 25658 | 25658 | ** mistake. |
| 25659 | 25659 | ** |
| 25660 | 25660 | ** sqlite3_vsnprintf() is the varargs version. |
| 25661 | 25661 | */ |
| 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){ | |
| 25663 | 25663 | StrAccum acc; |
| 25664 | 25664 | if( n<=0 ) return zBuf; |
| 25665 | 25665 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 25666 | 25666 | if( zBuf==0 || zFormat==0 ) { |
| 25667 | 25667 | (void)SQLITE_MISUSE_BKPT; |
| @@ -25671,11 +25671,11 @@ | ||
| 25671 | 25671 | #endif |
| 25672 | 25672 | sqlite3StrAccumInit(&acc, 0, zBuf, n, 0); |
| 25673 | 25673 | sqlite3VXPrintf(&acc, zFormat, ap); |
| 25674 | 25674 | return sqlite3StrAccumFinish(&acc); |
| 25675 | 25675 | } |
| 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, ...){ | |
| 25677 | 25677 | char *z; |
| 25678 | 25678 | va_list ap; |
| 25679 | 25679 | va_start(ap,zFormat); |
| 25680 | 25680 | z = sqlite3_vsnprintf(n, zBuf, zFormat, ap); |
| 25681 | 25681 | va_end(ap); |
| @@ -25707,11 +25707,11 @@ | ||
| 25707 | 25707 | } |
| 25708 | 25708 | |
| 25709 | 25709 | /* |
| 25710 | 25710 | ** Format and write a message to the log if logging is enabled. |
| 25711 | 25711 | */ |
| 25712 | -SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...){ | |
| 25712 | +SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...){ | |
| 25713 | 25713 | va_list ap; /* Vararg list */ |
| 25714 | 25714 | if( sqlite3GlobalConfig.xLog ){ |
| 25715 | 25715 | va_start(ap, zFormat); |
| 25716 | 25716 | renderLogMsg(iErrCode, zFormat, ap); |
| 25717 | 25717 | va_end(ap); |
| @@ -26284,11 +26284,11 @@ | ||
| 26284 | 26284 | } sqlite3Prng; |
| 26285 | 26285 | |
| 26286 | 26286 | /* |
| 26287 | 26287 | ** Return N random bytes. |
| 26288 | 26288 | */ |
| 26289 | -SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *pBuf){ | |
| 26289 | +SQLITE_API void sqlite3_randomness(int N, void *pBuf){ | |
| 26290 | 26290 | unsigned char t; |
| 26291 | 26291 | unsigned char *zBuf = pBuf; |
| 26292 | 26292 | |
| 26293 | 26293 | /* The "wsdPrng" macro will resolve to the pseudo-random number generator |
| 26294 | 26294 | ** state vector. If writable static data is unsupported on the target, |
| @@ -27487,11 +27487,11 @@ | ||
| 27487 | 27487 | ** sqlite3_strnicmp() APIs allow applications and extensions to compare |
| 27488 | 27488 | ** the contents of two buffers containing UTF-8 strings in a |
| 27489 | 27489 | ** case-independent fashion, using the same definition of "case |
| 27490 | 27490 | ** independence" that SQLite uses internally when comparing identifiers. |
| 27491 | 27491 | */ |
| 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){ | |
| 27493 | 27493 | if( zLeft==0 ){ |
| 27494 | 27494 | return zRight ? -1 : 0; |
| 27495 | 27495 | }else if( zRight==0 ){ |
| 27496 | 27496 | return 1; |
| 27497 | 27497 | } |
| @@ -27508,11 +27508,11 @@ | ||
| 27508 | 27508 | a++; |
| 27509 | 27509 | b++; |
| 27510 | 27510 | } |
| 27511 | 27511 | return c; |
| 27512 | 27512 | } |
| 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){ | |
| 27514 | 27514 | register unsigned char *a, *b; |
| 27515 | 27515 | if( zLeft==0 ){ |
| 27516 | 27516 | return zRight ? -1 : 0; |
| 27517 | 27517 | }else if( zRight==0 ){ |
| 27518 | 27518 | return 1; |
| @@ -28990,16 +28990,16 @@ | ||
| 28990 | 28990 | /* 31 */ "Found" OpHelp("key=r[P3@P4]"), |
| 28991 | 28991 | /* 32 */ "SeekRowid" OpHelp("intkey=r[P3]"), |
| 28992 | 28992 | /* 33 */ "NotExists" OpHelp("intkey=r[P3]"), |
| 28993 | 28993 | /* 34 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"), |
| 28994 | 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"), | |
| 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 | 29001 | /* 42 */ "Last" OpHelp(""), |
| 29002 | 29002 | /* 43 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"), |
| 29003 | 29003 | /* 44 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"), |
| 29004 | 29004 | /* 45 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"), |
| 29005 | 29005 | /* 46 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"), |
| @@ -36807,11 +36807,11 @@ | ||
| 36807 | 36807 | ** This routine is called once during SQLite initialization and by a |
| 36808 | 36808 | ** single thread. The memory allocation and mutex subsystems have not |
| 36809 | 36809 | ** necessarily been initialized when this routine is called, and so they |
| 36810 | 36810 | ** should not be used. |
| 36811 | 36811 | */ |
| 36812 | -SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ | |
| 36812 | +SQLITE_API int sqlite3_os_init(void){ | |
| 36813 | 36813 | /* |
| 36814 | 36814 | ** The following macro defines an initializer for an sqlite3_vfs object. |
| 36815 | 36815 | ** The name of the VFS is NAME. The pAppData is a pointer to a pointer |
| 36816 | 36816 | ** to the "finder" function. (pAppData is a pointer to a pointer because |
| 36817 | 36817 | ** silly C90 rules prohibit a void* from being cast to a function pointer |
| @@ -36906,11 +36906,11 @@ | ||
| 36906 | 36906 | ** |
| 36907 | 36907 | ** Some operating systems might need to do some cleanup in this routine, |
| 36908 | 36908 | ** to release dynamically allocated objects. But not on unix. |
| 36909 | 36909 | ** This routine is a no-op for unix. |
| 36910 | 36910 | */ |
| 36911 | -SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ | |
| 36911 | +SQLITE_API int sqlite3_os_end(void){ | |
| 36912 | 36912 | return SQLITE_OK; |
| 36913 | 36913 | } |
| 36914 | 36914 | |
| 36915 | 36915 | #endif /* SQLITE_OS_UNIX */ |
| 36916 | 36916 | |
| @@ -38341,11 +38341,11 @@ | ||
| 38341 | 38341 | ** compact it. Upon success, SQLITE_OK will be returned. Upon failure, one |
| 38342 | 38342 | ** of SQLITE_NOMEM, SQLITE_ERROR, or SQLITE_NOTFOUND will be returned. The |
| 38343 | 38343 | ** "pnLargest" argument, if non-zero, will be used to return the size of the |
| 38344 | 38344 | ** largest committed free block in the heap, in bytes. |
| 38345 | 38345 | */ |
| 38346 | -SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){ | |
| 38346 | +SQLITE_API int sqlite3_win32_compact_heap(LPUINT pnLargest){ | |
| 38347 | 38347 | int rc = SQLITE_OK; |
| 38348 | 38348 | UINT nLargest = 0; |
| 38349 | 38349 | HANDLE hHeap; |
| 38350 | 38350 | |
| 38351 | 38351 | winMemAssertMagic(); |
| @@ -38381,11 +38381,11 @@ | ||
| 38381 | 38381 | ** If a Win32 native heap has been configured, this function will attempt to |
| 38382 | 38382 | ** destroy and recreate it. If the Win32 native heap is not isolated and/or |
| 38383 | 38383 | ** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will |
| 38384 | 38384 | ** be returned and no changes will be made to the Win32 native heap. |
| 38385 | 38385 | */ |
| 38386 | -SQLITE_API int SQLITE_STDCALL sqlite3_win32_reset_heap(){ | |
| 38386 | +SQLITE_API int sqlite3_win32_reset_heap(){ | |
| 38387 | 38387 | int rc; |
| 38388 | 38388 | MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ |
| 38389 | 38389 | MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */ |
| 38390 | 38390 | MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); ) |
| 38391 | 38391 | MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); ) |
| @@ -38426,11 +38426,11 @@ | ||
| 38426 | 38426 | /* |
| 38427 | 38427 | ** This function outputs the specified (ANSI) string to the Win32 debugger |
| 38428 | 38428 | ** (if available). |
| 38429 | 38429 | */ |
| 38430 | 38430 | |
| 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){ | |
| 38432 | 38432 | char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE]; |
| 38433 | 38433 | int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */ |
| 38434 | 38434 | if( nMin<-1 ) nMin = -1; /* all negative values become -1. */ |
| 38435 | 38435 | assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE ); |
| 38436 | 38436 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -38472,11 +38472,11 @@ | ||
| 38472 | 38472 | */ |
| 38473 | 38473 | #if SQLITE_OS_WINRT |
| 38474 | 38474 | static HANDLE sleepObj = NULL; |
| 38475 | 38475 | #endif |
| 38476 | 38476 | |
| 38477 | -SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds){ | |
| 38477 | +SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds){ | |
| 38478 | 38478 | #if SQLITE_OS_WINRT |
| 38479 | 38479 | if ( sleepObj==NULL ){ |
| 38480 | 38480 | sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET, |
| 38481 | 38481 | SYNCHRONIZE); |
| 38482 | 38482 | } |
| @@ -38521,11 +38521,11 @@ | ||
| 38521 | 38521 | |
| 38522 | 38522 | /* |
| 38523 | 38523 | ** This function determines if the machine is running a version of Windows |
| 38524 | 38524 | ** based on the NT kernel. |
| 38525 | 38525 | */ |
| 38526 | -SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void){ | |
| 38526 | +SQLITE_API int sqlite3_win32_is_nt(void){ | |
| 38527 | 38527 | #if SQLITE_OS_WINRT |
| 38528 | 38528 | /* |
| 38529 | 38529 | ** NOTE: The WinRT sub-platform is always assumed to be based on the NT |
| 38530 | 38530 | ** kernel. |
| 38531 | 38531 | */ |
| @@ -38909,11 +38909,11 @@ | ||
| 38909 | 38909 | } |
| 38910 | 38910 | |
| 38911 | 38911 | /* |
| 38912 | 38912 | ** This is a public wrapper for the winUtf8ToUnicode() function. |
| 38913 | 38913 | */ |
| 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){ | |
| 38915 | 38915 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38916 | 38916 | if( !zText ){ |
| 38917 | 38917 | (void)SQLITE_MISUSE_BKPT; |
| 38918 | 38918 | return 0; |
| 38919 | 38919 | } |
| @@ -38925,11 +38925,11 @@ | ||
| 38925 | 38925 | } |
| 38926 | 38926 | |
| 38927 | 38927 | /* |
| 38928 | 38928 | ** This is a public wrapper for the winUnicodeToUtf8() function. |
| 38929 | 38929 | */ |
| 38930 | -SQLITE_API char *SQLITE_STDCALL sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){ | |
| 38930 | +SQLITE_API char *sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){ | |
| 38931 | 38931 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38932 | 38932 | if( !zWideText ){ |
| 38933 | 38933 | (void)SQLITE_MISUSE_BKPT; |
| 38934 | 38934 | return 0; |
| 38935 | 38935 | } |
| @@ -38941,11 +38941,11 @@ | ||
| 38941 | 38941 | } |
| 38942 | 38942 | |
| 38943 | 38943 | /* |
| 38944 | 38944 | ** This is a public wrapper for the winMbcsToUtf8() function. |
| 38945 | 38945 | */ |
| 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){ | |
| 38947 | 38947 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38948 | 38948 | if( !zText ){ |
| 38949 | 38949 | (void)SQLITE_MISUSE_BKPT; |
| 38950 | 38950 | return 0; |
| 38951 | 38951 | } |
| @@ -38957,11 +38957,11 @@ | ||
| 38957 | 38957 | } |
| 38958 | 38958 | |
| 38959 | 38959 | /* |
| 38960 | 38960 | ** This is a public wrapper for the winMbcsToUtf8() function. |
| 38961 | 38961 | */ |
| 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){ | |
| 38963 | 38963 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38964 | 38964 | if( !zText ){ |
| 38965 | 38965 | (void)SQLITE_MISUSE_BKPT; |
| 38966 | 38966 | return 0; |
| 38967 | 38967 | } |
| @@ -38973,11 +38973,11 @@ | ||
| 38973 | 38973 | } |
| 38974 | 38974 | |
| 38975 | 38975 | /* |
| 38976 | 38976 | ** This is a public wrapper for the winUtf8ToMbcs() function. |
| 38977 | 38977 | */ |
| 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){ | |
| 38979 | 38979 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38980 | 38980 | if( !zText ){ |
| 38981 | 38981 | (void)SQLITE_MISUSE_BKPT; |
| 38982 | 38982 | return 0; |
| 38983 | 38983 | } |
| @@ -38989,11 +38989,11 @@ | ||
| 38989 | 38989 | } |
| 38990 | 38990 | |
| 38991 | 38991 | /* |
| 38992 | 38992 | ** This is a public wrapper for the winUtf8ToMbcs() function. |
| 38993 | 38993 | */ |
| 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){ | |
| 38995 | 38995 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38996 | 38996 | if( !zText ){ |
| 38997 | 38997 | (void)SQLITE_MISUSE_BKPT; |
| 38998 | 38998 | return 0; |
| 38999 | 38999 | } |
| @@ -39009,11 +39009,11 @@ | ||
| 39009 | 39009 | ** the provided arguments. The type argument must be 1 in order to set the |
| 39010 | 39010 | ** data directory or 2 in order to set the temporary directory. The zValue |
| 39011 | 39011 | ** argument is the name of the directory to use. The return value will be |
| 39012 | 39012 | ** SQLITE_OK if successful. |
| 39013 | 39013 | */ |
| 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){ | |
| 39015 | 39015 | char **ppDirectory = 0; |
| 39016 | 39016 | #ifndef SQLITE_OMIT_AUTOINIT |
| 39017 | 39017 | int rc = sqlite3_initialize(); |
| 39018 | 39018 | if( rc ) return rc; |
| 39019 | 39019 | #endif |
| @@ -42927,11 +42927,11 @@ | ||
| 42927 | 42927 | } |
| 42928 | 42928 | |
| 42929 | 42929 | /* |
| 42930 | 42930 | ** Initialize and deinitialize the operating system interface. |
| 42931 | 42931 | */ |
| 42932 | -SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ | |
| 42932 | +SQLITE_API int sqlite3_os_init(void){ | |
| 42933 | 42933 | static sqlite3_vfs winVfs = { |
| 42934 | 42934 | 3, /* iVersion */ |
| 42935 | 42935 | sizeof(winFile), /* szOsFile */ |
| 42936 | 42936 | SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */ |
| 42937 | 42937 | 0, /* pNext */ |
| @@ -43058,11 +43058,11 @@ | ||
| 43058 | 43058 | #endif |
| 43059 | 43059 | |
| 43060 | 43060 | return SQLITE_OK; |
| 43061 | 43061 | } |
| 43062 | 43062 | |
| 43063 | -SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ | |
| 43063 | +SQLITE_API int sqlite3_os_end(void){ | |
| 43064 | 43064 | #if SQLITE_OS_WINRT |
| 43065 | 43065 | if( sleepObj!=NULL ){ |
| 43066 | 43066 | osCloseHandle(sleepObj); |
| 43067 | 43067 | sleepObj = NULL; |
| 43068 | 43068 | } |
| @@ -57083,11 +57083,11 @@ | ||
| 57083 | 57083 | |
| 57084 | 57084 | /* |
| 57085 | 57085 | ** Return a +ve value if snapshot p1 is newer than p2. A -ve value if |
| 57086 | 57086 | ** p1 is older than p2 and zero if p1 and p2 are the same snapshot. |
| 57087 | 57087 | */ |
| 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){ | |
| 57089 | 57089 | WalIndexHdr *pHdr1 = (WalIndexHdr*)p1; |
| 57090 | 57090 | WalIndexHdr *pHdr2 = (WalIndexHdr*)p2; |
| 57091 | 57091 | |
| 57092 | 57092 | /* aSalt[0] is a copy of the value stored in the wal file header. It |
| 57093 | 57093 | ** is incremented each time the wal file is restarted. */ |
| @@ -58220,11 +58220,11 @@ | ||
| 58220 | 58220 | ** |
| 58221 | 58221 | ** This routine has no effect on existing database connections. |
| 58222 | 58222 | ** The shared cache setting effects only future calls to |
| 58223 | 58223 | ** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). |
| 58224 | 58224 | */ |
| 58225 | -SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int enable){ | |
| 58225 | +SQLITE_API int sqlite3_enable_shared_cache(int enable){ | |
| 58226 | 58226 | sqlite3GlobalConfig.sharedCacheEnabled = enable; |
| 58227 | 58227 | return SQLITE_OK; |
| 58228 | 58228 | } |
| 58229 | 58229 | #endif |
| 58230 | 58230 | |
| @@ -67993,11 +67993,11 @@ | ||
| 67993 | 67993 | ** a pointer to the new sqlite3_backup object. |
| 67994 | 67994 | ** |
| 67995 | 67995 | ** If an error occurs, NULL is returned and an error code and error message |
| 67996 | 67996 | ** stored in database handle pDestDb. |
| 67997 | 67997 | */ |
| 67998 | -SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( | |
| 67998 | +SQLITE_API sqlite3_backup *sqlite3_backup_init( | |
| 67999 | 67999 | sqlite3* pDestDb, /* Database to write to */ |
| 68000 | 68000 | const char *zDestDb, /* Name of database within pDestDb */ |
| 68001 | 68001 | sqlite3* pSrcDb, /* Database connection to read from */ |
| 68002 | 68002 | const char *zSrcDb /* Name of database within pSrcDb */ |
| 68003 | 68003 | ){ |
| @@ -68201,11 +68201,11 @@ | ||
| 68201 | 68201 | } |
| 68202 | 68202 | |
| 68203 | 68203 | /* |
| 68204 | 68204 | ** Copy nPage pages from the source b-tree to the destination. |
| 68205 | 68205 | */ |
| 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){ | |
| 68207 | 68207 | int rc; |
| 68208 | 68208 | int destMode; /* Destination journal mode */ |
| 68209 | 68209 | int pgszSrc = 0; /* Source page size */ |
| 68210 | 68210 | int pgszDest = 0; /* Destination page size */ |
| 68211 | 68211 | |
| @@ -68445,11 +68445,11 @@ | ||
| 68445 | 68445 | } |
| 68446 | 68446 | |
| 68447 | 68447 | /* |
| 68448 | 68448 | ** Release all resources associated with an sqlite3_backup* handle. |
| 68449 | 68449 | */ |
| 68450 | -SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p){ | |
| 68450 | +SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p){ | |
| 68451 | 68451 | sqlite3_backup **pp; /* Ptr to head of pagers backup list */ |
| 68452 | 68452 | sqlite3 *pSrcDb; /* Source database connection */ |
| 68453 | 68453 | int rc; /* Value to return */ |
| 68454 | 68454 | |
| 68455 | 68455 | /* Enter the mutexes */ |
| @@ -68497,11 +68497,11 @@ | ||
| 68497 | 68497 | |
| 68498 | 68498 | /* |
| 68499 | 68499 | ** Return the number of pages still to be backed up as of the most recent |
| 68500 | 68500 | ** call to sqlite3_backup_step(). |
| 68501 | 68501 | */ |
| 68502 | -SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p){ | |
| 68502 | +SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p){ | |
| 68503 | 68503 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 68504 | 68504 | if( p==0 ){ |
| 68505 | 68505 | (void)SQLITE_MISUSE_BKPT; |
| 68506 | 68506 | return 0; |
| 68507 | 68507 | } |
| @@ -68511,11 +68511,11 @@ | ||
| 68511 | 68511 | |
| 68512 | 68512 | /* |
| 68513 | 68513 | ** Return the total number of pages in the source database as of the most |
| 68514 | 68514 | ** recent call to sqlite3_backup_step(). |
| 68515 | 68515 | */ |
| 68516 | -SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p){ | |
| 68516 | +SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p){ | |
| 68517 | 68517 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 68518 | 68518 | if( p==0 ){ |
| 68519 | 68519 | (void)SQLITE_MISUSE_BKPT; |
| 68520 | 68520 | return 0; |
| 68521 | 68521 | } |
| @@ -71450,16 +71450,25 @@ | ||
| 71450 | 71450 | ){ |
| 71451 | 71451 | const char *zOpName; |
| 71452 | 71452 | const char *zSynopsis; |
| 71453 | 71453 | int nOpName; |
| 71454 | 71454 | int ii, jj; |
| 71455 | + char zAlt[50]; | |
| 71455 | 71456 | zOpName = sqlite3OpcodeName(pOp->opcode); |
| 71456 | 71457 | nOpName = sqlite3Strlen30(zOpName); |
| 71457 | 71458 | if( zOpName[nOpName+1] ){ |
| 71458 | 71459 | int seenCom = 0; |
| 71459 | 71460 | char c; |
| 71460 | 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 | + } | |
| 71461 | 71470 | for(ii=jj=0; jj<nTemp-1 && (c = zSynopsis[ii])!=0; ii++){ |
| 71462 | 71471 | if( c=='P' ){ |
| 71463 | 71472 | c = zSynopsis[++ii]; |
| 71464 | 71473 | if( c=='4' ){ |
| 71465 | 71474 | sqlite3_snprintf(nTemp-jj, zTemp+jj, "%s", zP4); |
| @@ -74967,11 +74976,11 @@ | ||
| 74967 | 74976 | ** execution environment changes in a way that would alter the program |
| 74968 | 74977 | ** that sqlite3_prepare() generates. For example, if new functions or |
| 74969 | 74978 | ** collating sequences are registered or if an authorizer function is |
| 74970 | 74979 | ** added or changed. |
| 74971 | 74980 | */ |
| 74972 | -SQLITE_API int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt *pStmt){ | |
| 74981 | +SQLITE_API int sqlite3_expired(sqlite3_stmt *pStmt){ | |
| 74973 | 74982 | Vdbe *p = (Vdbe*)pStmt; |
| 74974 | 74983 | return p==0 || p->expired; |
| 74975 | 74984 | } |
| 74976 | 74985 | #endif |
| 74977 | 74986 | |
| @@ -75036,11 +75045,11 @@ | ||
| 75036 | 75045 | ** machine. |
| 75037 | 75046 | ** |
| 75038 | 75047 | ** This routine sets the error code and string returned by |
| 75039 | 75048 | ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). |
| 75040 | 75049 | */ |
| 75041 | -SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt){ | |
| 75050 | +SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt){ | |
| 75042 | 75051 | int rc; |
| 75043 | 75052 | if( pStmt==0 ){ |
| 75044 | 75053 | /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL |
| 75045 | 75054 | ** pointer is a harmless no-op. */ |
| 75046 | 75055 | rc = SQLITE_OK; |
| @@ -75063,11 +75072,11 @@ | ||
| 75063 | 75072 | ** the prior execution is returned. |
| 75064 | 75073 | ** |
| 75065 | 75074 | ** This routine sets the error code and string returned by |
| 75066 | 75075 | ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). |
| 75067 | 75076 | */ |
| 75068 | -SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt){ | |
| 75077 | +SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt){ | |
| 75069 | 75078 | int rc; |
| 75070 | 75079 | if( pStmt==0 ){ |
| 75071 | 75080 | rc = SQLITE_OK; |
| 75072 | 75081 | }else{ |
| 75073 | 75082 | Vdbe *v = (Vdbe*)pStmt; |
| @@ -75084,11 +75093,11 @@ | ||
| 75084 | 75093 | } |
| 75085 | 75094 | |
| 75086 | 75095 | /* |
| 75087 | 75096 | ** Set all the parameters in the compiled SQL statement to NULL. |
| 75088 | 75097 | */ |
| 75089 | -SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){ | |
| 75098 | +SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *pStmt){ | |
| 75090 | 75099 | int i; |
| 75091 | 75100 | int rc = SQLITE_OK; |
| 75092 | 75101 | Vdbe *p = (Vdbe*)pStmt; |
| 75093 | 75102 | #if SQLITE_THREADSAFE |
| 75094 | 75103 | sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex; |
| @@ -75108,11 +75117,11 @@ | ||
| 75108 | 75117 | |
| 75109 | 75118 | /**************************** sqlite3_value_ ******************************* |
| 75110 | 75119 | ** The following routines extract information from a Mem or sqlite3_value |
| 75111 | 75120 | ** structure. |
| 75112 | 75121 | */ |
| 75113 | -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){ | |
| 75122 | +SQLITE_API const void *sqlite3_value_blob(sqlite3_value *pVal){ | |
| 75114 | 75123 | Mem *p = (Mem*)pVal; |
| 75115 | 75124 | if( p->flags & (MEM_Blob|MEM_Str) ){ |
| 75116 | 75125 | if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){ |
| 75117 | 75126 | assert( p->flags==MEM_Null && p->z==0 ); |
| 75118 | 75127 | return 0; |
| @@ -75121,48 +75130,48 @@ | ||
| 75121 | 75130 | return p->n ? p->z : 0; |
| 75122 | 75131 | }else{ |
| 75123 | 75132 | return sqlite3_value_text(pVal); |
| 75124 | 75133 | } |
| 75125 | 75134 | } |
| 75126 | -SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value *pVal){ | |
| 75135 | +SQLITE_API int sqlite3_value_bytes(sqlite3_value *pVal){ | |
| 75127 | 75136 | return sqlite3ValueBytes(pVal, SQLITE_UTF8); |
| 75128 | 75137 | } |
| 75129 | -SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value *pVal){ | |
| 75138 | +SQLITE_API int sqlite3_value_bytes16(sqlite3_value *pVal){ | |
| 75130 | 75139 | return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE); |
| 75131 | 75140 | } |
| 75132 | -SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value *pVal){ | |
| 75141 | +SQLITE_API double sqlite3_value_double(sqlite3_value *pVal){ | |
| 75133 | 75142 | return sqlite3VdbeRealValue((Mem*)pVal); |
| 75134 | 75143 | } |
| 75135 | -SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value *pVal){ | |
| 75144 | +SQLITE_API int sqlite3_value_int(sqlite3_value *pVal){ | |
| 75136 | 75145 | return (int)sqlite3VdbeIntValue((Mem*)pVal); |
| 75137 | 75146 | } |
| 75138 | -SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value *pVal){ | |
| 75147 | +SQLITE_API sqlite_int64 sqlite3_value_int64(sqlite3_value *pVal){ | |
| 75139 | 75148 | return sqlite3VdbeIntValue((Mem*)pVal); |
| 75140 | 75149 | } |
| 75141 | -SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value *pVal){ | |
| 75150 | +SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value *pVal){ | |
| 75142 | 75151 | Mem *pMem = (Mem*)pVal; |
| 75143 | 75152 | return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0); |
| 75144 | 75153 | } |
| 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){ | |
| 75146 | 75155 | return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8); |
| 75147 | 75156 | } |
| 75148 | 75157 | #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){ | |
| 75150 | 75159 | return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE); |
| 75151 | 75160 | } |
| 75152 | -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value *pVal){ | |
| 75161 | +SQLITE_API const void *sqlite3_value_text16be(sqlite3_value *pVal){ | |
| 75153 | 75162 | return sqlite3ValueText(pVal, SQLITE_UTF16BE); |
| 75154 | 75163 | } |
| 75155 | -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value *pVal){ | |
| 75164 | +SQLITE_API const void *sqlite3_value_text16le(sqlite3_value *pVal){ | |
| 75156 | 75165 | return sqlite3ValueText(pVal, SQLITE_UTF16LE); |
| 75157 | 75166 | } |
| 75158 | 75167 | #endif /* SQLITE_OMIT_UTF16 */ |
| 75159 | 75168 | /* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five |
| 75160 | 75169 | ** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating |
| 75161 | 75170 | ** point number string BLOB NULL |
| 75162 | 75171 | */ |
| 75163 | -SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value* pVal){ | |
| 75172 | +SQLITE_API int sqlite3_value_type(sqlite3_value* pVal){ | |
| 75164 | 75173 | static const u8 aType[] = { |
| 75165 | 75174 | SQLITE_BLOB, /* 0x00 */ |
| 75166 | 75175 | SQLITE_NULL, /* 0x01 */ |
| 75167 | 75176 | SQLITE_TEXT, /* 0x02 */ |
| 75168 | 75177 | SQLITE_NULL, /* 0x03 */ |
| @@ -75198,11 +75207,11 @@ | ||
| 75198 | 75207 | return aType[pVal->flags&MEM_AffMask]; |
| 75199 | 75208 | } |
| 75200 | 75209 | |
| 75201 | 75210 | /* Make a copy of an sqlite3_value object |
| 75202 | 75211 | */ |
| 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){ | |
| 75204 | 75213 | sqlite3_value *pNew; |
| 75205 | 75214 | if( pOrig==0 ) return 0; |
| 75206 | 75215 | pNew = sqlite3_malloc( sizeof(*pNew) ); |
| 75207 | 75216 | if( pNew==0 ) return 0; |
| 75208 | 75217 | memset(pNew, 0, sizeof(*pNew)); |
| @@ -75221,11 +75230,11 @@ | ||
| 75221 | 75230 | } |
| 75222 | 75231 | |
| 75223 | 75232 | /* Destroy an sqlite3_value object previously obtained from |
| 75224 | 75233 | ** sqlite3_value_dup(). |
| 75225 | 75234 | */ |
| 75226 | -SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value *pOld){ | |
| 75235 | +SQLITE_API void sqlite3_value_free(sqlite3_value *pOld){ | |
| 75227 | 75236 | sqlite3ValueFree(pOld); |
| 75228 | 75237 | } |
| 75229 | 75238 | |
| 75230 | 75239 | |
| 75231 | 75240 | /**************************** sqlite3_result_ ******************************* |
| @@ -75264,21 +75273,21 @@ | ||
| 75264 | 75273 | xDel((void*)p); |
| 75265 | 75274 | } |
| 75266 | 75275 | if( pCtx ) sqlite3_result_error_toobig(pCtx); |
| 75267 | 75276 | return SQLITE_TOOBIG; |
| 75268 | 75277 | } |
| 75269 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_blob( | |
| 75278 | +SQLITE_API void sqlite3_result_blob( | |
| 75270 | 75279 | sqlite3_context *pCtx, |
| 75271 | 75280 | const void *z, |
| 75272 | 75281 | int n, |
| 75273 | 75282 | void (*xDel)(void *) |
| 75274 | 75283 | ){ |
| 75275 | 75284 | assert( n>=0 ); |
| 75276 | 75285 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75277 | 75286 | setResultStrOrError(pCtx, z, n, 0, xDel); |
| 75278 | 75287 | } |
| 75279 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64( | |
| 75288 | +SQLITE_API void sqlite3_result_blob64( | |
| 75280 | 75289 | sqlite3_context *pCtx, |
| 75281 | 75290 | const void *z, |
| 75282 | 75291 | sqlite3_uint64 n, |
| 75283 | 75292 | void (*xDel)(void *) |
| 75284 | 75293 | ){ |
| @@ -75288,56 +75297,56 @@ | ||
| 75288 | 75297 | (void)invokeValueDestructor(z, xDel, pCtx); |
| 75289 | 75298 | }else{ |
| 75290 | 75299 | setResultStrOrError(pCtx, z, (int)n, 0, xDel); |
| 75291 | 75300 | } |
| 75292 | 75301 | } |
| 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){ | |
| 75294 | 75303 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75295 | 75304 | sqlite3VdbeMemSetDouble(pCtx->pOut, rVal); |
| 75296 | 75305 | } |
| 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){ | |
| 75298 | 75307 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75299 | 75308 | pCtx->isError = SQLITE_ERROR; |
| 75300 | 75309 | pCtx->fErrorOrAux = 1; |
| 75301 | 75310 | sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT); |
| 75302 | 75311 | } |
| 75303 | 75312 | #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){ | |
| 75305 | 75314 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75306 | 75315 | pCtx->isError = SQLITE_ERROR; |
| 75307 | 75316 | pCtx->fErrorOrAux = 1; |
| 75308 | 75317 | sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT); |
| 75309 | 75318 | } |
| 75310 | 75319 | #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){ | |
| 75312 | 75321 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75313 | 75322 | sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal); |
| 75314 | 75323 | } |
| 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){ | |
| 75316 | 75325 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75317 | 75326 | sqlite3VdbeMemSetInt64(pCtx->pOut, iVal); |
| 75318 | 75327 | } |
| 75319 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context *pCtx){ | |
| 75328 | +SQLITE_API void sqlite3_result_null(sqlite3_context *pCtx){ | |
| 75320 | 75329 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75321 | 75330 | sqlite3VdbeMemSetNull(pCtx->pOut); |
| 75322 | 75331 | } |
| 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){ | |
| 75324 | 75333 | Mem *pOut = pCtx->pOut; |
| 75325 | 75334 | assert( sqlite3_mutex_held(pOut->db->mutex) ); |
| 75326 | 75335 | pOut->eSubtype = eSubtype & 0xff; |
| 75327 | 75336 | pOut->flags |= MEM_Subtype; |
| 75328 | 75337 | } |
| 75329 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text( | |
| 75338 | +SQLITE_API void sqlite3_result_text( | |
| 75330 | 75339 | sqlite3_context *pCtx, |
| 75331 | 75340 | const char *z, |
| 75332 | 75341 | int n, |
| 75333 | 75342 | void (*xDel)(void *) |
| 75334 | 75343 | ){ |
| 75335 | 75344 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75336 | 75345 | setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel); |
| 75337 | 75346 | } |
| 75338 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text64( | |
| 75347 | +SQLITE_API void sqlite3_result_text64( | |
| 75339 | 75348 | sqlite3_context *pCtx, |
| 75340 | 75349 | const char *z, |
| 75341 | 75350 | sqlite3_uint64 n, |
| 75342 | 75351 | void (*xDel)(void *), |
| 75343 | 75352 | unsigned char enc |
| @@ -75350,56 +75359,56 @@ | ||
| 75350 | 75359 | }else{ |
| 75351 | 75360 | setResultStrOrError(pCtx, z, (int)n, enc, xDel); |
| 75352 | 75361 | } |
| 75353 | 75362 | } |
| 75354 | 75363 | #ifndef SQLITE_OMIT_UTF16 |
| 75355 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16( | |
| 75364 | +SQLITE_API void sqlite3_result_text16( | |
| 75356 | 75365 | sqlite3_context *pCtx, |
| 75357 | 75366 | const void *z, |
| 75358 | 75367 | int n, |
| 75359 | 75368 | void (*xDel)(void *) |
| 75360 | 75369 | ){ |
| 75361 | 75370 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75362 | 75371 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel); |
| 75363 | 75372 | } |
| 75364 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be( | |
| 75373 | +SQLITE_API void sqlite3_result_text16be( | |
| 75365 | 75374 | sqlite3_context *pCtx, |
| 75366 | 75375 | const void *z, |
| 75367 | 75376 | int n, |
| 75368 | 75377 | void (*xDel)(void *) |
| 75369 | 75378 | ){ |
| 75370 | 75379 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75371 | 75380 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel); |
| 75372 | 75381 | } |
| 75373 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le( | |
| 75382 | +SQLITE_API void sqlite3_result_text16le( | |
| 75374 | 75383 | sqlite3_context *pCtx, |
| 75375 | 75384 | const void *z, |
| 75376 | 75385 | int n, |
| 75377 | 75386 | void (*xDel)(void *) |
| 75378 | 75387 | ){ |
| 75379 | 75388 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75380 | 75389 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel); |
| 75381 | 75390 | } |
| 75382 | 75391 | #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){ | |
| 75384 | 75393 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75385 | 75394 | sqlite3VdbeMemCopy(pCtx->pOut, pValue); |
| 75386 | 75395 | } |
| 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){ | |
| 75388 | 75397 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75389 | 75398 | sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n); |
| 75390 | 75399 | } |
| 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){ | |
| 75392 | 75401 | Mem *pOut = pCtx->pOut; |
| 75393 | 75402 | assert( sqlite3_mutex_held(pOut->db->mutex) ); |
| 75394 | 75403 | if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){ |
| 75395 | 75404 | return SQLITE_TOOBIG; |
| 75396 | 75405 | } |
| 75397 | 75406 | sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n); |
| 75398 | 75407 | return SQLITE_OK; |
| 75399 | 75408 | } |
| 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){ | |
| 75401 | 75410 | pCtx->isError = errCode; |
| 75402 | 75411 | pCtx->fErrorOrAux = 1; |
| 75403 | 75412 | #ifdef SQLITE_DEBUG |
| 75404 | 75413 | if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode; |
| 75405 | 75414 | #endif |
| @@ -75408,20 +75417,20 @@ | ||
| 75408 | 75417 | SQLITE_UTF8, SQLITE_STATIC); |
| 75409 | 75418 | } |
| 75410 | 75419 | } |
| 75411 | 75420 | |
| 75412 | 75421 | /* 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){ | |
| 75414 | 75423 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75415 | 75424 | pCtx->isError = SQLITE_TOOBIG; |
| 75416 | 75425 | pCtx->fErrorOrAux = 1; |
| 75417 | 75426 | sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1, |
| 75418 | 75427 | SQLITE_UTF8, SQLITE_STATIC); |
| 75419 | 75428 | } |
| 75420 | 75429 | |
| 75421 | 75430 | /* 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){ | |
| 75423 | 75432 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75424 | 75433 | sqlite3VdbeMemSetNull(pCtx->pOut); |
| 75425 | 75434 | pCtx->isError = SQLITE_NOMEM_BKPT; |
| 75426 | 75435 | pCtx->fErrorOrAux = 1; |
| 75427 | 75436 | sqlite3OomFault(pCtx->pOut->db); |
| @@ -75589,11 +75598,11 @@ | ||
| 75589 | 75598 | /* |
| 75590 | 75599 | ** This is the top-level implementation of sqlite3_step(). Call |
| 75591 | 75600 | ** sqlite3Step() to do most of the work. If a schema error occurs, |
| 75592 | 75601 | ** call sqlite3Reprepare() and try again. |
| 75593 | 75602 | */ |
| 75594 | -SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt *pStmt){ | |
| 75603 | +SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){ | |
| 75595 | 75604 | int rc = SQLITE_OK; /* Result from sqlite3Step() */ |
| 75596 | 75605 | int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */ |
| 75597 | 75606 | Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */ |
| 75598 | 75607 | int cnt = 0; /* Counter to prevent infinite loop of reprepares */ |
| 75599 | 75608 | sqlite3 *db; /* The database connection */ |
| @@ -75640,11 +75649,11 @@ | ||
| 75640 | 75649 | |
| 75641 | 75650 | /* |
| 75642 | 75651 | ** Extract the user data from a sqlite3_context structure and return a |
| 75643 | 75652 | ** pointer to it. |
| 75644 | 75653 | */ |
| 75645 | -SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context *p){ | |
| 75654 | +SQLITE_API void *sqlite3_user_data(sqlite3_context *p){ | |
| 75646 | 75655 | assert( p && p->pFunc ); |
| 75647 | 75656 | return p->pFunc->pUserData; |
| 75648 | 75657 | } |
| 75649 | 75658 | |
| 75650 | 75659 | /* |
| @@ -75655,11 +75664,11 @@ | ||
| 75655 | 75664 | ** returns a copy of the pointer to the database connection (the 1st |
| 75656 | 75665 | ** parameter) of the sqlite3_create_function() and |
| 75657 | 75666 | ** sqlite3_create_function16() routines that originally registered the |
| 75658 | 75667 | ** application defined function. |
| 75659 | 75668 | */ |
| 75660 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context *p){ | |
| 75669 | +SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){ | |
| 75661 | 75670 | assert( p && p->pOut ); |
| 75662 | 75671 | return p->pOut->db; |
| 75663 | 75672 | } |
| 75664 | 75673 | |
| 75665 | 75674 | /* |
| @@ -75731,11 +75740,11 @@ | ||
| 75731 | 75740 | /* |
| 75732 | 75741 | ** Allocate or return the aggregate context for a user function. A new |
| 75733 | 75742 | ** context is allocated on the first call. Subsequent calls return the |
| 75734 | 75743 | ** same context that was returned on prior calls. |
| 75735 | 75744 | */ |
| 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){ | |
| 75737 | 75746 | assert( p && p->pFunc && p->pFunc->xFinalize ); |
| 75738 | 75747 | assert( sqlite3_mutex_held(p->pOut->db->mutex) ); |
| 75739 | 75748 | testcase( nByte<0 ); |
| 75740 | 75749 | if( (p->pMem->flags & MEM_Agg)==0 ){ |
| 75741 | 75750 | return createAggContext(p, nByte); |
| @@ -75746,11 +75755,11 @@ | ||
| 75746 | 75755 | |
| 75747 | 75756 | /* |
| 75748 | 75757 | ** Return the auxiliary data pointer, if any, for the iArg'th argument to |
| 75749 | 75758 | ** the user-function defined by pCtx. |
| 75750 | 75759 | */ |
| 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){ | |
| 75752 | 75761 | AuxData *pAuxData; |
| 75753 | 75762 | |
| 75754 | 75763 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75755 | 75764 | #if SQLITE_ENABLE_STAT3_OR_STAT4 |
| 75756 | 75765 | if( pCtx->pVdbe==0 ) return 0; |
| @@ -75767,11 +75776,11 @@ | ||
| 75767 | 75776 | /* |
| 75768 | 75777 | ** Set the auxiliary data pointer and delete function, for the iArg'th |
| 75769 | 75778 | ** argument to the user-function defined by pCtx. Any previous value is |
| 75770 | 75779 | ** deleted by calling the delete function specified when it was set. |
| 75771 | 75780 | */ |
| 75772 | -SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata( | |
| 75781 | +SQLITE_API void sqlite3_set_auxdata( | |
| 75773 | 75782 | sqlite3_context *pCtx, |
| 75774 | 75783 | int iArg, |
| 75775 | 75784 | void *pAux, |
| 75776 | 75785 | void (*xDelete)(void*) |
| 75777 | 75786 | ){ |
| @@ -75822,29 +75831,29 @@ | ||
| 75822 | 75831 | ** This function is deprecated. Do not use it for new code. It is |
| 75823 | 75832 | ** provide only to avoid breaking legacy code. New aggregate function |
| 75824 | 75833 | ** implementations should keep their own counts within their aggregate |
| 75825 | 75834 | ** context. |
| 75826 | 75835 | */ |
| 75827 | -SQLITE_API int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context *p){ | |
| 75836 | +SQLITE_API int sqlite3_aggregate_count(sqlite3_context *p){ | |
| 75828 | 75837 | assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize ); |
| 75829 | 75838 | return p->pMem->n; |
| 75830 | 75839 | } |
| 75831 | 75840 | #endif |
| 75832 | 75841 | |
| 75833 | 75842 | /* |
| 75834 | 75843 | ** Return the number of columns in the result set for the statement pStmt. |
| 75835 | 75844 | */ |
| 75836 | -SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt){ | |
| 75845 | +SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt){ | |
| 75837 | 75846 | Vdbe *pVm = (Vdbe *)pStmt; |
| 75838 | 75847 | return pVm ? pVm->nResColumn : 0; |
| 75839 | 75848 | } |
| 75840 | 75849 | |
| 75841 | 75850 | /* |
| 75842 | 75851 | ** Return the number of values available from the current row of the |
| 75843 | 75852 | ** currently executing statement pStmt. |
| 75844 | 75853 | */ |
| 75845 | -SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt){ | |
| 75854 | +SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt){ | |
| 75846 | 75855 | Vdbe *pVm = (Vdbe *)pStmt; |
| 75847 | 75856 | if( pVm==0 || pVm->pResultSet==0 ) return 0; |
| 75848 | 75857 | return pVm->nResColumn; |
| 75849 | 75858 | } |
| 75850 | 75859 | |
| @@ -75943,67 +75952,67 @@ | ||
| 75943 | 75952 | |
| 75944 | 75953 | /**************************** sqlite3_column_ ******************************* |
| 75945 | 75954 | ** The following routines are used to access elements of the current row |
| 75946 | 75955 | ** in the result set. |
| 75947 | 75956 | */ |
| 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){ | |
| 75949 | 75958 | const void *val; |
| 75950 | 75959 | val = sqlite3_value_blob( columnMem(pStmt,i) ); |
| 75951 | 75960 | /* Even though there is no encoding conversion, value_blob() might |
| 75952 | 75961 | ** need to call malloc() to expand the result of a zeroblob() |
| 75953 | 75962 | ** expression. |
| 75954 | 75963 | */ |
| 75955 | 75964 | columnMallocFailure(pStmt); |
| 75956 | 75965 | return val; |
| 75957 | 75966 | } |
| 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){ | |
| 75959 | 75968 | int val = sqlite3_value_bytes( columnMem(pStmt,i) ); |
| 75960 | 75969 | columnMallocFailure(pStmt); |
| 75961 | 75970 | return val; |
| 75962 | 75971 | } |
| 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){ | |
| 75964 | 75973 | int val = sqlite3_value_bytes16( columnMem(pStmt,i) ); |
| 75965 | 75974 | columnMallocFailure(pStmt); |
| 75966 | 75975 | return val; |
| 75967 | 75976 | } |
| 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){ | |
| 75969 | 75978 | double val = sqlite3_value_double( columnMem(pStmt,i) ); |
| 75970 | 75979 | columnMallocFailure(pStmt); |
| 75971 | 75980 | return val; |
| 75972 | 75981 | } |
| 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){ | |
| 75974 | 75983 | int val = sqlite3_value_int( columnMem(pStmt,i) ); |
| 75975 | 75984 | columnMallocFailure(pStmt); |
| 75976 | 75985 | return val; |
| 75977 | 75986 | } |
| 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){ | |
| 75979 | 75988 | sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) ); |
| 75980 | 75989 | columnMallocFailure(pStmt); |
| 75981 | 75990 | return val; |
| 75982 | 75991 | } |
| 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){ | |
| 75984 | 75993 | const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) ); |
| 75985 | 75994 | columnMallocFailure(pStmt); |
| 75986 | 75995 | return val; |
| 75987 | 75996 | } |
| 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){ | |
| 75989 | 75998 | Mem *pOut = columnMem(pStmt, i); |
| 75990 | 75999 | if( pOut->flags&MEM_Static ){ |
| 75991 | 76000 | pOut->flags &= ~MEM_Static; |
| 75992 | 76001 | pOut->flags |= MEM_Ephem; |
| 75993 | 76002 | } |
| 75994 | 76003 | columnMallocFailure(pStmt); |
| 75995 | 76004 | return (sqlite3_value *)pOut; |
| 75996 | 76005 | } |
| 75997 | 76006 | #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){ | |
| 75999 | 76008 | const void *val = sqlite3_value_text16( columnMem(pStmt,i) ); |
| 76000 | 76009 | columnMallocFailure(pStmt); |
| 76001 | 76010 | return val; |
| 76002 | 76011 | } |
| 76003 | 76012 | #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){ | |
| 76005 | 76014 | int iType = sqlite3_value_type( columnMem(pStmt,i) ); |
| 76006 | 76015 | columnMallocFailure(pStmt); |
| 76007 | 76016 | return iType; |
| 76008 | 76017 | } |
| 76009 | 76018 | |
| @@ -76063,16 +76072,16 @@ | ||
| 76063 | 76072 | |
| 76064 | 76073 | /* |
| 76065 | 76074 | ** Return the name of the Nth column of the result set returned by SQL |
| 76066 | 76075 | ** statement pStmt. |
| 76067 | 76076 | */ |
| 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){ | |
| 76069 | 76078 | return columnName( |
| 76070 | 76079 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME); |
| 76071 | 76080 | } |
| 76072 | 76081 | #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){ | |
| 76074 | 76083 | return columnName( |
| 76075 | 76084 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME); |
| 76076 | 76085 | } |
| 76077 | 76086 | #endif |
| 76078 | 76087 | |
| @@ -76088,16 +76097,16 @@ | ||
| 76088 | 76097 | #ifndef SQLITE_OMIT_DECLTYPE |
| 76089 | 76098 | /* |
| 76090 | 76099 | ** Return the column declaration type (if applicable) of the 'i'th column |
| 76091 | 76100 | ** of the result set of SQL statement pStmt. |
| 76092 | 76101 | */ |
| 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){ | |
| 76094 | 76103 | return columnName( |
| 76095 | 76104 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE); |
| 76096 | 76105 | } |
| 76097 | 76106 | #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){ | |
| 76099 | 76108 | return columnName( |
| 76100 | 76109 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE); |
| 76101 | 76110 | } |
| 76102 | 76111 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76103 | 76112 | #endif /* SQLITE_OMIT_DECLTYPE */ |
| @@ -76106,16 +76115,16 @@ | ||
| 76106 | 76115 | /* |
| 76107 | 76116 | ** Return the name of the database from which a result column derives. |
| 76108 | 76117 | ** NULL is returned if the result column is an expression or constant or |
| 76109 | 76118 | ** anything else which is not an unambiguous reference to a database column. |
| 76110 | 76119 | */ |
| 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){ | |
| 76112 | 76121 | return columnName( |
| 76113 | 76122 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE); |
| 76114 | 76123 | } |
| 76115 | 76124 | #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){ | |
| 76117 | 76126 | return columnName( |
| 76118 | 76127 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE); |
| 76119 | 76128 | } |
| 76120 | 76129 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76121 | 76130 | |
| @@ -76122,16 +76131,16 @@ | ||
| 76122 | 76131 | /* |
| 76123 | 76132 | ** Return the name of the table from which a result column derives. |
| 76124 | 76133 | ** NULL is returned if the result column is an expression or constant or |
| 76125 | 76134 | ** anything else which is not an unambiguous reference to a database column. |
| 76126 | 76135 | */ |
| 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){ | |
| 76128 | 76137 | return columnName( |
| 76129 | 76138 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE); |
| 76130 | 76139 | } |
| 76131 | 76140 | #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){ | |
| 76133 | 76142 | return columnName( |
| 76134 | 76143 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE); |
| 76135 | 76144 | } |
| 76136 | 76145 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76137 | 76146 | |
| @@ -76138,16 +76147,16 @@ | ||
| 76138 | 76147 | /* |
| 76139 | 76148 | ** Return the name of the table column from which a result column derives. |
| 76140 | 76149 | ** NULL is returned if the result column is an expression or constant or |
| 76141 | 76150 | ** anything else which is not an unambiguous reference to a database column. |
| 76142 | 76151 | */ |
| 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){ | |
| 76144 | 76153 | return columnName( |
| 76145 | 76154 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN); |
| 76146 | 76155 | } |
| 76147 | 76156 | #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){ | |
| 76149 | 76158 | return columnName( |
| 76150 | 76159 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN); |
| 76151 | 76160 | } |
| 76152 | 76161 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76153 | 76162 | #endif /* SQLITE_ENABLE_COLUMN_METADATA */ |
| @@ -76244,11 +76253,11 @@ | ||
| 76244 | 76253 | |
| 76245 | 76254 | |
| 76246 | 76255 | /* |
| 76247 | 76256 | ** Bind a blob value to an SQL statement variable. |
| 76248 | 76257 | */ |
| 76249 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob( | |
| 76258 | +SQLITE_API int sqlite3_bind_blob( | |
| 76250 | 76259 | sqlite3_stmt *pStmt, |
| 76251 | 76260 | int i, |
| 76252 | 76261 | const void *zData, |
| 76253 | 76262 | int nData, |
| 76254 | 76263 | void (*xDel)(void*) |
| @@ -76256,11 +76265,11 @@ | ||
| 76256 | 76265 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76257 | 76266 | if( nData<0 ) return SQLITE_MISUSE_BKPT; |
| 76258 | 76267 | #endif |
| 76259 | 76268 | return bindText(pStmt, i, zData, nData, xDel, 0); |
| 76260 | 76269 | } |
| 76261 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64( | |
| 76270 | +SQLITE_API int sqlite3_bind_blob64( | |
| 76262 | 76271 | sqlite3_stmt *pStmt, |
| 76263 | 76272 | int i, |
| 76264 | 76273 | const void *zData, |
| 76265 | 76274 | sqlite3_uint64 nData, |
| 76266 | 76275 | void (*xDel)(void*) |
| @@ -76270,52 +76279,52 @@ | ||
| 76270 | 76279 | return invokeValueDestructor(zData, xDel, 0); |
| 76271 | 76280 | }else{ |
| 76272 | 76281 | return bindText(pStmt, i, zData, (int)nData, xDel, 0); |
| 76273 | 76282 | } |
| 76274 | 76283 | } |
| 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){ | |
| 76276 | 76285 | int rc; |
| 76277 | 76286 | Vdbe *p = (Vdbe *)pStmt; |
| 76278 | 76287 | rc = vdbeUnbind(p, i); |
| 76279 | 76288 | if( rc==SQLITE_OK ){ |
| 76280 | 76289 | sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue); |
| 76281 | 76290 | sqlite3_mutex_leave(p->db->mutex); |
| 76282 | 76291 | } |
| 76283 | 76292 | return rc; |
| 76284 | 76293 | } |
| 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){ | |
| 76286 | 76295 | return sqlite3_bind_int64(p, i, (i64)iValue); |
| 76287 | 76296 | } |
| 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){ | |
| 76289 | 76298 | int rc; |
| 76290 | 76299 | Vdbe *p = (Vdbe *)pStmt; |
| 76291 | 76300 | rc = vdbeUnbind(p, i); |
| 76292 | 76301 | if( rc==SQLITE_OK ){ |
| 76293 | 76302 | sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue); |
| 76294 | 76303 | sqlite3_mutex_leave(p->db->mutex); |
| 76295 | 76304 | } |
| 76296 | 76305 | return rc; |
| 76297 | 76306 | } |
| 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){ | |
| 76299 | 76308 | int rc; |
| 76300 | 76309 | Vdbe *p = (Vdbe*)pStmt; |
| 76301 | 76310 | rc = vdbeUnbind(p, i); |
| 76302 | 76311 | if( rc==SQLITE_OK ){ |
| 76303 | 76312 | sqlite3_mutex_leave(p->db->mutex); |
| 76304 | 76313 | } |
| 76305 | 76314 | return rc; |
| 76306 | 76315 | } |
| 76307 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text( | |
| 76316 | +SQLITE_API int sqlite3_bind_text( | |
| 76308 | 76317 | sqlite3_stmt *pStmt, |
| 76309 | 76318 | int i, |
| 76310 | 76319 | const char *zData, |
| 76311 | 76320 | int nData, |
| 76312 | 76321 | void (*xDel)(void*) |
| 76313 | 76322 | ){ |
| 76314 | 76323 | return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8); |
| 76315 | 76324 | } |
| 76316 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64( | |
| 76325 | +SQLITE_API int sqlite3_bind_text64( | |
| 76317 | 76326 | sqlite3_stmt *pStmt, |
| 76318 | 76327 | int i, |
| 76319 | 76328 | const char *zData, |
| 76320 | 76329 | sqlite3_uint64 nData, |
| 76321 | 76330 | void (*xDel)(void*), |
| @@ -76328,21 +76337,21 @@ | ||
| 76328 | 76337 | if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE; |
| 76329 | 76338 | return bindText(pStmt, i, zData, (int)nData, xDel, enc); |
| 76330 | 76339 | } |
| 76331 | 76340 | } |
| 76332 | 76341 | #ifndef SQLITE_OMIT_UTF16 |
| 76333 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16( | |
| 76342 | +SQLITE_API int sqlite3_bind_text16( | |
| 76334 | 76343 | sqlite3_stmt *pStmt, |
| 76335 | 76344 | int i, |
| 76336 | 76345 | const void *zData, |
| 76337 | 76346 | int nData, |
| 76338 | 76347 | void (*xDel)(void*) |
| 76339 | 76348 | ){ |
| 76340 | 76349 | return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE); |
| 76341 | 76350 | } |
| 76342 | 76351 | #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){ | |
| 76344 | 76353 | int rc; |
| 76345 | 76354 | switch( sqlite3_value_type((sqlite3_value*)pValue) ){ |
| 76346 | 76355 | case SQLITE_INTEGER: { |
| 76347 | 76356 | rc = sqlite3_bind_int64(pStmt, i, pValue->u.i); |
| 76348 | 76357 | break; |
| @@ -76369,21 +76378,21 @@ | ||
| 76369 | 76378 | break; |
| 76370 | 76379 | } |
| 76371 | 76380 | } |
| 76372 | 76381 | return rc; |
| 76373 | 76382 | } |
| 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){ | |
| 76375 | 76384 | int rc; |
| 76376 | 76385 | Vdbe *p = (Vdbe *)pStmt; |
| 76377 | 76386 | rc = vdbeUnbind(p, i); |
| 76378 | 76387 | if( rc==SQLITE_OK ){ |
| 76379 | 76388 | sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n); |
| 76380 | 76389 | sqlite3_mutex_leave(p->db->mutex); |
| 76381 | 76390 | } |
| 76382 | 76391 | return rc; |
| 76383 | 76392 | } |
| 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){ | |
| 76385 | 76394 | int rc; |
| 76386 | 76395 | Vdbe *p = (Vdbe *)pStmt; |
| 76387 | 76396 | sqlite3_mutex_enter(p->db->mutex); |
| 76388 | 76397 | if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){ |
| 76389 | 76398 | rc = SQLITE_TOOBIG; |
| @@ -76398,11 +76407,11 @@ | ||
| 76398 | 76407 | |
| 76399 | 76408 | /* |
| 76400 | 76409 | ** Return the number of wildcards that can be potentially bound to. |
| 76401 | 76410 | ** This routine is added to support DBD::SQLite. |
| 76402 | 76411 | */ |
| 76403 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ | |
| 76412 | +SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ | |
| 76404 | 76413 | Vdbe *p = (Vdbe*)pStmt; |
| 76405 | 76414 | return p ? p->nVar : 0; |
| 76406 | 76415 | } |
| 76407 | 76416 | |
| 76408 | 76417 | /* |
| @@ -76409,11 +76418,11 @@ | ||
| 76409 | 76418 | ** Return the name of a wildcard parameter. Return NULL if the index |
| 76410 | 76419 | ** is out of range or if the wildcard is unnamed. |
| 76411 | 76420 | ** |
| 76412 | 76421 | ** The result is always UTF-8. |
| 76413 | 76422 | */ |
| 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){ | |
| 76415 | 76424 | Vdbe *p = (Vdbe*)pStmt; |
| 76416 | 76425 | if( p==0 || i<1 || i>p->nzVar ){ |
| 76417 | 76426 | return 0; |
| 76418 | 76427 | } |
| 76419 | 76428 | return p->azVar[i-1]; |
| @@ -76437,11 +76446,11 @@ | ||
| 76437 | 76446 | } |
| 76438 | 76447 | } |
| 76439 | 76448 | } |
| 76440 | 76449 | return 0; |
| 76441 | 76450 | } |
| 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){ | |
| 76443 | 76452 | return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName)); |
| 76444 | 76453 | } |
| 76445 | 76454 | |
| 76446 | 76455 | /* |
| 76447 | 76456 | ** Transfer all bindings from the first statement over to the second. |
| @@ -76471,11 +76480,11 @@ | ||
| 76471 | 76480 | ** |
| 76472 | 76481 | ** If the two statements contain a different number of bindings, then |
| 76473 | 76482 | ** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise |
| 76474 | 76483 | ** SQLITE_OK is returned. |
| 76475 | 76484 | */ |
| 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){ | |
| 76477 | 76486 | Vdbe *pFrom = (Vdbe*)pFromStmt; |
| 76478 | 76487 | Vdbe *pTo = (Vdbe*)pToStmt; |
| 76479 | 76488 | if( pFrom->nVar!=pTo->nVar ){ |
| 76480 | 76489 | return SQLITE_ERROR; |
| 76481 | 76490 | } |
| @@ -76493,26 +76502,26 @@ | ||
| 76493 | 76502 | ** Return the sqlite3* database handle to which the prepared statement given |
| 76494 | 76503 | ** in the argument belongs. This is the same database handle that was |
| 76495 | 76504 | ** the first argument to the sqlite3_prepare() that was used to create |
| 76496 | 76505 | ** the statement in the first place. |
| 76497 | 76506 | */ |
| 76498 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt *pStmt){ | |
| 76507 | +SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *pStmt){ | |
| 76499 | 76508 | return pStmt ? ((Vdbe*)pStmt)->db : 0; |
| 76500 | 76509 | } |
| 76501 | 76510 | |
| 76502 | 76511 | /* |
| 76503 | 76512 | ** Return true if the prepared statement is guaranteed to not modify the |
| 76504 | 76513 | ** database. |
| 76505 | 76514 | */ |
| 76506 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt){ | |
| 76515 | +SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt){ | |
| 76507 | 76516 | return pStmt ? ((Vdbe*)pStmt)->readOnly : 1; |
| 76508 | 76517 | } |
| 76509 | 76518 | |
| 76510 | 76519 | /* |
| 76511 | 76520 | ** Return true if the prepared statement is in need of being reset. |
| 76512 | 76521 | */ |
| 76513 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){ | |
| 76522 | +SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt *pStmt){ | |
| 76514 | 76523 | Vdbe *v = (Vdbe*)pStmt; |
| 76515 | 76524 | return v!=0 && v->pc>=0 && v->magic==VDBE_MAGIC_RUN; |
| 76516 | 76525 | } |
| 76517 | 76526 | |
| 76518 | 76527 | /* |
| @@ -76519,11 +76528,11 @@ | ||
| 76519 | 76528 | ** Return a pointer to the next prepared statement after pStmt associated |
| 76520 | 76529 | ** with database connection pDb. If pStmt is NULL, return the first |
| 76521 | 76530 | ** prepared statement for the database connection. Return NULL if there |
| 76522 | 76531 | ** are no more. |
| 76523 | 76532 | */ |
| 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){ | |
| 76525 | 76534 | sqlite3_stmt *pNext; |
| 76526 | 76535 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76527 | 76536 | if( !sqlite3SafetyCheckOk(pDb) ){ |
| 76528 | 76537 | (void)SQLITE_MISUSE_BKPT; |
| 76529 | 76538 | return 0; |
| @@ -76540,11 +76549,11 @@ | ||
| 76540 | 76549 | } |
| 76541 | 76550 | |
| 76542 | 76551 | /* |
| 76543 | 76552 | ** Return the value of a status counter for a prepared statement |
| 76544 | 76553 | */ |
| 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){ | |
| 76546 | 76555 | Vdbe *pVdbe = (Vdbe*)pStmt; |
| 76547 | 76556 | u32 v; |
| 76548 | 76557 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76549 | 76558 | if( !pStmt ){ |
| 76550 | 76559 | (void)SQLITE_MISUSE_BKPT; |
| @@ -76557,11 +76566,11 @@ | ||
| 76557 | 76566 | } |
| 76558 | 76567 | |
| 76559 | 76568 | /* |
| 76560 | 76569 | ** Return the SQL associated with a prepared statement |
| 76561 | 76570 | */ |
| 76562 | -SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt){ | |
| 76571 | +SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt){ | |
| 76563 | 76572 | Vdbe *p = (Vdbe *)pStmt; |
| 76564 | 76573 | return p ? p->zSql : 0; |
| 76565 | 76574 | } |
| 76566 | 76575 | |
| 76567 | 76576 | /* |
| @@ -76571,11 +76580,11 @@ | ||
| 76571 | 76580 | ** freeing the returned string by passing it to sqlite3_free(). |
| 76572 | 76581 | ** |
| 76573 | 76582 | ** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of |
| 76574 | 76583 | ** expanded bound parameters. |
| 76575 | 76584 | */ |
| 76576 | -SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt){ | |
| 76585 | +SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt){ | |
| 76577 | 76586 | #ifdef SQLITE_OMIT_TRACE |
| 76578 | 76587 | return 0; |
| 76579 | 76588 | #else |
| 76580 | 76589 | char *z = 0; |
| 76581 | 76590 | const char *zSql = sqlite3_sql(pStmt); |
| @@ -76613,11 +76622,11 @@ | ||
| 76613 | 76622 | |
| 76614 | 76623 | /* |
| 76615 | 76624 | ** This function is called from within a pre-update callback to retrieve |
| 76616 | 76625 | ** a field of the row currently being updated or deleted. |
| 76617 | 76626 | */ |
| 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){ | |
| 76619 | 76628 | PreUpdate *p = db->pPreUpdate; |
| 76620 | 76629 | int rc = SQLITE_OK; |
| 76621 | 76630 | |
| 76622 | 76631 | /* Test that this call is being made from within an SQLITE_DELETE or |
| 76623 | 76632 | ** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */ |
| @@ -76668,11 +76677,11 @@ | ||
| 76668 | 76677 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 76669 | 76678 | /* |
| 76670 | 76679 | ** This function is called from within a pre-update callback to retrieve |
| 76671 | 76680 | ** the number of columns in the row being updated, deleted or inserted. |
| 76672 | 76681 | */ |
| 76673 | -SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *db){ | |
| 76682 | +SQLITE_API int sqlite3_preupdate_count(sqlite3 *db){ | |
| 76674 | 76683 | PreUpdate *p = db->pPreUpdate; |
| 76675 | 76684 | return (p ? p->keyinfo.nField : 0); |
| 76676 | 76685 | } |
| 76677 | 76686 | #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */ |
| 76678 | 76687 | |
| @@ -76686,11 +76695,11 @@ | ||
| 76686 | 76695 | ** top-level trigger etc.). |
| 76687 | 76696 | ** |
| 76688 | 76697 | ** For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL |
| 76689 | 76698 | ** or SET DEFAULT action is considered a trigger. |
| 76690 | 76699 | */ |
| 76691 | -SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *db){ | |
| 76700 | +SQLITE_API int sqlite3_preupdate_depth(sqlite3 *db){ | |
| 76692 | 76701 | PreUpdate *p = db->pPreUpdate; |
| 76693 | 76702 | return (p ? p->v->nFrame : 0); |
| 76694 | 76703 | } |
| 76695 | 76704 | #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */ |
| 76696 | 76705 | |
| @@ -76697,11 +76706,11 @@ | ||
| 76697 | 76706 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 76698 | 76707 | /* |
| 76699 | 76708 | ** This function is called from within a pre-update callback to retrieve |
| 76700 | 76709 | ** a field of the row currently being updated or inserted. |
| 76701 | 76710 | */ |
| 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){ | |
| 76703 | 76712 | PreUpdate *p = db->pPreUpdate; |
| 76704 | 76713 | int rc = SQLITE_OK; |
| 76705 | 76714 | Mem *pMem; |
| 76706 | 76715 | |
| 76707 | 76716 | if( !p || p->op==SQLITE_DELETE ){ |
| @@ -76771,11 +76780,11 @@ | ||
| 76771 | 76780 | |
| 76772 | 76781 | #ifdef SQLITE_ENABLE_STMT_SCANSTATUS |
| 76773 | 76782 | /* |
| 76774 | 76783 | ** Return status data for a single loop within query pStmt. |
| 76775 | 76784 | */ |
| 76776 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( | |
| 76785 | +SQLITE_API int sqlite3_stmt_scanstatus( | |
| 76777 | 76786 | sqlite3_stmt *pStmt, /* Prepared statement being queried */ |
| 76778 | 76787 | int idx, /* Index of loop to report on */ |
| 76779 | 76788 | int iScanStatusOp, /* Which metric to return */ |
| 76780 | 76789 | void *pOut /* OUT: Write the answer here */ |
| 76781 | 76790 | ){ |
| @@ -76830,11 +76839,11 @@ | ||
| 76830 | 76839 | } |
| 76831 | 76840 | |
| 76832 | 76841 | /* |
| 76833 | 76842 | ** Zero all counters associated with the sqlite3_stmt_scanstatus() data. |
| 76834 | 76843 | */ |
| 76835 | -SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ | |
| 76844 | +SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ | |
| 76836 | 76845 | Vdbe *p = (Vdbe*)pStmt; |
| 76837 | 76846 | memset(p->anExec, 0, p->nOp * sizeof(i64)); |
| 76838 | 76847 | } |
| 76839 | 76848 | #endif /* SQLITE_ENABLE_STMT_SCANSTATUS */ |
| 76840 | 76849 | |
| @@ -77357,11 +77366,11 @@ | ||
| 77357 | 77366 | ** Try to convert the type of a function argument or a result column |
| 77358 | 77367 | ** into a numeric representation. Use either INTEGER or REAL whichever |
| 77359 | 77368 | ** is appropriate. But only do the conversion if it is possible without |
| 77360 | 77369 | ** loss of information and return the revised type of the argument. |
| 77361 | 77370 | */ |
| 77362 | -SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value *pVal){ | |
| 77371 | +SQLITE_API int sqlite3_value_numeric_type(sqlite3_value *pVal){ | |
| 77363 | 77372 | int eType = sqlite3_value_type(pVal); |
| 77364 | 77373 | if( eType==SQLITE_TEXT ){ |
| 77365 | 77374 | Mem *pMem = (Mem*)pVal; |
| 77366 | 77375 | applyNumericAffinity(pMem, 0); |
| 77367 | 77376 | eType = sqlite3_value_type(pVal); |
| @@ -79007,11 +79016,11 @@ | ||
| 79007 | 79016 | break; |
| 79008 | 79017 | } |
| 79009 | 79018 | #endif /* SQLITE_OMIT_CAST */ |
| 79010 | 79019 | |
| 79011 | 79020 | /* Opcode: Lt P1 P2 P3 P4 P5 |
| 79012 | -** Synopsis: if r[P1]<r[P3] goto P2 | |
| 79021 | +** Synopsis: IF r[P3]<r[P1] | |
| 79013 | 79022 | ** |
| 79014 | 79023 | ** Compare the values in register P1 and P3. If reg(P3)<reg(P1) then |
| 79015 | 79024 | ** jump to address P2. |
| 79016 | 79025 | ** |
| 79017 | 79026 | ** If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or |
| @@ -79042,11 +79051,11 @@ | ||
| 79042 | 79051 | ** If the SQLITE_NULLEQ bit is set in P5, then NULL values are considered |
| 79043 | 79052 | ** equal to one another, provided that they do not have their MEM_Cleared |
| 79044 | 79053 | ** bit set. |
| 79045 | 79054 | */ |
| 79046 | 79055 | /* Opcode: Ne P1 P2 P3 P4 P5 |
| 79047 | -** Synopsis: if r[P1]!=r[P3] goto P2 | |
| 79056 | +** Synopsis: IF r[P3]!=r[P1] | |
| 79048 | 79057 | ** |
| 79049 | 79058 | ** This works just like the Lt opcode except that the jump is taken if |
| 79050 | 79059 | ** the operands in registers P1 and P3 are not equal. See the Lt opcode for |
| 79051 | 79060 | ** additional information. |
| 79052 | 79061 | ** |
| @@ -79055,11 +79064,11 @@ | ||
| 79055 | 79064 | ** of comparison is false. If either operand is NULL then the result is true. |
| 79056 | 79065 | ** If neither operand is NULL the result is the same as it would be if |
| 79057 | 79066 | ** the SQLITE_NULLEQ flag were omitted from P5. |
| 79058 | 79067 | */ |
| 79059 | 79068 | /* Opcode: Eq P1 P2 P3 P4 P5 |
| 79060 | -** Synopsis: if r[P1]==r[P3] goto P2 | |
| 79069 | +** Synopsis: IF r[P3]==r[P1] | |
| 79061 | 79070 | ** |
| 79062 | 79071 | ** This works just like the Lt opcode except that the jump is taken if |
| 79063 | 79072 | ** the operands in registers P1 and P3 are equal. |
| 79064 | 79073 | ** See the Lt opcode for additional information. |
| 79065 | 79074 | ** |
| @@ -79068,25 +79077,25 @@ | ||
| 79068 | 79077 | ** of comparison is true. If either operand is NULL then the result is false. |
| 79069 | 79078 | ** If neither operand is NULL the result is the same as it would be if |
| 79070 | 79079 | ** the SQLITE_NULLEQ flag were omitted from P5. |
| 79071 | 79080 | */ |
| 79072 | 79081 | /* Opcode: Le P1 P2 P3 P4 P5 |
| 79073 | -** Synopsis: if r[P1]<=r[P3] goto P2 | |
| 79082 | +** Synopsis: IF r[P3]<=r[P1] | |
| 79074 | 79083 | ** |
| 79075 | 79084 | ** This works just like the Lt opcode except that the jump is taken if |
| 79076 | 79085 | ** the content of register P3 is less than or equal to the content of |
| 79077 | 79086 | ** register P1. See the Lt opcode for additional information. |
| 79078 | 79087 | */ |
| 79079 | 79088 | /* Opcode: Gt P1 P2 P3 P4 P5 |
| 79080 | -** Synopsis: if r[P1]>r[P3] goto P2 | |
| 79089 | +** Synopsis: IF r[P3]>r[P1] | |
| 79081 | 79090 | ** |
| 79082 | 79091 | ** This works just like the Lt opcode except that the jump is taken if |
| 79083 | 79092 | ** the content of register P3 is greater than the content of |
| 79084 | 79093 | ** register P1. See the Lt opcode for additional information. |
| 79085 | 79094 | */ |
| 79086 | 79095 | /* Opcode: Ge P1 P2 P3 P4 P5 |
| 79087 | -** Synopsis: if r[P1]>=r[P3] goto P2 | |
| 79096 | +** Synopsis: IF r[P3]>=r[P1] | |
| 79088 | 79097 | ** |
| 79089 | 79098 | ** This works just like the Lt opcode except that the jump is taken if |
| 79090 | 79099 | ** the content of register P3 is greater than or equal to the content of |
| 79091 | 79100 | ** register P1. See the Lt opcode for additional information. |
| 79092 | 79101 | */ |
| @@ -84209,11 +84218,11 @@ | ||
| 84209 | 84218 | } |
| 84210 | 84219 | |
| 84211 | 84220 | /* |
| 84212 | 84221 | ** Open a blob handle. |
| 84213 | 84222 | */ |
| 84214 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( | |
| 84223 | +SQLITE_API int sqlite3_blob_open( | |
| 84215 | 84224 | sqlite3* db, /* The database connection */ |
| 84216 | 84225 | const char *zDb, /* The attached database containing the blob */ |
| 84217 | 84226 | const char *zTable, /* The table containing the blob */ |
| 84218 | 84227 | const char *zColumn, /* The column containing the blob */ |
| 84219 | 84228 | sqlite_int64 iRow, /* The row containing the glob */ |
| @@ -84450,11 +84459,11 @@ | ||
| 84450 | 84459 | |
| 84451 | 84460 | /* |
| 84452 | 84461 | ** Close a blob handle that was previously created using |
| 84453 | 84462 | ** sqlite3_blob_open(). |
| 84454 | 84463 | */ |
| 84455 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *pBlob){ | |
| 84464 | +SQLITE_API int sqlite3_blob_close(sqlite3_blob *pBlob){ | |
| 84456 | 84465 | Incrblob *p = (Incrblob *)pBlob; |
| 84457 | 84466 | int rc; |
| 84458 | 84467 | sqlite3 *db; |
| 84459 | 84468 | |
| 84460 | 84469 | if( p ){ |
| @@ -84543,28 +84552,28 @@ | ||
| 84543 | 84552 | } |
| 84544 | 84553 | |
| 84545 | 84554 | /* |
| 84546 | 84555 | ** Read data from a blob handle. |
| 84547 | 84556 | */ |
| 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){ | |
| 84549 | 84558 | return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData); |
| 84550 | 84559 | } |
| 84551 | 84560 | |
| 84552 | 84561 | /* |
| 84553 | 84562 | ** Write data to a blob handle. |
| 84554 | 84563 | */ |
| 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){ | |
| 84556 | 84565 | return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData); |
| 84557 | 84566 | } |
| 84558 | 84567 | |
| 84559 | 84568 | /* |
| 84560 | 84569 | ** Query a blob handle for the size of the data. |
| 84561 | 84570 | ** |
| 84562 | 84571 | ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob |
| 84563 | 84572 | ** so no mutex is required for access. |
| 84564 | 84573 | */ |
| 84565 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *pBlob){ | |
| 84574 | +SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *pBlob){ | |
| 84566 | 84575 | Incrblob *p = (Incrblob *)pBlob; |
| 84567 | 84576 | return (p && p->pStmt) ? p->nByte : 0; |
| 84568 | 84577 | } |
| 84569 | 84578 | |
| 84570 | 84579 | /* |
| @@ -84575,11 +84584,11 @@ | ||
| 84575 | 84584 | ** contain a blob or text value, then an error code is returned and the |
| 84576 | 84585 | ** database handle error code and message set. If this happens, then all |
| 84577 | 84586 | ** subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) |
| 84578 | 84587 | ** immediately return SQLITE_ABORT. |
| 84579 | 84588 | */ |
| 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){ | |
| 84581 | 84590 | int rc; |
| 84582 | 84591 | Incrblob *p = (Incrblob *)pBlob; |
| 84583 | 84592 | sqlite3 *db; |
| 84584 | 84593 | |
| 84585 | 84594 | if( p==0 ) return SQLITE_MISUSE_BKPT; |
| @@ -97188,11 +97197,11 @@ | ||
| 97188 | 97197 | ** and attempts to write the column will be ignored. |
| 97189 | 97198 | ** |
| 97190 | 97199 | ** Setting the auth function to NULL disables this hook. The default |
| 97191 | 97200 | ** setting of the auth function is NULL. |
| 97192 | 97201 | */ |
| 97193 | -SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( | |
| 97202 | +SQLITE_API int sqlite3_set_authorizer( | |
| 97194 | 97203 | sqlite3 *db, |
| 97195 | 97204 | int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 97196 | 97205 | void *pArg |
| 97197 | 97206 | ){ |
| 97198 | 97207 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -103958,18 +103967,18 @@ | ||
| 103958 | 103967 | } |
| 103959 | 103968 | |
| 103960 | 103969 | /* |
| 103961 | 103970 | ** The sqlite3_strglob() interface. |
| 103962 | 103971 | */ |
| 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){ | |
| 103964 | 103973 | return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, '[')==0; |
| 103965 | 103974 | } |
| 103966 | 103975 | |
| 103967 | 103976 | /* |
| 103968 | 103977 | ** The sqlite3_strlike() interface. |
| 103969 | 103978 | */ |
| 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){ | |
| 103971 | 103980 | return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc)==0; |
| 103972 | 103981 | } |
| 103973 | 103982 | |
| 103974 | 103983 | /* |
| 103975 | 103984 | ** Count the number of times that the LIKE operator (or GLOB which is |
| @@ -108244,19 +108253,19 @@ | ||
| 108244 | 108253 | } |
| 108245 | 108254 | if( piIdxCur ) *piIdxCur = iBase; |
| 108246 | 108255 | for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){ |
| 108247 | 108256 | int iIdxCur = iBase++; |
| 108248 | 108257 | assert( pIdx->pSchema==pTab->pSchema ); |
| 108258 | + if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){ | |
| 108259 | + if( piDataCur ) *piDataCur = iIdxCur; | |
| 108260 | + p5 = 0; | |
| 108261 | + } | |
| 108249 | 108262 | if( aToOpen==0 || aToOpen[i+1] ){ |
| 108250 | 108263 | sqlite3VdbeAddOp3(v, op, iIdxCur, pIdx->tnum, iDb); |
| 108251 | 108264 | sqlite3VdbeSetP4KeyInfo(pParse, pIdx); |
| 108252 | - VdbeComment((v, "%s", pIdx->zName)); | |
| 108253 | - } | |
| 108254 | - if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){ | |
| 108255 | - if( piDataCur ) *piDataCur = iIdxCur; | |
| 108256 | - }else{ | |
| 108257 | 108265 | sqlite3VdbeChangeP5(v, p5); |
| 108266 | + VdbeComment((v, "%s", pIdx->zName)); | |
| 108258 | 108267 | } |
| 108259 | 108268 | } |
| 108260 | 108269 | if( iBase>pParse->nTab ) pParse->nTab = iBase; |
| 108261 | 108270 | return i; |
| 108262 | 108271 | } |
| @@ -108684,11 +108693,11 @@ | ||
| 108684 | 108693 | ** If the SQL is a query, then for each row in the query result |
| 108685 | 108694 | ** the xCallback() function is called. pArg becomes the first |
| 108686 | 108695 | ** argument to xCallback(). If xCallback=NULL then no callback |
| 108687 | 108696 | ** is invoked, even for queries. |
| 108688 | 108697 | */ |
| 108689 | -SQLITE_API int SQLITE_STDCALL sqlite3_exec( | |
| 108698 | +SQLITE_API int sqlite3_exec( | |
| 108690 | 108699 | sqlite3 *db, /* The database on which the SQL executes */ |
| 108691 | 108700 | const char *zSql, /* The SQL to be executed */ |
| 108692 | 108701 | sqlite3_callback xCallback, /* Invoke this callback routine */ |
| 108693 | 108702 | void *pArg, /* First argument to xCallback() */ |
| 108694 | 108703 | char **pzErrMsg /* Write error messages here */ |
| @@ -109946,11 +109955,11 @@ | ||
| 109946 | 109955 | db->aExtension = aHandle; |
| 109947 | 109956 | |
| 109948 | 109957 | db->aExtension[db->nExtension++] = handle; |
| 109949 | 109958 | return SQLITE_OK; |
| 109950 | 109959 | } |
| 109951 | -SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( | |
| 109960 | +SQLITE_API int sqlite3_load_extension( | |
| 109952 | 109961 | sqlite3 *db, /* Load the extension into this database connection */ |
| 109953 | 109962 | const char *zFile, /* Name of the shared library containing extension */ |
| 109954 | 109963 | const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */ |
| 109955 | 109964 | char **pzErrMsg /* Put error message here if not 0 */ |
| 109956 | 109965 | ){ |
| @@ -109977,11 +109986,11 @@ | ||
| 109977 | 109986 | |
| 109978 | 109987 | /* |
| 109979 | 109988 | ** Enable or disable extension loading. Extension loading is disabled by |
| 109980 | 109989 | ** default so as not to open security holes in older applications. |
| 109981 | 109990 | */ |
| 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){ | |
| 109983 | 109992 | sqlite3_mutex_enter(db->mutex); |
| 109984 | 109993 | if( onoff ){ |
| 109985 | 109994 | db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc; |
| 109986 | 109995 | }else{ |
| 109987 | 109996 | db->flags &= ~(SQLITE_LoadExtension|SQLITE_LoadExtFunc); |
| @@ -110034,11 +110043,11 @@ | ||
| 110034 | 110043 | |
| 110035 | 110044 | /* |
| 110036 | 110045 | ** Register a statically linked extension that is automatically |
| 110037 | 110046 | ** loaded by every new database connection. |
| 110038 | 110047 | */ |
| 110039 | -SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension( | |
| 110048 | +SQLITE_API int sqlite3_auto_extension( | |
| 110040 | 110049 | void (*xInit)(void) |
| 110041 | 110050 | ){ |
| 110042 | 110051 | int rc = SQLITE_OK; |
| 110043 | 110052 | #ifndef SQLITE_OMIT_AUTOINIT |
| 110044 | 110053 | rc = sqlite3_initialize(); |
| @@ -110081,11 +110090,11 @@ | ||
| 110081 | 110090 | ** routine is a no-op. |
| 110082 | 110091 | ** |
| 110083 | 110092 | ** Return 1 if xInit was found on the list and removed. Return 0 if xInit |
| 110084 | 110093 | ** was not on the list. |
| 110085 | 110094 | */ |
| 110086 | -SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension( | |
| 110095 | +SQLITE_API int sqlite3_cancel_auto_extension( | |
| 110087 | 110096 | void (*xInit)(void) |
| 110088 | 110097 | ){ |
| 110089 | 110098 | #if SQLITE_THREADSAFE |
| 110090 | 110099 | sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); |
| 110091 | 110100 | #endif |
| @@ -110106,11 +110115,11 @@ | ||
| 110106 | 110115 | } |
| 110107 | 110116 | |
| 110108 | 110117 | /* |
| 110109 | 110118 | ** Reset the automatic extension loading mechanism. |
| 110110 | 110119 | */ |
| 110111 | -SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void){ | |
| 110120 | +SQLITE_API void sqlite3_reset_auto_extension(void){ | |
| 110112 | 110121 | #ifndef SQLITE_OMIT_AUTOINIT |
| 110113 | 110122 | if( sqlite3_initialize()==SQLITE_OK ) |
| 110114 | 110123 | #endif |
| 110115 | 110124 | { |
| 110116 | 110125 | #if SQLITE_THREADSAFE |
| @@ -113367,11 +113376,11 @@ | ||
| 113367 | 113376 | ** and so if a schema change occurs, SQLITE_SCHEMA is returned by |
| 113368 | 113377 | ** sqlite3_step(). In the new version, the original SQL text is retained |
| 113369 | 113378 | ** and the statement is automatically recompiled if an schema change |
| 113370 | 113379 | ** occurs. |
| 113371 | 113380 | */ |
| 113372 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare( | |
| 113381 | +SQLITE_API int sqlite3_prepare( | |
| 113373 | 113382 | sqlite3 *db, /* Database handle. */ |
| 113374 | 113383 | const char *zSql, /* UTF-8 encoded SQL statement. */ |
| 113375 | 113384 | int nBytes, /* Length of zSql in bytes. */ |
| 113376 | 113385 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113377 | 113386 | const char **pzTail /* OUT: End of parsed string */ |
| @@ -113379,11 +113388,11 @@ | ||
| 113379 | 113388 | int rc; |
| 113380 | 113389 | rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail); |
| 113381 | 113390 | assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ |
| 113382 | 113391 | return rc; |
| 113383 | 113392 | } |
| 113384 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( | |
| 113393 | +SQLITE_API int sqlite3_prepare_v2( | |
| 113385 | 113394 | sqlite3 *db, /* Database handle. */ |
| 113386 | 113395 | const char *zSql, /* UTF-8 encoded SQL statement. */ |
| 113387 | 113396 | int nBytes, /* Length of zSql in bytes. */ |
| 113388 | 113397 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113389 | 113398 | const char **pzTail /* OUT: End of parsed string */ |
| @@ -113455,11 +113464,11 @@ | ||
| 113455 | 113464 | ** and so if a schema change occurs, SQLITE_SCHEMA is returned by |
| 113456 | 113465 | ** sqlite3_step(). In the new version, the original SQL text is retained |
| 113457 | 113466 | ** and the statement is automatically recompiled if an schema change |
| 113458 | 113467 | ** occurs. |
| 113459 | 113468 | */ |
| 113460 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( | |
| 113469 | +SQLITE_API int sqlite3_prepare16( | |
| 113461 | 113470 | sqlite3 *db, /* Database handle. */ |
| 113462 | 113471 | const void *zSql, /* UTF-16 encoded SQL statement. */ |
| 113463 | 113472 | int nBytes, /* Length of zSql in bytes. */ |
| 113464 | 113473 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113465 | 113474 | const void **pzTail /* OUT: End of parsed string */ |
| @@ -113467,11 +113476,11 @@ | ||
| 113467 | 113476 | int rc; |
| 113468 | 113477 | rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail); |
| 113469 | 113478 | assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ |
| 113470 | 113479 | return rc; |
| 113471 | 113480 | } |
| 113472 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( | |
| 113481 | +SQLITE_API int sqlite3_prepare16_v2( | |
| 113473 | 113482 | sqlite3 *db, /* Database handle. */ |
| 113474 | 113483 | const void *zSql, /* UTF-16 encoded SQL statement. */ |
| 113475 | 113484 | int nBytes, /* Length of zSql in bytes. */ |
| 113476 | 113485 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113477 | 113486 | const void **pzTail /* OUT: End of parsed string */ |
| @@ -119310,11 +119319,11 @@ | ||
| 119310 | 119319 | ** The result that is written to ***pazResult is held in memory obtained |
| 119311 | 119320 | ** from malloc(). But the caller cannot free this memory directly. |
| 119312 | 119321 | ** Instead, the entire table should be passed to sqlite3_free_table() when |
| 119313 | 119322 | ** the calling procedure is finished using it. |
| 119314 | 119323 | */ |
| 119315 | -SQLITE_API int SQLITE_STDCALL sqlite3_get_table( | |
| 119324 | +SQLITE_API int sqlite3_get_table( | |
| 119316 | 119325 | sqlite3 *db, /* The database on which the SQL executes */ |
| 119317 | 119326 | const char *zSql, /* The SQL to be executed */ |
| 119318 | 119327 | char ***pazResult, /* Write the result table here */ |
| 119319 | 119328 | int *pnRow, /* Write the number of rows in the result here */ |
| 119320 | 119329 | int *pnColumn, /* Write the number of columns of result here */ |
| @@ -119379,11 +119388,11 @@ | ||
| 119379 | 119388 | } |
| 119380 | 119389 | |
| 119381 | 119390 | /* |
| 119382 | 119391 | ** This routine frees the space the sqlite3_get_table() malloced. |
| 119383 | 119392 | */ |
| 119384 | -SQLITE_API void SQLITE_STDCALL sqlite3_free_table( | |
| 119393 | +SQLITE_API void sqlite3_free_table( | |
| 119385 | 119394 | char **azResult /* Result returned from sqlite3_get_table() */ |
| 119386 | 119395 | ){ |
| 119387 | 119396 | if( azResult ){ |
| 119388 | 119397 | int i, n; |
| 119389 | 119398 | azResult--; |
| @@ -121789,11 +121798,11 @@ | ||
| 121789 | 121798 | |
| 121790 | 121799 | |
| 121791 | 121800 | /* |
| 121792 | 121801 | ** External API function used to create a new virtual-table module. |
| 121793 | 121802 | */ |
| 121794 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module( | |
| 121803 | +SQLITE_API int sqlite3_create_module( | |
| 121795 | 121804 | sqlite3 *db, /* Database in which module is registered */ |
| 121796 | 121805 | const char *zName, /* Name assigned to this module */ |
| 121797 | 121806 | const sqlite3_module *pModule, /* The definition of the module */ |
| 121798 | 121807 | void *pAux /* Context pointer for xCreate/xConnect */ |
| 121799 | 121808 | ){ |
| @@ -121804,11 +121813,11 @@ | ||
| 121804 | 121813 | } |
| 121805 | 121814 | |
| 121806 | 121815 | /* |
| 121807 | 121816 | ** External API function used to create a new virtual-table module. |
| 121808 | 121817 | */ |
| 121809 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( | |
| 121818 | +SQLITE_API int sqlite3_create_module_v2( | |
| 121810 | 121819 | sqlite3 *db, /* Database in which module is registered */ |
| 121811 | 121820 | const char *zName, /* Name assigned to this module */ |
| 121812 | 121821 | const sqlite3_module *pModule, /* The definition of the module */ |
| 121813 | 121822 | void *pAux, /* Context pointer for xCreate/xConnect */ |
| 121814 | 121823 | void (*xDestroy)(void *) /* Module destructor function */ |
| @@ -122428,11 +122437,11 @@ | ||
| 122428 | 122437 | /* |
| 122429 | 122438 | ** This function is used to set the schema of a virtual table. It is only |
| 122430 | 122439 | ** valid to call this function from within the xCreate() or xConnect() of a |
| 122431 | 122440 | ** virtual table module. |
| 122432 | 122441 | */ |
| 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){ | |
| 122434 | 122443 | VtabCtx *pCtx; |
| 122435 | 122444 | Parse *pParse; |
| 122436 | 122445 | int rc = SQLITE_OK; |
| 122437 | 122446 | Table *pTab; |
| 122438 | 122447 | char *zErr = 0; |
| @@ -122885,11 +122894,11 @@ | ||
| 122885 | 122894 | ** table update operation currently in progress. |
| 122886 | 122895 | ** |
| 122887 | 122896 | ** The results of this routine are undefined unless it is called from |
| 122888 | 122897 | ** within an xUpdate method. |
| 122889 | 122898 | */ |
| 122890 | -SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *db){ | |
| 122899 | +SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *db){ | |
| 122891 | 122900 | static const unsigned char aMap[] = { |
| 122892 | 122901 | SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE |
| 122893 | 122902 | }; |
| 122894 | 122903 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 122895 | 122904 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| @@ -122903,11 +122912,11 @@ | ||
| 122903 | 122912 | /* |
| 122904 | 122913 | ** Call from within the xCreate() or xConnect() methods to provide |
| 122905 | 122914 | ** the SQLite core with additional information about the behavior |
| 122906 | 122915 | ** of the virtual table being implemented. |
| 122907 | 122916 | */ |
| 122908 | -SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3 *db, int op, ...){ | |
| 122917 | +SQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){ | |
| 122909 | 122918 | va_list ap; |
| 122910 | 122919 | int rc = SQLITE_OK; |
| 122911 | 122920 | |
| 122912 | 122921 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 122913 | 122922 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| @@ -124028,13 +124037,19 @@ | ||
| 124028 | 124037 | regBase = r1; |
| 124029 | 124038 | }else{ |
| 124030 | 124039 | sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j); |
| 124031 | 124040 | } |
| 124032 | 124041 | } |
| 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 ){ | |
| 124036 | 124051 | Expr *pRight = pTerm->pExpr->pRight; |
| 124037 | 124052 | if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){ |
| 124038 | 124053 | sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk); |
| 124039 | 124054 | VdbeCoverage(v); |
| 124040 | 124055 | } |
| @@ -130105,10 +130120,18 @@ | ||
| 130105 | 130120 | if( pOBExpr->op!=TK_COLUMN ) continue; |
| 130106 | 130121 | if( pOBExpr->iTable!=iCur ) continue; |
| 130107 | 130122 | pTerm = sqlite3WhereFindTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn, |
| 130108 | 130123 | ~ready, eqOpMask, 0); |
| 130109 | 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 | + } | |
| 130110 | 130133 | if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0 && pOBExpr->iColumn>=0 ){ |
| 130111 | 130134 | const char *z1, *z2; |
| 130112 | 130135 | pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr); |
| 130113 | 130136 | if( !pColl ) pColl = db->pDfltColl; |
| 130114 | 130137 | z1 = pColl->zName; |
| @@ -136210,11 +136233,11 @@ | ||
| 136210 | 136233 | ** |
| 136211 | 136234 | ** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed |
| 136212 | 136235 | ** to recognize the end of a trigger can be omitted. All we have to do |
| 136213 | 136236 | ** is look for a semicolon that is not part of an string or comment. |
| 136214 | 136237 | */ |
| 136215 | -SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *zSql){ | |
| 136238 | +SQLITE_API int sqlite3_complete(const char *zSql){ | |
| 136216 | 136239 | u8 state = 0; /* Current state, using numbers defined in header comment */ |
| 136217 | 136240 | u8 token; /* Value of the next token */ |
| 136218 | 136241 | |
| 136219 | 136242 | #ifndef SQLITE_OMIT_TRIGGER |
| 136220 | 136243 | /* A complex statement machine used to detect the end of a CREATE TRIGGER |
| @@ -136375,11 +136398,11 @@ | ||
| 136375 | 136398 | /* |
| 136376 | 136399 | ** This routine is the same as the sqlite3_complete() routine described |
| 136377 | 136400 | ** above, except that the parameter is required to be UTF-16 encoded, not |
| 136378 | 136401 | ** UTF-8. |
| 136379 | 136402 | */ |
| 136380 | -SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *zSql){ | |
| 136403 | +SQLITE_API int sqlite3_complete16(const void *zSql){ | |
| 136381 | 136404 | sqlite3_value *pVal; |
| 136382 | 136405 | char const *zSql8; |
| 136383 | 136406 | int rc; |
| 136384 | 136407 | |
| 136385 | 136408 | #ifndef SQLITE_OMIT_AUTOINIT |
| @@ -136535,28 +136558,28 @@ | ||
| 136535 | 136558 | #endif |
| 136536 | 136559 | |
| 136537 | 136560 | /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns |
| 136538 | 136561 | ** a pointer to the to the sqlite3_version[] string constant. |
| 136539 | 136562 | */ |
| 136540 | -SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void){ return sqlite3_version; } | |
| 136563 | +SQLITE_API const char *sqlite3_libversion(void){ return sqlite3_version; } | |
| 136541 | 136564 | |
| 136542 | 136565 | /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a |
| 136543 | 136566 | ** pointer to a string constant whose value is the same as the |
| 136544 | 136567 | ** SQLITE_SOURCE_ID C preprocessor macro. |
| 136545 | 136568 | */ |
| 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; } | |
| 136547 | 136570 | |
| 136548 | 136571 | /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function |
| 136549 | 136572 | ** returns an integer equal to SQLITE_VERSION_NUMBER. |
| 136550 | 136573 | */ |
| 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; } | |
| 136552 | 136575 | |
| 136553 | 136576 | /* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns |
| 136554 | 136577 | ** zero if and only if SQLite was compiled with mutexing code omitted due to |
| 136555 | 136578 | ** the SQLITE_THREADSAFE compile-time option being set to 0. |
| 136556 | 136579 | */ |
| 136557 | -SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } | |
| 136580 | +SQLITE_API int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } | |
| 136558 | 136581 | |
| 136559 | 136582 | /* |
| 136560 | 136583 | ** When compiling the test fixture or with debugging enabled (on Win32), |
| 136561 | 136584 | ** this variable being set to non-zero will cause OSTRACE macros to emit |
| 136562 | 136585 | ** extra diagnostic information. |
| @@ -136625,11 +136648,11 @@ | ||
| 136625 | 136648 | ** call by X completes. |
| 136626 | 136649 | ** |
| 136627 | 136650 | ** * Recursive calls to this routine from thread X return immediately |
| 136628 | 136651 | ** without blocking. |
| 136629 | 136652 | */ |
| 136630 | -SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void){ | |
| 136653 | +SQLITE_API int sqlite3_initialize(void){ | |
| 136631 | 136654 | MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ |
| 136632 | 136655 | int rc; /* Result code */ |
| 136633 | 136656 | #ifdef SQLITE_EXTRA_INIT |
| 136634 | 136657 | int bRunExtraInit = 0; /* Extra initialization needed */ |
| 136635 | 136658 | #endif |
| @@ -136791,11 +136814,11 @@ | ||
| 136791 | 136814 | ** while any part of SQLite is otherwise in use in any thread. This |
| 136792 | 136815 | ** routine is not threadsafe. But it is safe to invoke this routine |
| 136793 | 136816 | ** on when SQLite is already shut down. If SQLite is already shut down |
| 136794 | 136817 | ** when this routine is invoked, then this routine is a harmless no-op. |
| 136795 | 136818 | */ |
| 136796 | -SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void){ | |
| 136819 | +SQLITE_API int sqlite3_shutdown(void){ | |
| 136797 | 136820 | #ifdef SQLITE_OMIT_WSD |
| 136798 | 136821 | int rc = sqlite3_wsd_init(4096, 24); |
| 136799 | 136822 | if( rc!=SQLITE_OK ){ |
| 136800 | 136823 | return rc; |
| 136801 | 136824 | } |
| @@ -136845,11 +136868,11 @@ | ||
| 136845 | 136868 | ** This routine should only be called when there are no outstanding |
| 136846 | 136869 | ** database connections or memory allocations. This routine is not |
| 136847 | 136870 | ** threadsafe. Failure to heed these warnings can lead to unpredictable |
| 136848 | 136871 | ** behavior. |
| 136849 | 136872 | */ |
| 136850 | -SQLITE_API int SQLITE_CDECL sqlite3_config(int op, ...){ | |
| 136873 | +SQLITE_API int sqlite3_config(int op, ...){ | |
| 136851 | 136874 | va_list ap; |
| 136852 | 136875 | int rc = SQLITE_OK; |
| 136853 | 136876 | |
| 136854 | 136877 | /* sqlite3_config() shall return SQLITE_MISUSE if it is invoked while |
| 136855 | 136878 | ** the SQLite library is in use. */ |
| @@ -137210,11 +137233,11 @@ | ||
| 137210 | 137233 | } |
| 137211 | 137234 | |
| 137212 | 137235 | /* |
| 137213 | 137236 | ** Return the mutex associated with a database connection. |
| 137214 | 137237 | */ |
| 137215 | -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3 *db){ | |
| 137238 | +SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){ | |
| 137216 | 137239 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137217 | 137240 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137218 | 137241 | (void)SQLITE_MISUSE_BKPT; |
| 137219 | 137242 | return 0; |
| 137220 | 137243 | } |
| @@ -137224,11 +137247,11 @@ | ||
| 137224 | 137247 | |
| 137225 | 137248 | /* |
| 137226 | 137249 | ** Free up as much memory as we can from the given database |
| 137227 | 137250 | ** connection. |
| 137228 | 137251 | */ |
| 137229 | -SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3 *db){ | |
| 137252 | +SQLITE_API int sqlite3_db_release_memory(sqlite3 *db){ | |
| 137230 | 137253 | int i; |
| 137231 | 137254 | |
| 137232 | 137255 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137233 | 137256 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 137234 | 137257 | #endif |
| @@ -137248,11 +137271,11 @@ | ||
| 137248 | 137271 | |
| 137249 | 137272 | /* |
| 137250 | 137273 | ** Flush any dirty pages in the pager-cache for any attached database |
| 137251 | 137274 | ** to disk. |
| 137252 | 137275 | */ |
| 137253 | -SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3 *db){ | |
| 137276 | +SQLITE_API int sqlite3_db_cacheflush(sqlite3 *db){ | |
| 137254 | 137277 | int i; |
| 137255 | 137278 | int rc = SQLITE_OK; |
| 137256 | 137279 | int bSeenBusy = 0; |
| 137257 | 137280 | |
| 137258 | 137281 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -137277,11 +137300,11 @@ | ||
| 137277 | 137300 | } |
| 137278 | 137301 | |
| 137279 | 137302 | /* |
| 137280 | 137303 | ** Configuration settings for an individual database connection |
| 137281 | 137304 | */ |
| 137282 | -SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3 *db, int op, ...){ | |
| 137305 | +SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){ | |
| 137283 | 137306 | va_list ap; |
| 137284 | 137307 | int rc; |
| 137285 | 137308 | va_start(ap, op); |
| 137286 | 137309 | switch( op ){ |
| 137287 | 137310 | case SQLITE_DBCONFIG_LOOKASIDE: { |
| @@ -137398,11 +137421,11 @@ | ||
| 137398 | 137421 | } |
| 137399 | 137422 | |
| 137400 | 137423 | /* |
| 137401 | 137424 | ** Return the ROWID of the most recent insert |
| 137402 | 137425 | */ |
| 137403 | -SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3 *db){ | |
| 137426 | +SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){ | |
| 137404 | 137427 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137405 | 137428 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137406 | 137429 | (void)SQLITE_MISUSE_BKPT; |
| 137407 | 137430 | return 0; |
| 137408 | 137431 | } |
| @@ -137411,11 +137434,11 @@ | ||
| 137411 | 137434 | } |
| 137412 | 137435 | |
| 137413 | 137436 | /* |
| 137414 | 137437 | ** Return the number of changes in the most recent call to sqlite3_exec(). |
| 137415 | 137438 | */ |
| 137416 | -SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3 *db){ | |
| 137439 | +SQLITE_API int sqlite3_changes(sqlite3 *db){ | |
| 137417 | 137440 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137418 | 137441 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137419 | 137442 | (void)SQLITE_MISUSE_BKPT; |
| 137420 | 137443 | return 0; |
| 137421 | 137444 | } |
| @@ -137424,11 +137447,11 @@ | ||
| 137424 | 137447 | } |
| 137425 | 137448 | |
| 137426 | 137449 | /* |
| 137427 | 137450 | ** Return the number of changes since the database handle was opened. |
| 137428 | 137451 | */ |
| 137429 | -SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3 *db){ | |
| 137452 | +SQLITE_API int sqlite3_total_changes(sqlite3 *db){ | |
| 137430 | 137453 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137431 | 137454 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137432 | 137455 | (void)SQLITE_MISUSE_BKPT; |
| 137433 | 137456 | return 0; |
| 137434 | 137457 | } |
| @@ -137575,12 +137598,12 @@ | ||
| 137575 | 137598 | ** statements or unfinished sqlite3_backups. The sqlite3_close_v2() |
| 137576 | 137599 | ** version forces the connection to become a zombie if there are |
| 137577 | 137600 | ** unclosed resources, and arranges for deallocation when the last |
| 137578 | 137601 | ** prepare statement or sqlite3_backup closes. |
| 137579 | 137602 | */ |
| 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); } | |
| 137582 | 137605 | |
| 137583 | 137606 | |
| 137584 | 137607 | /* |
| 137585 | 137608 | ** Close the mutex on database connection db. |
| 137586 | 137609 | ** |
| @@ -137983,11 +138006,11 @@ | ||
| 137983 | 138006 | |
| 137984 | 138007 | /* |
| 137985 | 138008 | ** This routine sets the busy callback for an Sqlite database to the |
| 137986 | 138009 | ** given callback function with the given argument. |
| 137987 | 138010 | */ |
| 137988 | -SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler( | |
| 138011 | +SQLITE_API int sqlite3_busy_handler( | |
| 137989 | 138012 | sqlite3 *db, |
| 137990 | 138013 | int (*xBusy)(void*,int), |
| 137991 | 138014 | void *pArg |
| 137992 | 138015 | ){ |
| 137993 | 138016 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -138006,11 +138029,11 @@ | ||
| 138006 | 138029 | /* |
| 138007 | 138030 | ** This routine sets the progress callback for an Sqlite database to the |
| 138008 | 138031 | ** given callback function with the given argument. The progress callback will |
| 138009 | 138032 | ** be invoked every nOps opcodes. |
| 138010 | 138033 | */ |
| 138011 | -SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler( | |
| 138034 | +SQLITE_API void sqlite3_progress_handler( | |
| 138012 | 138035 | sqlite3 *db, |
| 138013 | 138036 | int nOps, |
| 138014 | 138037 | int (*xProgress)(void*), |
| 138015 | 138038 | void *pArg |
| 138016 | 138039 | ){ |
| @@ -138037,11 +138060,11 @@ | ||
| 138037 | 138060 | |
| 138038 | 138061 | /* |
| 138039 | 138062 | ** This routine installs a default busy handler that waits for the |
| 138040 | 138063 | ** specified number of milliseconds before returning 0. |
| 138041 | 138064 | */ |
| 138042 | -SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3 *db, int ms){ | |
| 138065 | +SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){ | |
| 138043 | 138066 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138044 | 138067 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 138045 | 138068 | #endif |
| 138046 | 138069 | if( ms>0 ){ |
| 138047 | 138070 | sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db); |
| @@ -138053,11 +138076,11 @@ | ||
| 138053 | 138076 | } |
| 138054 | 138077 | |
| 138055 | 138078 | /* |
| 138056 | 138079 | ** Cause any pending operation to stop at its earliest opportunity. |
| 138057 | 138080 | */ |
| 138058 | -SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3 *db){ | |
| 138081 | +SQLITE_API void sqlite3_interrupt(sqlite3 *db){ | |
| 138059 | 138082 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138060 | 138083 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138061 | 138084 | (void)SQLITE_MISUSE_BKPT; |
| 138062 | 138085 | return; |
| 138063 | 138086 | } |
| @@ -138169,11 +138192,11 @@ | ||
| 138169 | 138192 | } |
| 138170 | 138193 | |
| 138171 | 138194 | /* |
| 138172 | 138195 | ** Create new user functions. |
| 138173 | 138196 | */ |
| 138174 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function( | |
| 138197 | +SQLITE_API int sqlite3_create_function( | |
| 138175 | 138198 | sqlite3 *db, |
| 138176 | 138199 | const char *zFunc, |
| 138177 | 138200 | int nArg, |
| 138178 | 138201 | int enc, |
| 138179 | 138202 | void *p, |
| @@ -138183,11 +138206,11 @@ | ||
| 138183 | 138206 | ){ |
| 138184 | 138207 | return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xSFunc, xStep, |
| 138185 | 138208 | xFinal, 0); |
| 138186 | 138209 | } |
| 138187 | 138210 | |
| 138188 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( | |
| 138211 | +SQLITE_API int sqlite3_create_function_v2( | |
| 138189 | 138212 | sqlite3 *db, |
| 138190 | 138213 | const char *zFunc, |
| 138191 | 138214 | int nArg, |
| 138192 | 138215 | int enc, |
| 138193 | 138216 | void *p, |
| @@ -138226,11 +138249,11 @@ | ||
| 138226 | 138249 | sqlite3_mutex_leave(db->mutex); |
| 138227 | 138250 | return rc; |
| 138228 | 138251 | } |
| 138229 | 138252 | |
| 138230 | 138253 | #ifndef SQLITE_OMIT_UTF16 |
| 138231 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( | |
| 138254 | +SQLITE_API int sqlite3_create_function16( | |
| 138232 | 138255 | sqlite3 *db, |
| 138233 | 138256 | const void *zFunctionName, |
| 138234 | 138257 | int nArg, |
| 138235 | 138258 | int eTextRep, |
| 138236 | 138259 | void *p, |
| @@ -138266,11 +138289,11 @@ | ||
| 138266 | 138289 | ** When virtual tables intend to provide an overloaded function, they |
| 138267 | 138290 | ** should call this routine to make sure the global function exists. |
| 138268 | 138291 | ** A global function must exist in order for name resolution to work |
| 138269 | 138292 | ** properly. |
| 138270 | 138293 | */ |
| 138271 | -SQLITE_API int SQLITE_STDCALL sqlite3_overload_function( | |
| 138294 | +SQLITE_API int sqlite3_overload_function( | |
| 138272 | 138295 | sqlite3 *db, |
| 138273 | 138296 | const char *zName, |
| 138274 | 138297 | int nArg |
| 138275 | 138298 | ){ |
| 138276 | 138299 | int rc = SQLITE_OK; |
| @@ -138298,11 +138321,11 @@ | ||
| 138298 | 138321 | ** A NULL trace function means that no tracing is executes. A non-NULL |
| 138299 | 138322 | ** trace is a pointer to a function that is invoked at the start of each |
| 138300 | 138323 | ** SQL statement. |
| 138301 | 138324 | */ |
| 138302 | 138325 | #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){ | |
| 138304 | 138327 | void *pOld; |
| 138305 | 138328 | |
| 138306 | 138329 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138307 | 138330 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138308 | 138331 | (void)SQLITE_MISUSE_BKPT; |
| @@ -138319,11 +138342,11 @@ | ||
| 138319 | 138342 | } |
| 138320 | 138343 | #endif /* SQLITE_OMIT_DEPRECATED */ |
| 138321 | 138344 | |
| 138322 | 138345 | /* Register a trace callback using the version-2 interface. |
| 138323 | 138346 | */ |
| 138324 | -SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2( | |
| 138347 | +SQLITE_API int sqlite3_trace_v2( | |
| 138325 | 138348 | sqlite3 *db, /* Trace this connection */ |
| 138326 | 138349 | unsigned mTrace, /* Mask of events to be traced */ |
| 138327 | 138350 | int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */ |
| 138328 | 138351 | void *pArg /* Context */ |
| 138329 | 138352 | ){ |
| @@ -138331,10 +138354,12 @@ | ||
| 138331 | 138354 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138332 | 138355 | return SQLITE_MISUSE_BKPT; |
| 138333 | 138356 | } |
| 138334 | 138357 | #endif |
| 138335 | 138358 | sqlite3_mutex_enter(db->mutex); |
| 138359 | + if( mTrace==0 ) xTrace = 0; | |
| 138360 | + if( xTrace==0 ) mTrace = 0; | |
| 138336 | 138361 | db->mTrace = mTrace; |
| 138337 | 138362 | db->xTrace = xTrace; |
| 138338 | 138363 | db->pTraceArg = pArg; |
| 138339 | 138364 | sqlite3_mutex_leave(db->mutex); |
| 138340 | 138365 | return SQLITE_OK; |
| @@ -138347,11 +138372,11 @@ | ||
| 138347 | 138372 | ** |
| 138348 | 138373 | ** A NULL profile function means that no profiling is executes. A non-NULL |
| 138349 | 138374 | ** profile is a pointer to a function that is invoked at the conclusion of |
| 138350 | 138375 | ** each SQL statement that is run. |
| 138351 | 138376 | */ |
| 138352 | -SQLITE_API void *SQLITE_STDCALL sqlite3_profile( | |
| 138377 | +SQLITE_API void *sqlite3_profile( | |
| 138353 | 138378 | sqlite3 *db, |
| 138354 | 138379 | void (*xProfile)(void*,const char*,sqlite_uint64), |
| 138355 | 138380 | void *pArg |
| 138356 | 138381 | ){ |
| 138357 | 138382 | void *pOld; |
| @@ -138375,11 +138400,11 @@ | ||
| 138375 | 138400 | /* |
| 138376 | 138401 | ** Register a function to be invoked when a transaction commits. |
| 138377 | 138402 | ** If the invoked function returns non-zero, then the commit becomes a |
| 138378 | 138403 | ** rollback. |
| 138379 | 138404 | */ |
| 138380 | -SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook( | |
| 138405 | +SQLITE_API void *sqlite3_commit_hook( | |
| 138381 | 138406 | sqlite3 *db, /* Attach the hook to this database */ |
| 138382 | 138407 | int (*xCallback)(void*), /* Function to invoke on each commit */ |
| 138383 | 138408 | void *pArg /* Argument to the function */ |
| 138384 | 138409 | ){ |
| 138385 | 138410 | void *pOld; |
| @@ -138400,11 +138425,11 @@ | ||
| 138400 | 138425 | |
| 138401 | 138426 | /* |
| 138402 | 138427 | ** Register a callback to be invoked each time a row is updated, |
| 138403 | 138428 | ** inserted or deleted using this database connection. |
| 138404 | 138429 | */ |
| 138405 | -SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( | |
| 138430 | +SQLITE_API void *sqlite3_update_hook( | |
| 138406 | 138431 | sqlite3 *db, /* Attach the hook to this database */ |
| 138407 | 138432 | void (*xCallback)(void*,int,char const *,char const *,sqlite_int64), |
| 138408 | 138433 | void *pArg /* Argument to the function */ |
| 138409 | 138434 | ){ |
| 138410 | 138435 | void *pRet; |
| @@ -138425,11 +138450,11 @@ | ||
| 138425 | 138450 | |
| 138426 | 138451 | /* |
| 138427 | 138452 | ** Register a callback to be invoked each time a transaction is rolled |
| 138428 | 138453 | ** back by this database connection. |
| 138429 | 138454 | */ |
| 138430 | -SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook( | |
| 138455 | +SQLITE_API void *sqlite3_rollback_hook( | |
| 138431 | 138456 | sqlite3 *db, /* Attach the hook to this database */ |
| 138432 | 138457 | void (*xCallback)(void*), /* Callback function */ |
| 138433 | 138458 | void *pArg /* Argument to the function */ |
| 138434 | 138459 | ){ |
| 138435 | 138460 | void *pRet; |
| @@ -138451,11 +138476,11 @@ | ||
| 138451 | 138476 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 138452 | 138477 | /* |
| 138453 | 138478 | ** Register a callback to be invoked each time a row is updated, |
| 138454 | 138479 | ** inserted or deleted using this database connection. |
| 138455 | 138480 | */ |
| 138456 | -SQLITE_API void *SQLITE_STDCALL sqlite3_preupdate_hook( | |
| 138481 | +SQLITE_API void *sqlite3_preupdate_hook( | |
| 138457 | 138482 | sqlite3 *db, /* Attach the hook to this database */ |
| 138458 | 138483 | void(*xCallback)( /* Callback function */ |
| 138459 | 138484 | void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64), |
| 138460 | 138485 | void *pArg /* First callback argument */ |
| 138461 | 138486 | ){ |
| @@ -138500,11 +138525,11 @@ | ||
| 138500 | 138525 | ** The callback registered by this function replaces any existing callback |
| 138501 | 138526 | ** registered using sqlite3_wal_hook(). Likewise, registering a callback |
| 138502 | 138527 | ** using sqlite3_wal_hook() disables the automatic checkpoint mechanism |
| 138503 | 138528 | ** configured by this function. |
| 138504 | 138529 | */ |
| 138505 | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){ | |
| 138530 | +SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){ | |
| 138506 | 138531 | #ifdef SQLITE_OMIT_WAL |
| 138507 | 138532 | UNUSED_PARAMETER(db); |
| 138508 | 138533 | UNUSED_PARAMETER(nFrame); |
| 138509 | 138534 | #else |
| 138510 | 138535 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -138521,11 +138546,11 @@ | ||
| 138521 | 138546 | |
| 138522 | 138547 | /* |
| 138523 | 138548 | ** Register a callback to be invoked each time a transaction is written |
| 138524 | 138549 | ** into the write-ahead-log by this database connection. |
| 138525 | 138550 | */ |
| 138526 | -SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( | |
| 138551 | +SQLITE_API void *sqlite3_wal_hook( | |
| 138527 | 138552 | sqlite3 *db, /* Attach the hook to this db handle */ |
| 138528 | 138553 | int(*xCallback)(void *, sqlite3*, const char*, int), |
| 138529 | 138554 | void *pArg /* First argument passed to xCallback() */ |
| 138530 | 138555 | ){ |
| 138531 | 138556 | #ifndef SQLITE_OMIT_WAL |
| @@ -138548,11 +138573,11 @@ | ||
| 138548 | 138573 | } |
| 138549 | 138574 | |
| 138550 | 138575 | /* |
| 138551 | 138576 | ** Checkpoint database zDb. |
| 138552 | 138577 | */ |
| 138553 | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( | |
| 138578 | +SQLITE_API int sqlite3_wal_checkpoint_v2( | |
| 138554 | 138579 | sqlite3 *db, /* Database handle */ |
| 138555 | 138580 | const char *zDb, /* Name of attached database (or NULL) */ |
| 138556 | 138581 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 138557 | 138582 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 138558 | 138583 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -138603,11 +138628,11 @@ | ||
| 138603 | 138628 | /* |
| 138604 | 138629 | ** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points |
| 138605 | 138630 | ** to contains a zero-length string, all attached databases are |
| 138606 | 138631 | ** checkpointed. |
| 138607 | 138632 | */ |
| 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){ | |
| 138609 | 138634 | /* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to |
| 138610 | 138635 | ** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */ |
| 138611 | 138636 | return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0); |
| 138612 | 138637 | } |
| 138613 | 138638 | |
| @@ -138694,11 +138719,11 @@ | ||
| 138694 | 138719 | |
| 138695 | 138720 | /* |
| 138696 | 138721 | ** Return UTF-8 encoded English language explanation of the most recent |
| 138697 | 138722 | ** error. |
| 138698 | 138723 | */ |
| 138699 | -SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3 *db){ | |
| 138724 | +SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){ | |
| 138700 | 138725 | const char *z; |
| 138701 | 138726 | if( !db ){ |
| 138702 | 138727 | return sqlite3ErrStr(SQLITE_NOMEM_BKPT); |
| 138703 | 138728 | } |
| 138704 | 138729 | if( !sqlite3SafetyCheckSickOrOk(db) ){ |
| @@ -138722,11 +138747,11 @@ | ||
| 138722 | 138747 | #ifndef SQLITE_OMIT_UTF16 |
| 138723 | 138748 | /* |
| 138724 | 138749 | ** Return UTF-16 encoded English language explanation of the most recent |
| 138725 | 138750 | ** error. |
| 138726 | 138751 | */ |
| 138727 | -SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3 *db){ | |
| 138752 | +SQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){ | |
| 138728 | 138753 | static const u16 outOfMem[] = { |
| 138729 | 138754 | 'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0 |
| 138730 | 138755 | }; |
| 138731 | 138756 | static const u16 misuse[] = { |
| 138732 | 138757 | 'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ', |
| @@ -138767,38 +138792,38 @@ | ||
| 138767 | 138792 | |
| 138768 | 138793 | /* |
| 138769 | 138794 | ** Return the most recent error code generated by an SQLite routine. If NULL is |
| 138770 | 138795 | ** passed to this function, we assume a malloc() failed during sqlite3_open(). |
| 138771 | 138796 | */ |
| 138772 | -SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db){ | |
| 138797 | +SQLITE_API int sqlite3_errcode(sqlite3 *db){ | |
| 138773 | 138798 | if( db && !sqlite3SafetyCheckSickOrOk(db) ){ |
| 138774 | 138799 | return SQLITE_MISUSE_BKPT; |
| 138775 | 138800 | } |
| 138776 | 138801 | if( !db || db->mallocFailed ){ |
| 138777 | 138802 | return SQLITE_NOMEM_BKPT; |
| 138778 | 138803 | } |
| 138779 | 138804 | return db->errCode & db->errMask; |
| 138780 | 138805 | } |
| 138781 | -SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db){ | |
| 138806 | +SQLITE_API int sqlite3_extended_errcode(sqlite3 *db){ | |
| 138782 | 138807 | if( db && !sqlite3SafetyCheckSickOrOk(db) ){ |
| 138783 | 138808 | return SQLITE_MISUSE_BKPT; |
| 138784 | 138809 | } |
| 138785 | 138810 | if( !db || db->mallocFailed ){ |
| 138786 | 138811 | return SQLITE_NOMEM_BKPT; |
| 138787 | 138812 | } |
| 138788 | 138813 | return db->errCode; |
| 138789 | 138814 | } |
| 138790 | -SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3 *db){ | |
| 138815 | +SQLITE_API int sqlite3_system_errno(sqlite3 *db){ | |
| 138791 | 138816 | return db ? db->iSysErrno : 0; |
| 138792 | 138817 | } |
| 138793 | 138818 | |
| 138794 | 138819 | /* |
| 138795 | 138820 | ** Return a string that describes the kind of error specified in the |
| 138796 | 138821 | ** argument. For now, this simply calls the internal sqlite3ErrStr() |
| 138797 | 138822 | ** function. |
| 138798 | 138823 | */ |
| 138799 | -SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int rc){ | |
| 138824 | +SQLITE_API const char *sqlite3_errstr(int rc){ | |
| 138800 | 138825 | return sqlite3ErrStr(rc); |
| 138801 | 138826 | } |
| 138802 | 138827 | |
| 138803 | 138828 | /* |
| 138804 | 138829 | ** Create a new collating function for database "db". The name is zName |
| @@ -138942,11 +138967,11 @@ | ||
| 138942 | 138967 | ** |
| 138943 | 138968 | ** A new lower limit does not shrink existing constructs. |
| 138944 | 138969 | ** It merely prevents new constructs that exceed the limit |
| 138945 | 138970 | ** from forming. |
| 138946 | 138971 | */ |
| 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){ | |
| 138948 | 138973 | int oldLimit; |
| 138949 | 138974 | |
| 138950 | 138975 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138951 | 138976 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138952 | 138977 | (void)SQLITE_MISUSE_BKPT; |
| @@ -139566,18 +139591,18 @@ | ||
| 139566 | 139591 | } |
| 139567 | 139592 | |
| 139568 | 139593 | /* |
| 139569 | 139594 | ** Open a new database handle. |
| 139570 | 139595 | */ |
| 139571 | -SQLITE_API int SQLITE_STDCALL sqlite3_open( | |
| 139596 | +SQLITE_API int sqlite3_open( | |
| 139572 | 139597 | const char *zFilename, |
| 139573 | 139598 | sqlite3 **ppDb |
| 139574 | 139599 | ){ |
| 139575 | 139600 | return openDatabase(zFilename, ppDb, |
| 139576 | 139601 | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0); |
| 139577 | 139602 | } |
| 139578 | -SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( | |
| 139603 | +SQLITE_API int sqlite3_open_v2( | |
| 139579 | 139604 | const char *filename, /* Database filename (UTF-8) */ |
| 139580 | 139605 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 139581 | 139606 | int flags, /* Flags */ |
| 139582 | 139607 | const char *zVfs /* Name of VFS module to use */ |
| 139583 | 139608 | ){ |
| @@ -139586,11 +139611,11 @@ | ||
| 139586 | 139611 | |
| 139587 | 139612 | #ifndef SQLITE_OMIT_UTF16 |
| 139588 | 139613 | /* |
| 139589 | 139614 | ** Open a new database handle. |
| 139590 | 139615 | */ |
| 139591 | -SQLITE_API int SQLITE_STDCALL sqlite3_open16( | |
| 139616 | +SQLITE_API int sqlite3_open16( | |
| 139592 | 139617 | const void *zFilename, |
| 139593 | 139618 | sqlite3 **ppDb |
| 139594 | 139619 | ){ |
| 139595 | 139620 | char const *zFilename8; /* zFilename encoded in UTF-8 instead of UTF-16 */ |
| 139596 | 139621 | sqlite3_value *pVal; |
| @@ -139625,11 +139650,11 @@ | ||
| 139625 | 139650 | #endif /* SQLITE_OMIT_UTF16 */ |
| 139626 | 139651 | |
| 139627 | 139652 | /* |
| 139628 | 139653 | ** Register a new collation sequence with the database handle db. |
| 139629 | 139654 | */ |
| 139630 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( | |
| 139655 | +SQLITE_API int sqlite3_create_collation( | |
| 139631 | 139656 | sqlite3* db, |
| 139632 | 139657 | const char *zName, |
| 139633 | 139658 | int enc, |
| 139634 | 139659 | void* pCtx, |
| 139635 | 139660 | int(*xCompare)(void*,int,const void*,int,const void*) |
| @@ -139638,11 +139663,11 @@ | ||
| 139638 | 139663 | } |
| 139639 | 139664 | |
| 139640 | 139665 | /* |
| 139641 | 139666 | ** Register a new collation sequence with the database handle db. |
| 139642 | 139667 | */ |
| 139643 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( | |
| 139668 | +SQLITE_API int sqlite3_create_collation_v2( | |
| 139644 | 139669 | sqlite3* db, |
| 139645 | 139670 | const char *zName, |
| 139646 | 139671 | int enc, |
| 139647 | 139672 | void* pCtx, |
| 139648 | 139673 | int(*xCompare)(void*,int,const void*,int,const void*), |
| @@ -139663,11 +139688,11 @@ | ||
| 139663 | 139688 | |
| 139664 | 139689 | #ifndef SQLITE_OMIT_UTF16 |
| 139665 | 139690 | /* |
| 139666 | 139691 | ** Register a new collation sequence with the database handle db. |
| 139667 | 139692 | */ |
| 139668 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( | |
| 139693 | +SQLITE_API int sqlite3_create_collation16( | |
| 139669 | 139694 | sqlite3* db, |
| 139670 | 139695 | const void *zName, |
| 139671 | 139696 | int enc, |
| 139672 | 139697 | void* pCtx, |
| 139673 | 139698 | int(*xCompare)(void*,int,const void*,int,const void*) |
| @@ -139693,11 +139718,11 @@ | ||
| 139693 | 139718 | |
| 139694 | 139719 | /* |
| 139695 | 139720 | ** Register a collation sequence factory callback with the database handle |
| 139696 | 139721 | ** db. Replace any previously installed collation sequence factory. |
| 139697 | 139722 | */ |
| 139698 | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( | |
| 139723 | +SQLITE_API int sqlite3_collation_needed( | |
| 139699 | 139724 | sqlite3 *db, |
| 139700 | 139725 | void *pCollNeededArg, |
| 139701 | 139726 | void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*) |
| 139702 | 139727 | ){ |
| 139703 | 139728 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -139714,11 +139739,11 @@ | ||
| 139714 | 139739 | #ifndef SQLITE_OMIT_UTF16 |
| 139715 | 139740 | /* |
| 139716 | 139741 | ** Register a collation sequence factory callback with the database handle |
| 139717 | 139742 | ** db. Replace any previously installed collation sequence factory. |
| 139718 | 139743 | */ |
| 139719 | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( | |
| 139744 | +SQLITE_API int sqlite3_collation_needed16( | |
| 139720 | 139745 | sqlite3 *db, |
| 139721 | 139746 | void *pCollNeededArg, |
| 139722 | 139747 | void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*) |
| 139723 | 139748 | ){ |
| 139724 | 139749 | #ifdef SQLITE_ENABLE_API_ARMOR |
| @@ -139736,11 +139761,11 @@ | ||
| 139736 | 139761 | #ifndef SQLITE_OMIT_DEPRECATED |
| 139737 | 139762 | /* |
| 139738 | 139763 | ** This function is now an anachronism. It used to be used to recover from a |
| 139739 | 139764 | ** malloc() failure, but SQLite now does this automatically. |
| 139740 | 139765 | */ |
| 139741 | -SQLITE_API int SQLITE_STDCALL sqlite3_global_recover(void){ | |
| 139766 | +SQLITE_API int sqlite3_global_recover(void){ | |
| 139742 | 139767 | return SQLITE_OK; |
| 139743 | 139768 | } |
| 139744 | 139769 | #endif |
| 139745 | 139770 | |
| 139746 | 139771 | /* |
| @@ -139747,11 +139772,11 @@ | ||
| 139747 | 139772 | ** Test to see whether or not the database connection is in autocommit |
| 139748 | 139773 | ** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on |
| 139749 | 139774 | ** by default. Autocommit is disabled by a BEGIN statement and reenabled |
| 139750 | 139775 | ** by the next COMMIT or ROLLBACK. |
| 139751 | 139776 | */ |
| 139752 | -SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3 *db){ | |
| 139777 | +SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){ | |
| 139753 | 139778 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139754 | 139779 | if( !sqlite3SafetyCheckOk(db) ){ |
| 139755 | 139780 | (void)SQLITE_MISUSE_BKPT; |
| 139756 | 139781 | return 0; |
| 139757 | 139782 | } |
| @@ -139804,19 +139829,19 @@ | ||
| 139804 | 139829 | ** data for this thread has been deallocated. |
| 139805 | 139830 | ** |
| 139806 | 139831 | ** SQLite no longer uses thread-specific data so this routine is now a |
| 139807 | 139832 | ** no-op. It is retained for historical compatibility. |
| 139808 | 139833 | */ |
| 139809 | -SQLITE_API void SQLITE_STDCALL sqlite3_thread_cleanup(void){ | |
| 139834 | +SQLITE_API void sqlite3_thread_cleanup(void){ | |
| 139810 | 139835 | } |
| 139811 | 139836 | #endif |
| 139812 | 139837 | |
| 139813 | 139838 | /* |
| 139814 | 139839 | ** Return meta information about a specific column of a database table. |
| 139815 | 139840 | ** See comment in sqlite3.h (sqlite.h.in) for details. |
| 139816 | 139841 | */ |
| 139817 | -SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( | |
| 139842 | +SQLITE_API int sqlite3_table_column_metadata( | |
| 139818 | 139843 | sqlite3 *db, /* Connection handle */ |
| 139819 | 139844 | const char *zDbName, /* Database name or NULL */ |
| 139820 | 139845 | const char *zTableName, /* Table name */ |
| 139821 | 139846 | const char *zColumnName, /* Column name */ |
| 139822 | 139847 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -139930,11 +139955,11 @@ | ||
| 139930 | 139955 | } |
| 139931 | 139956 | |
| 139932 | 139957 | /* |
| 139933 | 139958 | ** Sleep for a little while. Return the amount of time slept. |
| 139934 | 139959 | */ |
| 139935 | -SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int ms){ | |
| 139960 | +SQLITE_API int sqlite3_sleep(int ms){ | |
| 139936 | 139961 | sqlite3_vfs *pVfs; |
| 139937 | 139962 | int rc; |
| 139938 | 139963 | pVfs = sqlite3_vfs_find(0); |
| 139939 | 139964 | if( pVfs==0 ) return 0; |
| 139940 | 139965 | |
| @@ -139946,11 +139971,11 @@ | ||
| 139946 | 139971 | } |
| 139947 | 139972 | |
| 139948 | 139973 | /* |
| 139949 | 139974 | ** Enable or disable the extended result codes. |
| 139950 | 139975 | */ |
| 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){ | |
| 139952 | 139977 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139953 | 139978 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 139954 | 139979 | #endif |
| 139955 | 139980 | sqlite3_mutex_enter(db->mutex); |
| 139956 | 139981 | db->errMask = onoff ? 0xffffffff : 0xff; |
| @@ -139959,11 +139984,11 @@ | ||
| 139959 | 139984 | } |
| 139960 | 139985 | |
| 139961 | 139986 | /* |
| 139962 | 139987 | ** Invoke the xFileControl method on a particular database. |
| 139963 | 139988 | */ |
| 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){ | |
| 139965 | 139990 | int rc = SQLITE_ERROR; |
| 139966 | 139991 | Btree *pBtree; |
| 139967 | 139992 | |
| 139968 | 139993 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139969 | 139994 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| @@ -139999,11 +140024,11 @@ | ||
| 139999 | 140024 | } |
| 140000 | 140025 | |
| 140001 | 140026 | /* |
| 140002 | 140027 | ** Interface to the testing logic. |
| 140003 | 140028 | */ |
| 140004 | -SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...){ | |
| 140029 | +SQLITE_API int sqlite3_test_control(int op, ...){ | |
| 140005 | 140030 | int rc = 0; |
| 140006 | 140031 | #ifdef SQLITE_OMIT_BUILTIN_TEST |
| 140007 | 140032 | UNUSED_PARAMETER(op); |
| 140008 | 140033 | #else |
| 140009 | 140034 | va_list ap; |
| @@ -140344,11 +140369,11 @@ | ||
| 140344 | 140369 | ** method of a VFS implementation. The zParam argument is the name of the |
| 140345 | 140370 | ** query parameter we seek. This routine returns the value of the zParam |
| 140346 | 140371 | ** parameter if it exists. If the parameter does not exist, this routine |
| 140347 | 140372 | ** returns a NULL pointer. |
| 140348 | 140373 | */ |
| 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){ | |
| 140350 | 140375 | if( zFilename==0 || zParam==0 ) return 0; |
| 140351 | 140376 | zFilename += sqlite3Strlen30(zFilename) + 1; |
| 140352 | 140377 | while( zFilename[0] ){ |
| 140353 | 140378 | int x = strcmp(zFilename, zParam); |
| 140354 | 140379 | zFilename += sqlite3Strlen30(zFilename) + 1; |
| @@ -140359,20 +140384,20 @@ | ||
| 140359 | 140384 | } |
| 140360 | 140385 | |
| 140361 | 140386 | /* |
| 140362 | 140387 | ** Return a boolean value for a query parameter. |
| 140363 | 140388 | */ |
| 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){ | |
| 140365 | 140390 | const char *z = sqlite3_uri_parameter(zFilename, zParam); |
| 140366 | 140391 | bDflt = bDflt!=0; |
| 140367 | 140392 | return z ? sqlite3GetBoolean(z, bDflt) : bDflt; |
| 140368 | 140393 | } |
| 140369 | 140394 | |
| 140370 | 140395 | /* |
| 140371 | 140396 | ** Return a 64-bit integer value for a query parameter. |
| 140372 | 140397 | */ |
| 140373 | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64( | |
| 140398 | +SQLITE_API sqlite3_int64 sqlite3_uri_int64( | |
| 140374 | 140399 | const char *zFilename, /* Filename as passed to xOpen */ |
| 140375 | 140400 | const char *zParam, /* URI parameter sought */ |
| 140376 | 140401 | sqlite3_int64 bDflt /* return if parameter is missing */ |
| 140377 | 140402 | ){ |
| 140378 | 140403 | const char *z = sqlite3_uri_parameter(zFilename, zParam); |
| @@ -140400,11 +140425,11 @@ | ||
| 140400 | 140425 | |
| 140401 | 140426 | /* |
| 140402 | 140427 | ** Return the filename of the database associated with a database |
| 140403 | 140428 | ** connection. |
| 140404 | 140429 | */ |
| 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){ | |
| 140406 | 140431 | Btree *pBt; |
| 140407 | 140432 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 140408 | 140433 | if( !sqlite3SafetyCheckOk(db) ){ |
| 140409 | 140434 | (void)SQLITE_MISUSE_BKPT; |
| 140410 | 140435 | return 0; |
| @@ -140416,11 +140441,11 @@ | ||
| 140416 | 140441 | |
| 140417 | 140442 | /* |
| 140418 | 140443 | ** Return 1 if database is read-only or 0 if read/write. Return -1 if |
| 140419 | 140444 | ** no such database exists. |
| 140420 | 140445 | */ |
| 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){ | |
| 140422 | 140447 | Btree *pBt; |
| 140423 | 140448 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 140424 | 140449 | if( !sqlite3SafetyCheckOk(db) ){ |
| 140425 | 140450 | (void)SQLITE_MISUSE_BKPT; |
| 140426 | 140451 | return -1; |
| @@ -140433,11 +140458,11 @@ | ||
| 140433 | 140458 | #ifdef SQLITE_ENABLE_SNAPSHOT |
| 140434 | 140459 | /* |
| 140435 | 140460 | ** Obtain a snapshot handle for the snapshot of database zDb currently |
| 140436 | 140461 | ** being read by handle db. |
| 140437 | 140462 | */ |
| 140438 | -SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_get( | |
| 140463 | +SQLITE_API int sqlite3_snapshot_get( | |
| 140439 | 140464 | sqlite3 *db, |
| 140440 | 140465 | const char *zDb, |
| 140441 | 140466 | sqlite3_snapshot **ppSnapshot |
| 140442 | 140467 | ){ |
| 140443 | 140468 | int rc = SQLITE_ERROR; |
| @@ -140468,11 +140493,11 @@ | ||
| 140468 | 140493 | } |
| 140469 | 140494 | |
| 140470 | 140495 | /* |
| 140471 | 140496 | ** Open a read-transaction on the snapshot idendified by pSnapshot. |
| 140472 | 140497 | */ |
| 140473 | -SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_open( | |
| 140498 | +SQLITE_API int sqlite3_snapshot_open( | |
| 140474 | 140499 | sqlite3 *db, |
| 140475 | 140500 | const char *zDb, |
| 140476 | 140501 | sqlite3_snapshot *pSnapshot |
| 140477 | 140502 | ){ |
| 140478 | 140503 | int rc = SQLITE_ERROR; |
| @@ -140505,11 +140530,11 @@ | ||
| 140505 | 140530 | } |
| 140506 | 140531 | |
| 140507 | 140532 | /* |
| 140508 | 140533 | ** Free a snapshot handle obtained from sqlite3_snapshot_get(). |
| 140509 | 140534 | */ |
| 140510 | -SQLITE_API void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){ | |
| 140535 | +SQLITE_API void sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){ | |
| 140511 | 140536 | sqlite3_free(pSnapshot); |
| 140512 | 140537 | } |
| 140513 | 140538 | #endif /* SQLITE_ENABLE_SNAPSHOT */ |
| 140514 | 140539 | |
| 140515 | 140540 | /************** End of main.c ************************************************/ |
| @@ -140659,11 +140684,11 @@ | ||
| 140659 | 140684 | ** |
| 140660 | 140685 | ** Each call to this routine overrides any prior callbacks registered |
| 140661 | 140686 | ** on the same "db". If xNotify==0 then any prior callbacks are immediately |
| 140662 | 140687 | ** cancelled. |
| 140663 | 140688 | */ |
| 140664 | -SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( | |
| 140689 | +SQLITE_API int sqlite3_unlock_notify( | |
| 140665 | 140690 | sqlite3 *db, |
| 140666 | 140691 | void (*xNotify)(void **, int), |
| 140667 | 140692 | void *pArg |
| 140668 | 140693 | ){ |
| 140669 | 140694 | int rc = SQLITE_OK; |
| @@ -147662,11 +147687,11 @@ | ||
| 147662 | 147687 | ** Initialize API pointer table, if required. |
| 147663 | 147688 | */ |
| 147664 | 147689 | #ifdef _WIN32 |
| 147665 | 147690 | __declspec(dllexport) |
| 147666 | 147691 | #endif |
| 147667 | -SQLITE_API int SQLITE_STDCALL sqlite3_fts3_init( | |
| 147692 | +SQLITE_API int sqlite3_fts3_init( | |
| 147668 | 147693 | sqlite3 *db, |
| 147669 | 147694 | char **pzErrMsg, |
| 147670 | 147695 | const sqlite3_api_routines *pApi |
| 147671 | 147696 | ){ |
| 147672 | 147697 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -163463,11 +163488,11 @@ | ||
| 163463 | 163488 | } |
| 163464 | 163489 | |
| 163465 | 163490 | /* |
| 163466 | 163491 | ** Register a new geometry function for use with the r-tree MATCH operator. |
| 163467 | 163492 | */ |
| 163468 | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( | |
| 163493 | +SQLITE_API int sqlite3_rtree_geometry_callback( | |
| 163469 | 163494 | sqlite3 *db, /* Register SQL function on this connection */ |
| 163470 | 163495 | const char *zGeom, /* Name of the new SQL function */ |
| 163471 | 163496 | int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */ |
| 163472 | 163497 | void *pContext /* Extra data associated with the callback */ |
| 163473 | 163498 | ){ |
| @@ -163487,11 +163512,11 @@ | ||
| 163487 | 163512 | |
| 163488 | 163513 | /* |
| 163489 | 163514 | ** Register a new 2nd-generation geometry function for use with the |
| 163490 | 163515 | ** r-tree MATCH operator. |
| 163491 | 163516 | */ |
| 163492 | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( | |
| 163517 | +SQLITE_API int sqlite3_rtree_query_callback( | |
| 163493 | 163518 | sqlite3 *db, /* Register SQL function on this connection */ |
| 163494 | 163519 | const char *zQueryFunc, /* Name of new SQL function */ |
| 163495 | 163520 | int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */ |
| 163496 | 163521 | void *pContext, /* Extra data passed into the callback */ |
| 163497 | 163522 | void (*xDestructor)(void*) /* Destructor for the extra data */ |
| @@ -163512,11 +163537,11 @@ | ||
| 163512 | 163537 | |
| 163513 | 163538 | #if !SQLITE_CORE |
| 163514 | 163539 | #ifdef _WIN32 |
| 163515 | 163540 | __declspec(dllexport) |
| 163516 | 163541 | #endif |
| 163517 | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_init( | |
| 163542 | +SQLITE_API int sqlite3_rtree_init( | |
| 163518 | 163543 | sqlite3 *db, |
| 163519 | 163544 | char **pzErrMsg, |
| 163520 | 163545 | const sqlite3_api_routines *pApi |
| 163521 | 163546 | ){ |
| 163522 | 163547 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -164063,11 +164088,11 @@ | ||
| 164063 | 164088 | |
| 164064 | 164089 | #if !SQLITE_CORE |
| 164065 | 164090 | #ifdef _WIN32 |
| 164066 | 164091 | __declspec(dllexport) |
| 164067 | 164092 | #endif |
| 164068 | -SQLITE_API int SQLITE_STDCALL sqlite3_icu_init( | |
| 164093 | +SQLITE_API int sqlite3_icu_init( | |
| 164069 | 164094 | sqlite3 *db, |
| 164070 | 164095 | char **pzErrMsg, |
| 164071 | 164096 | const sqlite3_api_routines *pApi |
| 164072 | 164097 | ){ |
| 164073 | 164098 | SQLITE_EXTENSION_INIT2(pApi) |
| @@ -164743,11 +164768,11 @@ | ||
| 164743 | 164768 | ** IMPORTANT NOTE FOR ZIPVFS USERS: The RBU extension works with all of |
| 164744 | 164769 | ** SQLite's built-in VFSs, including the multiplexor VFS. However it does |
| 164745 | 164770 | ** not work out of the box with zipvfs. Refer to the comment describing |
| 164746 | 164771 | ** the zipvfs_create_vfs() API below for details on using RBU with zipvfs. |
| 164747 | 164772 | */ |
| 164748 | -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open( | |
| 164773 | +SQLITE_API sqlite3rbu *sqlite3rbu_open( | |
| 164749 | 164774 | const char *zTarget, |
| 164750 | 164775 | const char *zRbu, |
| 164751 | 164776 | const char *zState |
| 164752 | 164777 | ); |
| 164753 | 164778 | |
| @@ -164776,11 +164801,11 @@ | ||
| 164776 | 164801 | ** As with sqlite3rbu_open(), Zipvfs users should rever to the comment |
| 164777 | 164802 | ** describing the sqlite3rbu_create_vfs() API function below for |
| 164778 | 164803 | ** a description of the complications associated with using RBU with |
| 164779 | 164804 | ** zipvfs databases. |
| 164780 | 164805 | */ |
| 164781 | -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum( | |
| 164806 | +SQLITE_API sqlite3rbu *sqlite3rbu_vacuum( | |
| 164782 | 164807 | const char *zTarget, |
| 164783 | 164808 | const char *zState |
| 164784 | 164809 | ); |
| 164785 | 164810 | |
| 164786 | 164811 | /* |
| @@ -164812,11 +164837,11 @@ | ||
| 164812 | 164837 | ** when sqlite3rbu_close() is called. |
| 164813 | 164838 | ** |
| 164814 | 164839 | ** Database handles returned by this function remain valid until the next |
| 164815 | 164840 | ** call to any sqlite3rbu_xxx() function other than sqlite3rbu_db(). |
| 164816 | 164841 | */ |
| 164817 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu*, int bRbu); | |
| 164842 | +SQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu*, int bRbu); | |
| 164818 | 164843 | |
| 164819 | 164844 | /* |
| 164820 | 164845 | ** Do some work towards applying the RBU update to the target db. |
| 164821 | 164846 | ** |
| 164822 | 164847 | ** Return SQLITE_DONE if the update has been completely applied, or |
| @@ -164826,11 +164851,11 @@ | ||
| 164826 | 164851 | ** |
| 164827 | 164852 | ** Once a call to sqlite3rbu_step() has returned a value other than |
| 164828 | 164853 | ** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops |
| 164829 | 164854 | ** that immediately return the same value. |
| 164830 | 164855 | */ |
| 164831 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *pRbu); | |
| 164856 | +SQLITE_API int sqlite3rbu_step(sqlite3rbu *pRbu); | |
| 164832 | 164857 | |
| 164833 | 164858 | /* |
| 164834 | 164859 | ** Force RBU to save its state to disk. |
| 164835 | 164860 | ** |
| 164836 | 164861 | ** If a power failure or application crash occurs during an update, following |
| @@ -164838,11 +164863,11 @@ | ||
| 164838 | 164863 | ** was last saved. In other words, from the most recent successful call to |
| 164839 | 164864 | ** sqlite3rbu_close() or this function. |
| 164840 | 164865 | ** |
| 164841 | 164866 | ** SQLITE_OK is returned if successful, or an SQLite error code otherwise. |
| 164842 | 164867 | */ |
| 164843 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *pRbu); | |
| 164868 | +SQLITE_API int sqlite3rbu_savestate(sqlite3rbu *pRbu); | |
| 164844 | 164869 | |
| 164845 | 164870 | /* |
| 164846 | 164871 | ** Close an RBU handle. |
| 164847 | 164872 | ** |
| 164848 | 164873 | ** If the RBU update has been completely applied, mark the RBU database |
| @@ -164858,18 +164883,18 @@ | ||
| 164858 | 164883 | ** |
| 164859 | 164884 | ** Otherwise, if no error occurs, this function returns SQLITE_OK if the |
| 164860 | 164885 | ** update has been partially applied, or SQLITE_DONE if it has been |
| 164861 | 164886 | ** completely applied. |
| 164862 | 164887 | */ |
| 164863 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg); | |
| 164888 | +SQLITE_API int sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg); | |
| 164864 | 164889 | |
| 164865 | 164890 | /* |
| 164866 | 164891 | ** Return the total number of key-value operations (inserts, deletes or |
| 164867 | 164892 | ** updates) that have been performed on the target database since the |
| 164868 | 164893 | ** current RBU update was started. |
| 164869 | 164894 | */ |
| 164870 | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu); | |
| 164895 | +SQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu); | |
| 164871 | 164896 | |
| 164872 | 164897 | /* |
| 164873 | 164898 | ** Obtain permyriadage (permyriadage is to 10000 as percentage is to 100) |
| 164874 | 164899 | ** progress indications for the two stages of an RBU update. This API may |
| 164875 | 164900 | ** be useful for driving GUI progress indicators and similar. |
| @@ -164907,11 +164932,11 @@ | ||
| 164907 | 164932 | ** permyriadage progress of the same stage. If the rbu_count table does |
| 164908 | 164933 | ** not exist, then (*pnOne) is set to -1 during stage 1. If the rbu_count |
| 164909 | 164934 | ** table exists but is not correctly populated, the value of the *pnOne |
| 164910 | 164935 | ** output variable during stage 1 is undefined. |
| 164911 | 164936 | */ |
| 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); | |
| 164913 | 164938 | |
| 164914 | 164939 | /* |
| 164915 | 164940 | ** Obtain an indication as to the current stage of an RBU update or vacuum. |
| 164916 | 164941 | ** This function always returns one of the SQLITE_RBU_STATE_XXX constants |
| 164917 | 164942 | ** defined in this file. Return values should be interpreted as follows: |
| @@ -164945,11 +164970,11 @@ | ||
| 164945 | 164970 | #define SQLITE_RBU_STATE_MOVE 2 |
| 164946 | 164971 | #define SQLITE_RBU_STATE_CHECKPOINT 3 |
| 164947 | 164972 | #define SQLITE_RBU_STATE_DONE 4 |
| 164948 | 164973 | #define SQLITE_RBU_STATE_ERROR 5 |
| 164949 | 164974 | |
| 164950 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *pRbu); | |
| 164975 | +SQLITE_API int sqlite3rbu_state(sqlite3rbu *pRbu); | |
| 164951 | 164976 | |
| 164952 | 164977 | /* |
| 164953 | 164978 | ** Create an RBU VFS named zName that accesses the underlying file-system |
| 164954 | 164979 | ** via existing VFS zParent. Or, if the zParent parameter is passed NULL, |
| 164955 | 164980 | ** then the new RBU VFS uses the default system VFS to access the file-system. |
| @@ -164989,21 +165014,21 @@ | ||
| 164989 | 165014 | ** The overhead of adding the "rbu" VFS to the system is negligible for |
| 164990 | 165015 | ** non-RBU users. There is no harm in an application accessing the |
| 164991 | 165016 | ** file-system via "rbu" all the time, even if it only uses RBU functionality |
| 164992 | 165017 | ** occasionally. |
| 164993 | 165018 | */ |
| 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); | |
| 164995 | 165020 | |
| 164996 | 165021 | /* |
| 164997 | 165022 | ** Deregister and destroy an RBU vfs created by an earlier call to |
| 164998 | 165023 | ** sqlite3rbu_create_vfs(). |
| 164999 | 165024 | ** |
| 165000 | 165025 | ** VFS objects are not reference counted. If a VFS object is destroyed |
| 165001 | 165026 | ** before all database handles that use it have been closed, the results |
| 165002 | 165027 | ** are undefined. |
| 165003 | 165028 | */ |
| 165004 | -SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName); | |
| 165029 | +SQLITE_API void sqlite3rbu_destroy_vfs(const char *zName); | |
| 165005 | 165030 | |
| 165006 | 165031 | #if 0 |
| 165007 | 165032 | } /* end of the 'extern "C"' block */ |
| 165008 | 165033 | #endif |
| 165009 | 165034 | |
| @@ -168093,11 +168118,11 @@ | ||
| 168093 | 168118 | } |
| 168094 | 168119 | |
| 168095 | 168120 | /* |
| 168096 | 168121 | ** Step the RBU object. |
| 168097 | 168122 | */ |
| 168098 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *p){ | |
| 168123 | +SQLITE_API int sqlite3rbu_step(sqlite3rbu *p){ | |
| 168099 | 168124 | if( p ){ |
| 168100 | 168125 | switch( p->eStage ){ |
| 168101 | 168126 | case RBU_STAGE_OAL: { |
| 168102 | 168127 | RbuObjIter *pIter = &p->objiter; |
| 168103 | 168128 | |
| @@ -168535,11 +168560,11 @@ | ||
| 168535 | 168560 | } |
| 168536 | 168561 | |
| 168537 | 168562 | /* |
| 168538 | 168563 | ** Open and return a new RBU handle. |
| 168539 | 168564 | */ |
| 168540 | -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open( | |
| 168565 | +SQLITE_API sqlite3rbu *sqlite3rbu_open( | |
| 168541 | 168566 | const char *zTarget, |
| 168542 | 168567 | const char *zRbu, |
| 168543 | 168568 | const char *zState |
| 168544 | 168569 | ){ |
| 168545 | 168570 | /* TODO: Check that zTarget and zRbu are non-NULL */ |
| @@ -168547,11 +168572,11 @@ | ||
| 168547 | 168572 | } |
| 168548 | 168573 | |
| 168549 | 168574 | /* |
| 168550 | 168575 | ** Open a handle to begin or resume an RBU VACUUM operation. |
| 168551 | 168576 | */ |
| 168552 | -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum( | |
| 168577 | +SQLITE_API sqlite3rbu *sqlite3rbu_vacuum( | |
| 168553 | 168578 | const char *zTarget, |
| 168554 | 168579 | const char *zState |
| 168555 | 168580 | ){ |
| 168556 | 168581 | /* TODO: Check that both arguments are non-NULL */ |
| 168557 | 168582 | return openRbuHandle(0, zTarget, zState); |
| @@ -168558,11 +168583,11 @@ | ||
| 168558 | 168583 | } |
| 168559 | 168584 | |
| 168560 | 168585 | /* |
| 168561 | 168586 | ** Return the database handle used by pRbu. |
| 168562 | 168587 | */ |
| 168563 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){ | |
| 168588 | +SQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){ | |
| 168564 | 168589 | sqlite3 *db = 0; |
| 168565 | 168590 | if( pRbu ){ |
| 168566 | 168591 | db = (bRbu ? pRbu->dbRbu : pRbu->dbMain); |
| 168567 | 168592 | } |
| 168568 | 168593 | return db; |
| @@ -168590,11 +168615,11 @@ | ||
| 168590 | 168615 | } |
| 168591 | 168616 | |
| 168592 | 168617 | /* |
| 168593 | 168618 | ** Close the RBU handle. |
| 168594 | 168619 | */ |
| 168595 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){ | |
| 168620 | +SQLITE_API int sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){ | |
| 168596 | 168621 | int rc; |
| 168597 | 168622 | if( p ){ |
| 168598 | 168623 | |
| 168599 | 168624 | /* Commit the transaction to the *-oal file. */ |
| 168600 | 168625 | if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){ |
| @@ -168641,19 +168666,19 @@ | ||
| 168641 | 168666 | /* |
| 168642 | 168667 | ** Return the total number of key-value operations (inserts, deletes or |
| 168643 | 168668 | ** updates) that have been performed on the target database since the |
| 168644 | 168669 | ** current RBU update was started. |
| 168645 | 168670 | */ |
| 168646 | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu){ | |
| 168671 | +SQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu){ | |
| 168647 | 168672 | return pRbu->nProgress; |
| 168648 | 168673 | } |
| 168649 | 168674 | |
| 168650 | 168675 | /* |
| 168651 | 168676 | ** Return permyriadage progress indications for the two main stages of |
| 168652 | 168677 | ** an RBU update. |
| 168653 | 168678 | */ |
| 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){ | |
| 168655 | 168680 | const int MAX_PROGRESS = 10000; |
| 168656 | 168681 | switch( p->eStage ){ |
| 168657 | 168682 | case RBU_STAGE_OAL: |
| 168658 | 168683 | if( p->nPhaseOneStep>0 ){ |
| 168659 | 168684 | *pnOne = (int)(MAX_PROGRESS * (i64)p->nProgress/(i64)p->nPhaseOneStep); |
| @@ -168684,11 +168709,11 @@ | ||
| 168684 | 168709 | } |
| 168685 | 168710 | |
| 168686 | 168711 | /* |
| 168687 | 168712 | ** Return the current state of the RBU vacuum or update operation. |
| 168688 | 168713 | */ |
| 168689 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *p){ | |
| 168714 | +SQLITE_API int sqlite3rbu_state(sqlite3rbu *p){ | |
| 168690 | 168715 | int aRes[] = { |
| 168691 | 168716 | 0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE, |
| 168692 | 168717 | 0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE |
| 168693 | 168718 | }; |
| 168694 | 168719 | |
| @@ -168712,11 +168737,11 @@ | ||
| 168712 | 168737 | ); |
| 168713 | 168738 | return aRes[p->eStage]; |
| 168714 | 168739 | } |
| 168715 | 168740 | } |
| 168716 | 168741 | |
| 168717 | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *p){ | |
| 168742 | +SQLITE_API int sqlite3rbu_savestate(sqlite3rbu *p){ | |
| 168718 | 168743 | int rc = p->rc; |
| 168719 | 168744 | if( rc==SQLITE_DONE ) return SQLITE_OK; |
| 168720 | 168745 | |
| 168721 | 168746 | assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE ); |
| 168722 | 168747 | if( p->eStage==RBU_STAGE_OAL ){ |
| @@ -169539,11 +169564,11 @@ | ||
| 169539 | 169564 | |
| 169540 | 169565 | /* |
| 169541 | 169566 | ** Deregister and destroy an RBU vfs created by an earlier call to |
| 169542 | 169567 | ** sqlite3rbu_create_vfs(). |
| 169543 | 169568 | */ |
| 169544 | -SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName){ | |
| 169569 | +SQLITE_API void sqlite3rbu_destroy_vfs(const char *zName){ | |
| 169545 | 169570 | sqlite3_vfs *pVfs = sqlite3_vfs_find(zName); |
| 169546 | 169571 | if( pVfs && pVfs->xOpen==rbuVfsOpen ){ |
| 169547 | 169572 | sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex); |
| 169548 | 169573 | sqlite3_vfs_unregister(pVfs); |
| 169549 | 169574 | sqlite3_free(pVfs); |
| @@ -169553,11 +169578,11 @@ | ||
| 169553 | 169578 | /* |
| 169554 | 169579 | ** Create an RBU VFS named zName that accesses the underlying file-system |
| 169555 | 169580 | ** via existing VFS zParent. The new object is registered as a non-default |
| 169556 | 169581 | ** VFS with SQLite before returning. |
| 169557 | 169582 | */ |
| 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){ | |
| 169559 | 169584 | |
| 169560 | 169585 | /* Template for VFS */ |
| 169561 | 169586 | static sqlite3_vfs vfs_template = { |
| 169562 | 169587 | 1, /* iVersion */ |
| 169563 | 169588 | 0, /* szOsFile */ |
| @@ -171798,11 +171823,11 @@ | ||
| 171798 | 171823 | } |
| 171799 | 171824 | |
| 171800 | 171825 | return rc; |
| 171801 | 171826 | } |
| 171802 | 171827 | |
| 171803 | -SQLITE_API int SQLITE_STDCALL sqlite3session_diff( | |
| 171828 | +SQLITE_API int sqlite3session_diff( | |
| 171804 | 171829 | sqlite3_session *pSession, |
| 171805 | 171830 | const char *zFrom, |
| 171806 | 171831 | const char *zTbl, |
| 171807 | 171832 | char **pzErrMsg |
| 171808 | 171833 | ){ |
| @@ -171892,11 +171917,11 @@ | ||
| 171892 | 171917 | |
| 171893 | 171918 | /* |
| 171894 | 171919 | ** Create a session object. This session object will record changes to |
| 171895 | 171920 | ** database zDb attached to connection db. |
| 171896 | 171921 | */ |
| 171897 | -SQLITE_API int SQLITE_STDCALL sqlite3session_create( | |
| 171922 | +SQLITE_API int sqlite3session_create( | |
| 171898 | 171923 | sqlite3 *db, /* Database handle */ |
| 171899 | 171924 | const char *zDb, /* Name of db (e.g. "main") */ |
| 171900 | 171925 | sqlite3_session **ppSession /* OUT: New session object */ |
| 171901 | 171926 | ){ |
| 171902 | 171927 | sqlite3_session *pNew; /* Newly allocated session object */ |
| @@ -171954,11 +171979,11 @@ | ||
| 171954 | 171979 | } |
| 171955 | 171980 | |
| 171956 | 171981 | /* |
| 171957 | 171982 | ** Delete a session object previously allocated using sqlite3session_create(). |
| 171958 | 171983 | */ |
| 171959 | -SQLITE_API void SQLITE_STDCALL sqlite3session_delete(sqlite3_session *pSession){ | |
| 171984 | +SQLITE_API void sqlite3session_delete(sqlite3_session *pSession){ | |
| 171960 | 171985 | sqlite3 *db = pSession->db; |
| 171961 | 171986 | sqlite3_session *pHead; |
| 171962 | 171987 | sqlite3_session **pp; |
| 171963 | 171988 | |
| 171964 | 171989 | /* Unlink the session from the linked list of sessions attached to the |
| @@ -171983,11 +172008,11 @@ | ||
| 171983 | 172008 | } |
| 171984 | 172009 | |
| 171985 | 172010 | /* |
| 171986 | 172011 | ** Set a table filter on a Session Object. |
| 171987 | 172012 | */ |
| 171988 | -SQLITE_API void SQLITE_STDCALL sqlite3session_table_filter( | |
| 172013 | +SQLITE_API void sqlite3session_table_filter( | |
| 171989 | 172014 | sqlite3_session *pSession, |
| 171990 | 172015 | int(*xFilter)(void*, const char*), |
| 171991 | 172016 | void *pCtx /* First argument passed to xFilter */ |
| 171992 | 172017 | ){ |
| 171993 | 172018 | pSession->bAutoAttach = 1; |
| @@ -172001,11 +172026,11 @@ | ||
| 172001 | 172026 | ** |
| 172002 | 172027 | ** Only tables that have a PRIMARY KEY defined may be attached. It does |
| 172003 | 172028 | ** not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) |
| 172004 | 172029 | ** or not. |
| 172005 | 172030 | */ |
| 172006 | -SQLITE_API int SQLITE_STDCALL sqlite3session_attach( | |
| 172031 | +SQLITE_API int sqlite3session_attach( | |
| 172007 | 172032 | sqlite3_session *pSession, /* Session object */ |
| 172008 | 172033 | const char *zName /* Table name */ |
| 172009 | 172034 | ){ |
| 172010 | 172035 | int rc = SQLITE_OK; |
| 172011 | 172036 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| @@ -172691,11 +172716,11 @@ | ||
| 172691 | 172716 | ** session object passed as the first argument. |
| 172692 | 172717 | ** |
| 172693 | 172718 | ** It is the responsibility of the caller to eventually free the buffer |
| 172694 | 172719 | ** using sqlite3_free(). |
| 172695 | 172720 | */ |
| 172696 | -SQLITE_API int SQLITE_STDCALL sqlite3session_changeset( | |
| 172721 | +SQLITE_API int sqlite3session_changeset( | |
| 172697 | 172722 | sqlite3_session *pSession, /* Session object */ |
| 172698 | 172723 | int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */ |
| 172699 | 172724 | void **ppChangeset /* OUT: Buffer containing changeset */ |
| 172700 | 172725 | ){ |
| 172701 | 172726 | return sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset); |
| @@ -172702,11 +172727,11 @@ | ||
| 172702 | 172727 | } |
| 172703 | 172728 | |
| 172704 | 172729 | /* |
| 172705 | 172730 | ** Streaming version of sqlite3session_changeset(). |
| 172706 | 172731 | */ |
| 172707 | -SQLITE_API int SQLITE_STDCALL sqlite3session_changeset_strm( | |
| 172732 | +SQLITE_API int sqlite3session_changeset_strm( | |
| 172708 | 172733 | sqlite3_session *pSession, |
| 172709 | 172734 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 172710 | 172735 | void *pOut |
| 172711 | 172736 | ){ |
| 172712 | 172737 | return sessionGenerateChangeset(pSession, 0, xOutput, pOut, 0, 0); |
| @@ -172713,11 +172738,11 @@ | ||
| 172713 | 172738 | } |
| 172714 | 172739 | |
| 172715 | 172740 | /* |
| 172716 | 172741 | ** Streaming version of sqlite3session_patchset(). |
| 172717 | 172742 | */ |
| 172718 | -SQLITE_API int SQLITE_STDCALL sqlite3session_patchset_strm( | |
| 172743 | +SQLITE_API int sqlite3session_patchset_strm( | |
| 172719 | 172744 | sqlite3_session *pSession, |
| 172720 | 172745 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 172721 | 172746 | void *pOut |
| 172722 | 172747 | ){ |
| 172723 | 172748 | return sessionGenerateChangeset(pSession, 1, xOutput, pOut, 0, 0); |
| @@ -172728,11 +172753,11 @@ | ||
| 172728 | 172753 | ** session object passed as the first argument. |
| 172729 | 172754 | ** |
| 172730 | 172755 | ** It is the responsibility of the caller to eventually free the buffer |
| 172731 | 172756 | ** using sqlite3_free(). |
| 172732 | 172757 | */ |
| 172733 | -SQLITE_API int SQLITE_STDCALL sqlite3session_patchset( | |
| 172758 | +SQLITE_API int sqlite3session_patchset( | |
| 172734 | 172759 | sqlite3_session *pSession, /* Session object */ |
| 172735 | 172760 | int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */ |
| 172736 | 172761 | void **ppPatchset /* OUT: Buffer containing changeset */ |
| 172737 | 172762 | ){ |
| 172738 | 172763 | return sessionGenerateChangeset(pSession, 1, 0, 0, pnPatchset, ppPatchset); |
| @@ -172739,11 +172764,11 @@ | ||
| 172739 | 172764 | } |
| 172740 | 172765 | |
| 172741 | 172766 | /* |
| 172742 | 172767 | ** Enable or disable the session object passed as the first argument. |
| 172743 | 172768 | */ |
| 172744 | -SQLITE_API int SQLITE_STDCALL sqlite3session_enable(sqlite3_session *pSession, int bEnable){ | |
| 172769 | +SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable){ | |
| 172745 | 172770 | int ret; |
| 172746 | 172771 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172747 | 172772 | if( bEnable>=0 ){ |
| 172748 | 172773 | pSession->bEnable = bEnable; |
| 172749 | 172774 | } |
| @@ -172753,11 +172778,11 @@ | ||
| 172753 | 172778 | } |
| 172754 | 172779 | |
| 172755 | 172780 | /* |
| 172756 | 172781 | ** Enable or disable the session object passed as the first argument. |
| 172757 | 172782 | */ |
| 172758 | -SQLITE_API int SQLITE_STDCALL sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){ | |
| 172783 | +SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){ | |
| 172759 | 172784 | int ret; |
| 172760 | 172785 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172761 | 172786 | if( bIndirect>=0 ){ |
| 172762 | 172787 | pSession->bIndirect = bIndirect; |
| 172763 | 172788 | } |
| @@ -172768,11 +172793,11 @@ | ||
| 172768 | 172793 | |
| 172769 | 172794 | /* |
| 172770 | 172795 | ** Return true if there have been no changes to monitored tables recorded |
| 172771 | 172796 | ** by the session object passed as the only argument. |
| 172772 | 172797 | */ |
| 172773 | -SQLITE_API int SQLITE_STDCALL sqlite3session_isempty(sqlite3_session *pSession){ | |
| 172798 | +SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession){ | |
| 172774 | 172799 | int ret = 0; |
| 172775 | 172800 | SessionTable *pTab; |
| 172776 | 172801 | |
| 172777 | 172802 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172778 | 172803 | for(pTab=pSession->pTable; pTab && ret==0; pTab=pTab->pNext){ |
| @@ -172818,11 +172843,11 @@ | ||
| 172818 | 172843 | } |
| 172819 | 172844 | |
| 172820 | 172845 | /* |
| 172821 | 172846 | ** Create an iterator used to iterate through the contents of a changeset. |
| 172822 | 172847 | */ |
| 172823 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_start( | |
| 172848 | +SQLITE_API int sqlite3changeset_start( | |
| 172824 | 172849 | sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */ |
| 172825 | 172850 | int nChangeset, /* Size of buffer pChangeset in bytes */ |
| 172826 | 172851 | void *pChangeset /* Pointer to buffer containing changeset */ |
| 172827 | 172852 | ){ |
| 172828 | 172853 | return sessionChangesetStart(pp, 0, 0, nChangeset, pChangeset); |
| @@ -172829,11 +172854,11 @@ | ||
| 172829 | 172854 | } |
| 172830 | 172855 | |
| 172831 | 172856 | /* |
| 172832 | 172857 | ** Streaming version of sqlite3changeset_start(). |
| 172833 | 172858 | */ |
| 172834 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_start_strm( | |
| 172859 | +SQLITE_API int sqlite3changeset_start_strm( | |
| 172835 | 172860 | sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */ |
| 172836 | 172861 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 172837 | 172862 | void *pIn |
| 172838 | 172863 | ){ |
| 172839 | 172864 | return sessionChangesetStart(pp, xInput, pIn, 0, 0); |
| @@ -173250,20 +173275,20 @@ | ||
| 173250 | 173275 | ** or SQLITE_CORRUPT. |
| 173251 | 173276 | ** |
| 173252 | 173277 | ** This function may not be called on iterators passed to a conflict handler |
| 173253 | 173278 | ** callback by changeset_apply(). |
| 173254 | 173279 | */ |
| 173255 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_next(sqlite3_changeset_iter *p){ | |
| 173280 | +SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *p){ | |
| 173256 | 173281 | return sessionChangesetNext(p, 0, 0); |
| 173257 | 173282 | } |
| 173258 | 173283 | |
| 173259 | 173284 | /* |
| 173260 | 173285 | ** The following function extracts information on the current change |
| 173261 | 173286 | ** from a changeset iterator. It may only be called after changeset_next() |
| 173262 | 173287 | ** has returned SQLITE_ROW. |
| 173263 | 173288 | */ |
| 173264 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_op( | |
| 173289 | +SQLITE_API int sqlite3changeset_op( | |
| 173265 | 173290 | sqlite3_changeset_iter *pIter, /* Iterator handle */ |
| 173266 | 173291 | const char **pzTab, /* OUT: Pointer to table name */ |
| 173267 | 173292 | int *pnCol, /* OUT: Number of columns in table */ |
| 173268 | 173293 | int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */ |
| 173269 | 173294 | int *pbIndirect /* OUT: True if change is indirect */ |
| @@ -173279,11 +173304,11 @@ | ||
| 173279 | 173304 | ** Return information regarding the PRIMARY KEY and number of columns in |
| 173280 | 173305 | ** the database table affected by the change that pIter currently points |
| 173281 | 173306 | ** to. This function may only be called after changeset_next() returns |
| 173282 | 173307 | ** SQLITE_ROW. |
| 173283 | 173308 | */ |
| 173284 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_pk( | |
| 173309 | +SQLITE_API int sqlite3changeset_pk( | |
| 173285 | 173310 | sqlite3_changeset_iter *pIter, /* Iterator object */ |
| 173286 | 173311 | unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */ |
| 173287 | 173312 | int *pnCol /* OUT: Number of entries in output array */ |
| 173288 | 173313 | ){ |
| 173289 | 173314 | *pabPK = pIter->abPK; |
| @@ -173302,11 +173327,11 @@ | ||
| 173302 | 173327 | ** was not modified and is not a PK column), set *ppValue to NULL. |
| 173303 | 173328 | ** |
| 173304 | 173329 | ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is |
| 173305 | 173330 | ** not modified. Otherwise, SQLITE_OK. |
| 173306 | 173331 | */ |
| 173307 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_old( | |
| 173332 | +SQLITE_API int sqlite3changeset_old( | |
| 173308 | 173333 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173309 | 173334 | int iVal, /* Index of old.* value to retrieve */ |
| 173310 | 173335 | sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */ |
| 173311 | 173336 | ){ |
| 173312 | 173337 | if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_DELETE ){ |
| @@ -173330,11 +173355,11 @@ | ||
| 173330 | 173355 | ** was not modified), set *ppValue to NULL. |
| 173331 | 173356 | ** |
| 173332 | 173357 | ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is |
| 173333 | 173358 | ** not modified. Otherwise, SQLITE_OK. |
| 173334 | 173359 | */ |
| 173335 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_new( | |
| 173360 | +SQLITE_API int sqlite3changeset_new( | |
| 173336 | 173361 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173337 | 173362 | int iVal, /* Index of new.* value to retrieve */ |
| 173338 | 173363 | sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */ |
| 173339 | 173364 | ){ |
| 173340 | 173365 | if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_INSERT ){ |
| @@ -173364,11 +173389,11 @@ | ||
| 173364 | 173389 | ** containing the iVal'th value of the conflicting record. |
| 173365 | 173390 | ** |
| 173366 | 173391 | ** If value iVal is out-of-range or some other error occurs, an SQLite error |
| 173367 | 173392 | ** code is returned. Otherwise, SQLITE_OK. |
| 173368 | 173393 | */ |
| 173369 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_conflict( | |
| 173394 | +SQLITE_API int sqlite3changeset_conflict( | |
| 173370 | 173395 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173371 | 173396 | int iVal, /* Index of conflict record value to fetch */ |
| 173372 | 173397 | sqlite3_value **ppValue /* OUT: Value from conflicting row */ |
| 173373 | 173398 | ){ |
| 173374 | 173399 | if( !pIter->pConflict ){ |
| @@ -173387,11 +173412,11 @@ | ||
| 173387 | 173412 | ** it sets the output variable to the total number of known foreign key |
| 173388 | 173413 | ** violations in the destination database and returns SQLITE_OK. |
| 173389 | 173414 | ** |
| 173390 | 173415 | ** In all other cases this function returns SQLITE_MISUSE. |
| 173391 | 173416 | */ |
| 173392 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_fk_conflicts( | |
| 173417 | +SQLITE_API int sqlite3changeset_fk_conflicts( | |
| 173393 | 173418 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173394 | 173419 | int *pnOut /* OUT: Number of FK violations */ |
| 173395 | 173420 | ){ |
| 173396 | 173421 | if( pIter->pConflict || pIter->apValue ){ |
| 173397 | 173422 | return SQLITE_MISUSE; |
| @@ -173405,11 +173430,11 @@ | ||
| 173405 | 173430 | ** Finalize an iterator allocated with sqlite3changeset_start(). |
| 173406 | 173431 | ** |
| 173407 | 173432 | ** This function may not be called on iterators passed to a conflict handler |
| 173408 | 173433 | ** callback by changeset_apply(). |
| 173409 | 173434 | */ |
| 173410 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_finalize(sqlite3_changeset_iter *p){ | |
| 173435 | +SQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *p){ | |
| 173411 | 173436 | int rc = SQLITE_OK; |
| 173412 | 173437 | if( p ){ |
| 173413 | 173438 | int i; /* Used to iterate through p->apValue[] */ |
| 173414 | 173439 | rc = p->rc; |
| 173415 | 173440 | if( p->apValue ){ |
| @@ -173579,11 +173604,11 @@ | ||
| 173579 | 173604 | |
| 173580 | 173605 | |
| 173581 | 173606 | /* |
| 173582 | 173607 | ** Invert a changeset object. |
| 173583 | 173608 | */ |
| 173584 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert( | |
| 173609 | +SQLITE_API int sqlite3changeset_invert( | |
| 173585 | 173610 | int nChangeset, /* Number of bytes in input */ |
| 173586 | 173611 | const void *pChangeset, /* Input changeset */ |
| 173587 | 173612 | int *pnInverted, /* OUT: Number of bytes in output changeset */ |
| 173588 | 173613 | void **ppInverted /* OUT: Inverse of pChangeset */ |
| 173589 | 173614 | ){ |
| @@ -173598,11 +173623,11 @@ | ||
| 173598 | 173623 | } |
| 173599 | 173624 | |
| 173600 | 173625 | /* |
| 173601 | 173626 | ** Streaming version of sqlite3changeset_invert(). |
| 173602 | 173627 | */ |
| 173603 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert_strm( | |
| 173628 | +SQLITE_API int sqlite3changeset_invert_strm( | |
| 173604 | 173629 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 173605 | 173630 | void *pIn, |
| 173606 | 173631 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 173607 | 173632 | void *pOut |
| 173608 | 173633 | ){ |
| @@ -174478,11 +174503,11 @@ | ||
| 174478 | 174503 | /* |
| 174479 | 174504 | ** Apply the changeset passed via pChangeset/nChangeset to the main database |
| 174480 | 174505 | ** attached to handle "db". Invoke the supplied conflict handler callback |
| 174481 | 174506 | ** to resolve any conflicts encountered while applying the change. |
| 174482 | 174507 | */ |
| 174483 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply( | |
| 174508 | +SQLITE_API int sqlite3changeset_apply( | |
| 174484 | 174509 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 174485 | 174510 | int nChangeset, /* Size of changeset in bytes */ |
| 174486 | 174511 | void *pChangeset, /* Changeset blob */ |
| 174487 | 174512 | int(*xFilter)( |
| 174488 | 174513 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| @@ -174506,11 +174531,11 @@ | ||
| 174506 | 174531 | /* |
| 174507 | 174532 | ** Apply the changeset passed via xInput/pIn to the main database |
| 174508 | 174533 | ** attached to handle "db". Invoke the supplied conflict handler callback |
| 174509 | 174534 | ** to resolve any conflicts encountered while applying the change. |
| 174510 | 174535 | */ |
| 174511 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply_strm( | |
| 174536 | +SQLITE_API int sqlite3changeset_apply_strm( | |
| 174512 | 174537 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 174513 | 174538 | int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ |
| 174514 | 174539 | void *pIn, /* First arg for xInput */ |
| 174515 | 174540 | int(*xFilter)( |
| 174516 | 174541 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| @@ -174841,11 +174866,11 @@ | ||
| 174841 | 174866 | } |
| 174842 | 174867 | |
| 174843 | 174868 | /* |
| 174844 | 174869 | ** Allocate a new, empty, sqlite3_changegroup. |
| 174845 | 174870 | */ |
| 174846 | -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_new(sqlite3_changegroup **pp){ | |
| 174871 | +SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp){ | |
| 174847 | 174872 | int rc = SQLITE_OK; /* Return code */ |
| 174848 | 174873 | sqlite3_changegroup *p; /* New object */ |
| 174849 | 174874 | p = (sqlite3_changegroup*)sqlite3_malloc(sizeof(sqlite3_changegroup)); |
| 174850 | 174875 | if( p==0 ){ |
| 174851 | 174876 | rc = SQLITE_NOMEM; |
| @@ -174858,11 +174883,11 @@ | ||
| 174858 | 174883 | |
| 174859 | 174884 | /* |
| 174860 | 174885 | ** Add the changeset currently stored in buffer pData, size nData bytes, |
| 174861 | 174886 | ** to changeset-group p. |
| 174862 | 174887 | */ |
| 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){ | |
| 174864 | 174889 | sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */ |
| 174865 | 174890 | int rc; /* Return code */ |
| 174866 | 174891 | |
| 174867 | 174892 | rc = sqlite3changeset_start(&pIter, nData, pData); |
| 174868 | 174893 | if( rc==SQLITE_OK ){ |
| @@ -174874,11 +174899,11 @@ | ||
| 174874 | 174899 | |
| 174875 | 174900 | /* |
| 174876 | 174901 | ** Obtain a buffer containing a changeset representing the concatenation |
| 174877 | 174902 | ** of all changesets added to the group so far. |
| 174878 | 174903 | */ |
| 174879 | -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output( | |
| 174904 | +SQLITE_API int sqlite3changegroup_output( | |
| 174880 | 174905 | sqlite3_changegroup *pGrp, |
| 174881 | 174906 | int *pnData, |
| 174882 | 174907 | void **ppData |
| 174883 | 174908 | ){ |
| 174884 | 174909 | return sessionChangegroupOutput(pGrp, 0, 0, pnData, ppData); |
| @@ -174885,11 +174910,11 @@ | ||
| 174885 | 174910 | } |
| 174886 | 174911 | |
| 174887 | 174912 | /* |
| 174888 | 174913 | ** Streaming versions of changegroup_add(). |
| 174889 | 174914 | */ |
| 174890 | -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add_strm( | |
| 174915 | +SQLITE_API int sqlite3changegroup_add_strm( | |
| 174891 | 174916 | sqlite3_changegroup *pGrp, |
| 174892 | 174917 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 174893 | 174918 | void *pIn |
| 174894 | 174919 | ){ |
| 174895 | 174920 | sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */ |
| @@ -174904,11 +174929,11 @@ | ||
| 174904 | 174929 | } |
| 174905 | 174930 | |
| 174906 | 174931 | /* |
| 174907 | 174932 | ** Streaming versions of changegroup_output(). |
| 174908 | 174933 | */ |
| 174909 | -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output_strm( | |
| 174934 | +SQLITE_API int sqlite3changegroup_output_strm( | |
| 174910 | 174935 | sqlite3_changegroup *pGrp, |
| 174911 | 174936 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 174912 | 174937 | void *pOut |
| 174913 | 174938 | ){ |
| 174914 | 174939 | return sessionChangegroupOutput(pGrp, xOutput, pOut, 0, 0); |
| @@ -174915,21 +174940,21 @@ | ||
| 174915 | 174940 | } |
| 174916 | 174941 | |
| 174917 | 174942 | /* |
| 174918 | 174943 | ** Delete a changegroup object. |
| 174919 | 174944 | */ |
| 174920 | -SQLITE_API void SQLITE_STDCALL sqlite3changegroup_delete(sqlite3_changegroup *pGrp){ | |
| 174945 | +SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup *pGrp){ | |
| 174921 | 174946 | if( pGrp ){ |
| 174922 | 174947 | sessionDeleteTable(pGrp->pList); |
| 174923 | 174948 | sqlite3_free(pGrp); |
| 174924 | 174949 | } |
| 174925 | 174950 | } |
| 174926 | 174951 | |
| 174927 | 174952 | /* |
| 174928 | 174953 | ** Combine two changesets together. |
| 174929 | 174954 | */ |
| 174930 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat( | |
| 174955 | +SQLITE_API int sqlite3changeset_concat( | |
| 174931 | 174956 | int nLeft, /* Number of bytes in lhs input */ |
| 174932 | 174957 | void *pLeft, /* Lhs input changeset */ |
| 174933 | 174958 | int nRight /* Number of bytes in rhs input */, |
| 174934 | 174959 | void *pRight, /* Rhs input changeset */ |
| 174935 | 174960 | int *pnOut, /* OUT: Number of bytes in output changeset */ |
| @@ -174954,11 +174979,11 @@ | ||
| 174954 | 174979 | } |
| 174955 | 174980 | |
| 174956 | 174981 | /* |
| 174957 | 174982 | ** Streaming version of sqlite3changeset_concat(). |
| 174958 | 174983 | */ |
| 174959 | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat_strm( | |
| 174984 | +SQLITE_API int sqlite3changeset_concat_strm( | |
| 174960 | 174985 | int (*xInputA)(void *pIn, void *pData, int *pnData), |
| 174961 | 174986 | void *pInA, |
| 174962 | 174987 | int (*xInputB)(void *pIn, void *pData, int *pnData), |
| 174963 | 174988 | void *pInB, |
| 174964 | 174989 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| @@ -177186,11 +177211,11 @@ | ||
| 177186 | 177211 | |
| 177187 | 177212 | #ifndef SQLITE_CORE |
| 177188 | 177213 | #ifdef _WIN32 |
| 177189 | 177214 | __declspec(dllexport) |
| 177190 | 177215 | #endif |
| 177191 | -SQLITE_API int SQLITE_STDCALL sqlite3_json_init( | |
| 177216 | +SQLITE_API int sqlite3_json_init( | |
| 177192 | 177217 | sqlite3 *db, |
| 177193 | 177218 | char **pzErrMsg, |
| 177194 | 177219 | const sqlite3_api_routines *pApi |
| 177195 | 177220 | ){ |
| 177196 | 177221 | SQLITE_EXTENSION_INIT2(pApi); |
| @@ -194018,11 +194043,11 @@ | ||
| 194018 | 194043 | int nArg, /* Number of args */ |
| 194019 | 194044 | sqlite3_value **apUnused /* Function arguments */ |
| 194020 | 194045 | ){ |
| 194021 | 194046 | assert( nArg==0 ); |
| 194022 | 194047 | 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); | |
| 194024 | 194049 | } |
| 194025 | 194050 | |
| 194026 | 194051 | static int fts5Init(sqlite3 *db){ |
| 194027 | 194052 | static const sqlite3_module fts5Mod = { |
| 194028 | 194053 | /* iVersion */ 2, |
| @@ -194106,11 +194131,11 @@ | ||
| 194106 | 194131 | */ |
| 194107 | 194132 | #ifndef SQLITE_CORE |
| 194108 | 194133 | #ifdef _WIN32 |
| 194109 | 194134 | __declspec(dllexport) |
| 194110 | 194135 | #endif |
| 194111 | -SQLITE_API int SQLITE_STDCALL sqlite3_fts_init( | |
| 194136 | +SQLITE_API int sqlite3_fts_init( | |
| 194112 | 194137 | sqlite3 *db, |
| 194113 | 194138 | char **pzErrMsg, |
| 194114 | 194139 | const sqlite3_api_routines *pApi |
| 194115 | 194140 | ){ |
| 194116 | 194141 | SQLITE_EXTENSION_INIT2(pApi); |
| @@ -194119,11 +194144,11 @@ | ||
| 194119 | 194144 | } |
| 194120 | 194145 | |
| 194121 | 194146 | #ifdef _WIN32 |
| 194122 | 194147 | __declspec(dllexport) |
| 194123 | 194148 | #endif |
| 194124 | -SQLITE_API int SQLITE_STDCALL sqlite3_fts5_init( | |
| 194149 | +SQLITE_API int sqlite3_fts5_init( | |
| 194125 | 194150 | sqlite3 *db, |
| 194126 | 194151 | char **pzErrMsg, |
| 194127 | 194152 | const sqlite3_api_routines *pApi |
| 194128 | 194153 | ){ |
| 194129 | 194154 | SQLITE_EXTENSION_INIT2(pApi); |
| 194130 | 194155 |
| --- 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 @@ | ||
| 118 | 118 | ** |
| 119 | 119 | ** See also: [sqlite3_libversion()], |
| 120 | 120 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 121 | 121 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 122 | 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" | |
| 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 | 126 | |
| 127 | 127 | /* |
| 128 | 128 | ** CAPI3REF: Run-Time Library Version Numbers |
| 129 | 129 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 130 | 130 | ** |
| @@ -153,13 +153,13 @@ | ||
| 153 | 153 | ** [SQLITE_SOURCE_ID] C preprocessor macro. |
| 154 | 154 | ** |
| 155 | 155 | ** See also: [sqlite_version()] and [sqlite_source_id()]. |
| 156 | 156 | */ |
| 157 | 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); | |
| 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 | 161 | |
| 162 | 162 | /* |
| 163 | 163 | ** CAPI3REF: Run-Time Library Compilation Options Diagnostics |
| 164 | 164 | ** |
| 165 | 165 | ** ^The sqlite3_compileoption_used() function returns 0 or 1 |
| @@ -180,12 +180,12 @@ | ||
| 180 | 180 | ** |
| 181 | 181 | ** See also: SQL functions [sqlite_compileoption_used()] and |
| 182 | 182 | ** [sqlite_compileoption_get()] and the [compile_options pragma]. |
| 183 | 183 | */ |
| 184 | 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); | |
| 185 | +SQLITE_API int sqlite3_compileoption_used(const char *zOptName); | |
| 186 | +SQLITE_API const char *sqlite3_compileoption_get(int N); | |
| 187 | 187 | #endif |
| 188 | 188 | |
| 189 | 189 | /* |
| 190 | 190 | ** CAPI3REF: Test To See If The Library Is Threadsafe |
| 191 | 191 | ** |
| @@ -220,11 +220,11 @@ | ||
| 220 | 220 | ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() |
| 221 | 221 | ** is unchanged by calls to sqlite3_config().)^ |
| 222 | 222 | ** |
| 223 | 223 | ** See the [threading mode] documentation for additional information. |
| 224 | 224 | */ |
| 225 | -SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void); | |
| 225 | +SQLITE_API int sqlite3_threadsafe(void); | |
| 226 | 226 | |
| 227 | 227 | /* |
| 228 | 228 | ** CAPI3REF: Database Connection Handle |
| 229 | 229 | ** KEYWORDS: {database connection} {database connections} |
| 230 | 230 | ** |
| @@ -317,12 +317,12 @@ | ||
| 317 | 317 | ** from [sqlite3_open()], [sqlite3_open16()], or |
| 318 | 318 | ** [sqlite3_open_v2()], and not previously closed. |
| 319 | 319 | ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer |
| 320 | 320 | ** argument is a harmless no-op. |
| 321 | 321 | */ |
| 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*); | |
| 324 | 324 | |
| 325 | 325 | /* |
| 326 | 326 | ** The type for a callback function. |
| 327 | 327 | ** This is legacy and deprecated. It is included for historical |
| 328 | 328 | ** compatibility and is not documented. |
| @@ -389,11 +389,11 @@ | ||
| 389 | 389 | ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. |
| 390 | 390 | ** <li> The application must not modify the SQL statement text passed into |
| 391 | 391 | ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. |
| 392 | 392 | ** </ul> |
| 393 | 393 | */ |
| 394 | -SQLITE_API int SQLITE_STDCALL sqlite3_exec( | |
| 394 | +SQLITE_API int sqlite3_exec( | |
| 395 | 395 | sqlite3*, /* An open database */ |
| 396 | 396 | const char *sql, /* SQL to be evaluated */ |
| 397 | 397 | int (*callback)(void*,int,char**,char**), /* Callback function */ |
| 398 | 398 | void *, /* 1st argument to callback */ |
| 399 | 399 | char **errmsg /* Error msg written here */ |
| @@ -1388,14 +1388,14 @@ | ||
| 1388 | 1388 | ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied |
| 1389 | 1389 | ** implementation of sqlite3_os_init() or sqlite3_os_end() |
| 1390 | 1390 | ** must return [SQLITE_OK] on success and some other [error code] upon |
| 1391 | 1391 | ** failure. |
| 1392 | 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); | |
| 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 | 1397 | |
| 1398 | 1398 | /* |
| 1399 | 1399 | ** CAPI3REF: Configuring The SQLite Library |
| 1400 | 1400 | ** |
| 1401 | 1401 | ** The sqlite3_config() interface is used to make global configuration |
| @@ -1424,11 +1424,11 @@ | ||
| 1424 | 1424 | ** |
| 1425 | 1425 | ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. |
| 1426 | 1426 | ** ^If the option is unknown or SQLite is unable to set the option |
| 1427 | 1427 | ** then this routine returns a non-zero [error code]. |
| 1428 | 1428 | */ |
| 1429 | -SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...); | |
| 1429 | +SQLITE_API int sqlite3_config(int, ...); | |
| 1430 | 1430 | |
| 1431 | 1431 | /* |
| 1432 | 1432 | ** CAPI3REF: Configure database connections |
| 1433 | 1433 | ** METHOD: sqlite3 |
| 1434 | 1434 | ** |
| @@ -1443,11 +1443,11 @@ | ||
| 1443 | 1443 | ** Subsequent arguments vary depending on the configuration verb. |
| 1444 | 1444 | ** |
| 1445 | 1445 | ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if |
| 1446 | 1446 | ** the call is considered successful. |
| 1447 | 1447 | */ |
| 1448 | -SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...); | |
| 1448 | +SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...); | |
| 1449 | 1449 | |
| 1450 | 1450 | /* |
| 1451 | 1451 | ** CAPI3REF: Memory Allocation Routines |
| 1452 | 1452 | ** |
| 1453 | 1453 | ** An instance of this object defines the interface between SQLite |
| @@ -1984,11 +1984,11 @@ | ||
| 1984 | 1984 | ** |
| 1985 | 1985 | ** ^The sqlite3_extended_result_codes() routine enables or disables the |
| 1986 | 1986 | ** [extended result codes] feature of SQLite. ^The extended result |
| 1987 | 1987 | ** codes are disabled by default for historical compatibility. |
| 1988 | 1988 | */ |
| 1989 | -SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff); | |
| 1989 | +SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff); | |
| 1990 | 1990 | |
| 1991 | 1991 | /* |
| 1992 | 1992 | ** CAPI3REF: Last Insert Rowid |
| 1993 | 1993 | ** METHOD: sqlite3 |
| 1994 | 1994 | ** |
| @@ -2036,11 +2036,11 @@ | ||
| 2036 | 2036 | ** function is running and thus changes the last insert [rowid], |
| 2037 | 2037 | ** then the value returned by [sqlite3_last_insert_rowid()] is |
| 2038 | 2038 | ** unpredictable and might not equal either the old or the new |
| 2039 | 2039 | ** last insert [rowid]. |
| 2040 | 2040 | */ |
| 2041 | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); | |
| 2041 | +SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); | |
| 2042 | 2042 | |
| 2043 | 2043 | /* |
| 2044 | 2044 | ** CAPI3REF: Count The Number Of Rows Modified |
| 2045 | 2045 | ** METHOD: sqlite3 |
| 2046 | 2046 | ** |
| @@ -2089,11 +2089,11 @@ | ||
| 2089 | 2089 | ** |
| 2090 | 2090 | ** If a separate thread makes changes on the same database connection |
| 2091 | 2091 | ** while [sqlite3_changes()] is running then the value returned |
| 2092 | 2092 | ** is unpredictable and not meaningful. |
| 2093 | 2093 | */ |
| 2094 | -SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*); | |
| 2094 | +SQLITE_API int sqlite3_changes(sqlite3*); | |
| 2095 | 2095 | |
| 2096 | 2096 | /* |
| 2097 | 2097 | ** CAPI3REF: Total Number Of Rows Modified |
| 2098 | 2098 | ** METHOD: sqlite3 |
| 2099 | 2099 | ** |
| @@ -2113,11 +2113,11 @@ | ||
| 2113 | 2113 | ** |
| 2114 | 2114 | ** If a separate thread makes changes on the same database connection |
| 2115 | 2115 | ** while [sqlite3_total_changes()] is running then the value |
| 2116 | 2116 | ** returned is unpredictable and not meaningful. |
| 2117 | 2117 | */ |
| 2118 | -SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*); | |
| 2118 | +SQLITE_API int sqlite3_total_changes(sqlite3*); | |
| 2119 | 2119 | |
| 2120 | 2120 | /* |
| 2121 | 2121 | ** CAPI3REF: Interrupt A Long-Running Query |
| 2122 | 2122 | ** METHOD: sqlite3 |
| 2123 | 2123 | ** |
| @@ -2153,11 +2153,11 @@ | ||
| 2153 | 2153 | ** that are started after the sqlite3_interrupt() call returns. |
| 2154 | 2154 | ** |
| 2155 | 2155 | ** If the database connection closes while [sqlite3_interrupt()] |
| 2156 | 2156 | ** is running then bad things will likely happen. |
| 2157 | 2157 | */ |
| 2158 | -SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*); | |
| 2158 | +SQLITE_API void sqlite3_interrupt(sqlite3*); | |
| 2159 | 2159 | |
| 2160 | 2160 | /* |
| 2161 | 2161 | ** CAPI3REF: Determine If An SQL Statement Is Complete |
| 2162 | 2162 | ** |
| 2163 | 2163 | ** These routines are useful during command-line input to determine if the |
| @@ -2188,12 +2188,12 @@ | ||
| 2188 | 2188 | ** UTF-8 string. |
| 2189 | 2189 | ** |
| 2190 | 2190 | ** The input to [sqlite3_complete16()] must be a zero-terminated |
| 2191 | 2191 | ** UTF-16 string in native byte order. |
| 2192 | 2192 | */ |
| 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); | |
| 2195 | 2195 | |
| 2196 | 2196 | /* |
| 2197 | 2197 | ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors |
| 2198 | 2198 | ** KEYWORDS: {busy-handler callback} {busy handler} |
| 2199 | 2199 | ** METHOD: sqlite3 |
| @@ -2250,11 +2250,11 @@ | ||
| 2250 | 2250 | ** result in undefined behavior. |
| 2251 | 2251 | ** |
| 2252 | 2252 | ** A busy handler must not close the database connection |
| 2253 | 2253 | ** or [prepared statement] that invoked the busy handler. |
| 2254 | 2254 | */ |
| 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*); | |
| 2256 | 2256 | |
| 2257 | 2257 | /* |
| 2258 | 2258 | ** CAPI3REF: Set A Busy Timeout |
| 2259 | 2259 | ** METHOD: sqlite3 |
| 2260 | 2260 | ** |
| @@ -2273,11 +2273,11 @@ | ||
| 2273 | 2273 | ** was defined (using [sqlite3_busy_handler()]) prior to calling |
| 2274 | 2274 | ** this routine, that other busy handler is cleared.)^ |
| 2275 | 2275 | ** |
| 2276 | 2276 | ** See also: [PRAGMA busy_timeout] |
| 2277 | 2277 | */ |
| 2278 | -SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms); | |
| 2278 | +SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms); | |
| 2279 | 2279 | |
| 2280 | 2280 | /* |
| 2281 | 2281 | ** CAPI3REF: Convenience Routines For Running Queries |
| 2282 | 2282 | ** METHOD: sqlite3 |
| 2283 | 2283 | ** |
| @@ -2348,19 +2348,19 @@ | ||
| 2348 | 2348 | ** interface defined here. As a consequence, errors that occur in the |
| 2349 | 2349 | ** wrapper layer outside of the internal [sqlite3_exec()] call are not |
| 2350 | 2350 | ** reflected in subsequent calls to [sqlite3_errcode()] or |
| 2351 | 2351 | ** [sqlite3_errmsg()]. |
| 2352 | 2352 | */ |
| 2353 | -SQLITE_API int SQLITE_STDCALL sqlite3_get_table( | |
| 2353 | +SQLITE_API int sqlite3_get_table( | |
| 2354 | 2354 | sqlite3 *db, /* An open database */ |
| 2355 | 2355 | const char *zSql, /* SQL to be evaluated */ |
| 2356 | 2356 | char ***pazResult, /* Results of the query */ |
| 2357 | 2357 | int *pnRow, /* Number of result rows written here */ |
| 2358 | 2358 | int *pnColumn, /* Number of result columns written here */ |
| 2359 | 2359 | char **pzErrmsg /* Error msg written here */ |
| 2360 | 2360 | ); |
| 2361 | -SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result); | |
| 2361 | +SQLITE_API void sqlite3_free_table(char **result); | |
| 2362 | 2362 | |
| 2363 | 2363 | /* |
| 2364 | 2364 | ** CAPI3REF: Formatted String Printing Functions |
| 2365 | 2365 | ** |
| 2366 | 2366 | ** These routines are work-alikes of the "printf()" family of functions |
| @@ -2462,14 +2462,14 @@ | ||
| 2462 | 2462 | ** |
| 2463 | 2463 | ** ^(The "%z" formatting option works like "%s" but with the |
| 2464 | 2464 | ** addition that after the string has been read and copied into |
| 2465 | 2465 | ** the result, [sqlite3_free()] is called on the input string.)^ |
| 2466 | 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); | |
| 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 | 2471 | |
| 2472 | 2472 | /* |
| 2473 | 2473 | ** CAPI3REF: Memory Allocation Subsystem |
| 2474 | 2474 | ** |
| 2475 | 2475 | ** The SQLite core uses these three routines for all of its own |
| @@ -2555,16 +2555,16 @@ | ||
| 2555 | 2555 | ** |
| 2556 | 2556 | ** The application must not read or write any part of |
| 2557 | 2557 | ** a block of memory after it has been released using |
| 2558 | 2558 | ** [sqlite3_free()] or [sqlite3_realloc()]. |
| 2559 | 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*); | |
| 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 | 2566 | |
| 2567 | 2567 | /* |
| 2568 | 2568 | ** CAPI3REF: Memory Allocator Statistics |
| 2569 | 2569 | ** |
| 2570 | 2570 | ** SQLite provides these two interfaces for reporting on the status |
| @@ -2585,12 +2585,12 @@ | ||
| 2585 | 2585 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 2586 | 2586 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| 2587 | 2587 | ** by [sqlite3_memory_highwater(1)] is the high-water mark |
| 2588 | 2588 | ** prior to the reset. |
| 2589 | 2589 | */ |
| 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); | |
| 2592 | 2592 | |
| 2593 | 2593 | /* |
| 2594 | 2594 | ** CAPI3REF: Pseudo-Random Number Generator |
| 2595 | 2595 | ** |
| 2596 | 2596 | ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to |
| @@ -2609,11 +2609,11 @@ | ||
| 2609 | 2609 | ** ^If the previous call to this routine had an N of 1 or more and a |
| 2610 | 2610 | ** non-NULL P then the pseudo-randomness is generated |
| 2611 | 2611 | ** internally and without recourse to the [sqlite3_vfs] xRandomness |
| 2612 | 2612 | ** method. |
| 2613 | 2613 | */ |
| 2614 | -SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P); | |
| 2614 | +SQLITE_API void sqlite3_randomness(int N, void *P); | |
| 2615 | 2615 | |
| 2616 | 2616 | /* |
| 2617 | 2617 | ** CAPI3REF: Compile-Time Authorization Callbacks |
| 2618 | 2618 | ** METHOD: sqlite3 |
| 2619 | 2619 | ** |
| @@ -2692,11 +2692,11 @@ | ||
| 2692 | 2692 | ** [sqlite3_prepare()] or its variants. Authorization is not |
| 2693 | 2693 | ** performed during statement evaluation in [sqlite3_step()], unless |
| 2694 | 2694 | ** as stated in the previous paragraph, sqlite3_step() invokes |
| 2695 | 2695 | ** sqlite3_prepare_v2() to reprepare a statement after a schema change. |
| 2696 | 2696 | */ |
| 2697 | -SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( | |
| 2697 | +SQLITE_API int sqlite3_set_authorizer( | |
| 2698 | 2698 | sqlite3*, |
| 2699 | 2699 | int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 2700 | 2700 | void *pUserData |
| 2701 | 2701 | ); |
| 2702 | 2702 | |
| @@ -2800,13 +2800,13 @@ | ||
| 2800 | 2800 | ** digits in the time are meaningless. Future versions of SQLite |
| 2801 | 2801 | ** might provide greater resolution on the profiler callback. The |
| 2802 | 2802 | ** sqlite3_profile() function is considered experimental and is |
| 2803 | 2803 | ** subject to change in future versions of SQLite. |
| 2804 | 2804 | */ |
| 2805 | -SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*, | |
| 2805 | +SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*, | |
| 2806 | 2806 | 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*, | |
| 2808 | 2808 | void(*xProfile)(void*,const char*,sqlite3_uint64), void*); |
| 2809 | 2809 | |
| 2810 | 2810 | /* |
| 2811 | 2811 | ** CAPI3REF: SQL Trace Event Codes |
| 2812 | 2812 | ** KEYWORDS: SQLITE_TRACE |
| @@ -2891,11 +2891,11 @@ | ||
| 2891 | 2891 | ** |
| 2892 | 2892 | ** The sqlite3_trace_v2() interface is intended to replace the legacy |
| 2893 | 2893 | ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which |
| 2894 | 2894 | ** are deprecated. |
| 2895 | 2895 | */ |
| 2896 | -SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2( | |
| 2896 | +SQLITE_API int sqlite3_trace_v2( | |
| 2897 | 2897 | sqlite3*, |
| 2898 | 2898 | unsigned uMask, |
| 2899 | 2899 | int(*xCallback)(unsigned,void*,void*,void*), |
| 2900 | 2900 | void *pCtx |
| 2901 | 2901 | ); |
| @@ -2930,11 +2930,11 @@ | ||
| 2930 | 2930 | ** the database connection that invoked the progress handler. |
| 2931 | 2931 | ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their |
| 2932 | 2932 | ** database connections for the meaning of "modify" in this paragraph. |
| 2933 | 2933 | ** |
| 2934 | 2934 | */ |
| 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*); | |
| 2936 | 2936 | |
| 2937 | 2937 | /* |
| 2938 | 2938 | ** CAPI3REF: Opening A New Database Connection |
| 2939 | 2939 | ** CONSTRUCTOR: sqlite3 |
| 2940 | 2940 | ** |
| @@ -3159,19 +3159,19 @@ | ||
| 3159 | 3159 | ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various |
| 3160 | 3160 | ** features that require the use of temporary files may fail. |
| 3161 | 3161 | ** |
| 3162 | 3162 | ** See also: [sqlite3_temp_directory] |
| 3163 | 3163 | */ |
| 3164 | -SQLITE_API int SQLITE_STDCALL sqlite3_open( | |
| 3164 | +SQLITE_API int sqlite3_open( | |
| 3165 | 3165 | const char *filename, /* Database filename (UTF-8) */ |
| 3166 | 3166 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3167 | 3167 | ); |
| 3168 | -SQLITE_API int SQLITE_STDCALL sqlite3_open16( | |
| 3168 | +SQLITE_API int sqlite3_open16( | |
| 3169 | 3169 | const void *filename, /* Database filename (UTF-16) */ |
| 3170 | 3170 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3171 | 3171 | ); |
| 3172 | -SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( | |
| 3172 | +SQLITE_API int sqlite3_open_v2( | |
| 3173 | 3173 | const char *filename, /* Database filename (UTF-8) */ |
| 3174 | 3174 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 3175 | 3175 | int flags, /* Flags */ |
| 3176 | 3176 | const char *zVfs /* Name of VFS module to use */ |
| 3177 | 3177 | ); |
| @@ -3213,13 +3213,13 @@ | ||
| 3213 | 3213 | ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and |
| 3214 | 3214 | ** is not a database file pathname pointer that SQLite passed into the xOpen |
| 3215 | 3215 | ** VFS method, then the behavior of this routine is undefined and probably |
| 3216 | 3216 | ** undesirable. |
| 3217 | 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); | |
| 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 | 3221 | |
| 3222 | 3222 | |
| 3223 | 3223 | /* |
| 3224 | 3224 | ** CAPI3REF: Error Codes And Messages |
| 3225 | 3225 | ** METHOD: sqlite3 |
| @@ -3259,15 +3259,15 @@ | ||
| 3259 | 3259 | ** |
| 3260 | 3260 | ** If an interface fails with SQLITE_MISUSE, that means the interface |
| 3261 | 3261 | ** was invoked incorrectly by the application. In that case, the |
| 3262 | 3262 | ** error code and message may or may not be set. |
| 3263 | 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); | |
| 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 | 3269 | |
| 3270 | 3270 | /* |
| 3271 | 3271 | ** CAPI3REF: Prepared Statement Object |
| 3272 | 3272 | ** KEYWORDS: {prepared statement} {prepared statements} |
| 3273 | 3273 | ** |
| @@ -3331,11 +3331,11 @@ | ||
| 3331 | 3331 | ** created by an untrusted script can be contained using the |
| 3332 | 3332 | ** [max_page_count] [PRAGMA]. |
| 3333 | 3333 | ** |
| 3334 | 3334 | ** New run-time limit categories may be added in future releases. |
| 3335 | 3335 | */ |
| 3336 | -SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal); | |
| 3336 | +SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal); | |
| 3337 | 3337 | |
| 3338 | 3338 | /* |
| 3339 | 3339 | ** CAPI3REF: Run-Time Limit Categories |
| 3340 | 3340 | ** KEYWORDS: {limit category} {*limit categories} |
| 3341 | 3341 | ** |
| @@ -3483,32 +3483,32 @@ | ||
| 3483 | 3483 | ** or [GLOB] operator or if the parameter is compared to an indexed column |
| 3484 | 3484 | ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled. |
| 3485 | 3485 | ** </li> |
| 3486 | 3486 | ** </ol> |
| 3487 | 3487 | */ |
| 3488 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare( | |
| 3488 | +SQLITE_API int sqlite3_prepare( | |
| 3489 | 3489 | sqlite3 *db, /* Database handle */ |
| 3490 | 3490 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3491 | 3491 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3492 | 3492 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3493 | 3493 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3494 | 3494 | ); |
| 3495 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( | |
| 3495 | +SQLITE_API int sqlite3_prepare_v2( | |
| 3496 | 3496 | sqlite3 *db, /* Database handle */ |
| 3497 | 3497 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3498 | 3498 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3499 | 3499 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3500 | 3500 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3501 | 3501 | ); |
| 3502 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( | |
| 3502 | +SQLITE_API int sqlite3_prepare16( | |
| 3503 | 3503 | sqlite3 *db, /* Database handle */ |
| 3504 | 3504 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3505 | 3505 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3506 | 3506 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3507 | 3507 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3508 | 3508 | ); |
| 3509 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( | |
| 3509 | +SQLITE_API int sqlite3_prepare16_v2( | |
| 3510 | 3510 | sqlite3 *db, /* Database handle */ |
| 3511 | 3511 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3512 | 3512 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3513 | 3513 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3514 | 3514 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| @@ -3543,12 +3543,12 @@ | ||
| 3543 | 3543 | ** automatically freed when the prepared statement is finalized. |
| 3544 | 3544 | ** ^The string returned by sqlite3_expanded_sql(P), on the other hand, |
| 3545 | 3545 | ** is obtained from [sqlite3_malloc()] and must be free by the application |
| 3546 | 3546 | ** by passing it to [sqlite3_free()]. |
| 3547 | 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); | |
| 3548 | +SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); | |
| 3549 | +SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt); | |
| 3550 | 3550 | |
| 3551 | 3551 | /* |
| 3552 | 3552 | ** CAPI3REF: Determine If An SQL Statement Writes The Database |
| 3553 | 3553 | ** METHOD: sqlite3_stmt |
| 3554 | 3554 | ** |
| @@ -3576,11 +3576,11 @@ | ||
| 3576 | 3576 | ** database. ^The [ATTACH] and [DETACH] statements also cause |
| 3577 | 3577 | ** sqlite3_stmt_readonly() to return true since, while those statements |
| 3578 | 3578 | ** change the configuration of a database connection, they do not make |
| 3579 | 3579 | ** changes to the content of the database files on disk. |
| 3580 | 3580 | */ |
| 3581 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); | |
| 3581 | +SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); | |
| 3582 | 3582 | |
| 3583 | 3583 | /* |
| 3584 | 3584 | ** CAPI3REF: Determine If A Prepared Statement Has Been Reset |
| 3585 | 3585 | ** METHOD: sqlite3_stmt |
| 3586 | 3586 | ** |
| @@ -3597,11 +3597,11 @@ | ||
| 3597 | 3597 | ** to locate all prepared statements associated with a database |
| 3598 | 3598 | ** connection that are in need of being reset. This can be used, |
| 3599 | 3599 | ** for example, in diagnostic routines to search for prepared |
| 3600 | 3600 | ** statements that are holding a transaction open. |
| 3601 | 3601 | */ |
| 3602 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*); | |
| 3602 | +SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*); | |
| 3603 | 3603 | |
| 3604 | 3604 | /* |
| 3605 | 3605 | ** CAPI3REF: Dynamically Typed Value Object |
| 3606 | 3606 | ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} |
| 3607 | 3607 | ** |
| @@ -3761,24 +3761,24 @@ | ||
| 3761 | 3761 | ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. |
| 3762 | 3762 | ** |
| 3763 | 3763 | ** See also: [sqlite3_bind_parameter_count()], |
| 3764 | 3764 | ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. |
| 3765 | 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, | |
| 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 | 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, | |
| 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 | 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); | |
| 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 | 3780 | |
| 3781 | 3781 | /* |
| 3782 | 3782 | ** CAPI3REF: Number Of SQL Parameters |
| 3783 | 3783 | ** METHOD: sqlite3_stmt |
| 3784 | 3784 | ** |
| @@ -3795,11 +3795,11 @@ | ||
| 3795 | 3795 | ** |
| 3796 | 3796 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3797 | 3797 | ** [sqlite3_bind_parameter_name()], and |
| 3798 | 3798 | ** [sqlite3_bind_parameter_index()]. |
| 3799 | 3799 | */ |
| 3800 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*); | |
| 3800 | +SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*); | |
| 3801 | 3801 | |
| 3802 | 3802 | /* |
| 3803 | 3803 | ** CAPI3REF: Name Of A Host Parameter |
| 3804 | 3804 | ** METHOD: sqlite3_stmt |
| 3805 | 3805 | ** |
| @@ -3823,11 +3823,11 @@ | ||
| 3823 | 3823 | ** |
| 3824 | 3824 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3825 | 3825 | ** [sqlite3_bind_parameter_count()], and |
| 3826 | 3826 | ** [sqlite3_bind_parameter_index()]. |
| 3827 | 3827 | */ |
| 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); | |
| 3829 | 3829 | |
| 3830 | 3830 | /* |
| 3831 | 3831 | ** CAPI3REF: Index Of A Parameter With A Given Name |
| 3832 | 3832 | ** METHOD: sqlite3_stmt |
| 3833 | 3833 | ** |
| @@ -3840,21 +3840,21 @@ | ||
| 3840 | 3840 | ** |
| 3841 | 3841 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3842 | 3842 | ** [sqlite3_bind_parameter_count()], and |
| 3843 | 3843 | ** [sqlite3_bind_parameter_name()]. |
| 3844 | 3844 | */ |
| 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); | |
| 3846 | 3846 | |
| 3847 | 3847 | /* |
| 3848 | 3848 | ** CAPI3REF: Reset All Bindings On A Prepared Statement |
| 3849 | 3849 | ** METHOD: sqlite3_stmt |
| 3850 | 3850 | ** |
| 3851 | 3851 | ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset |
| 3852 | 3852 | ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. |
| 3853 | 3853 | ** ^Use this routine to reset all host parameters to NULL. |
| 3854 | 3854 | */ |
| 3855 | -SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*); | |
| 3855 | +SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*); | |
| 3856 | 3856 | |
| 3857 | 3857 | /* |
| 3858 | 3858 | ** CAPI3REF: Number Of Columns In A Result Set |
| 3859 | 3859 | ** METHOD: sqlite3_stmt |
| 3860 | 3860 | ** |
| @@ -3862,11 +3862,11 @@ | ||
| 3862 | 3862 | ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL |
| 3863 | 3863 | ** statement that does not return data (for example an [UPDATE]). |
| 3864 | 3864 | ** |
| 3865 | 3865 | ** See also: [sqlite3_data_count()] |
| 3866 | 3866 | */ |
| 3867 | -SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt); | |
| 3867 | +SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt); | |
| 3868 | 3868 | |
| 3869 | 3869 | /* |
| 3870 | 3870 | ** CAPI3REF: Column Names In A Result Set |
| 3871 | 3871 | ** METHOD: sqlite3_stmt |
| 3872 | 3872 | ** |
| @@ -3891,12 +3891,12 @@ | ||
| 3891 | 3891 | ** ^The name of a result column is the value of the "AS" clause for |
| 3892 | 3892 | ** that column, if there is an AS clause. If there is no AS clause |
| 3893 | 3893 | ** then the name of the column is unspecified and may change from |
| 3894 | 3894 | ** one release of SQLite to the next. |
| 3895 | 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); | |
| 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 | 3898 | |
| 3899 | 3899 | /* |
| 3900 | 3900 | ** CAPI3REF: Source Of Data In A Query Result |
| 3901 | 3901 | ** METHOD: sqlite3_stmt |
| 3902 | 3902 | ** |
| @@ -3940,16 +3940,16 @@ | ||
| 3940 | 3940 | ** If two or more threads call one or more |
| 3941 | 3941 | ** [sqlite3_column_database_name | column metadata interfaces] |
| 3942 | 3942 | ** for the same [prepared statement] and result column |
| 3943 | 3943 | ** at the same time then the results are undefined. |
| 3944 | 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); | |
| 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 | 3951 | |
| 3952 | 3952 | /* |
| 3953 | 3953 | ** CAPI3REF: Declared Datatype Of A Query Result |
| 3954 | 3954 | ** METHOD: sqlite3_stmt |
| 3955 | 3955 | ** |
| @@ -3977,12 +3977,12 @@ | ||
| 3977 | 3977 | ** data stored in that column is of the declared type. SQLite is |
| 3978 | 3978 | ** strongly typed, but the typing is dynamic not static. ^Type |
| 3979 | 3979 | ** is associated with individual values, not with the containers |
| 3980 | 3980 | ** used to hold those values. |
| 3981 | 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); | |
| 3982 | +SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int); | |
| 3983 | +SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int); | |
| 3984 | 3984 | |
| 3985 | 3985 | /* |
| 3986 | 3986 | ** CAPI3REF: Evaluate An SQL Statement |
| 3987 | 3987 | ** METHOD: sqlite3_stmt |
| 3988 | 3988 | ** |
| @@ -4058,11 +4058,11 @@ | ||
| 4058 | 4058 | ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead |
| 4059 | 4059 | ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, |
| 4060 | 4060 | ** then the more specific [error codes] are returned directly |
| 4061 | 4061 | ** by sqlite3_step(). The use of the "v2" interface is recommended. |
| 4062 | 4062 | */ |
| 4063 | -SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*); | |
| 4063 | +SQLITE_API int sqlite3_step(sqlite3_stmt*); | |
| 4064 | 4064 | |
| 4065 | 4065 | /* |
| 4066 | 4066 | ** CAPI3REF: Number of columns in a result set |
| 4067 | 4067 | ** METHOD: sqlite3_stmt |
| 4068 | 4068 | ** |
| @@ -4079,11 +4079,11 @@ | ||
| 4079 | 4079 | ** where it always returns zero since each step of that multi-step |
| 4080 | 4080 | ** pragma returns 0 columns of data. |
| 4081 | 4081 | ** |
| 4082 | 4082 | ** See also: [sqlite3_column_count()] |
| 4083 | 4083 | */ |
| 4084 | -SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt); | |
| 4084 | +SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt); | |
| 4085 | 4085 | |
| 4086 | 4086 | /* |
| 4087 | 4087 | ** CAPI3REF: Fundamental Datatypes |
| 4088 | 4088 | ** KEYWORDS: SQLITE_TEXT |
| 4089 | 4089 | ** |
| @@ -4269,20 +4269,20 @@ | ||
| 4269 | 4269 | ** of these routines, a default value is returned. The default value |
| 4270 | 4270 | ** is either the integer 0, the floating point number 0.0, or a NULL |
| 4271 | 4271 | ** pointer. Subsequent calls to [sqlite3_errcode()] will return |
| 4272 | 4272 | ** [SQLITE_NOMEM].)^ |
| 4273 | 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); | |
| 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 | 4284 | |
| 4285 | 4285 | /* |
| 4286 | 4286 | ** CAPI3REF: Destroy A Prepared Statement Object |
| 4287 | 4287 | ** DESTRUCTOR: sqlite3_stmt |
| 4288 | 4288 | ** |
| @@ -4306,11 +4306,11 @@ | ||
| 4306 | 4306 | ** resource leaks. It is a grievous error for the application to try to use |
| 4307 | 4307 | ** a prepared statement after it has been finalized. Any use of a prepared |
| 4308 | 4308 | ** statement after it has been finalized can result in undefined and |
| 4309 | 4309 | ** undesirable behavior such as segfaults and heap corruption. |
| 4310 | 4310 | */ |
| 4311 | -SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt); | |
| 4311 | +SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); | |
| 4312 | 4312 | |
| 4313 | 4313 | /* |
| 4314 | 4314 | ** CAPI3REF: Reset A Prepared Statement Object |
| 4315 | 4315 | ** METHOD: sqlite3_stmt |
| 4316 | 4316 | ** |
| @@ -4333,11 +4333,11 @@ | ||
| 4333 | 4333 | ** [sqlite3_reset(S)] returns an appropriate [error code]. |
| 4334 | 4334 | ** |
| 4335 | 4335 | ** ^The [sqlite3_reset(S)] interface does not change the values |
| 4336 | 4336 | ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. |
| 4337 | 4337 | */ |
| 4338 | -SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt); | |
| 4338 | +SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); | |
| 4339 | 4339 | |
| 4340 | 4340 | /* |
| 4341 | 4341 | ** CAPI3REF: Create Or Redefine SQL Functions |
| 4342 | 4342 | ** KEYWORDS: {function creation routines} |
| 4343 | 4343 | ** KEYWORDS: {application-defined SQL function} |
| @@ -4433,31 +4433,31 @@ | ||
| 4433 | 4433 | ** ^An application-defined function is permitted to call other |
| 4434 | 4434 | ** SQLite interfaces. However, such calls must not |
| 4435 | 4435 | ** close the database connection nor finalize or reset the prepared |
| 4436 | 4436 | ** statement in which the function is running. |
| 4437 | 4437 | */ |
| 4438 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function( | |
| 4438 | +SQLITE_API int sqlite3_create_function( | |
| 4439 | 4439 | sqlite3 *db, |
| 4440 | 4440 | const char *zFunctionName, |
| 4441 | 4441 | int nArg, |
| 4442 | 4442 | int eTextRep, |
| 4443 | 4443 | void *pApp, |
| 4444 | 4444 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4445 | 4445 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4446 | 4446 | void (*xFinal)(sqlite3_context*) |
| 4447 | 4447 | ); |
| 4448 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( | |
| 4448 | +SQLITE_API int sqlite3_create_function16( | |
| 4449 | 4449 | sqlite3 *db, |
| 4450 | 4450 | const void *zFunctionName, |
| 4451 | 4451 | int nArg, |
| 4452 | 4452 | int eTextRep, |
| 4453 | 4453 | void *pApp, |
| 4454 | 4454 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4455 | 4455 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4456 | 4456 | void (*xFinal)(sqlite3_context*) |
| 4457 | 4457 | ); |
| 4458 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( | |
| 4458 | +SQLITE_API int sqlite3_create_function_v2( | |
| 4459 | 4459 | sqlite3 *db, |
| 4460 | 4460 | const char *zFunctionName, |
| 4461 | 4461 | int nArg, |
| 4462 | 4462 | int eTextRep, |
| 4463 | 4463 | void *pApp, |
| @@ -4499,16 +4499,16 @@ | ||
| 4499 | 4499 | ** to be supported. However, new applications should avoid |
| 4500 | 4500 | ** the use of these functions. To encourage programmers to avoid |
| 4501 | 4501 | ** these functions, we will not explain what they do. |
| 4502 | 4502 | */ |
| 4503 | 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), | |
| 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 | 4510 | void*,sqlite3_int64); |
| 4511 | 4511 | #endif |
| 4512 | 4512 | |
| 4513 | 4513 | /* |
| 4514 | 4514 | ** CAPI3REF: Obtaining SQL Values |
| @@ -4554,22 +4554,22 @@ | ||
| 4554 | 4554 | ** or [sqlite3_value_text16()]. |
| 4555 | 4555 | ** |
| 4556 | 4556 | ** These routines must be called from the same thread as |
| 4557 | 4557 | ** the SQL function that supplied the [sqlite3_value*] parameters. |
| 4558 | 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*); | |
| 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 | 4571 | |
| 4572 | 4572 | /* |
| 4573 | 4573 | ** CAPI3REF: Finding The Subtype Of SQL Values |
| 4574 | 4574 | ** METHOD: sqlite3_value |
| 4575 | 4575 | ** |
| @@ -4581,11 +4581,11 @@ | ||
| 4581 | 4581 | ** |
| 4582 | 4582 | ** SQLite makes no use of subtype itself. It merely passes the subtype |
| 4583 | 4583 | ** from the result of one [application-defined SQL function] into the |
| 4584 | 4584 | ** input of another. |
| 4585 | 4585 | */ |
| 4586 | -SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*); | |
| 4586 | +SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*); | |
| 4587 | 4587 | |
| 4588 | 4588 | /* |
| 4589 | 4589 | ** CAPI3REF: Copy And Free SQL Values |
| 4590 | 4590 | ** METHOD: sqlite3_value |
| 4591 | 4591 | ** |
| @@ -4597,12 +4597,12 @@ | ||
| 4597 | 4597 | ** |
| 4598 | 4598 | ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object |
| 4599 | 4599 | ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer |
| 4600 | 4600 | ** then sqlite3_value_free(V) is a harmless no-op. |
| 4601 | 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*); | |
| 4602 | +SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*); | |
| 4603 | +SQLITE_API void sqlite3_value_free(sqlite3_value*); | |
| 4604 | 4604 | |
| 4605 | 4605 | /* |
| 4606 | 4606 | ** CAPI3REF: Obtain Aggregate Function Context |
| 4607 | 4607 | ** METHOD: sqlite3_context |
| 4608 | 4608 | ** |
| @@ -4643,11 +4643,11 @@ | ||
| 4643 | 4643 | ** function. |
| 4644 | 4644 | ** |
| 4645 | 4645 | ** This routine must be called from the same thread in which |
| 4646 | 4646 | ** the aggregate SQL function is running. |
| 4647 | 4647 | */ |
| 4648 | -SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); | |
| 4648 | +SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes); | |
| 4649 | 4649 | |
| 4650 | 4650 | /* |
| 4651 | 4651 | ** CAPI3REF: User Data For Functions |
| 4652 | 4652 | ** METHOD: sqlite3_context |
| 4653 | 4653 | ** |
| @@ -4658,11 +4658,11 @@ | ||
| 4658 | 4658 | ** registered the application defined function. |
| 4659 | 4659 | ** |
| 4660 | 4660 | ** This routine must be called from the same thread in which |
| 4661 | 4661 | ** the application-defined function is running. |
| 4662 | 4662 | */ |
| 4663 | -SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*); | |
| 4663 | +SQLITE_API void *sqlite3_user_data(sqlite3_context*); | |
| 4664 | 4664 | |
| 4665 | 4665 | /* |
| 4666 | 4666 | ** CAPI3REF: Database Connection For Functions |
| 4667 | 4667 | ** METHOD: sqlite3_context |
| 4668 | 4668 | ** |
| @@ -4670,11 +4670,11 @@ | ||
| 4670 | 4670 | ** the pointer to the [database connection] (the 1st parameter) |
| 4671 | 4671 | ** of the [sqlite3_create_function()] |
| 4672 | 4672 | ** and [sqlite3_create_function16()] routines that originally |
| 4673 | 4673 | ** registered the application defined function. |
| 4674 | 4674 | */ |
| 4675 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); | |
| 4675 | +SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*); | |
| 4676 | 4676 | |
| 4677 | 4677 | /* |
| 4678 | 4678 | ** CAPI3REF: Function Auxiliary Data |
| 4679 | 4679 | ** METHOD: sqlite3_context |
| 4680 | 4680 | ** |
| @@ -4724,12 +4724,12 @@ | ||
| 4724 | 4724 | ** values and [parameters] and expressions composed from the same.)^ |
| 4725 | 4725 | ** |
| 4726 | 4726 | ** These routines must be called from the same thread in which |
| 4727 | 4727 | ** the SQL function is running. |
| 4728 | 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*)); | |
| 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 | 4731 | |
| 4732 | 4732 | |
| 4733 | 4733 | /* |
| 4734 | 4734 | ** CAPI3REF: Constants Defining Special Destructor Behavior |
| 4735 | 4735 | ** |
| @@ -4861,31 +4861,31 @@ | ||
| 4861 | 4861 | ** |
| 4862 | 4862 | ** If these routines are called from within the different thread |
| 4863 | 4863 | ** than the one containing the application-defined function that received |
| 4864 | 4864 | ** the [sqlite3_context] pointer, the results are undefined. |
| 4865 | 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*, | |
| 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 | 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, | |
| 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 | 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); | |
| 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 | 4887 | |
| 4888 | 4888 | |
| 4889 | 4889 | /* |
| 4890 | 4890 | ** CAPI3REF: Setting The Subtype Of An SQL Function |
| 4891 | 4891 | ** METHOD: sqlite3_context |
| @@ -4896,11 +4896,11 @@ | ||
| 4896 | 4896 | ** of the subtype T are preserved in current versions of SQLite; |
| 4897 | 4897 | ** higher order bits are discarded. |
| 4898 | 4898 | ** The number of subtype bytes preserved by SQLite might increase |
| 4899 | 4899 | ** in future releases of SQLite. |
| 4900 | 4900 | */ |
| 4901 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int); | |
| 4901 | +SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int); | |
| 4902 | 4902 | |
| 4903 | 4903 | /* |
| 4904 | 4904 | ** CAPI3REF: Define New Collating Sequences |
| 4905 | 4905 | ** METHOD: sqlite3 |
| 4906 | 4906 | ** |
| @@ -4978,26 +4978,26 @@ | ||
| 4978 | 4978 | ** is unfortunate but cannot be changed without breaking backwards |
| 4979 | 4979 | ** compatibility. |
| 4980 | 4980 | ** |
| 4981 | 4981 | ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. |
| 4982 | 4982 | */ |
| 4983 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( | |
| 4983 | +SQLITE_API int sqlite3_create_collation( | |
| 4984 | 4984 | sqlite3*, |
| 4985 | 4985 | const char *zName, |
| 4986 | 4986 | int eTextRep, |
| 4987 | 4987 | void *pArg, |
| 4988 | 4988 | int(*xCompare)(void*,int,const void*,int,const void*) |
| 4989 | 4989 | ); |
| 4990 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( | |
| 4990 | +SQLITE_API int sqlite3_create_collation_v2( | |
| 4991 | 4991 | sqlite3*, |
| 4992 | 4992 | const char *zName, |
| 4993 | 4993 | int eTextRep, |
| 4994 | 4994 | void *pArg, |
| 4995 | 4995 | int(*xCompare)(void*,int,const void*,int,const void*), |
| 4996 | 4996 | void(*xDestroy)(void*) |
| 4997 | 4997 | ); |
| 4998 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( | |
| 4998 | +SQLITE_API int sqlite3_create_collation16( | |
| 4999 | 4999 | sqlite3*, |
| 5000 | 5000 | const void *zName, |
| 5001 | 5001 | int eTextRep, |
| 5002 | 5002 | void *pArg, |
| 5003 | 5003 | int(*xCompare)(void*,int,const void*,int,const void*) |
| @@ -5028,16 +5028,16 @@ | ||
| 5028 | 5028 | ** |
| 5029 | 5029 | ** The callback function should register the desired collation using |
| 5030 | 5030 | ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or |
| 5031 | 5031 | ** [sqlite3_create_collation_v2()]. |
| 5032 | 5032 | */ |
| 5033 | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( | |
| 5033 | +SQLITE_API int sqlite3_collation_needed( | |
| 5034 | 5034 | sqlite3*, |
| 5035 | 5035 | void*, |
| 5036 | 5036 | void(*)(void*,sqlite3*,int eTextRep,const char*) |
| 5037 | 5037 | ); |
| 5038 | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( | |
| 5038 | +SQLITE_API int sqlite3_collation_needed16( | |
| 5039 | 5039 | sqlite3*, |
| 5040 | 5040 | void*, |
| 5041 | 5041 | void(*)(void*,sqlite3*,int eTextRep,const void*) |
| 5042 | 5042 | ); |
| 5043 | 5043 | |
| @@ -5047,15 +5047,15 @@ | ||
| 5047 | 5047 | ** called right after sqlite3_open(). |
| 5048 | 5048 | ** |
| 5049 | 5049 | ** The code to implement this API is not available in the public release |
| 5050 | 5050 | ** of SQLite. |
| 5051 | 5051 | */ |
| 5052 | -SQLITE_API int SQLITE_STDCALL sqlite3_key( | |
| 5052 | +SQLITE_API int sqlite3_key( | |
| 5053 | 5053 | sqlite3 *db, /* Database to be rekeyed */ |
| 5054 | 5054 | const void *pKey, int nKey /* The key */ |
| 5055 | 5055 | ); |
| 5056 | -SQLITE_API int SQLITE_STDCALL sqlite3_key_v2( | |
| 5056 | +SQLITE_API int sqlite3_key_v2( | |
| 5057 | 5057 | sqlite3 *db, /* Database to be rekeyed */ |
| 5058 | 5058 | const char *zDbName, /* Name of the database */ |
| 5059 | 5059 | const void *pKey, int nKey /* The key */ |
| 5060 | 5060 | ); |
| 5061 | 5061 | |
| @@ -5065,35 +5065,35 @@ | ||
| 5065 | 5065 | ** database is decrypted. |
| 5066 | 5066 | ** |
| 5067 | 5067 | ** The code to implement this API is not available in the public release |
| 5068 | 5068 | ** of SQLite. |
| 5069 | 5069 | */ |
| 5070 | -SQLITE_API int SQLITE_STDCALL sqlite3_rekey( | |
| 5070 | +SQLITE_API int sqlite3_rekey( | |
| 5071 | 5071 | sqlite3 *db, /* Database to be rekeyed */ |
| 5072 | 5072 | const void *pKey, int nKey /* The new key */ |
| 5073 | 5073 | ); |
| 5074 | -SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2( | |
| 5074 | +SQLITE_API int sqlite3_rekey_v2( | |
| 5075 | 5075 | sqlite3 *db, /* Database to be rekeyed */ |
| 5076 | 5076 | const char *zDbName, /* Name of the database */ |
| 5077 | 5077 | const void *pKey, int nKey /* The new key */ |
| 5078 | 5078 | ); |
| 5079 | 5079 | |
| 5080 | 5080 | /* |
| 5081 | 5081 | ** Specify the activation key for a SEE database. Unless |
| 5082 | 5082 | ** activated, none of the SEE routines will work. |
| 5083 | 5083 | */ |
| 5084 | -SQLITE_API void SQLITE_STDCALL sqlite3_activate_see( | |
| 5084 | +SQLITE_API void sqlite3_activate_see( | |
| 5085 | 5085 | const char *zPassPhrase /* Activation phrase */ |
| 5086 | 5086 | ); |
| 5087 | 5087 | #endif |
| 5088 | 5088 | |
| 5089 | 5089 | #ifdef SQLITE_ENABLE_CEROD |
| 5090 | 5090 | /* |
| 5091 | 5091 | ** Specify the activation key for a CEROD database. Unless |
| 5092 | 5092 | ** activated, none of the CEROD routines will work. |
| 5093 | 5093 | */ |
| 5094 | -SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod( | |
| 5094 | +SQLITE_API void sqlite3_activate_cerod( | |
| 5095 | 5095 | const char *zPassPhrase /* Activation phrase */ |
| 5096 | 5096 | ); |
| 5097 | 5097 | #endif |
| 5098 | 5098 | |
| 5099 | 5099 | /* |
| @@ -5111,11 +5111,11 @@ | ||
| 5111 | 5111 | ** method of the default [sqlite3_vfs] object. If the xSleep() method |
| 5112 | 5112 | ** of the default VFS is not implemented correctly, or not implemented at |
| 5113 | 5113 | ** all, then the behavior of sqlite3_sleep() may deviate from the description |
| 5114 | 5114 | ** in the previous paragraphs. |
| 5115 | 5115 | */ |
| 5116 | -SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int); | |
| 5116 | +SQLITE_API int sqlite3_sleep(int); | |
| 5117 | 5117 | |
| 5118 | 5118 | /* |
| 5119 | 5119 | ** CAPI3REF: Name Of The Folder Holding Temporary Files |
| 5120 | 5120 | ** |
| 5121 | 5121 | ** ^(If this global variable is made to point to a string which is |
| @@ -5230,11 +5230,11 @@ | ||
| 5230 | 5230 | ** |
| 5231 | 5231 | ** If another thread changes the autocommit status of the database |
| 5232 | 5232 | ** connection while this routine is running, then the return value |
| 5233 | 5233 | ** is undefined. |
| 5234 | 5234 | */ |
| 5235 | -SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*); | |
| 5235 | +SQLITE_API int sqlite3_get_autocommit(sqlite3*); | |
| 5236 | 5236 | |
| 5237 | 5237 | /* |
| 5238 | 5238 | ** CAPI3REF: Find The Database Handle Of A Prepared Statement |
| 5239 | 5239 | ** METHOD: sqlite3_stmt |
| 5240 | 5240 | ** |
| @@ -5243,11 +5243,11 @@ | ||
| 5243 | 5243 | ** returned by sqlite3_db_handle is the same [database connection] |
| 5244 | 5244 | ** that was the first argument |
| 5245 | 5245 | ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to |
| 5246 | 5246 | ** create the statement in the first place. |
| 5247 | 5247 | */ |
| 5248 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*); | |
| 5248 | +SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); | |
| 5249 | 5249 | |
| 5250 | 5250 | /* |
| 5251 | 5251 | ** CAPI3REF: Return The Filename For A Database Connection |
| 5252 | 5252 | ** METHOD: sqlite3 |
| 5253 | 5253 | ** |
| @@ -5260,21 +5260,21 @@ | ||
| 5260 | 5260 | ** ^The filename returned by this function is the output of the |
| 5261 | 5261 | ** xFullPathname method of the [VFS]. ^In other words, the filename |
| 5262 | 5262 | ** will be an absolute pathname, even if the filename used |
| 5263 | 5263 | ** to open the database originally was a URI or relative pathname. |
| 5264 | 5264 | */ |
| 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); | |
| 5266 | 5266 | |
| 5267 | 5267 | /* |
| 5268 | 5268 | ** CAPI3REF: Determine if a database is read-only |
| 5269 | 5269 | ** METHOD: sqlite3 |
| 5270 | 5270 | ** |
| 5271 | 5271 | ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N |
| 5272 | 5272 | ** of connection D is read-only, 0 if it is read/write, or -1 if N is not |
| 5273 | 5273 | ** the name of a database on connection D. |
| 5274 | 5274 | */ |
| 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); | |
| 5276 | 5276 | |
| 5277 | 5277 | /* |
| 5278 | 5278 | ** CAPI3REF: Find the next prepared statement |
| 5279 | 5279 | ** METHOD: sqlite3 |
| 5280 | 5280 | ** |
| @@ -5286,11 +5286,11 @@ | ||
| 5286 | 5286 | ** |
| 5287 | 5287 | ** The [database connection] pointer D in a call to |
| 5288 | 5288 | ** [sqlite3_next_stmt(D,S)] must refer to an open database |
| 5289 | 5289 | ** connection and in particular must not be a NULL pointer. |
| 5290 | 5290 | */ |
| 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); | |
| 5292 | 5292 | |
| 5293 | 5293 | /* |
| 5294 | 5294 | ** CAPI3REF: Commit And Rollback Notification Callbacks |
| 5295 | 5295 | ** METHOD: sqlite3 |
| 5296 | 5296 | ** |
| @@ -5335,12 +5335,12 @@ | ||
| 5335 | 5335 | ** ^The rollback callback is not invoked if a transaction is |
| 5336 | 5336 | ** automatically rolled back because the database connection is closed. |
| 5337 | 5337 | ** |
| 5338 | 5338 | ** See also the [sqlite3_update_hook()] interface. |
| 5339 | 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*); | |
| 5340 | +SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); | |
| 5341 | +SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); | |
| 5342 | 5342 | |
| 5343 | 5343 | /* |
| 5344 | 5344 | ** CAPI3REF: Data Change Notification Callbacks |
| 5345 | 5345 | ** METHOD: sqlite3 |
| 5346 | 5346 | ** |
| @@ -5387,11 +5387,11 @@ | ||
| 5387 | 5387 | ** the first call on D. |
| 5388 | 5388 | ** |
| 5389 | 5389 | ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], |
| 5390 | 5390 | ** and [sqlite3_preupdate_hook()] interfaces. |
| 5391 | 5391 | */ |
| 5392 | -SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( | |
| 5392 | +SQLITE_API void *sqlite3_update_hook( | |
| 5393 | 5393 | sqlite3*, |
| 5394 | 5394 | void(*)(void *,int ,char const *,char const *,sqlite3_int64), |
| 5395 | 5395 | void* |
| 5396 | 5396 | ); |
| 5397 | 5397 | |
| @@ -5427,11 +5427,11 @@ | ||
| 5427 | 5427 | ** This interface is threadsafe on processors where writing a |
| 5428 | 5428 | ** 32-bit integer is atomic. |
| 5429 | 5429 | ** |
| 5430 | 5430 | ** See Also: [SQLite Shared-Cache Mode] |
| 5431 | 5431 | */ |
| 5432 | -SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int); | |
| 5432 | +SQLITE_API int sqlite3_enable_shared_cache(int); | |
| 5433 | 5433 | |
| 5434 | 5434 | /* |
| 5435 | 5435 | ** CAPI3REF: Attempt To Free Heap Memory |
| 5436 | 5436 | ** |
| 5437 | 5437 | ** ^The sqlite3_release_memory() interface attempts to free N bytes |
| @@ -5443,11 +5443,11 @@ | ||
| 5443 | 5443 | ** ^The sqlite3_release_memory() routine is a no-op returning zero |
| 5444 | 5444 | ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5445 | 5445 | ** |
| 5446 | 5446 | ** See also: [sqlite3_db_release_memory()] |
| 5447 | 5447 | */ |
| 5448 | -SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int); | |
| 5448 | +SQLITE_API int sqlite3_release_memory(int); | |
| 5449 | 5449 | |
| 5450 | 5450 | /* |
| 5451 | 5451 | ** CAPI3REF: Free Memory Used By A Database Connection |
| 5452 | 5452 | ** METHOD: sqlite3 |
| 5453 | 5453 | ** |
| @@ -5457,11 +5457,11 @@ | ||
| 5457 | 5457 | ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is |
| 5458 | 5458 | ** omitted. |
| 5459 | 5459 | ** |
| 5460 | 5460 | ** See also: [sqlite3_release_memory()] |
| 5461 | 5461 | */ |
| 5462 | -SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*); | |
| 5462 | +SQLITE_API int sqlite3_db_release_memory(sqlite3*); | |
| 5463 | 5463 | |
| 5464 | 5464 | /* |
| 5465 | 5465 | ** CAPI3REF: Impose A Limit On Heap Size |
| 5466 | 5466 | ** |
| 5467 | 5467 | ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the |
| @@ -5509,11 +5509,11 @@ | ||
| 5509 | 5509 | ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5510 | 5510 | ** |
| 5511 | 5511 | ** The circumstances under which SQLite will enforce the soft heap limit may |
| 5512 | 5512 | ** changes in future releases of SQLite. |
| 5513 | 5513 | */ |
| 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); | |
| 5515 | 5515 | |
| 5516 | 5516 | /* |
| 5517 | 5517 | ** CAPI3REF: Deprecated Soft Heap Limit Interface |
| 5518 | 5518 | ** DEPRECATED |
| 5519 | 5519 | ** |
| @@ -5520,11 +5520,11 @@ | ||
| 5520 | 5520 | ** This is a deprecated version of the [sqlite3_soft_heap_limit64()] |
| 5521 | 5521 | ** interface. This routine is provided for historical compatibility |
| 5522 | 5522 | ** only. All new applications should use the |
| 5523 | 5523 | ** [sqlite3_soft_heap_limit64()] interface rather than this one. |
| 5524 | 5524 | */ |
| 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); | |
| 5526 | 5526 | |
| 5527 | 5527 | |
| 5528 | 5528 | /* |
| 5529 | 5529 | ** CAPI3REF: Extract Metadata About A Column Of A Table |
| 5530 | 5530 | ** METHOD: sqlite3 |
| @@ -5590,11 +5590,11 @@ | ||
| 5590 | 5590 | ** |
| 5591 | 5591 | ** ^This function causes all database schemas to be read from disk and |
| 5592 | 5592 | ** parsed, if that has not already been done, and returns an error if |
| 5593 | 5593 | ** any errors are encountered while loading the schema. |
| 5594 | 5594 | */ |
| 5595 | -SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( | |
| 5595 | +SQLITE_API int sqlite3_table_column_metadata( | |
| 5596 | 5596 | sqlite3 *db, /* Connection handle */ |
| 5597 | 5597 | const char *zDbName, /* Database name or NULL */ |
| 5598 | 5598 | const char *zTableName, /* Table name */ |
| 5599 | 5599 | const char *zColumnName, /* Column name */ |
| 5600 | 5600 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -5646,11 +5646,11 @@ | ||
| 5646 | 5646 | ** disabled and prevent SQL injections from giving attackers |
| 5647 | 5647 | ** access to extension loading capabilities. |
| 5648 | 5648 | ** |
| 5649 | 5649 | ** See also the [load_extension() SQL function]. |
| 5650 | 5650 | */ |
| 5651 | -SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( | |
| 5651 | +SQLITE_API int sqlite3_load_extension( | |
| 5652 | 5652 | sqlite3 *db, /* Load the extension into this database connection */ |
| 5653 | 5653 | const char *zFile, /* Name of the shared library containing extension */ |
| 5654 | 5654 | const char *zProc, /* Entry point. Derived from zFile if 0 */ |
| 5655 | 5655 | char **pzErrMsg /* Put error message here if not 0 */ |
| 5656 | 5656 | ); |
| @@ -5678,11 +5678,11 @@ | ||
| 5678 | 5678 | ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method |
| 5679 | 5679 | ** rather than this interface, so the [load_extension()] SQL function |
| 5680 | 5680 | ** remains disabled. This will prevent SQL injections from giving attackers |
| 5681 | 5681 | ** access to extension loading capabilities. |
| 5682 | 5682 | */ |
| 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); | |
| 5684 | 5684 | |
| 5685 | 5685 | /* |
| 5686 | 5686 | ** CAPI3REF: Automatically Load Statically Linked Extensions |
| 5687 | 5687 | ** |
| 5688 | 5688 | ** ^This interface causes the xEntryPoint() function to be invoked for |
| @@ -5716,11 +5716,11 @@ | ||
| 5716 | 5716 | ** will be called more than once for each database connection that is opened. |
| 5717 | 5717 | ** |
| 5718 | 5718 | ** See also: [sqlite3_reset_auto_extension()] |
| 5719 | 5719 | ** and [sqlite3_cancel_auto_extension()] |
| 5720 | 5720 | */ |
| 5721 | -SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void)); | |
| 5721 | +SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void)); | |
| 5722 | 5722 | |
| 5723 | 5723 | /* |
| 5724 | 5724 | ** CAPI3REF: Cancel Automatic Extension Loading |
| 5725 | 5725 | ** |
| 5726 | 5726 | ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the |
| @@ -5728,19 +5728,19 @@ | ||
| 5728 | 5728 | ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] |
| 5729 | 5729 | ** routine returns 1 if initialization routine X was successfully |
| 5730 | 5730 | ** unregistered and it returns 0 if X was not on the list of initialization |
| 5731 | 5731 | ** routines. |
| 5732 | 5732 | */ |
| 5733 | -SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); | |
| 5733 | +SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); | |
| 5734 | 5734 | |
| 5735 | 5735 | /* |
| 5736 | 5736 | ** CAPI3REF: Reset Automatic Extension Loading |
| 5737 | 5737 | ** |
| 5738 | 5738 | ** ^This interface disables all automatic extensions previously |
| 5739 | 5739 | ** registered using [sqlite3_auto_extension()]. |
| 5740 | 5740 | */ |
| 5741 | -SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void); | |
| 5741 | +SQLITE_API void sqlite3_reset_auto_extension(void); | |
| 5742 | 5742 | |
| 5743 | 5743 | /* |
| 5744 | 5744 | ** The interface to the virtual-table mechanism is currently considered |
| 5745 | 5745 | ** to be experimental. The interface might change in incompatible ways. |
| 5746 | 5746 | ** If this is a problem for you, do not use the interface at this time. |
| @@ -5981,17 +5981,17 @@ | ||
| 5981 | 5981 | ** be invoked if the call to sqlite3_create_module_v2() fails. |
| 5982 | 5982 | ** ^The sqlite3_create_module() |
| 5983 | 5983 | ** interface is equivalent to sqlite3_create_module_v2() with a NULL |
| 5984 | 5984 | ** destructor. |
| 5985 | 5985 | */ |
| 5986 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module( | |
| 5986 | +SQLITE_API int sqlite3_create_module( | |
| 5987 | 5987 | sqlite3 *db, /* SQLite connection to register module with */ |
| 5988 | 5988 | const char *zName, /* Name of the module */ |
| 5989 | 5989 | const sqlite3_module *p, /* Methods for the module */ |
| 5990 | 5990 | void *pClientData /* Client data for xCreate/xConnect */ |
| 5991 | 5991 | ); |
| 5992 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( | |
| 5992 | +SQLITE_API int sqlite3_create_module_v2( | |
| 5993 | 5993 | sqlite3 *db, /* SQLite connection to register module with */ |
| 5994 | 5994 | const char *zName, /* Name of the module */ |
| 5995 | 5995 | const sqlite3_module *p, /* Methods for the module */ |
| 5996 | 5996 | void *pClientData, /* Client data for xCreate/xConnect */ |
| 5997 | 5997 | void(*xDestroy)(void*) /* Module destructor function */ |
| @@ -6050,11 +6050,11 @@ | ||
| 6050 | 6050 | ** ^The [xCreate] and [xConnect] methods of a |
| 6051 | 6051 | ** [virtual table module] call this interface |
| 6052 | 6052 | ** to declare the format (the names and datatypes of the columns) of |
| 6053 | 6053 | ** the virtual tables they implement. |
| 6054 | 6054 | */ |
| 6055 | -SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); | |
| 6055 | +SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL); | |
| 6056 | 6056 | |
| 6057 | 6057 | /* |
| 6058 | 6058 | ** CAPI3REF: Overload A Function For A Virtual Table |
| 6059 | 6059 | ** METHOD: sqlite3 |
| 6060 | 6060 | ** |
| @@ -6069,11 +6069,11 @@ | ||
| 6069 | 6069 | ** of the new function always causes an exception to be thrown. So |
| 6070 | 6070 | ** the new function is not good for anything by itself. Its only |
| 6071 | 6071 | ** purpose is to be a placeholder function that can be overloaded |
| 6072 | 6072 | ** by a [virtual table]. |
| 6073 | 6073 | */ |
| 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); | |
| 6075 | 6075 | |
| 6076 | 6076 | /* |
| 6077 | 6077 | ** The interface to the virtual-table mechanism defined above (back up |
| 6078 | 6078 | ** to a comment remarkably similar to this one) is currently considered |
| 6079 | 6079 | ** to be experimental. The interface might change in incompatible ways. |
| @@ -6168,11 +6168,11 @@ | ||
| 6168 | 6168 | ** zero-filled blob to read or write using the incremental-blob interface. |
| 6169 | 6169 | ** |
| 6170 | 6170 | ** To avoid a resource leak, every open [BLOB handle] should eventually |
| 6171 | 6171 | ** be released by a call to [sqlite3_blob_close()]. |
| 6172 | 6172 | */ |
| 6173 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( | |
| 6173 | +SQLITE_API int sqlite3_blob_open( | |
| 6174 | 6174 | sqlite3*, |
| 6175 | 6175 | const char *zDb, |
| 6176 | 6176 | const char *zTable, |
| 6177 | 6177 | const char *zColumn, |
| 6178 | 6178 | sqlite3_int64 iRow, |
| @@ -6201,11 +6201,11 @@ | ||
| 6201 | 6201 | ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle |
| 6202 | 6202 | ** always returns zero. |
| 6203 | 6203 | ** |
| 6204 | 6204 | ** ^This function sets the database handle error code and message. |
| 6205 | 6205 | */ |
| 6206 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); | |
| 6206 | +SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); | |
| 6207 | 6207 | |
| 6208 | 6208 | /* |
| 6209 | 6209 | ** CAPI3REF: Close A BLOB Handle |
| 6210 | 6210 | ** DESTRUCTOR: sqlite3_blob |
| 6211 | 6211 | ** |
| @@ -6224,11 +6224,11 @@ | ||
| 6224 | 6224 | ** with a null pointer (such as would be returned by a failed call to |
| 6225 | 6225 | ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function |
| 6226 | 6226 | ** is passed a valid open blob handle, the values returned by the |
| 6227 | 6227 | ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. |
| 6228 | 6228 | */ |
| 6229 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *); | |
| 6229 | +SQLITE_API int sqlite3_blob_close(sqlite3_blob *); | |
| 6230 | 6230 | |
| 6231 | 6231 | /* |
| 6232 | 6232 | ** CAPI3REF: Return The Size Of An Open BLOB |
| 6233 | 6233 | ** METHOD: sqlite3_blob |
| 6234 | 6234 | ** |
| @@ -6240,11 +6240,11 @@ | ||
| 6240 | 6240 | ** This routine only works on a [BLOB handle] which has been created |
| 6241 | 6241 | ** by a prior successful call to [sqlite3_blob_open()] and which has not |
| 6242 | 6242 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6243 | 6243 | ** to this routine results in undefined and probably undesirable behavior. |
| 6244 | 6244 | */ |
| 6245 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *); | |
| 6245 | +SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *); | |
| 6246 | 6246 | |
| 6247 | 6247 | /* |
| 6248 | 6248 | ** CAPI3REF: Read Data From A BLOB Incrementally |
| 6249 | 6249 | ** METHOD: sqlite3_blob |
| 6250 | 6250 | ** |
| @@ -6269,11 +6269,11 @@ | ||
| 6269 | 6269 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6270 | 6270 | ** to this routine results in undefined and probably undesirable behavior. |
| 6271 | 6271 | ** |
| 6272 | 6272 | ** See also: [sqlite3_blob_write()]. |
| 6273 | 6273 | */ |
| 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); | |
| 6275 | 6275 | |
| 6276 | 6276 | /* |
| 6277 | 6277 | ** CAPI3REF: Write Data Into A BLOB Incrementally |
| 6278 | 6278 | ** METHOD: sqlite3_blob |
| 6279 | 6279 | ** |
| @@ -6311,11 +6311,11 @@ | ||
| 6311 | 6311 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6312 | 6312 | ** to this routine results in undefined and probably undesirable behavior. |
| 6313 | 6313 | ** |
| 6314 | 6314 | ** See also: [sqlite3_blob_read()]. |
| 6315 | 6315 | */ |
| 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); | |
| 6317 | 6317 | |
| 6318 | 6318 | /* |
| 6319 | 6319 | ** CAPI3REF: Virtual File System Objects |
| 6320 | 6320 | ** |
| 6321 | 6321 | ** A virtual filesystem (VFS) is an [sqlite3_vfs] object |
| @@ -6342,13 +6342,13 @@ | ||
| 6342 | 6342 | ** |
| 6343 | 6343 | ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. |
| 6344 | 6344 | ** ^(If the default VFS is unregistered, another VFS is chosen as |
| 6345 | 6345 | ** the default. The choice for the new VFS is arbitrary.)^ |
| 6346 | 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*); | |
| 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 | 6350 | |
| 6351 | 6351 | /* |
| 6352 | 6352 | ** CAPI3REF: Mutexes |
| 6353 | 6353 | ** |
| 6354 | 6354 | ** The SQLite core uses these routines for thread |
| @@ -6460,15 +6460,15 @@ | ||
| 6460 | 6460 | ** sqlite3_mutex_leave() is a NULL pointer, then all three routines |
| 6461 | 6461 | ** behave as no-ops. |
| 6462 | 6462 | ** |
| 6463 | 6463 | ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
| 6464 | 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*); | |
| 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 | 6470 | |
| 6471 | 6471 | /* |
| 6472 | 6472 | ** CAPI3REF: Mutex Methods Object |
| 6473 | 6473 | ** |
| 6474 | 6474 | ** An instance of this structure defines the low-level routines |
| @@ -6574,12 +6574,12 @@ | ||
| 6574 | 6574 | ** call to sqlite3_mutex_held() to fail, so a non-zero return is |
| 6575 | 6575 | ** the appropriate thing to do. The sqlite3_mutex_notheld() |
| 6576 | 6576 | ** interface should also return 1 when given a NULL pointer. |
| 6577 | 6577 | */ |
| 6578 | 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*); | |
| 6579 | +SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*); | |
| 6580 | +SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*); | |
| 6581 | 6581 | #endif |
| 6582 | 6582 | |
| 6583 | 6583 | /* |
| 6584 | 6584 | ** CAPI3REF: Mutex Types |
| 6585 | 6585 | ** |
| @@ -6615,11 +6615,11 @@ | ||
| 6615 | 6615 | ** serializes access to the [database connection] given in the argument |
| 6616 | 6616 | ** when the [threading mode] is Serialized. |
| 6617 | 6617 | ** ^If the [threading mode] is Single-thread or Multi-thread then this |
| 6618 | 6618 | ** routine returns a NULL pointer. |
| 6619 | 6619 | */ |
| 6620 | -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*); | |
| 6620 | +SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*); | |
| 6621 | 6621 | |
| 6622 | 6622 | /* |
| 6623 | 6623 | ** CAPI3REF: Low-Level Control Of Database Files |
| 6624 | 6624 | ** METHOD: sqlite3 |
| 6625 | 6625 | ** |
| @@ -6650,11 +6650,11 @@ | ||
| 6650 | 6650 | ** an incorrect zDbName and an SQLITE_ERROR return from the underlying |
| 6651 | 6651 | ** xFileControl method. |
| 6652 | 6652 | ** |
| 6653 | 6653 | ** See also: [SQLITE_FCNTL_LOCKSTATE] |
| 6654 | 6654 | */ |
| 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*); | |
| 6656 | 6656 | |
| 6657 | 6657 | /* |
| 6658 | 6658 | ** CAPI3REF: Testing Interface |
| 6659 | 6659 | ** |
| 6660 | 6660 | ** ^The sqlite3_test_control() interface is used to read out internal |
| @@ -6669,11 +6669,11 @@ | ||
| 6669 | 6669 | ** The details of the operation codes, their meanings, the parameters |
| 6670 | 6670 | ** they take, and what they do are all subject to change without notice. |
| 6671 | 6671 | ** Unlike most of the SQLite API, this function is not guaranteed to |
| 6672 | 6672 | ** operate consistently from one release to the next. |
| 6673 | 6673 | */ |
| 6674 | -SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...); | |
| 6674 | +SQLITE_API int sqlite3_test_control(int op, ...); | |
| 6675 | 6675 | |
| 6676 | 6676 | /* |
| 6677 | 6677 | ** CAPI3REF: Testing Interface Operation Codes |
| 6678 | 6678 | ** |
| 6679 | 6679 | ** These constants are the valid operation code parameters used |
| @@ -6732,12 +6732,12 @@ | ||
| 6732 | 6732 | ** be represented by a 32-bit integer, then the values returned by |
| 6733 | 6733 | ** sqlite3_status() are undefined. |
| 6734 | 6734 | ** |
| 6735 | 6735 | ** See also: [sqlite3_db_status()] |
| 6736 | 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( | |
| 6737 | +SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); | |
| 6738 | +SQLITE_API int sqlite3_status64( | |
| 6739 | 6739 | int op, |
| 6740 | 6740 | sqlite3_int64 *pCurrent, |
| 6741 | 6741 | sqlite3_int64 *pHighwater, |
| 6742 | 6742 | int resetFlag |
| 6743 | 6743 | ); |
| @@ -6858,11 +6858,11 @@ | ||
| 6858 | 6858 | ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a |
| 6859 | 6859 | ** non-zero [error code] on failure. |
| 6860 | 6860 | ** |
| 6861 | 6861 | ** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. |
| 6862 | 6862 | */ |
| 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); | |
| 6864 | 6864 | |
| 6865 | 6865 | /* |
| 6866 | 6866 | ** CAPI3REF: Status Parameters for database connections |
| 6867 | 6867 | ** KEYWORDS: {SQLITE_DBSTATUS options} |
| 6868 | 6868 | ** |
| @@ -7001,11 +7001,11 @@ | ||
| 7001 | 7001 | ** ^If the resetFlg is true, then the counter is reset to zero after this |
| 7002 | 7002 | ** interface call returns. |
| 7003 | 7003 | ** |
| 7004 | 7004 | ** See also: [sqlite3_status()] and [sqlite3_db_status()]. |
| 7005 | 7005 | */ |
| 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); | |
| 7007 | 7007 | |
| 7008 | 7008 | /* |
| 7009 | 7009 | ** CAPI3REF: Status Parameters for prepared statements |
| 7010 | 7010 | ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} |
| 7011 | 7011 | ** |
| @@ -7470,20 +7470,20 @@ | ||
| 7470 | 7470 | ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() |
| 7471 | 7471 | ** APIs are not strictly speaking threadsafe. If they are invoked at the |
| 7472 | 7472 | ** same time as another thread is invoking sqlite3_backup_step() it is |
| 7473 | 7473 | ** possible that they return invalid values. |
| 7474 | 7474 | */ |
| 7475 | -SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( | |
| 7475 | +SQLITE_API sqlite3_backup *sqlite3_backup_init( | |
| 7476 | 7476 | sqlite3 *pDest, /* Destination database handle */ |
| 7477 | 7477 | const char *zDestName, /* Destination database name */ |
| 7478 | 7478 | sqlite3 *pSource, /* Source database handle */ |
| 7479 | 7479 | const char *zSourceName /* Source database name */ |
| 7480 | 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); | |
| 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 | 7485 | |
| 7486 | 7486 | /* |
| 7487 | 7487 | ** CAPI3REF: Unlock Notification |
| 7488 | 7488 | ** METHOD: sqlite3 |
| 7489 | 7489 | ** |
| @@ -7596,11 +7596,11 @@ | ||
| 7596 | 7596 | ** by an sqlite3_step() call. ^(If there is a blocking connection, then the |
| 7597 | 7597 | ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in |
| 7598 | 7598 | ** the special "DROP TABLE/INDEX" case, the extended error code is just |
| 7599 | 7599 | ** SQLITE_LOCKED.)^ |
| 7600 | 7600 | */ |
| 7601 | -SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( | |
| 7601 | +SQLITE_API int sqlite3_unlock_notify( | |
| 7602 | 7602 | sqlite3 *pBlocked, /* Waiting connection */ |
| 7603 | 7603 | void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ |
| 7604 | 7604 | void *pNotifyArg /* Argument to pass to xNotify */ |
| 7605 | 7605 | ); |
| 7606 | 7606 | |
| @@ -7611,12 +7611,12 @@ | ||
| 7611 | 7611 | ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications |
| 7612 | 7612 | ** and extensions to compare the contents of two buffers containing UTF-8 |
| 7613 | 7613 | ** strings in a case-independent fashion, using the same definition of "case |
| 7614 | 7614 | ** independence" that SQLite uses internally when comparing identifiers. |
| 7615 | 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); | |
| 7616 | +SQLITE_API int sqlite3_stricmp(const char *, const char *); | |
| 7617 | +SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); | |
| 7618 | 7618 | |
| 7619 | 7619 | /* |
| 7620 | 7620 | ** CAPI3REF: String Globbing |
| 7621 | 7621 | * |
| 7622 | 7622 | ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if |
| @@ -7629,11 +7629,11 @@ | ||
| 7629 | 7629 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7630 | 7630 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7631 | 7631 | ** |
| 7632 | 7632 | ** See also: [sqlite3_strlike()]. |
| 7633 | 7633 | */ |
| 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); | |
| 7635 | 7635 | |
| 7636 | 7636 | /* |
| 7637 | 7637 | ** CAPI3REF: String LIKE Matching |
| 7638 | 7638 | * |
| 7639 | 7639 | ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if |
| @@ -7652,11 +7652,11 @@ | ||
| 7652 | 7652 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7653 | 7653 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7654 | 7654 | ** |
| 7655 | 7655 | ** See also: [sqlite3_strglob()]. |
| 7656 | 7656 | */ |
| 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); | |
| 7658 | 7658 | |
| 7659 | 7659 | /* |
| 7660 | 7660 | ** CAPI3REF: Error Logging Interface |
| 7661 | 7661 | ** |
| 7662 | 7662 | ** ^The [sqlite3_log()] interface writes a message into the [error log] |
| @@ -7675,11 +7675,11 @@ | ||
| 7675 | 7675 | ** will not use dynamically allocated memory. The log message is stored in |
| 7676 | 7676 | ** a fixed-length buffer on the stack. If the log message is longer than |
| 7677 | 7677 | ** a few hundred characters, it will be truncated to the length of the |
| 7678 | 7678 | ** buffer. |
| 7679 | 7679 | */ |
| 7680 | -SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...); | |
| 7680 | +SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...); | |
| 7681 | 7681 | |
| 7682 | 7682 | /* |
| 7683 | 7683 | ** CAPI3REF: Write-Ahead Log Commit Hook |
| 7684 | 7684 | ** METHOD: sqlite3 |
| 7685 | 7685 | ** |
| @@ -7711,11 +7711,11 @@ | ||
| 7711 | 7711 | ** previously registered write-ahead log callback. ^Note that the |
| 7712 | 7712 | ** [sqlite3_wal_autocheckpoint()] interface and the |
| 7713 | 7713 | ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will |
| 7714 | 7714 | ** overwrite any prior [sqlite3_wal_hook()] settings. |
| 7715 | 7715 | */ |
| 7716 | -SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( | |
| 7716 | +SQLITE_API void *sqlite3_wal_hook( | |
| 7717 | 7717 | sqlite3*, |
| 7718 | 7718 | int(*)(void *,sqlite3*,const char*,int), |
| 7719 | 7719 | void* |
| 7720 | 7720 | ); |
| 7721 | 7721 | |
| @@ -7746,11 +7746,11 @@ | ||
| 7746 | 7746 | ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] |
| 7747 | 7747 | ** pages. The use of this interface |
| 7748 | 7748 | ** is only necessary if the default setting is found to be suboptimal |
| 7749 | 7749 | ** for a particular application. |
| 7750 | 7750 | */ |
| 7751 | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); | |
| 7751 | +SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N); | |
| 7752 | 7752 | |
| 7753 | 7753 | /* |
| 7754 | 7754 | ** CAPI3REF: Checkpoint a database |
| 7755 | 7755 | ** METHOD: sqlite3 |
| 7756 | 7756 | ** |
| @@ -7768,11 +7768,11 @@ | ||
| 7768 | 7768 | ** interface was added. This interface is retained for backwards |
| 7769 | 7769 | ** compatibility and as a convenience for applications that need to manually |
| 7770 | 7770 | ** start a callback but which do not need the full power (and corresponding |
| 7771 | 7771 | ** complication) of [sqlite3_wal_checkpoint_v2()]. |
| 7772 | 7772 | */ |
| 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); | |
| 7774 | 7774 | |
| 7775 | 7775 | /* |
| 7776 | 7776 | ** CAPI3REF: Checkpoint a database |
| 7777 | 7777 | ** METHOD: sqlite3 |
| 7778 | 7778 | ** |
| @@ -7862,11 +7862,11 @@ | ||
| 7862 | 7862 | ** [sqlite3_errcode()] and [sqlite3_errmsg()]. |
| 7863 | 7863 | ** |
| 7864 | 7864 | ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface |
| 7865 | 7865 | ** from SQL. |
| 7866 | 7866 | */ |
| 7867 | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( | |
| 7867 | +SQLITE_API int sqlite3_wal_checkpoint_v2( | |
| 7868 | 7868 | sqlite3 *db, /* Database handle */ |
| 7869 | 7869 | const char *zDb, /* Name of attached database (or NULL) */ |
| 7870 | 7870 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 7871 | 7871 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 7872 | 7872 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -7898,11 +7898,11 @@ | ||
| 7898 | 7898 | ** |
| 7899 | 7899 | ** At present, there is only one option that may be configured using |
| 7900 | 7900 | ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options |
| 7901 | 7901 | ** may be added in the future. |
| 7902 | 7902 | */ |
| 7903 | -SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...); | |
| 7903 | +SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); | |
| 7904 | 7904 | |
| 7905 | 7905 | /* |
| 7906 | 7906 | ** CAPI3REF: Virtual Table Configuration Options |
| 7907 | 7907 | ** |
| 7908 | 7908 | ** These macros define the various options to the |
| @@ -7951,11 +7951,11 @@ | ||
| 7951 | 7951 | ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], |
| 7952 | 7952 | ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode |
| 7953 | 7953 | ** of the SQL statement that triggered the call to the [xUpdate] method of the |
| 7954 | 7954 | ** [virtual table]. |
| 7955 | 7955 | */ |
| 7956 | -SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *); | |
| 7956 | +SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *); | |
| 7957 | 7957 | |
| 7958 | 7958 | /* |
| 7959 | 7959 | ** CAPI3REF: Conflict resolution modes |
| 7960 | 7960 | ** KEYWORDS: {conflict resolution mode} |
| 7961 | 7961 | ** |
| @@ -8056,11 +8056,11 @@ | ||
| 8056 | 8056 | ** as if the loop did not exist - it returns non-zero and leave the variable |
| 8057 | 8057 | ** that pOut points to unchanged. |
| 8058 | 8058 | ** |
| 8059 | 8059 | ** See also: [sqlite3_stmt_scanstatus_reset()] |
| 8060 | 8060 | */ |
| 8061 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( | |
| 8061 | +SQLITE_API int sqlite3_stmt_scanstatus( | |
| 8062 | 8062 | sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ |
| 8063 | 8063 | int idx, /* Index of loop to report on */ |
| 8064 | 8064 | int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
| 8065 | 8065 | void *pOut /* Result written here */ |
| 8066 | 8066 | ); |
| @@ -8072,11 +8072,11 @@ | ||
| 8072 | 8072 | ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters. |
| 8073 | 8073 | ** |
| 8074 | 8074 | ** This API is only available if the library is built with pre-processor |
| 8075 | 8075 | ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. |
| 8076 | 8076 | */ |
| 8077 | -SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); | |
| 8077 | +SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); | |
| 8078 | 8078 | |
| 8079 | 8079 | /* |
| 8080 | 8080 | ** CAPI3REF: Flush caches to disk mid-transaction |
| 8081 | 8081 | ** |
| 8082 | 8082 | ** ^If a write-transaction is open on [database connection] D when the |
| @@ -8104,11 +8104,11 @@ | ||
| 8104 | 8104 | ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. |
| 8105 | 8105 | ** |
| 8106 | 8106 | ** ^This function does not set the database handle error code or message |
| 8107 | 8107 | ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. |
| 8108 | 8108 | */ |
| 8109 | -SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); | |
| 8109 | +SQLITE_API int sqlite3_db_cacheflush(sqlite3*); | |
| 8110 | 8110 | |
| 8111 | 8111 | /* |
| 8112 | 8112 | ** CAPI3REF: The pre-update hook. |
| 8113 | 8113 | ** |
| 8114 | 8114 | ** ^These interfaces are only available if SQLite is compiled using the |
| @@ -8184,11 +8184,11 @@ | ||
| 8184 | 8184 | ** triggers; or 2 for changes resulting from triggers called by top-level |
| 8185 | 8185 | ** triggers; and so forth. |
| 8186 | 8186 | ** |
| 8187 | 8187 | ** See also: [sqlite3_update_hook()] |
| 8188 | 8188 | */ |
| 8189 | -SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook( | |
| 8189 | +SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook( | |
| 8190 | 8190 | sqlite3 *db, |
| 8191 | 8191 | void(*xPreUpdate)( |
| 8192 | 8192 | void *pCtx, /* Copy of third arg to preupdate_hook() */ |
| 8193 | 8193 | sqlite3 *db, /* Database handle */ |
| 8194 | 8194 | int op, /* SQLITE_UPDATE, DELETE or INSERT */ |
| @@ -8197,14 +8197,14 @@ | ||
| 8197 | 8197 | sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */ |
| 8198 | 8198 | sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */ |
| 8199 | 8199 | ), |
| 8200 | 8200 | void* |
| 8201 | 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 **); | |
| 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 | 8206 | |
| 8207 | 8207 | /* |
| 8208 | 8208 | ** CAPI3REF: Low-level system error code |
| 8209 | 8209 | ** |
| 8210 | 8210 | ** ^Attempt to return the underlying operating system error code or error |
| @@ -8212,11 +8212,11 @@ | ||
| 8212 | 8212 | ** The return value is OS-dependent. For example, on unix systems, after |
| 8213 | 8213 | ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be |
| 8214 | 8214 | ** called to get back the underlying "errno" that caused the problem, such |
| 8215 | 8215 | ** as ENOSPC, EAUTH, EISDIR, and so forth. |
| 8216 | 8216 | */ |
| 8217 | -SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*); | |
| 8217 | +SQLITE_API int sqlite3_system_errno(sqlite3*); | |
| 8218 | 8218 | |
| 8219 | 8219 | /* |
| 8220 | 8220 | ** CAPI3REF: Database Snapshot |
| 8221 | 8221 | ** KEYWORDS: {snapshot} |
| 8222 | 8222 | ** EXPERIMENTAL |
| @@ -8262,11 +8262,11 @@ | ||
| 8262 | 8262 | ** to avoid a memory leak. |
| 8263 | 8263 | ** |
| 8264 | 8264 | ** The [sqlite3_snapshot_get()] interface is only available when the |
| 8265 | 8265 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8266 | 8266 | */ |
| 8267 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get( | |
| 8267 | +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get( | |
| 8268 | 8268 | sqlite3 *db, |
| 8269 | 8269 | const char *zSchema, |
| 8270 | 8270 | sqlite3_snapshot **ppSnapshot |
| 8271 | 8271 | ); |
| 8272 | 8272 | |
| @@ -8300,11 +8300,11 @@ | ||
| 8300 | 8300 | ** database connection in order to make it ready to use snapshots.) |
| 8301 | 8301 | ** |
| 8302 | 8302 | ** The [sqlite3_snapshot_open()] interface is only available when the |
| 8303 | 8303 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8304 | 8304 | */ |
| 8305 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open( | |
| 8305 | +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open( | |
| 8306 | 8306 | sqlite3 *db, |
| 8307 | 8307 | const char *zSchema, |
| 8308 | 8308 | sqlite3_snapshot *pSnapshot |
| 8309 | 8309 | ); |
| 8310 | 8310 | |
| @@ -8317,11 +8317,11 @@ | ||
| 8317 | 8317 | ** using this routine to avoid a memory leak. |
| 8318 | 8318 | ** |
| 8319 | 8319 | ** The [sqlite3_snapshot_free()] interface is only available when the |
| 8320 | 8320 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8321 | 8321 | */ |
| 8322 | -SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*); | |
| 8322 | +SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*); | |
| 8323 | 8323 | |
| 8324 | 8324 | /* |
| 8325 | 8325 | ** CAPI3REF: Compare the ages of two snapshot handles. |
| 8326 | 8326 | ** EXPERIMENTAL |
| 8327 | 8327 | ** |
| @@ -8341,11 +8341,11 @@ | ||
| 8341 | 8341 | ** |
| 8342 | 8342 | ** Otherwise, this API returns a negative value if P1 refers to an older |
| 8343 | 8343 | ** snapshot than P2, zero if the two handles refer to the same database |
| 8344 | 8344 | ** snapshot, and a positive value if P1 is a newer snapshot than P2. |
| 8345 | 8345 | */ |
| 8346 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp( | |
| 8346 | +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp( | |
| 8347 | 8347 | sqlite3_snapshot *p1, |
| 8348 | 8348 | sqlite3_snapshot *p2 |
| 8349 | 8349 | ); |
| 8350 | 8350 | |
| 8351 | 8351 | /* |
| @@ -8399,11 +8399,11 @@ | ||
| 8399 | 8399 | ** Register a geometry callback named zGeom that can be used as part of an |
| 8400 | 8400 | ** R-Tree geometry query as follows: |
| 8401 | 8401 | ** |
| 8402 | 8402 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...) |
| 8403 | 8403 | */ |
| 8404 | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( | |
| 8404 | +SQLITE_API int sqlite3_rtree_geometry_callback( | |
| 8405 | 8405 | sqlite3 *db, |
| 8406 | 8406 | const char *zGeom, |
| 8407 | 8407 | int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), |
| 8408 | 8408 | void *pContext |
| 8409 | 8409 | ); |
| @@ -8425,11 +8425,11 @@ | ||
| 8425 | 8425 | ** Register a 2nd-generation geometry callback named zScore that can be |
| 8426 | 8426 | ** used as part of an R-Tree geometry query as follows: |
| 8427 | 8427 | ** |
| 8428 | 8428 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...) |
| 8429 | 8429 | */ |
| 8430 | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( | |
| 8430 | +SQLITE_API int sqlite3_rtree_query_callback( | |
| 8431 | 8431 | sqlite3 *db, |
| 8432 | 8432 | const char *zQueryFunc, |
| 8433 | 8433 | int (*xQueryFunc)(sqlite3_rtree_query_info*), |
| 8434 | 8434 | void *pContext, |
| 8435 | 8435 | void (*xDestructor)(void*) |
| 8436 | 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.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 @@ | ||
| 118 | 118 | ** |
| 119 | 119 | ** See also: [sqlite3_libversion()], |
| 120 | 120 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 121 | 121 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 122 | 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" | |
| 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 | 126 | |
| 127 | 127 | /* |
| 128 | 128 | ** CAPI3REF: Run-Time Library Version Numbers |
| 129 | 129 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 130 | 130 | ** |
| @@ -153,13 +153,13 @@ | ||
| 153 | 153 | ** [SQLITE_SOURCE_ID] C preprocessor macro. |
| 154 | 154 | ** |
| 155 | 155 | ** See also: [sqlite_version()] and [sqlite_source_id()]. |
| 156 | 156 | */ |
| 157 | 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); | |
| 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 | 161 | |
| 162 | 162 | /* |
| 163 | 163 | ** CAPI3REF: Run-Time Library Compilation Options Diagnostics |
| 164 | 164 | ** |
| 165 | 165 | ** ^The sqlite3_compileoption_used() function returns 0 or 1 |
| @@ -180,12 +180,12 @@ | ||
| 180 | 180 | ** |
| 181 | 181 | ** See also: SQL functions [sqlite_compileoption_used()] and |
| 182 | 182 | ** [sqlite_compileoption_get()] and the [compile_options pragma]. |
| 183 | 183 | */ |
| 184 | 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); | |
| 185 | +SQLITE_API int sqlite3_compileoption_used(const char *zOptName); | |
| 186 | +SQLITE_API const char *sqlite3_compileoption_get(int N); | |
| 187 | 187 | #endif |
| 188 | 188 | |
| 189 | 189 | /* |
| 190 | 190 | ** CAPI3REF: Test To See If The Library Is Threadsafe |
| 191 | 191 | ** |
| @@ -220,11 +220,11 @@ | ||
| 220 | 220 | ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() |
| 221 | 221 | ** is unchanged by calls to sqlite3_config().)^ |
| 222 | 222 | ** |
| 223 | 223 | ** See the [threading mode] documentation for additional information. |
| 224 | 224 | */ |
| 225 | -SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void); | |
| 225 | +SQLITE_API int sqlite3_threadsafe(void); | |
| 226 | 226 | |
| 227 | 227 | /* |
| 228 | 228 | ** CAPI3REF: Database Connection Handle |
| 229 | 229 | ** KEYWORDS: {database connection} {database connections} |
| 230 | 230 | ** |
| @@ -317,12 +317,12 @@ | ||
| 317 | 317 | ** from [sqlite3_open()], [sqlite3_open16()], or |
| 318 | 318 | ** [sqlite3_open_v2()], and not previously closed. |
| 319 | 319 | ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer |
| 320 | 320 | ** argument is a harmless no-op. |
| 321 | 321 | */ |
| 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*); | |
| 324 | 324 | |
| 325 | 325 | /* |
| 326 | 326 | ** The type for a callback function. |
| 327 | 327 | ** This is legacy and deprecated. It is included for historical |
| 328 | 328 | ** compatibility and is not documented. |
| @@ -389,11 +389,11 @@ | ||
| 389 | 389 | ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. |
| 390 | 390 | ** <li> The application must not modify the SQL statement text passed into |
| 391 | 391 | ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. |
| 392 | 392 | ** </ul> |
| 393 | 393 | */ |
| 394 | -SQLITE_API int SQLITE_STDCALL sqlite3_exec( | |
| 394 | +SQLITE_API int sqlite3_exec( | |
| 395 | 395 | sqlite3*, /* An open database */ |
| 396 | 396 | const char *sql, /* SQL to be evaluated */ |
| 397 | 397 | int (*callback)(void*,int,char**,char**), /* Callback function */ |
| 398 | 398 | void *, /* 1st argument to callback */ |
| 399 | 399 | char **errmsg /* Error msg written here */ |
| @@ -1388,14 +1388,14 @@ | ||
| 1388 | 1388 | ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied |
| 1389 | 1389 | ** implementation of sqlite3_os_init() or sqlite3_os_end() |
| 1390 | 1390 | ** must return [SQLITE_OK] on success and some other [error code] upon |
| 1391 | 1391 | ** failure. |
| 1392 | 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); | |
| 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 | 1397 | |
| 1398 | 1398 | /* |
| 1399 | 1399 | ** CAPI3REF: Configuring The SQLite Library |
| 1400 | 1400 | ** |
| 1401 | 1401 | ** The sqlite3_config() interface is used to make global configuration |
| @@ -1424,11 +1424,11 @@ | ||
| 1424 | 1424 | ** |
| 1425 | 1425 | ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. |
| 1426 | 1426 | ** ^If the option is unknown or SQLite is unable to set the option |
| 1427 | 1427 | ** then this routine returns a non-zero [error code]. |
| 1428 | 1428 | */ |
| 1429 | -SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...); | |
| 1429 | +SQLITE_API int sqlite3_config(int, ...); | |
| 1430 | 1430 | |
| 1431 | 1431 | /* |
| 1432 | 1432 | ** CAPI3REF: Configure database connections |
| 1433 | 1433 | ** METHOD: sqlite3 |
| 1434 | 1434 | ** |
| @@ -1443,11 +1443,11 @@ | ||
| 1443 | 1443 | ** Subsequent arguments vary depending on the configuration verb. |
| 1444 | 1444 | ** |
| 1445 | 1445 | ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if |
| 1446 | 1446 | ** the call is considered successful. |
| 1447 | 1447 | */ |
| 1448 | -SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...); | |
| 1448 | +SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...); | |
| 1449 | 1449 | |
| 1450 | 1450 | /* |
| 1451 | 1451 | ** CAPI3REF: Memory Allocation Routines |
| 1452 | 1452 | ** |
| 1453 | 1453 | ** An instance of this object defines the interface between SQLite |
| @@ -1984,11 +1984,11 @@ | ||
| 1984 | 1984 | ** |
| 1985 | 1985 | ** ^The sqlite3_extended_result_codes() routine enables or disables the |
| 1986 | 1986 | ** [extended result codes] feature of SQLite. ^The extended result |
| 1987 | 1987 | ** codes are disabled by default for historical compatibility. |
| 1988 | 1988 | */ |
| 1989 | -SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff); | |
| 1989 | +SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff); | |
| 1990 | 1990 | |
| 1991 | 1991 | /* |
| 1992 | 1992 | ** CAPI3REF: Last Insert Rowid |
| 1993 | 1993 | ** METHOD: sqlite3 |
| 1994 | 1994 | ** |
| @@ -2036,11 +2036,11 @@ | ||
| 2036 | 2036 | ** function is running and thus changes the last insert [rowid], |
| 2037 | 2037 | ** then the value returned by [sqlite3_last_insert_rowid()] is |
| 2038 | 2038 | ** unpredictable and might not equal either the old or the new |
| 2039 | 2039 | ** last insert [rowid]. |
| 2040 | 2040 | */ |
| 2041 | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); | |
| 2041 | +SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); | |
| 2042 | 2042 | |
| 2043 | 2043 | /* |
| 2044 | 2044 | ** CAPI3REF: Count The Number Of Rows Modified |
| 2045 | 2045 | ** METHOD: sqlite3 |
| 2046 | 2046 | ** |
| @@ -2089,11 +2089,11 @@ | ||
| 2089 | 2089 | ** |
| 2090 | 2090 | ** If a separate thread makes changes on the same database connection |
| 2091 | 2091 | ** while [sqlite3_changes()] is running then the value returned |
| 2092 | 2092 | ** is unpredictable and not meaningful. |
| 2093 | 2093 | */ |
| 2094 | -SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*); | |
| 2094 | +SQLITE_API int sqlite3_changes(sqlite3*); | |
| 2095 | 2095 | |
| 2096 | 2096 | /* |
| 2097 | 2097 | ** CAPI3REF: Total Number Of Rows Modified |
| 2098 | 2098 | ** METHOD: sqlite3 |
| 2099 | 2099 | ** |
| @@ -2113,11 +2113,11 @@ | ||
| 2113 | 2113 | ** |
| 2114 | 2114 | ** If a separate thread makes changes on the same database connection |
| 2115 | 2115 | ** while [sqlite3_total_changes()] is running then the value |
| 2116 | 2116 | ** returned is unpredictable and not meaningful. |
| 2117 | 2117 | */ |
| 2118 | -SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*); | |
| 2118 | +SQLITE_API int sqlite3_total_changes(sqlite3*); | |
| 2119 | 2119 | |
| 2120 | 2120 | /* |
| 2121 | 2121 | ** CAPI3REF: Interrupt A Long-Running Query |
| 2122 | 2122 | ** METHOD: sqlite3 |
| 2123 | 2123 | ** |
| @@ -2153,11 +2153,11 @@ | ||
| 2153 | 2153 | ** that are started after the sqlite3_interrupt() call returns. |
| 2154 | 2154 | ** |
| 2155 | 2155 | ** If the database connection closes while [sqlite3_interrupt()] |
| 2156 | 2156 | ** is running then bad things will likely happen. |
| 2157 | 2157 | */ |
| 2158 | -SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*); | |
| 2158 | +SQLITE_API void sqlite3_interrupt(sqlite3*); | |
| 2159 | 2159 | |
| 2160 | 2160 | /* |
| 2161 | 2161 | ** CAPI3REF: Determine If An SQL Statement Is Complete |
| 2162 | 2162 | ** |
| 2163 | 2163 | ** These routines are useful during command-line input to determine if the |
| @@ -2188,12 +2188,12 @@ | ||
| 2188 | 2188 | ** UTF-8 string. |
| 2189 | 2189 | ** |
| 2190 | 2190 | ** The input to [sqlite3_complete16()] must be a zero-terminated |
| 2191 | 2191 | ** UTF-16 string in native byte order. |
| 2192 | 2192 | */ |
| 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); | |
| 2195 | 2195 | |
| 2196 | 2196 | /* |
| 2197 | 2197 | ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors |
| 2198 | 2198 | ** KEYWORDS: {busy-handler callback} {busy handler} |
| 2199 | 2199 | ** METHOD: sqlite3 |
| @@ -2250,11 +2250,11 @@ | ||
| 2250 | 2250 | ** result in undefined behavior. |
| 2251 | 2251 | ** |
| 2252 | 2252 | ** A busy handler must not close the database connection |
| 2253 | 2253 | ** or [prepared statement] that invoked the busy handler. |
| 2254 | 2254 | */ |
| 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*); | |
| 2256 | 2256 | |
| 2257 | 2257 | /* |
| 2258 | 2258 | ** CAPI3REF: Set A Busy Timeout |
| 2259 | 2259 | ** METHOD: sqlite3 |
| 2260 | 2260 | ** |
| @@ -2273,11 +2273,11 @@ | ||
| 2273 | 2273 | ** was defined (using [sqlite3_busy_handler()]) prior to calling |
| 2274 | 2274 | ** this routine, that other busy handler is cleared.)^ |
| 2275 | 2275 | ** |
| 2276 | 2276 | ** See also: [PRAGMA busy_timeout] |
| 2277 | 2277 | */ |
| 2278 | -SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms); | |
| 2278 | +SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms); | |
| 2279 | 2279 | |
| 2280 | 2280 | /* |
| 2281 | 2281 | ** CAPI3REF: Convenience Routines For Running Queries |
| 2282 | 2282 | ** METHOD: sqlite3 |
| 2283 | 2283 | ** |
| @@ -2348,19 +2348,19 @@ | ||
| 2348 | 2348 | ** interface defined here. As a consequence, errors that occur in the |
| 2349 | 2349 | ** wrapper layer outside of the internal [sqlite3_exec()] call are not |
| 2350 | 2350 | ** reflected in subsequent calls to [sqlite3_errcode()] or |
| 2351 | 2351 | ** [sqlite3_errmsg()]. |
| 2352 | 2352 | */ |
| 2353 | -SQLITE_API int SQLITE_STDCALL sqlite3_get_table( | |
| 2353 | +SQLITE_API int sqlite3_get_table( | |
| 2354 | 2354 | sqlite3 *db, /* An open database */ |
| 2355 | 2355 | const char *zSql, /* SQL to be evaluated */ |
| 2356 | 2356 | char ***pazResult, /* Results of the query */ |
| 2357 | 2357 | int *pnRow, /* Number of result rows written here */ |
| 2358 | 2358 | int *pnColumn, /* Number of result columns written here */ |
| 2359 | 2359 | char **pzErrmsg /* Error msg written here */ |
| 2360 | 2360 | ); |
| 2361 | -SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result); | |
| 2361 | +SQLITE_API void sqlite3_free_table(char **result); | |
| 2362 | 2362 | |
| 2363 | 2363 | /* |
| 2364 | 2364 | ** CAPI3REF: Formatted String Printing Functions |
| 2365 | 2365 | ** |
| 2366 | 2366 | ** These routines are work-alikes of the "printf()" family of functions |
| @@ -2462,14 +2462,14 @@ | ||
| 2462 | 2462 | ** |
| 2463 | 2463 | ** ^(The "%z" formatting option works like "%s" but with the |
| 2464 | 2464 | ** addition that after the string has been read and copied into |
| 2465 | 2465 | ** the result, [sqlite3_free()] is called on the input string.)^ |
| 2466 | 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); | |
| 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 | 2471 | |
| 2472 | 2472 | /* |
| 2473 | 2473 | ** CAPI3REF: Memory Allocation Subsystem |
| 2474 | 2474 | ** |
| 2475 | 2475 | ** The SQLite core uses these three routines for all of its own |
| @@ -2555,16 +2555,16 @@ | ||
| 2555 | 2555 | ** |
| 2556 | 2556 | ** The application must not read or write any part of |
| 2557 | 2557 | ** a block of memory after it has been released using |
| 2558 | 2558 | ** [sqlite3_free()] or [sqlite3_realloc()]. |
| 2559 | 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*); | |
| 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 | 2566 | |
| 2567 | 2567 | /* |
| 2568 | 2568 | ** CAPI3REF: Memory Allocator Statistics |
| 2569 | 2569 | ** |
| 2570 | 2570 | ** SQLite provides these two interfaces for reporting on the status |
| @@ -2585,12 +2585,12 @@ | ||
| 2585 | 2585 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 2586 | 2586 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| 2587 | 2587 | ** by [sqlite3_memory_highwater(1)] is the high-water mark |
| 2588 | 2588 | ** prior to the reset. |
| 2589 | 2589 | */ |
| 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); | |
| 2592 | 2592 | |
| 2593 | 2593 | /* |
| 2594 | 2594 | ** CAPI3REF: Pseudo-Random Number Generator |
| 2595 | 2595 | ** |
| 2596 | 2596 | ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to |
| @@ -2609,11 +2609,11 @@ | ||
| 2609 | 2609 | ** ^If the previous call to this routine had an N of 1 or more and a |
| 2610 | 2610 | ** non-NULL P then the pseudo-randomness is generated |
| 2611 | 2611 | ** internally and without recourse to the [sqlite3_vfs] xRandomness |
| 2612 | 2612 | ** method. |
| 2613 | 2613 | */ |
| 2614 | -SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P); | |
| 2614 | +SQLITE_API void sqlite3_randomness(int N, void *P); | |
| 2615 | 2615 | |
| 2616 | 2616 | /* |
| 2617 | 2617 | ** CAPI3REF: Compile-Time Authorization Callbacks |
| 2618 | 2618 | ** METHOD: sqlite3 |
| 2619 | 2619 | ** |
| @@ -2692,11 +2692,11 @@ | ||
| 2692 | 2692 | ** [sqlite3_prepare()] or its variants. Authorization is not |
| 2693 | 2693 | ** performed during statement evaluation in [sqlite3_step()], unless |
| 2694 | 2694 | ** as stated in the previous paragraph, sqlite3_step() invokes |
| 2695 | 2695 | ** sqlite3_prepare_v2() to reprepare a statement after a schema change. |
| 2696 | 2696 | */ |
| 2697 | -SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( | |
| 2697 | +SQLITE_API int sqlite3_set_authorizer( | |
| 2698 | 2698 | sqlite3*, |
| 2699 | 2699 | int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 2700 | 2700 | void *pUserData |
| 2701 | 2701 | ); |
| 2702 | 2702 | |
| @@ -2800,13 +2800,13 @@ | ||
| 2800 | 2800 | ** digits in the time are meaningless. Future versions of SQLite |
| 2801 | 2801 | ** might provide greater resolution on the profiler callback. The |
| 2802 | 2802 | ** sqlite3_profile() function is considered experimental and is |
| 2803 | 2803 | ** subject to change in future versions of SQLite. |
| 2804 | 2804 | */ |
| 2805 | -SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*, | |
| 2805 | +SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*, | |
| 2806 | 2806 | 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*, | |
| 2808 | 2808 | void(*xProfile)(void*,const char*,sqlite3_uint64), void*); |
| 2809 | 2809 | |
| 2810 | 2810 | /* |
| 2811 | 2811 | ** CAPI3REF: SQL Trace Event Codes |
| 2812 | 2812 | ** KEYWORDS: SQLITE_TRACE |
| @@ -2891,11 +2891,11 @@ | ||
| 2891 | 2891 | ** |
| 2892 | 2892 | ** The sqlite3_trace_v2() interface is intended to replace the legacy |
| 2893 | 2893 | ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which |
| 2894 | 2894 | ** are deprecated. |
| 2895 | 2895 | */ |
| 2896 | -SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2( | |
| 2896 | +SQLITE_API int sqlite3_trace_v2( | |
| 2897 | 2897 | sqlite3*, |
| 2898 | 2898 | unsigned uMask, |
| 2899 | 2899 | int(*xCallback)(unsigned,void*,void*,void*), |
| 2900 | 2900 | void *pCtx |
| 2901 | 2901 | ); |
| @@ -2930,11 +2930,11 @@ | ||
| 2930 | 2930 | ** the database connection that invoked the progress handler. |
| 2931 | 2931 | ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their |
| 2932 | 2932 | ** database connections for the meaning of "modify" in this paragraph. |
| 2933 | 2933 | ** |
| 2934 | 2934 | */ |
| 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*); | |
| 2936 | 2936 | |
| 2937 | 2937 | /* |
| 2938 | 2938 | ** CAPI3REF: Opening A New Database Connection |
| 2939 | 2939 | ** CONSTRUCTOR: sqlite3 |
| 2940 | 2940 | ** |
| @@ -3159,19 +3159,19 @@ | ||
| 3159 | 3159 | ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various |
| 3160 | 3160 | ** features that require the use of temporary files may fail. |
| 3161 | 3161 | ** |
| 3162 | 3162 | ** See also: [sqlite3_temp_directory] |
| 3163 | 3163 | */ |
| 3164 | -SQLITE_API int SQLITE_STDCALL sqlite3_open( | |
| 3164 | +SQLITE_API int sqlite3_open( | |
| 3165 | 3165 | const char *filename, /* Database filename (UTF-8) */ |
| 3166 | 3166 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3167 | 3167 | ); |
| 3168 | -SQLITE_API int SQLITE_STDCALL sqlite3_open16( | |
| 3168 | +SQLITE_API int sqlite3_open16( | |
| 3169 | 3169 | const void *filename, /* Database filename (UTF-16) */ |
| 3170 | 3170 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3171 | 3171 | ); |
| 3172 | -SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( | |
| 3172 | +SQLITE_API int sqlite3_open_v2( | |
| 3173 | 3173 | const char *filename, /* Database filename (UTF-8) */ |
| 3174 | 3174 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 3175 | 3175 | int flags, /* Flags */ |
| 3176 | 3176 | const char *zVfs /* Name of VFS module to use */ |
| 3177 | 3177 | ); |
| @@ -3213,13 +3213,13 @@ | ||
| 3213 | 3213 | ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and |
| 3214 | 3214 | ** is not a database file pathname pointer that SQLite passed into the xOpen |
| 3215 | 3215 | ** VFS method, then the behavior of this routine is undefined and probably |
| 3216 | 3216 | ** undesirable. |
| 3217 | 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); | |
| 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 | 3221 | |
| 3222 | 3222 | |
| 3223 | 3223 | /* |
| 3224 | 3224 | ** CAPI3REF: Error Codes And Messages |
| 3225 | 3225 | ** METHOD: sqlite3 |
| @@ -3259,15 +3259,15 @@ | ||
| 3259 | 3259 | ** |
| 3260 | 3260 | ** If an interface fails with SQLITE_MISUSE, that means the interface |
| 3261 | 3261 | ** was invoked incorrectly by the application. In that case, the |
| 3262 | 3262 | ** error code and message may or may not be set. |
| 3263 | 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); | |
| 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 | 3269 | |
| 3270 | 3270 | /* |
| 3271 | 3271 | ** CAPI3REF: Prepared Statement Object |
| 3272 | 3272 | ** KEYWORDS: {prepared statement} {prepared statements} |
| 3273 | 3273 | ** |
| @@ -3331,11 +3331,11 @@ | ||
| 3331 | 3331 | ** created by an untrusted script can be contained using the |
| 3332 | 3332 | ** [max_page_count] [PRAGMA]. |
| 3333 | 3333 | ** |
| 3334 | 3334 | ** New run-time limit categories may be added in future releases. |
| 3335 | 3335 | */ |
| 3336 | -SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal); | |
| 3336 | +SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal); | |
| 3337 | 3337 | |
| 3338 | 3338 | /* |
| 3339 | 3339 | ** CAPI3REF: Run-Time Limit Categories |
| 3340 | 3340 | ** KEYWORDS: {limit category} {*limit categories} |
| 3341 | 3341 | ** |
| @@ -3483,32 +3483,32 @@ | ||
| 3483 | 3483 | ** or [GLOB] operator or if the parameter is compared to an indexed column |
| 3484 | 3484 | ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled. |
| 3485 | 3485 | ** </li> |
| 3486 | 3486 | ** </ol> |
| 3487 | 3487 | */ |
| 3488 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare( | |
| 3488 | +SQLITE_API int sqlite3_prepare( | |
| 3489 | 3489 | sqlite3 *db, /* Database handle */ |
| 3490 | 3490 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3491 | 3491 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3492 | 3492 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3493 | 3493 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3494 | 3494 | ); |
| 3495 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( | |
| 3495 | +SQLITE_API int sqlite3_prepare_v2( | |
| 3496 | 3496 | sqlite3 *db, /* Database handle */ |
| 3497 | 3497 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3498 | 3498 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3499 | 3499 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3500 | 3500 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3501 | 3501 | ); |
| 3502 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( | |
| 3502 | +SQLITE_API int sqlite3_prepare16( | |
| 3503 | 3503 | sqlite3 *db, /* Database handle */ |
| 3504 | 3504 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3505 | 3505 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3506 | 3506 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3507 | 3507 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3508 | 3508 | ); |
| 3509 | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( | |
| 3509 | +SQLITE_API int sqlite3_prepare16_v2( | |
| 3510 | 3510 | sqlite3 *db, /* Database handle */ |
| 3511 | 3511 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3512 | 3512 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3513 | 3513 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3514 | 3514 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| @@ -3543,12 +3543,12 @@ | ||
| 3543 | 3543 | ** automatically freed when the prepared statement is finalized. |
| 3544 | 3544 | ** ^The string returned by sqlite3_expanded_sql(P), on the other hand, |
| 3545 | 3545 | ** is obtained from [sqlite3_malloc()] and must be free by the application |
| 3546 | 3546 | ** by passing it to [sqlite3_free()]. |
| 3547 | 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); | |
| 3548 | +SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); | |
| 3549 | +SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt); | |
| 3550 | 3550 | |
| 3551 | 3551 | /* |
| 3552 | 3552 | ** CAPI3REF: Determine If An SQL Statement Writes The Database |
| 3553 | 3553 | ** METHOD: sqlite3_stmt |
| 3554 | 3554 | ** |
| @@ -3576,11 +3576,11 @@ | ||
| 3576 | 3576 | ** database. ^The [ATTACH] and [DETACH] statements also cause |
| 3577 | 3577 | ** sqlite3_stmt_readonly() to return true since, while those statements |
| 3578 | 3578 | ** change the configuration of a database connection, they do not make |
| 3579 | 3579 | ** changes to the content of the database files on disk. |
| 3580 | 3580 | */ |
| 3581 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); | |
| 3581 | +SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); | |
| 3582 | 3582 | |
| 3583 | 3583 | /* |
| 3584 | 3584 | ** CAPI3REF: Determine If A Prepared Statement Has Been Reset |
| 3585 | 3585 | ** METHOD: sqlite3_stmt |
| 3586 | 3586 | ** |
| @@ -3597,11 +3597,11 @@ | ||
| 3597 | 3597 | ** to locate all prepared statements associated with a database |
| 3598 | 3598 | ** connection that are in need of being reset. This can be used, |
| 3599 | 3599 | ** for example, in diagnostic routines to search for prepared |
| 3600 | 3600 | ** statements that are holding a transaction open. |
| 3601 | 3601 | */ |
| 3602 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*); | |
| 3602 | +SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*); | |
| 3603 | 3603 | |
| 3604 | 3604 | /* |
| 3605 | 3605 | ** CAPI3REF: Dynamically Typed Value Object |
| 3606 | 3606 | ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} |
| 3607 | 3607 | ** |
| @@ -3761,24 +3761,24 @@ | ||
| 3761 | 3761 | ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. |
| 3762 | 3762 | ** |
| 3763 | 3763 | ** See also: [sqlite3_bind_parameter_count()], |
| 3764 | 3764 | ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. |
| 3765 | 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, | |
| 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 | 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, | |
| 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 | 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); | |
| 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 | 3780 | |
| 3781 | 3781 | /* |
| 3782 | 3782 | ** CAPI3REF: Number Of SQL Parameters |
| 3783 | 3783 | ** METHOD: sqlite3_stmt |
| 3784 | 3784 | ** |
| @@ -3795,11 +3795,11 @@ | ||
| 3795 | 3795 | ** |
| 3796 | 3796 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3797 | 3797 | ** [sqlite3_bind_parameter_name()], and |
| 3798 | 3798 | ** [sqlite3_bind_parameter_index()]. |
| 3799 | 3799 | */ |
| 3800 | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*); | |
| 3800 | +SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*); | |
| 3801 | 3801 | |
| 3802 | 3802 | /* |
| 3803 | 3803 | ** CAPI3REF: Name Of A Host Parameter |
| 3804 | 3804 | ** METHOD: sqlite3_stmt |
| 3805 | 3805 | ** |
| @@ -3823,11 +3823,11 @@ | ||
| 3823 | 3823 | ** |
| 3824 | 3824 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3825 | 3825 | ** [sqlite3_bind_parameter_count()], and |
| 3826 | 3826 | ** [sqlite3_bind_parameter_index()]. |
| 3827 | 3827 | */ |
| 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); | |
| 3829 | 3829 | |
| 3830 | 3830 | /* |
| 3831 | 3831 | ** CAPI3REF: Index Of A Parameter With A Given Name |
| 3832 | 3832 | ** METHOD: sqlite3_stmt |
| 3833 | 3833 | ** |
| @@ -3840,21 +3840,21 @@ | ||
| 3840 | 3840 | ** |
| 3841 | 3841 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3842 | 3842 | ** [sqlite3_bind_parameter_count()], and |
| 3843 | 3843 | ** [sqlite3_bind_parameter_name()]. |
| 3844 | 3844 | */ |
| 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); | |
| 3846 | 3846 | |
| 3847 | 3847 | /* |
| 3848 | 3848 | ** CAPI3REF: Reset All Bindings On A Prepared Statement |
| 3849 | 3849 | ** METHOD: sqlite3_stmt |
| 3850 | 3850 | ** |
| 3851 | 3851 | ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset |
| 3852 | 3852 | ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. |
| 3853 | 3853 | ** ^Use this routine to reset all host parameters to NULL. |
| 3854 | 3854 | */ |
| 3855 | -SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*); | |
| 3855 | +SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*); | |
| 3856 | 3856 | |
| 3857 | 3857 | /* |
| 3858 | 3858 | ** CAPI3REF: Number Of Columns In A Result Set |
| 3859 | 3859 | ** METHOD: sqlite3_stmt |
| 3860 | 3860 | ** |
| @@ -3862,11 +3862,11 @@ | ||
| 3862 | 3862 | ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL |
| 3863 | 3863 | ** statement that does not return data (for example an [UPDATE]). |
| 3864 | 3864 | ** |
| 3865 | 3865 | ** See also: [sqlite3_data_count()] |
| 3866 | 3866 | */ |
| 3867 | -SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt); | |
| 3867 | +SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt); | |
| 3868 | 3868 | |
| 3869 | 3869 | /* |
| 3870 | 3870 | ** CAPI3REF: Column Names In A Result Set |
| 3871 | 3871 | ** METHOD: sqlite3_stmt |
| 3872 | 3872 | ** |
| @@ -3891,12 +3891,12 @@ | ||
| 3891 | 3891 | ** ^The name of a result column is the value of the "AS" clause for |
| 3892 | 3892 | ** that column, if there is an AS clause. If there is no AS clause |
| 3893 | 3893 | ** then the name of the column is unspecified and may change from |
| 3894 | 3894 | ** one release of SQLite to the next. |
| 3895 | 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); | |
| 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 | 3898 | |
| 3899 | 3899 | /* |
| 3900 | 3900 | ** CAPI3REF: Source Of Data In A Query Result |
| 3901 | 3901 | ** METHOD: sqlite3_stmt |
| 3902 | 3902 | ** |
| @@ -3940,16 +3940,16 @@ | ||
| 3940 | 3940 | ** If two or more threads call one or more |
| 3941 | 3941 | ** [sqlite3_column_database_name | column metadata interfaces] |
| 3942 | 3942 | ** for the same [prepared statement] and result column |
| 3943 | 3943 | ** at the same time then the results are undefined. |
| 3944 | 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); | |
| 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 | 3951 | |
| 3952 | 3952 | /* |
| 3953 | 3953 | ** CAPI3REF: Declared Datatype Of A Query Result |
| 3954 | 3954 | ** METHOD: sqlite3_stmt |
| 3955 | 3955 | ** |
| @@ -3977,12 +3977,12 @@ | ||
| 3977 | 3977 | ** data stored in that column is of the declared type. SQLite is |
| 3978 | 3978 | ** strongly typed, but the typing is dynamic not static. ^Type |
| 3979 | 3979 | ** is associated with individual values, not with the containers |
| 3980 | 3980 | ** used to hold those values. |
| 3981 | 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); | |
| 3982 | +SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int); | |
| 3983 | +SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int); | |
| 3984 | 3984 | |
| 3985 | 3985 | /* |
| 3986 | 3986 | ** CAPI3REF: Evaluate An SQL Statement |
| 3987 | 3987 | ** METHOD: sqlite3_stmt |
| 3988 | 3988 | ** |
| @@ -4058,11 +4058,11 @@ | ||
| 4058 | 4058 | ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead |
| 4059 | 4059 | ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, |
| 4060 | 4060 | ** then the more specific [error codes] are returned directly |
| 4061 | 4061 | ** by sqlite3_step(). The use of the "v2" interface is recommended. |
| 4062 | 4062 | */ |
| 4063 | -SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*); | |
| 4063 | +SQLITE_API int sqlite3_step(sqlite3_stmt*); | |
| 4064 | 4064 | |
| 4065 | 4065 | /* |
| 4066 | 4066 | ** CAPI3REF: Number of columns in a result set |
| 4067 | 4067 | ** METHOD: sqlite3_stmt |
| 4068 | 4068 | ** |
| @@ -4079,11 +4079,11 @@ | ||
| 4079 | 4079 | ** where it always returns zero since each step of that multi-step |
| 4080 | 4080 | ** pragma returns 0 columns of data. |
| 4081 | 4081 | ** |
| 4082 | 4082 | ** See also: [sqlite3_column_count()] |
| 4083 | 4083 | */ |
| 4084 | -SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt); | |
| 4084 | +SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt); | |
| 4085 | 4085 | |
| 4086 | 4086 | /* |
| 4087 | 4087 | ** CAPI3REF: Fundamental Datatypes |
| 4088 | 4088 | ** KEYWORDS: SQLITE_TEXT |
| 4089 | 4089 | ** |
| @@ -4269,20 +4269,20 @@ | ||
| 4269 | 4269 | ** of these routines, a default value is returned. The default value |
| 4270 | 4270 | ** is either the integer 0, the floating point number 0.0, or a NULL |
| 4271 | 4271 | ** pointer. Subsequent calls to [sqlite3_errcode()] will return |
| 4272 | 4272 | ** [SQLITE_NOMEM].)^ |
| 4273 | 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); | |
| 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 | 4284 | |
| 4285 | 4285 | /* |
| 4286 | 4286 | ** CAPI3REF: Destroy A Prepared Statement Object |
| 4287 | 4287 | ** DESTRUCTOR: sqlite3_stmt |
| 4288 | 4288 | ** |
| @@ -4306,11 +4306,11 @@ | ||
| 4306 | 4306 | ** resource leaks. It is a grievous error for the application to try to use |
| 4307 | 4307 | ** a prepared statement after it has been finalized. Any use of a prepared |
| 4308 | 4308 | ** statement after it has been finalized can result in undefined and |
| 4309 | 4309 | ** undesirable behavior such as segfaults and heap corruption. |
| 4310 | 4310 | */ |
| 4311 | -SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt); | |
| 4311 | +SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); | |
| 4312 | 4312 | |
| 4313 | 4313 | /* |
| 4314 | 4314 | ** CAPI3REF: Reset A Prepared Statement Object |
| 4315 | 4315 | ** METHOD: sqlite3_stmt |
| 4316 | 4316 | ** |
| @@ -4333,11 +4333,11 @@ | ||
| 4333 | 4333 | ** [sqlite3_reset(S)] returns an appropriate [error code]. |
| 4334 | 4334 | ** |
| 4335 | 4335 | ** ^The [sqlite3_reset(S)] interface does not change the values |
| 4336 | 4336 | ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. |
| 4337 | 4337 | */ |
| 4338 | -SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt); | |
| 4338 | +SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); | |
| 4339 | 4339 | |
| 4340 | 4340 | /* |
| 4341 | 4341 | ** CAPI3REF: Create Or Redefine SQL Functions |
| 4342 | 4342 | ** KEYWORDS: {function creation routines} |
| 4343 | 4343 | ** KEYWORDS: {application-defined SQL function} |
| @@ -4433,31 +4433,31 @@ | ||
| 4433 | 4433 | ** ^An application-defined function is permitted to call other |
| 4434 | 4434 | ** SQLite interfaces. However, such calls must not |
| 4435 | 4435 | ** close the database connection nor finalize or reset the prepared |
| 4436 | 4436 | ** statement in which the function is running. |
| 4437 | 4437 | */ |
| 4438 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function( | |
| 4438 | +SQLITE_API int sqlite3_create_function( | |
| 4439 | 4439 | sqlite3 *db, |
| 4440 | 4440 | const char *zFunctionName, |
| 4441 | 4441 | int nArg, |
| 4442 | 4442 | int eTextRep, |
| 4443 | 4443 | void *pApp, |
| 4444 | 4444 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4445 | 4445 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4446 | 4446 | void (*xFinal)(sqlite3_context*) |
| 4447 | 4447 | ); |
| 4448 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( | |
| 4448 | +SQLITE_API int sqlite3_create_function16( | |
| 4449 | 4449 | sqlite3 *db, |
| 4450 | 4450 | const void *zFunctionName, |
| 4451 | 4451 | int nArg, |
| 4452 | 4452 | int eTextRep, |
| 4453 | 4453 | void *pApp, |
| 4454 | 4454 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4455 | 4455 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4456 | 4456 | void (*xFinal)(sqlite3_context*) |
| 4457 | 4457 | ); |
| 4458 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( | |
| 4458 | +SQLITE_API int sqlite3_create_function_v2( | |
| 4459 | 4459 | sqlite3 *db, |
| 4460 | 4460 | const char *zFunctionName, |
| 4461 | 4461 | int nArg, |
| 4462 | 4462 | int eTextRep, |
| 4463 | 4463 | void *pApp, |
| @@ -4499,16 +4499,16 @@ | ||
| 4499 | 4499 | ** to be supported. However, new applications should avoid |
| 4500 | 4500 | ** the use of these functions. To encourage programmers to avoid |
| 4501 | 4501 | ** these functions, we will not explain what they do. |
| 4502 | 4502 | */ |
| 4503 | 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), | |
| 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 | 4510 | void*,sqlite3_int64); |
| 4511 | 4511 | #endif |
| 4512 | 4512 | |
| 4513 | 4513 | /* |
| 4514 | 4514 | ** CAPI3REF: Obtaining SQL Values |
| @@ -4554,22 +4554,22 @@ | ||
| 4554 | 4554 | ** or [sqlite3_value_text16()]. |
| 4555 | 4555 | ** |
| 4556 | 4556 | ** These routines must be called from the same thread as |
| 4557 | 4557 | ** the SQL function that supplied the [sqlite3_value*] parameters. |
| 4558 | 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*); | |
| 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 | 4571 | |
| 4572 | 4572 | /* |
| 4573 | 4573 | ** CAPI3REF: Finding The Subtype Of SQL Values |
| 4574 | 4574 | ** METHOD: sqlite3_value |
| 4575 | 4575 | ** |
| @@ -4581,11 +4581,11 @@ | ||
| 4581 | 4581 | ** |
| 4582 | 4582 | ** SQLite makes no use of subtype itself. It merely passes the subtype |
| 4583 | 4583 | ** from the result of one [application-defined SQL function] into the |
| 4584 | 4584 | ** input of another. |
| 4585 | 4585 | */ |
| 4586 | -SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*); | |
| 4586 | +SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*); | |
| 4587 | 4587 | |
| 4588 | 4588 | /* |
| 4589 | 4589 | ** CAPI3REF: Copy And Free SQL Values |
| 4590 | 4590 | ** METHOD: sqlite3_value |
| 4591 | 4591 | ** |
| @@ -4597,12 +4597,12 @@ | ||
| 4597 | 4597 | ** |
| 4598 | 4598 | ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object |
| 4599 | 4599 | ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer |
| 4600 | 4600 | ** then sqlite3_value_free(V) is a harmless no-op. |
| 4601 | 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*); | |
| 4602 | +SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*); | |
| 4603 | +SQLITE_API void sqlite3_value_free(sqlite3_value*); | |
| 4604 | 4604 | |
| 4605 | 4605 | /* |
| 4606 | 4606 | ** CAPI3REF: Obtain Aggregate Function Context |
| 4607 | 4607 | ** METHOD: sqlite3_context |
| 4608 | 4608 | ** |
| @@ -4643,11 +4643,11 @@ | ||
| 4643 | 4643 | ** function. |
| 4644 | 4644 | ** |
| 4645 | 4645 | ** This routine must be called from the same thread in which |
| 4646 | 4646 | ** the aggregate SQL function is running. |
| 4647 | 4647 | */ |
| 4648 | -SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); | |
| 4648 | +SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes); | |
| 4649 | 4649 | |
| 4650 | 4650 | /* |
| 4651 | 4651 | ** CAPI3REF: User Data For Functions |
| 4652 | 4652 | ** METHOD: sqlite3_context |
| 4653 | 4653 | ** |
| @@ -4658,11 +4658,11 @@ | ||
| 4658 | 4658 | ** registered the application defined function. |
| 4659 | 4659 | ** |
| 4660 | 4660 | ** This routine must be called from the same thread in which |
| 4661 | 4661 | ** the application-defined function is running. |
| 4662 | 4662 | */ |
| 4663 | -SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*); | |
| 4663 | +SQLITE_API void *sqlite3_user_data(sqlite3_context*); | |
| 4664 | 4664 | |
| 4665 | 4665 | /* |
| 4666 | 4666 | ** CAPI3REF: Database Connection For Functions |
| 4667 | 4667 | ** METHOD: sqlite3_context |
| 4668 | 4668 | ** |
| @@ -4670,11 +4670,11 @@ | ||
| 4670 | 4670 | ** the pointer to the [database connection] (the 1st parameter) |
| 4671 | 4671 | ** of the [sqlite3_create_function()] |
| 4672 | 4672 | ** and [sqlite3_create_function16()] routines that originally |
| 4673 | 4673 | ** registered the application defined function. |
| 4674 | 4674 | */ |
| 4675 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); | |
| 4675 | +SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*); | |
| 4676 | 4676 | |
| 4677 | 4677 | /* |
| 4678 | 4678 | ** CAPI3REF: Function Auxiliary Data |
| 4679 | 4679 | ** METHOD: sqlite3_context |
| 4680 | 4680 | ** |
| @@ -4724,12 +4724,12 @@ | ||
| 4724 | 4724 | ** values and [parameters] and expressions composed from the same.)^ |
| 4725 | 4725 | ** |
| 4726 | 4726 | ** These routines must be called from the same thread in which |
| 4727 | 4727 | ** the SQL function is running. |
| 4728 | 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*)); | |
| 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 | 4731 | |
| 4732 | 4732 | |
| 4733 | 4733 | /* |
| 4734 | 4734 | ** CAPI3REF: Constants Defining Special Destructor Behavior |
| 4735 | 4735 | ** |
| @@ -4861,31 +4861,31 @@ | ||
| 4861 | 4861 | ** |
| 4862 | 4862 | ** If these routines are called from within the different thread |
| 4863 | 4863 | ** than the one containing the application-defined function that received |
| 4864 | 4864 | ** the [sqlite3_context] pointer, the results are undefined. |
| 4865 | 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*, | |
| 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 | 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, | |
| 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 | 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); | |
| 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 | 4887 | |
| 4888 | 4888 | |
| 4889 | 4889 | /* |
| 4890 | 4890 | ** CAPI3REF: Setting The Subtype Of An SQL Function |
| 4891 | 4891 | ** METHOD: sqlite3_context |
| @@ -4896,11 +4896,11 @@ | ||
| 4896 | 4896 | ** of the subtype T are preserved in current versions of SQLite; |
| 4897 | 4897 | ** higher order bits are discarded. |
| 4898 | 4898 | ** The number of subtype bytes preserved by SQLite might increase |
| 4899 | 4899 | ** in future releases of SQLite. |
| 4900 | 4900 | */ |
| 4901 | -SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int); | |
| 4901 | +SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int); | |
| 4902 | 4902 | |
| 4903 | 4903 | /* |
| 4904 | 4904 | ** CAPI3REF: Define New Collating Sequences |
| 4905 | 4905 | ** METHOD: sqlite3 |
| 4906 | 4906 | ** |
| @@ -4978,26 +4978,26 @@ | ||
| 4978 | 4978 | ** is unfortunate but cannot be changed without breaking backwards |
| 4979 | 4979 | ** compatibility. |
| 4980 | 4980 | ** |
| 4981 | 4981 | ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. |
| 4982 | 4982 | */ |
| 4983 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( | |
| 4983 | +SQLITE_API int sqlite3_create_collation( | |
| 4984 | 4984 | sqlite3*, |
| 4985 | 4985 | const char *zName, |
| 4986 | 4986 | int eTextRep, |
| 4987 | 4987 | void *pArg, |
| 4988 | 4988 | int(*xCompare)(void*,int,const void*,int,const void*) |
| 4989 | 4989 | ); |
| 4990 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( | |
| 4990 | +SQLITE_API int sqlite3_create_collation_v2( | |
| 4991 | 4991 | sqlite3*, |
| 4992 | 4992 | const char *zName, |
| 4993 | 4993 | int eTextRep, |
| 4994 | 4994 | void *pArg, |
| 4995 | 4995 | int(*xCompare)(void*,int,const void*,int,const void*), |
| 4996 | 4996 | void(*xDestroy)(void*) |
| 4997 | 4997 | ); |
| 4998 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( | |
| 4998 | +SQLITE_API int sqlite3_create_collation16( | |
| 4999 | 4999 | sqlite3*, |
| 5000 | 5000 | const void *zName, |
| 5001 | 5001 | int eTextRep, |
| 5002 | 5002 | void *pArg, |
| 5003 | 5003 | int(*xCompare)(void*,int,const void*,int,const void*) |
| @@ -5028,16 +5028,16 @@ | ||
| 5028 | 5028 | ** |
| 5029 | 5029 | ** The callback function should register the desired collation using |
| 5030 | 5030 | ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or |
| 5031 | 5031 | ** [sqlite3_create_collation_v2()]. |
| 5032 | 5032 | */ |
| 5033 | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( | |
| 5033 | +SQLITE_API int sqlite3_collation_needed( | |
| 5034 | 5034 | sqlite3*, |
| 5035 | 5035 | void*, |
| 5036 | 5036 | void(*)(void*,sqlite3*,int eTextRep,const char*) |
| 5037 | 5037 | ); |
| 5038 | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( | |
| 5038 | +SQLITE_API int sqlite3_collation_needed16( | |
| 5039 | 5039 | sqlite3*, |
| 5040 | 5040 | void*, |
| 5041 | 5041 | void(*)(void*,sqlite3*,int eTextRep,const void*) |
| 5042 | 5042 | ); |
| 5043 | 5043 | |
| @@ -5047,15 +5047,15 @@ | ||
| 5047 | 5047 | ** called right after sqlite3_open(). |
| 5048 | 5048 | ** |
| 5049 | 5049 | ** The code to implement this API is not available in the public release |
| 5050 | 5050 | ** of SQLite. |
| 5051 | 5051 | */ |
| 5052 | -SQLITE_API int SQLITE_STDCALL sqlite3_key( | |
| 5052 | +SQLITE_API int sqlite3_key( | |
| 5053 | 5053 | sqlite3 *db, /* Database to be rekeyed */ |
| 5054 | 5054 | const void *pKey, int nKey /* The key */ |
| 5055 | 5055 | ); |
| 5056 | -SQLITE_API int SQLITE_STDCALL sqlite3_key_v2( | |
| 5056 | +SQLITE_API int sqlite3_key_v2( | |
| 5057 | 5057 | sqlite3 *db, /* Database to be rekeyed */ |
| 5058 | 5058 | const char *zDbName, /* Name of the database */ |
| 5059 | 5059 | const void *pKey, int nKey /* The key */ |
| 5060 | 5060 | ); |
| 5061 | 5061 | |
| @@ -5065,35 +5065,35 @@ | ||
| 5065 | 5065 | ** database is decrypted. |
| 5066 | 5066 | ** |
| 5067 | 5067 | ** The code to implement this API is not available in the public release |
| 5068 | 5068 | ** of SQLite. |
| 5069 | 5069 | */ |
| 5070 | -SQLITE_API int SQLITE_STDCALL sqlite3_rekey( | |
| 5070 | +SQLITE_API int sqlite3_rekey( | |
| 5071 | 5071 | sqlite3 *db, /* Database to be rekeyed */ |
| 5072 | 5072 | const void *pKey, int nKey /* The new key */ |
| 5073 | 5073 | ); |
| 5074 | -SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2( | |
| 5074 | +SQLITE_API int sqlite3_rekey_v2( | |
| 5075 | 5075 | sqlite3 *db, /* Database to be rekeyed */ |
| 5076 | 5076 | const char *zDbName, /* Name of the database */ |
| 5077 | 5077 | const void *pKey, int nKey /* The new key */ |
| 5078 | 5078 | ); |
| 5079 | 5079 | |
| 5080 | 5080 | /* |
| 5081 | 5081 | ** Specify the activation key for a SEE database. Unless |
| 5082 | 5082 | ** activated, none of the SEE routines will work. |
| 5083 | 5083 | */ |
| 5084 | -SQLITE_API void SQLITE_STDCALL sqlite3_activate_see( | |
| 5084 | +SQLITE_API void sqlite3_activate_see( | |
| 5085 | 5085 | const char *zPassPhrase /* Activation phrase */ |
| 5086 | 5086 | ); |
| 5087 | 5087 | #endif |
| 5088 | 5088 | |
| 5089 | 5089 | #ifdef SQLITE_ENABLE_CEROD |
| 5090 | 5090 | /* |
| 5091 | 5091 | ** Specify the activation key for a CEROD database. Unless |
| 5092 | 5092 | ** activated, none of the CEROD routines will work. |
| 5093 | 5093 | */ |
| 5094 | -SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod( | |
| 5094 | +SQLITE_API void sqlite3_activate_cerod( | |
| 5095 | 5095 | const char *zPassPhrase /* Activation phrase */ |
| 5096 | 5096 | ); |
| 5097 | 5097 | #endif |
| 5098 | 5098 | |
| 5099 | 5099 | /* |
| @@ -5111,11 +5111,11 @@ | ||
| 5111 | 5111 | ** method of the default [sqlite3_vfs] object. If the xSleep() method |
| 5112 | 5112 | ** of the default VFS is not implemented correctly, or not implemented at |
| 5113 | 5113 | ** all, then the behavior of sqlite3_sleep() may deviate from the description |
| 5114 | 5114 | ** in the previous paragraphs. |
| 5115 | 5115 | */ |
| 5116 | -SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int); | |
| 5116 | +SQLITE_API int sqlite3_sleep(int); | |
| 5117 | 5117 | |
| 5118 | 5118 | /* |
| 5119 | 5119 | ** CAPI3REF: Name Of The Folder Holding Temporary Files |
| 5120 | 5120 | ** |
| 5121 | 5121 | ** ^(If this global variable is made to point to a string which is |
| @@ -5230,11 +5230,11 @@ | ||
| 5230 | 5230 | ** |
| 5231 | 5231 | ** If another thread changes the autocommit status of the database |
| 5232 | 5232 | ** connection while this routine is running, then the return value |
| 5233 | 5233 | ** is undefined. |
| 5234 | 5234 | */ |
| 5235 | -SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*); | |
| 5235 | +SQLITE_API int sqlite3_get_autocommit(sqlite3*); | |
| 5236 | 5236 | |
| 5237 | 5237 | /* |
| 5238 | 5238 | ** CAPI3REF: Find The Database Handle Of A Prepared Statement |
| 5239 | 5239 | ** METHOD: sqlite3_stmt |
| 5240 | 5240 | ** |
| @@ -5243,11 +5243,11 @@ | ||
| 5243 | 5243 | ** returned by sqlite3_db_handle is the same [database connection] |
| 5244 | 5244 | ** that was the first argument |
| 5245 | 5245 | ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to |
| 5246 | 5246 | ** create the statement in the first place. |
| 5247 | 5247 | */ |
| 5248 | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*); | |
| 5248 | +SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); | |
| 5249 | 5249 | |
| 5250 | 5250 | /* |
| 5251 | 5251 | ** CAPI3REF: Return The Filename For A Database Connection |
| 5252 | 5252 | ** METHOD: sqlite3 |
| 5253 | 5253 | ** |
| @@ -5260,21 +5260,21 @@ | ||
| 5260 | 5260 | ** ^The filename returned by this function is the output of the |
| 5261 | 5261 | ** xFullPathname method of the [VFS]. ^In other words, the filename |
| 5262 | 5262 | ** will be an absolute pathname, even if the filename used |
| 5263 | 5263 | ** to open the database originally was a URI or relative pathname. |
| 5264 | 5264 | */ |
| 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); | |
| 5266 | 5266 | |
| 5267 | 5267 | /* |
| 5268 | 5268 | ** CAPI3REF: Determine if a database is read-only |
| 5269 | 5269 | ** METHOD: sqlite3 |
| 5270 | 5270 | ** |
| 5271 | 5271 | ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N |
| 5272 | 5272 | ** of connection D is read-only, 0 if it is read/write, or -1 if N is not |
| 5273 | 5273 | ** the name of a database on connection D. |
| 5274 | 5274 | */ |
| 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); | |
| 5276 | 5276 | |
| 5277 | 5277 | /* |
| 5278 | 5278 | ** CAPI3REF: Find the next prepared statement |
| 5279 | 5279 | ** METHOD: sqlite3 |
| 5280 | 5280 | ** |
| @@ -5286,11 +5286,11 @@ | ||
| 5286 | 5286 | ** |
| 5287 | 5287 | ** The [database connection] pointer D in a call to |
| 5288 | 5288 | ** [sqlite3_next_stmt(D,S)] must refer to an open database |
| 5289 | 5289 | ** connection and in particular must not be a NULL pointer. |
| 5290 | 5290 | */ |
| 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); | |
| 5292 | 5292 | |
| 5293 | 5293 | /* |
| 5294 | 5294 | ** CAPI3REF: Commit And Rollback Notification Callbacks |
| 5295 | 5295 | ** METHOD: sqlite3 |
| 5296 | 5296 | ** |
| @@ -5335,12 +5335,12 @@ | ||
| 5335 | 5335 | ** ^The rollback callback is not invoked if a transaction is |
| 5336 | 5336 | ** automatically rolled back because the database connection is closed. |
| 5337 | 5337 | ** |
| 5338 | 5338 | ** See also the [sqlite3_update_hook()] interface. |
| 5339 | 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*); | |
| 5340 | +SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); | |
| 5341 | +SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); | |
| 5342 | 5342 | |
| 5343 | 5343 | /* |
| 5344 | 5344 | ** CAPI3REF: Data Change Notification Callbacks |
| 5345 | 5345 | ** METHOD: sqlite3 |
| 5346 | 5346 | ** |
| @@ -5387,11 +5387,11 @@ | ||
| 5387 | 5387 | ** the first call on D. |
| 5388 | 5388 | ** |
| 5389 | 5389 | ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], |
| 5390 | 5390 | ** and [sqlite3_preupdate_hook()] interfaces. |
| 5391 | 5391 | */ |
| 5392 | -SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( | |
| 5392 | +SQLITE_API void *sqlite3_update_hook( | |
| 5393 | 5393 | sqlite3*, |
| 5394 | 5394 | void(*)(void *,int ,char const *,char const *,sqlite3_int64), |
| 5395 | 5395 | void* |
| 5396 | 5396 | ); |
| 5397 | 5397 | |
| @@ -5427,11 +5427,11 @@ | ||
| 5427 | 5427 | ** This interface is threadsafe on processors where writing a |
| 5428 | 5428 | ** 32-bit integer is atomic. |
| 5429 | 5429 | ** |
| 5430 | 5430 | ** See Also: [SQLite Shared-Cache Mode] |
| 5431 | 5431 | */ |
| 5432 | -SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int); | |
| 5432 | +SQLITE_API int sqlite3_enable_shared_cache(int); | |
| 5433 | 5433 | |
| 5434 | 5434 | /* |
| 5435 | 5435 | ** CAPI3REF: Attempt To Free Heap Memory |
| 5436 | 5436 | ** |
| 5437 | 5437 | ** ^The sqlite3_release_memory() interface attempts to free N bytes |
| @@ -5443,11 +5443,11 @@ | ||
| 5443 | 5443 | ** ^The sqlite3_release_memory() routine is a no-op returning zero |
| 5444 | 5444 | ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5445 | 5445 | ** |
| 5446 | 5446 | ** See also: [sqlite3_db_release_memory()] |
| 5447 | 5447 | */ |
| 5448 | -SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int); | |
| 5448 | +SQLITE_API int sqlite3_release_memory(int); | |
| 5449 | 5449 | |
| 5450 | 5450 | /* |
| 5451 | 5451 | ** CAPI3REF: Free Memory Used By A Database Connection |
| 5452 | 5452 | ** METHOD: sqlite3 |
| 5453 | 5453 | ** |
| @@ -5457,11 +5457,11 @@ | ||
| 5457 | 5457 | ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is |
| 5458 | 5458 | ** omitted. |
| 5459 | 5459 | ** |
| 5460 | 5460 | ** See also: [sqlite3_release_memory()] |
| 5461 | 5461 | */ |
| 5462 | -SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*); | |
| 5462 | +SQLITE_API int sqlite3_db_release_memory(sqlite3*); | |
| 5463 | 5463 | |
| 5464 | 5464 | /* |
| 5465 | 5465 | ** CAPI3REF: Impose A Limit On Heap Size |
| 5466 | 5466 | ** |
| 5467 | 5467 | ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the |
| @@ -5509,11 +5509,11 @@ | ||
| 5509 | 5509 | ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5510 | 5510 | ** |
| 5511 | 5511 | ** The circumstances under which SQLite will enforce the soft heap limit may |
| 5512 | 5512 | ** changes in future releases of SQLite. |
| 5513 | 5513 | */ |
| 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); | |
| 5515 | 5515 | |
| 5516 | 5516 | /* |
| 5517 | 5517 | ** CAPI3REF: Deprecated Soft Heap Limit Interface |
| 5518 | 5518 | ** DEPRECATED |
| 5519 | 5519 | ** |
| @@ -5520,11 +5520,11 @@ | ||
| 5520 | 5520 | ** This is a deprecated version of the [sqlite3_soft_heap_limit64()] |
| 5521 | 5521 | ** interface. This routine is provided for historical compatibility |
| 5522 | 5522 | ** only. All new applications should use the |
| 5523 | 5523 | ** [sqlite3_soft_heap_limit64()] interface rather than this one. |
| 5524 | 5524 | */ |
| 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); | |
| 5526 | 5526 | |
| 5527 | 5527 | |
| 5528 | 5528 | /* |
| 5529 | 5529 | ** CAPI3REF: Extract Metadata About A Column Of A Table |
| 5530 | 5530 | ** METHOD: sqlite3 |
| @@ -5590,11 +5590,11 @@ | ||
| 5590 | 5590 | ** |
| 5591 | 5591 | ** ^This function causes all database schemas to be read from disk and |
| 5592 | 5592 | ** parsed, if that has not already been done, and returns an error if |
| 5593 | 5593 | ** any errors are encountered while loading the schema. |
| 5594 | 5594 | */ |
| 5595 | -SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( | |
| 5595 | +SQLITE_API int sqlite3_table_column_metadata( | |
| 5596 | 5596 | sqlite3 *db, /* Connection handle */ |
| 5597 | 5597 | const char *zDbName, /* Database name or NULL */ |
| 5598 | 5598 | const char *zTableName, /* Table name */ |
| 5599 | 5599 | const char *zColumnName, /* Column name */ |
| 5600 | 5600 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| @@ -5646,11 +5646,11 @@ | ||
| 5646 | 5646 | ** disabled and prevent SQL injections from giving attackers |
| 5647 | 5647 | ** access to extension loading capabilities. |
| 5648 | 5648 | ** |
| 5649 | 5649 | ** See also the [load_extension() SQL function]. |
| 5650 | 5650 | */ |
| 5651 | -SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( | |
| 5651 | +SQLITE_API int sqlite3_load_extension( | |
| 5652 | 5652 | sqlite3 *db, /* Load the extension into this database connection */ |
| 5653 | 5653 | const char *zFile, /* Name of the shared library containing extension */ |
| 5654 | 5654 | const char *zProc, /* Entry point. Derived from zFile if 0 */ |
| 5655 | 5655 | char **pzErrMsg /* Put error message here if not 0 */ |
| 5656 | 5656 | ); |
| @@ -5678,11 +5678,11 @@ | ||
| 5678 | 5678 | ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method |
| 5679 | 5679 | ** rather than this interface, so the [load_extension()] SQL function |
| 5680 | 5680 | ** remains disabled. This will prevent SQL injections from giving attackers |
| 5681 | 5681 | ** access to extension loading capabilities. |
| 5682 | 5682 | */ |
| 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); | |
| 5684 | 5684 | |
| 5685 | 5685 | /* |
| 5686 | 5686 | ** CAPI3REF: Automatically Load Statically Linked Extensions |
| 5687 | 5687 | ** |
| 5688 | 5688 | ** ^This interface causes the xEntryPoint() function to be invoked for |
| @@ -5716,11 +5716,11 @@ | ||
| 5716 | 5716 | ** will be called more than once for each database connection that is opened. |
| 5717 | 5717 | ** |
| 5718 | 5718 | ** See also: [sqlite3_reset_auto_extension()] |
| 5719 | 5719 | ** and [sqlite3_cancel_auto_extension()] |
| 5720 | 5720 | */ |
| 5721 | -SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void)); | |
| 5721 | +SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void)); | |
| 5722 | 5722 | |
| 5723 | 5723 | /* |
| 5724 | 5724 | ** CAPI3REF: Cancel Automatic Extension Loading |
| 5725 | 5725 | ** |
| 5726 | 5726 | ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the |
| @@ -5728,19 +5728,19 @@ | ||
| 5728 | 5728 | ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] |
| 5729 | 5729 | ** routine returns 1 if initialization routine X was successfully |
| 5730 | 5730 | ** unregistered and it returns 0 if X was not on the list of initialization |
| 5731 | 5731 | ** routines. |
| 5732 | 5732 | */ |
| 5733 | -SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); | |
| 5733 | +SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); | |
| 5734 | 5734 | |
| 5735 | 5735 | /* |
| 5736 | 5736 | ** CAPI3REF: Reset Automatic Extension Loading |
| 5737 | 5737 | ** |
| 5738 | 5738 | ** ^This interface disables all automatic extensions previously |
| 5739 | 5739 | ** registered using [sqlite3_auto_extension()]. |
| 5740 | 5740 | */ |
| 5741 | -SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void); | |
| 5741 | +SQLITE_API void sqlite3_reset_auto_extension(void); | |
| 5742 | 5742 | |
| 5743 | 5743 | /* |
| 5744 | 5744 | ** The interface to the virtual-table mechanism is currently considered |
| 5745 | 5745 | ** to be experimental. The interface might change in incompatible ways. |
| 5746 | 5746 | ** If this is a problem for you, do not use the interface at this time. |
| @@ -5981,17 +5981,17 @@ | ||
| 5981 | 5981 | ** be invoked if the call to sqlite3_create_module_v2() fails. |
| 5982 | 5982 | ** ^The sqlite3_create_module() |
| 5983 | 5983 | ** interface is equivalent to sqlite3_create_module_v2() with a NULL |
| 5984 | 5984 | ** destructor. |
| 5985 | 5985 | */ |
| 5986 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module( | |
| 5986 | +SQLITE_API int sqlite3_create_module( | |
| 5987 | 5987 | sqlite3 *db, /* SQLite connection to register module with */ |
| 5988 | 5988 | const char *zName, /* Name of the module */ |
| 5989 | 5989 | const sqlite3_module *p, /* Methods for the module */ |
| 5990 | 5990 | void *pClientData /* Client data for xCreate/xConnect */ |
| 5991 | 5991 | ); |
| 5992 | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( | |
| 5992 | +SQLITE_API int sqlite3_create_module_v2( | |
| 5993 | 5993 | sqlite3 *db, /* SQLite connection to register module with */ |
| 5994 | 5994 | const char *zName, /* Name of the module */ |
| 5995 | 5995 | const sqlite3_module *p, /* Methods for the module */ |
| 5996 | 5996 | void *pClientData, /* Client data for xCreate/xConnect */ |
| 5997 | 5997 | void(*xDestroy)(void*) /* Module destructor function */ |
| @@ -6050,11 +6050,11 @@ | ||
| 6050 | 6050 | ** ^The [xCreate] and [xConnect] methods of a |
| 6051 | 6051 | ** [virtual table module] call this interface |
| 6052 | 6052 | ** to declare the format (the names and datatypes of the columns) of |
| 6053 | 6053 | ** the virtual tables they implement. |
| 6054 | 6054 | */ |
| 6055 | -SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); | |
| 6055 | +SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL); | |
| 6056 | 6056 | |
| 6057 | 6057 | /* |
| 6058 | 6058 | ** CAPI3REF: Overload A Function For A Virtual Table |
| 6059 | 6059 | ** METHOD: sqlite3 |
| 6060 | 6060 | ** |
| @@ -6069,11 +6069,11 @@ | ||
| 6069 | 6069 | ** of the new function always causes an exception to be thrown. So |
| 6070 | 6070 | ** the new function is not good for anything by itself. Its only |
| 6071 | 6071 | ** purpose is to be a placeholder function that can be overloaded |
| 6072 | 6072 | ** by a [virtual table]. |
| 6073 | 6073 | */ |
| 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); | |
| 6075 | 6075 | |
| 6076 | 6076 | /* |
| 6077 | 6077 | ** The interface to the virtual-table mechanism defined above (back up |
| 6078 | 6078 | ** to a comment remarkably similar to this one) is currently considered |
| 6079 | 6079 | ** to be experimental. The interface might change in incompatible ways. |
| @@ -6168,11 +6168,11 @@ | ||
| 6168 | 6168 | ** zero-filled blob to read or write using the incremental-blob interface. |
| 6169 | 6169 | ** |
| 6170 | 6170 | ** To avoid a resource leak, every open [BLOB handle] should eventually |
| 6171 | 6171 | ** be released by a call to [sqlite3_blob_close()]. |
| 6172 | 6172 | */ |
| 6173 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( | |
| 6173 | +SQLITE_API int sqlite3_blob_open( | |
| 6174 | 6174 | sqlite3*, |
| 6175 | 6175 | const char *zDb, |
| 6176 | 6176 | const char *zTable, |
| 6177 | 6177 | const char *zColumn, |
| 6178 | 6178 | sqlite3_int64 iRow, |
| @@ -6201,11 +6201,11 @@ | ||
| 6201 | 6201 | ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle |
| 6202 | 6202 | ** always returns zero. |
| 6203 | 6203 | ** |
| 6204 | 6204 | ** ^This function sets the database handle error code and message. |
| 6205 | 6205 | */ |
| 6206 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); | |
| 6206 | +SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); | |
| 6207 | 6207 | |
| 6208 | 6208 | /* |
| 6209 | 6209 | ** CAPI3REF: Close A BLOB Handle |
| 6210 | 6210 | ** DESTRUCTOR: sqlite3_blob |
| 6211 | 6211 | ** |
| @@ -6224,11 +6224,11 @@ | ||
| 6224 | 6224 | ** with a null pointer (such as would be returned by a failed call to |
| 6225 | 6225 | ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function |
| 6226 | 6226 | ** is passed a valid open blob handle, the values returned by the |
| 6227 | 6227 | ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. |
| 6228 | 6228 | */ |
| 6229 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *); | |
| 6229 | +SQLITE_API int sqlite3_blob_close(sqlite3_blob *); | |
| 6230 | 6230 | |
| 6231 | 6231 | /* |
| 6232 | 6232 | ** CAPI3REF: Return The Size Of An Open BLOB |
| 6233 | 6233 | ** METHOD: sqlite3_blob |
| 6234 | 6234 | ** |
| @@ -6240,11 +6240,11 @@ | ||
| 6240 | 6240 | ** This routine only works on a [BLOB handle] which has been created |
| 6241 | 6241 | ** by a prior successful call to [sqlite3_blob_open()] and which has not |
| 6242 | 6242 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6243 | 6243 | ** to this routine results in undefined and probably undesirable behavior. |
| 6244 | 6244 | */ |
| 6245 | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *); | |
| 6245 | +SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *); | |
| 6246 | 6246 | |
| 6247 | 6247 | /* |
| 6248 | 6248 | ** CAPI3REF: Read Data From A BLOB Incrementally |
| 6249 | 6249 | ** METHOD: sqlite3_blob |
| 6250 | 6250 | ** |
| @@ -6269,11 +6269,11 @@ | ||
| 6269 | 6269 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6270 | 6270 | ** to this routine results in undefined and probably undesirable behavior. |
| 6271 | 6271 | ** |
| 6272 | 6272 | ** See also: [sqlite3_blob_write()]. |
| 6273 | 6273 | */ |
| 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); | |
| 6275 | 6275 | |
| 6276 | 6276 | /* |
| 6277 | 6277 | ** CAPI3REF: Write Data Into A BLOB Incrementally |
| 6278 | 6278 | ** METHOD: sqlite3_blob |
| 6279 | 6279 | ** |
| @@ -6311,11 +6311,11 @@ | ||
| 6311 | 6311 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6312 | 6312 | ** to this routine results in undefined and probably undesirable behavior. |
| 6313 | 6313 | ** |
| 6314 | 6314 | ** See also: [sqlite3_blob_read()]. |
| 6315 | 6315 | */ |
| 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); | |
| 6317 | 6317 | |
| 6318 | 6318 | /* |
| 6319 | 6319 | ** CAPI3REF: Virtual File System Objects |
| 6320 | 6320 | ** |
| 6321 | 6321 | ** A virtual filesystem (VFS) is an [sqlite3_vfs] object |
| @@ -6342,13 +6342,13 @@ | ||
| 6342 | 6342 | ** |
| 6343 | 6343 | ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. |
| 6344 | 6344 | ** ^(If the default VFS is unregistered, another VFS is chosen as |
| 6345 | 6345 | ** the default. The choice for the new VFS is arbitrary.)^ |
| 6346 | 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*); | |
| 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 | 6350 | |
| 6351 | 6351 | /* |
| 6352 | 6352 | ** CAPI3REF: Mutexes |
| 6353 | 6353 | ** |
| 6354 | 6354 | ** The SQLite core uses these routines for thread |
| @@ -6460,15 +6460,15 @@ | ||
| 6460 | 6460 | ** sqlite3_mutex_leave() is a NULL pointer, then all three routines |
| 6461 | 6461 | ** behave as no-ops. |
| 6462 | 6462 | ** |
| 6463 | 6463 | ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
| 6464 | 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*); | |
| 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 | 6470 | |
| 6471 | 6471 | /* |
| 6472 | 6472 | ** CAPI3REF: Mutex Methods Object |
| 6473 | 6473 | ** |
| 6474 | 6474 | ** An instance of this structure defines the low-level routines |
| @@ -6574,12 +6574,12 @@ | ||
| 6574 | 6574 | ** call to sqlite3_mutex_held() to fail, so a non-zero return is |
| 6575 | 6575 | ** the appropriate thing to do. The sqlite3_mutex_notheld() |
| 6576 | 6576 | ** interface should also return 1 when given a NULL pointer. |
| 6577 | 6577 | */ |
| 6578 | 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*); | |
| 6579 | +SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*); | |
| 6580 | +SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*); | |
| 6581 | 6581 | #endif |
| 6582 | 6582 | |
| 6583 | 6583 | /* |
| 6584 | 6584 | ** CAPI3REF: Mutex Types |
| 6585 | 6585 | ** |
| @@ -6615,11 +6615,11 @@ | ||
| 6615 | 6615 | ** serializes access to the [database connection] given in the argument |
| 6616 | 6616 | ** when the [threading mode] is Serialized. |
| 6617 | 6617 | ** ^If the [threading mode] is Single-thread or Multi-thread then this |
| 6618 | 6618 | ** routine returns a NULL pointer. |
| 6619 | 6619 | */ |
| 6620 | -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*); | |
| 6620 | +SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*); | |
| 6621 | 6621 | |
| 6622 | 6622 | /* |
| 6623 | 6623 | ** CAPI3REF: Low-Level Control Of Database Files |
| 6624 | 6624 | ** METHOD: sqlite3 |
| 6625 | 6625 | ** |
| @@ -6650,11 +6650,11 @@ | ||
| 6650 | 6650 | ** an incorrect zDbName and an SQLITE_ERROR return from the underlying |
| 6651 | 6651 | ** xFileControl method. |
| 6652 | 6652 | ** |
| 6653 | 6653 | ** See also: [SQLITE_FCNTL_LOCKSTATE] |
| 6654 | 6654 | */ |
| 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*); | |
| 6656 | 6656 | |
| 6657 | 6657 | /* |
| 6658 | 6658 | ** CAPI3REF: Testing Interface |
| 6659 | 6659 | ** |
| 6660 | 6660 | ** ^The sqlite3_test_control() interface is used to read out internal |
| @@ -6669,11 +6669,11 @@ | ||
| 6669 | 6669 | ** The details of the operation codes, their meanings, the parameters |
| 6670 | 6670 | ** they take, and what they do are all subject to change without notice. |
| 6671 | 6671 | ** Unlike most of the SQLite API, this function is not guaranteed to |
| 6672 | 6672 | ** operate consistently from one release to the next. |
| 6673 | 6673 | */ |
| 6674 | -SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...); | |
| 6674 | +SQLITE_API int sqlite3_test_control(int op, ...); | |
| 6675 | 6675 | |
| 6676 | 6676 | /* |
| 6677 | 6677 | ** CAPI3REF: Testing Interface Operation Codes |
| 6678 | 6678 | ** |
| 6679 | 6679 | ** These constants are the valid operation code parameters used |
| @@ -6732,12 +6732,12 @@ | ||
| 6732 | 6732 | ** be represented by a 32-bit integer, then the values returned by |
| 6733 | 6733 | ** sqlite3_status() are undefined. |
| 6734 | 6734 | ** |
| 6735 | 6735 | ** See also: [sqlite3_db_status()] |
| 6736 | 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( | |
| 6737 | +SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); | |
| 6738 | +SQLITE_API int sqlite3_status64( | |
| 6739 | 6739 | int op, |
| 6740 | 6740 | sqlite3_int64 *pCurrent, |
| 6741 | 6741 | sqlite3_int64 *pHighwater, |
| 6742 | 6742 | int resetFlag |
| 6743 | 6743 | ); |
| @@ -6858,11 +6858,11 @@ | ||
| 6858 | 6858 | ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a |
| 6859 | 6859 | ** non-zero [error code] on failure. |
| 6860 | 6860 | ** |
| 6861 | 6861 | ** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. |
| 6862 | 6862 | */ |
| 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); | |
| 6864 | 6864 | |
| 6865 | 6865 | /* |
| 6866 | 6866 | ** CAPI3REF: Status Parameters for database connections |
| 6867 | 6867 | ** KEYWORDS: {SQLITE_DBSTATUS options} |
| 6868 | 6868 | ** |
| @@ -7001,11 +7001,11 @@ | ||
| 7001 | 7001 | ** ^If the resetFlg is true, then the counter is reset to zero after this |
| 7002 | 7002 | ** interface call returns. |
| 7003 | 7003 | ** |
| 7004 | 7004 | ** See also: [sqlite3_status()] and [sqlite3_db_status()]. |
| 7005 | 7005 | */ |
| 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); | |
| 7007 | 7007 | |
| 7008 | 7008 | /* |
| 7009 | 7009 | ** CAPI3REF: Status Parameters for prepared statements |
| 7010 | 7010 | ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} |
| 7011 | 7011 | ** |
| @@ -7470,20 +7470,20 @@ | ||
| 7470 | 7470 | ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() |
| 7471 | 7471 | ** APIs are not strictly speaking threadsafe. If they are invoked at the |
| 7472 | 7472 | ** same time as another thread is invoking sqlite3_backup_step() it is |
| 7473 | 7473 | ** possible that they return invalid values. |
| 7474 | 7474 | */ |
| 7475 | -SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( | |
| 7475 | +SQLITE_API sqlite3_backup *sqlite3_backup_init( | |
| 7476 | 7476 | sqlite3 *pDest, /* Destination database handle */ |
| 7477 | 7477 | const char *zDestName, /* Destination database name */ |
| 7478 | 7478 | sqlite3 *pSource, /* Source database handle */ |
| 7479 | 7479 | const char *zSourceName /* Source database name */ |
| 7480 | 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); | |
| 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 | 7485 | |
| 7486 | 7486 | /* |
| 7487 | 7487 | ** CAPI3REF: Unlock Notification |
| 7488 | 7488 | ** METHOD: sqlite3 |
| 7489 | 7489 | ** |
| @@ -7596,11 +7596,11 @@ | ||
| 7596 | 7596 | ** by an sqlite3_step() call. ^(If there is a blocking connection, then the |
| 7597 | 7597 | ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in |
| 7598 | 7598 | ** the special "DROP TABLE/INDEX" case, the extended error code is just |
| 7599 | 7599 | ** SQLITE_LOCKED.)^ |
| 7600 | 7600 | */ |
| 7601 | -SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( | |
| 7601 | +SQLITE_API int sqlite3_unlock_notify( | |
| 7602 | 7602 | sqlite3 *pBlocked, /* Waiting connection */ |
| 7603 | 7603 | void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ |
| 7604 | 7604 | void *pNotifyArg /* Argument to pass to xNotify */ |
| 7605 | 7605 | ); |
| 7606 | 7606 | |
| @@ -7611,12 +7611,12 @@ | ||
| 7611 | 7611 | ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications |
| 7612 | 7612 | ** and extensions to compare the contents of two buffers containing UTF-8 |
| 7613 | 7613 | ** strings in a case-independent fashion, using the same definition of "case |
| 7614 | 7614 | ** independence" that SQLite uses internally when comparing identifiers. |
| 7615 | 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); | |
| 7616 | +SQLITE_API int sqlite3_stricmp(const char *, const char *); | |
| 7617 | +SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); | |
| 7618 | 7618 | |
| 7619 | 7619 | /* |
| 7620 | 7620 | ** CAPI3REF: String Globbing |
| 7621 | 7621 | * |
| 7622 | 7622 | ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if |
| @@ -7629,11 +7629,11 @@ | ||
| 7629 | 7629 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7630 | 7630 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7631 | 7631 | ** |
| 7632 | 7632 | ** See also: [sqlite3_strlike()]. |
| 7633 | 7633 | */ |
| 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); | |
| 7635 | 7635 | |
| 7636 | 7636 | /* |
| 7637 | 7637 | ** CAPI3REF: String LIKE Matching |
| 7638 | 7638 | * |
| 7639 | 7639 | ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if |
| @@ -7652,11 +7652,11 @@ | ||
| 7652 | 7652 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7653 | 7653 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7654 | 7654 | ** |
| 7655 | 7655 | ** See also: [sqlite3_strglob()]. |
| 7656 | 7656 | */ |
| 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); | |
| 7658 | 7658 | |
| 7659 | 7659 | /* |
| 7660 | 7660 | ** CAPI3REF: Error Logging Interface |
| 7661 | 7661 | ** |
| 7662 | 7662 | ** ^The [sqlite3_log()] interface writes a message into the [error log] |
| @@ -7675,11 +7675,11 @@ | ||
| 7675 | 7675 | ** will not use dynamically allocated memory. The log message is stored in |
| 7676 | 7676 | ** a fixed-length buffer on the stack. If the log message is longer than |
| 7677 | 7677 | ** a few hundred characters, it will be truncated to the length of the |
| 7678 | 7678 | ** buffer. |
| 7679 | 7679 | */ |
| 7680 | -SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...); | |
| 7680 | +SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...); | |
| 7681 | 7681 | |
| 7682 | 7682 | /* |
| 7683 | 7683 | ** CAPI3REF: Write-Ahead Log Commit Hook |
| 7684 | 7684 | ** METHOD: sqlite3 |
| 7685 | 7685 | ** |
| @@ -7711,11 +7711,11 @@ | ||
| 7711 | 7711 | ** previously registered write-ahead log callback. ^Note that the |
| 7712 | 7712 | ** [sqlite3_wal_autocheckpoint()] interface and the |
| 7713 | 7713 | ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will |
| 7714 | 7714 | ** overwrite any prior [sqlite3_wal_hook()] settings. |
| 7715 | 7715 | */ |
| 7716 | -SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( | |
| 7716 | +SQLITE_API void *sqlite3_wal_hook( | |
| 7717 | 7717 | sqlite3*, |
| 7718 | 7718 | int(*)(void *,sqlite3*,const char*,int), |
| 7719 | 7719 | void* |
| 7720 | 7720 | ); |
| 7721 | 7721 | |
| @@ -7746,11 +7746,11 @@ | ||
| 7746 | 7746 | ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] |
| 7747 | 7747 | ** pages. The use of this interface |
| 7748 | 7748 | ** is only necessary if the default setting is found to be suboptimal |
| 7749 | 7749 | ** for a particular application. |
| 7750 | 7750 | */ |
| 7751 | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); | |
| 7751 | +SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N); | |
| 7752 | 7752 | |
| 7753 | 7753 | /* |
| 7754 | 7754 | ** CAPI3REF: Checkpoint a database |
| 7755 | 7755 | ** METHOD: sqlite3 |
| 7756 | 7756 | ** |
| @@ -7768,11 +7768,11 @@ | ||
| 7768 | 7768 | ** interface was added. This interface is retained for backwards |
| 7769 | 7769 | ** compatibility and as a convenience for applications that need to manually |
| 7770 | 7770 | ** start a callback but which do not need the full power (and corresponding |
| 7771 | 7771 | ** complication) of [sqlite3_wal_checkpoint_v2()]. |
| 7772 | 7772 | */ |
| 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); | |
| 7774 | 7774 | |
| 7775 | 7775 | /* |
| 7776 | 7776 | ** CAPI3REF: Checkpoint a database |
| 7777 | 7777 | ** METHOD: sqlite3 |
| 7778 | 7778 | ** |
| @@ -7862,11 +7862,11 @@ | ||
| 7862 | 7862 | ** [sqlite3_errcode()] and [sqlite3_errmsg()]. |
| 7863 | 7863 | ** |
| 7864 | 7864 | ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface |
| 7865 | 7865 | ** from SQL. |
| 7866 | 7866 | */ |
| 7867 | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( | |
| 7867 | +SQLITE_API int sqlite3_wal_checkpoint_v2( | |
| 7868 | 7868 | sqlite3 *db, /* Database handle */ |
| 7869 | 7869 | const char *zDb, /* Name of attached database (or NULL) */ |
| 7870 | 7870 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 7871 | 7871 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 7872 | 7872 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| @@ -7898,11 +7898,11 @@ | ||
| 7898 | 7898 | ** |
| 7899 | 7899 | ** At present, there is only one option that may be configured using |
| 7900 | 7900 | ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options |
| 7901 | 7901 | ** may be added in the future. |
| 7902 | 7902 | */ |
| 7903 | -SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...); | |
| 7903 | +SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); | |
| 7904 | 7904 | |
| 7905 | 7905 | /* |
| 7906 | 7906 | ** CAPI3REF: Virtual Table Configuration Options |
| 7907 | 7907 | ** |
| 7908 | 7908 | ** These macros define the various options to the |
| @@ -7951,11 +7951,11 @@ | ||
| 7951 | 7951 | ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], |
| 7952 | 7952 | ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode |
| 7953 | 7953 | ** of the SQL statement that triggered the call to the [xUpdate] method of the |
| 7954 | 7954 | ** [virtual table]. |
| 7955 | 7955 | */ |
| 7956 | -SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *); | |
| 7956 | +SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *); | |
| 7957 | 7957 | |
| 7958 | 7958 | /* |
| 7959 | 7959 | ** CAPI3REF: Conflict resolution modes |
| 7960 | 7960 | ** KEYWORDS: {conflict resolution mode} |
| 7961 | 7961 | ** |
| @@ -8056,11 +8056,11 @@ | ||
| 8056 | 8056 | ** as if the loop did not exist - it returns non-zero and leave the variable |
| 8057 | 8057 | ** that pOut points to unchanged. |
| 8058 | 8058 | ** |
| 8059 | 8059 | ** See also: [sqlite3_stmt_scanstatus_reset()] |
| 8060 | 8060 | */ |
| 8061 | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( | |
| 8061 | +SQLITE_API int sqlite3_stmt_scanstatus( | |
| 8062 | 8062 | sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ |
| 8063 | 8063 | int idx, /* Index of loop to report on */ |
| 8064 | 8064 | int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
| 8065 | 8065 | void *pOut /* Result written here */ |
| 8066 | 8066 | ); |
| @@ -8072,11 +8072,11 @@ | ||
| 8072 | 8072 | ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters. |
| 8073 | 8073 | ** |
| 8074 | 8074 | ** This API is only available if the library is built with pre-processor |
| 8075 | 8075 | ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. |
| 8076 | 8076 | */ |
| 8077 | -SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); | |
| 8077 | +SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); | |
| 8078 | 8078 | |
| 8079 | 8079 | /* |
| 8080 | 8080 | ** CAPI3REF: Flush caches to disk mid-transaction |
| 8081 | 8081 | ** |
| 8082 | 8082 | ** ^If a write-transaction is open on [database connection] D when the |
| @@ -8104,11 +8104,11 @@ | ||
| 8104 | 8104 | ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. |
| 8105 | 8105 | ** |
| 8106 | 8106 | ** ^This function does not set the database handle error code or message |
| 8107 | 8107 | ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. |
| 8108 | 8108 | */ |
| 8109 | -SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); | |
| 8109 | +SQLITE_API int sqlite3_db_cacheflush(sqlite3*); | |
| 8110 | 8110 | |
| 8111 | 8111 | /* |
| 8112 | 8112 | ** CAPI3REF: The pre-update hook. |
| 8113 | 8113 | ** |
| 8114 | 8114 | ** ^These interfaces are only available if SQLite is compiled using the |
| @@ -8184,11 +8184,11 @@ | ||
| 8184 | 8184 | ** triggers; or 2 for changes resulting from triggers called by top-level |
| 8185 | 8185 | ** triggers; and so forth. |
| 8186 | 8186 | ** |
| 8187 | 8187 | ** See also: [sqlite3_update_hook()] |
| 8188 | 8188 | */ |
| 8189 | -SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook( | |
| 8189 | +SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook( | |
| 8190 | 8190 | sqlite3 *db, |
| 8191 | 8191 | void(*xPreUpdate)( |
| 8192 | 8192 | void *pCtx, /* Copy of third arg to preupdate_hook() */ |
| 8193 | 8193 | sqlite3 *db, /* Database handle */ |
| 8194 | 8194 | int op, /* SQLITE_UPDATE, DELETE or INSERT */ |
| @@ -8197,14 +8197,14 @@ | ||
| 8197 | 8197 | sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */ |
| 8198 | 8198 | sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */ |
| 8199 | 8199 | ), |
| 8200 | 8200 | void* |
| 8201 | 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 **); | |
| 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 | 8206 | |
| 8207 | 8207 | /* |
| 8208 | 8208 | ** CAPI3REF: Low-level system error code |
| 8209 | 8209 | ** |
| 8210 | 8210 | ** ^Attempt to return the underlying operating system error code or error |
| @@ -8212,11 +8212,11 @@ | ||
| 8212 | 8212 | ** The return value is OS-dependent. For example, on unix systems, after |
| 8213 | 8213 | ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be |
| 8214 | 8214 | ** called to get back the underlying "errno" that caused the problem, such |
| 8215 | 8215 | ** as ENOSPC, EAUTH, EISDIR, and so forth. |
| 8216 | 8216 | */ |
| 8217 | -SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*); | |
| 8217 | +SQLITE_API int sqlite3_system_errno(sqlite3*); | |
| 8218 | 8218 | |
| 8219 | 8219 | /* |
| 8220 | 8220 | ** CAPI3REF: Database Snapshot |
| 8221 | 8221 | ** KEYWORDS: {snapshot} |
| 8222 | 8222 | ** EXPERIMENTAL |
| @@ -8262,11 +8262,11 @@ | ||
| 8262 | 8262 | ** to avoid a memory leak. |
| 8263 | 8263 | ** |
| 8264 | 8264 | ** The [sqlite3_snapshot_get()] interface is only available when the |
| 8265 | 8265 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8266 | 8266 | */ |
| 8267 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get( | |
| 8267 | +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get( | |
| 8268 | 8268 | sqlite3 *db, |
| 8269 | 8269 | const char *zSchema, |
| 8270 | 8270 | sqlite3_snapshot **ppSnapshot |
| 8271 | 8271 | ); |
| 8272 | 8272 | |
| @@ -8300,11 +8300,11 @@ | ||
| 8300 | 8300 | ** database connection in order to make it ready to use snapshots.) |
| 8301 | 8301 | ** |
| 8302 | 8302 | ** The [sqlite3_snapshot_open()] interface is only available when the |
| 8303 | 8303 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8304 | 8304 | */ |
| 8305 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open( | |
| 8305 | +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open( | |
| 8306 | 8306 | sqlite3 *db, |
| 8307 | 8307 | const char *zSchema, |
| 8308 | 8308 | sqlite3_snapshot *pSnapshot |
| 8309 | 8309 | ); |
| 8310 | 8310 | |
| @@ -8317,11 +8317,11 @@ | ||
| 8317 | 8317 | ** using this routine to avoid a memory leak. |
| 8318 | 8318 | ** |
| 8319 | 8319 | ** The [sqlite3_snapshot_free()] interface is only available when the |
| 8320 | 8320 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8321 | 8321 | */ |
| 8322 | -SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*); | |
| 8322 | +SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*); | |
| 8323 | 8323 | |
| 8324 | 8324 | /* |
| 8325 | 8325 | ** CAPI3REF: Compare the ages of two snapshot handles. |
| 8326 | 8326 | ** EXPERIMENTAL |
| 8327 | 8327 | ** |
| @@ -8341,11 +8341,11 @@ | ||
| 8341 | 8341 | ** |
| 8342 | 8342 | ** Otherwise, this API returns a negative value if P1 refers to an older |
| 8343 | 8343 | ** snapshot than P2, zero if the two handles refer to the same database |
| 8344 | 8344 | ** snapshot, and a positive value if P1 is a newer snapshot than P2. |
| 8345 | 8345 | */ |
| 8346 | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp( | |
| 8346 | +SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp( | |
| 8347 | 8347 | sqlite3_snapshot *p1, |
| 8348 | 8348 | sqlite3_snapshot *p2 |
| 8349 | 8349 | ); |
| 8350 | 8350 | |
| 8351 | 8351 | /* |
| @@ -8399,11 +8399,11 @@ | ||
| 8399 | 8399 | ** Register a geometry callback named zGeom that can be used as part of an |
| 8400 | 8400 | ** R-Tree geometry query as follows: |
| 8401 | 8401 | ** |
| 8402 | 8402 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...) |
| 8403 | 8403 | */ |
| 8404 | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( | |
| 8404 | +SQLITE_API int sqlite3_rtree_geometry_callback( | |
| 8405 | 8405 | sqlite3 *db, |
| 8406 | 8406 | const char *zGeom, |
| 8407 | 8407 | int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), |
| 8408 | 8408 | void *pContext |
| 8409 | 8409 | ); |
| @@ -8425,11 +8425,11 @@ | ||
| 8425 | 8425 | ** Register a 2nd-generation geometry callback named zScore that can be |
| 8426 | 8426 | ** used as part of an R-Tree geometry query as follows: |
| 8427 | 8427 | ** |
| 8428 | 8428 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...) |
| 8429 | 8429 | */ |
| 8430 | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( | |
| 8430 | +SQLITE_API int sqlite3_rtree_query_callback( | |
| 8431 | 8431 | sqlite3 *db, |
| 8432 | 8432 | const char *zQueryFunc, |
| 8433 | 8433 | int (*xQueryFunc)(sqlite3_rtree_query_info*), |
| 8434 | 8434 | void *pContext, |
| 8435 | 8435 | void (*xDestructor)(void*) |
| 8436 | 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.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 |
+1
-1
| --- win/Makefile.PellesCGMake | ||
| +++ win/Makefile.PellesCGMake | ||
| @@ -83,11 +83,11 @@ | ||
| 83 | 83 | |
| 84 | 84 | # define the SQLite files, which need special flags on compile |
| 85 | 85 | SQLITESRC=sqlite3.c |
| 86 | 86 | ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) |
| 87 | 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 | |
| 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 | 89 | |
| 90 | 90 | # define the SQLite shell files, which need special flags on compile |
| 91 | 91 | SQLITESHELLSRC=shell.c |
| 92 | 92 | ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) |
| 93 | 93 | SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) |
| 94 | 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_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 |
+1
-1
| --- win/Makefile.PellesCGMake | ||
| +++ win/Makefile.PellesCGMake | ||
| @@ -83,11 +83,11 @@ | ||
| 83 | 83 | |
| 84 | 84 | # define the SQLite files, which need special flags on compile |
| 85 | 85 | SQLITESRC=sqlite3.c |
| 86 | 86 | ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) |
| 87 | 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 | |
| 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 | 89 | |
| 90 | 90 | # define the SQLite shell files, which need special flags on compile |
| 91 | 91 | SQLITESHELLSRC=shell.c |
| 92 | 92 | ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) |
| 93 | 93 | SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) |
| 94 | 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_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 |
+1
-1
| --- win/Makefile.dmc | ||
| +++ win/Makefile.dmc | ||
| @@ -24,11 +24,11 @@ | ||
| 24 | 24 | CFLAGS = -o |
| 25 | 25 | BCC = $(DMDIR)\bin\dmc $(CFLAGS) |
| 26 | 26 | TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) |
| 27 | 27 | LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 |
| 28 | 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 | |
| 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 | 30 | |
| 31 | 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 | 32 | |
| 33 | 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 | 34 | |
| 35 | 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_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 |
+1
-1
| --- win/Makefile.dmc | ||
| +++ win/Makefile.dmc | ||
| @@ -24,11 +24,11 @@ | ||
| 24 | 24 | CFLAGS = -o |
| 25 | 25 | BCC = $(DMDIR)\bin\dmc $(CFLAGS) |
| 26 | 26 | TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) |
| 27 | 27 | LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 |
| 28 | 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 | |
| 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 | 30 | |
| 31 | 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 | 32 | |
| 33 | 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 | 34 | |
| 35 | 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_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 |
+1
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -2130,10 +2130,11 @@ | ||
| 2130 | 2130 | |
| 2131 | 2131 | MINGW_OPTIONS = -D_HAVE__MINGW_H |
| 2132 | 2132 | |
| 2133 | 2133 | SQLITE_OPTIONS = -DNDEBUG=1 \ |
| 2134 | 2134 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 2135 | + -DSQLITE_OMIT_SHARED_CACHE \ | |
| 2135 | 2136 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 2136 | 2137 | -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \ |
| 2137 | 2138 | -DSQLITE_THREADSAFE=0 \ |
| 2138 | 2139 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 2139 | 2140 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 2140 | 2141 |
| --- 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 |
+1
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -2130,10 +2130,11 @@ | ||
| 2130 | 2130 | |
| 2131 | 2131 | MINGW_OPTIONS = -D_HAVE__MINGW_H |
| 2132 | 2132 | |
| 2133 | 2133 | SQLITE_OPTIONS = -DNDEBUG=1 \ |
| 2134 | 2134 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 2135 | + -DSQLITE_OMIT_SHARED_CACHE \ | |
| 2135 | 2136 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 2136 | 2137 | -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \ |
| 2137 | 2138 | -DSQLITE_THREADSAFE=0 \ |
| 2138 | 2139 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 2139 | 2140 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 2140 | 2141 |
| --- 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 @@ | ||
| 2130 | 2130 | |
| 2131 | 2131 | MINGW_OPTIONS = -D_HAVE__MINGW_H |
| 2132 | 2132 | |
| 2133 | 2133 | SQLITE_OPTIONS = -DNDEBUG=1 \ |
| 2134 | 2134 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 2135 | + -DSQLITE_OMIT_SHARED_CACHE \ | |
| 2135 | 2136 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 2136 | 2137 | -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \ |
| 2137 | 2138 | -DSQLITE_THREADSAFE=0 \ |
| 2138 | 2139 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 2139 | 2140 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 2140 | 2141 |
| --- 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 @@ | ||
| 2130 | 2130 | |
| 2131 | 2131 | MINGW_OPTIONS = -D_HAVE__MINGW_H |
| 2132 | 2132 | |
| 2133 | 2133 | SQLITE_OPTIONS = -DNDEBUG=1 \ |
| 2134 | 2134 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 2135 | + -DSQLITE_OMIT_SHARED_CACHE \ | |
| 2135 | 2136 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 2136 | 2137 | -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \ |
| 2137 | 2138 | -DSQLITE_THREADSAFE=0 \ |
| 2138 | 2139 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 2139 | 2140 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 2140 | 2141 |
| --- 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 |
+1
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -313,10 +313,11 @@ | ||
| 313 | 313 | RCC = $(RCC) /DUSE_SEE=1 |
| 314 | 314 | !endif |
| 315 | 315 | |
| 316 | 316 | SQLITE_OPTIONS = /DNDEBUG=1 \ |
| 317 | 317 | /DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 318 | + /DSQLITE_OMIT_SHARED_CACHE \ | |
| 318 | 319 | /DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 319 | 320 | /DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \ |
| 320 | 321 | /DSQLITE_THREADSAFE=0 \ |
| 321 | 322 | /DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 322 | 323 | /DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 323 | 324 |
| --- 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 |
+1
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -313,10 +313,11 @@ | ||
| 313 | 313 | RCC = $(RCC) /DUSE_SEE=1 |
| 314 | 314 | !endif |
| 315 | 315 | |
| 316 | 316 | SQLITE_OPTIONS = /DNDEBUG=1 \ |
| 317 | 317 | /DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 318 | + /DSQLITE_OMIT_SHARED_CACHE \ | |
| 318 | 319 | /DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 319 | 320 | /DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \ |
| 320 | 321 | /DSQLITE_THREADSAFE=0 \ |
| 321 | 322 | /DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 322 | 323 | /DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 323 | 324 |
| --- 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 |