|
|
@@ -123,9 +123,9 @@ extern "C" {
|
|
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
|
*/
|
|
|
-#define SQLITE_VERSION "3.24.0"
|
|
|
-#define SQLITE_VERSION_NUMBER 3024000
|
|
|
-#define SQLITE_SOURCE_ID "2018-04-28 19:08:02 08665a9e2e50a0a1e62529884cf65f8090debe89a306a3904b53268729abalt1"
|
|
|
+#define SQLITE_VERSION "3.25.0"
|
|
|
+#define SQLITE_VERSION_NUMBER 3025000
|
|
|
+#define SQLITE_SOURCE_ID "2018-06-06 23:31:26 71f97f0f82b3abfb07feb78d64a182fc50ff396e85d6f5aac479dbf58ba4alt1"
|
|
|
|
|
|
/*
|
|
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
|
@@ -504,6 +504,7 @@ SQLITE_API int sqlite3_exec(
|
|
|
#define SQLITE_IOERR_COMMIT_ATOMIC (SQLITE_IOERR | (30<<8))
|
|
|
#define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31<<8))
|
|
|
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
|
|
|
+#define SQLITE_LOCKED_VTAB (SQLITE_LOCKED | (2<<8))
|
|
|
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
|
|
|
#define SQLITE_BUSY_SNAPSHOT (SQLITE_BUSY | (2<<8))
|
|
|
#define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8))
|
|
|
@@ -511,6 +512,7 @@ SQLITE_API int sqlite3_exec(
|
|
|
#define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8))
|
|
|
#define SQLITE_CANTOPEN_CONVPATH (SQLITE_CANTOPEN | (4<<8))
|
|
|
#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8))
|
|
|
+#define SQLITE_CORRUPT_SEQUENCE (SQLITE_CORRUPT | (2<<8))
|
|
|
#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8))
|
|
|
#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8))
|
|
|
#define SQLITE_READONLY_ROLLBACK (SQLITE_READONLY | (3<<8))
|
|
|
@@ -5559,12 +5561,17 @@ SQLITE_API SQLITE_EXTERN char *sqlite3_data_directory;
|
|
|
** or [SQLITE_NOMEM] if memory could not be allocated. The value of the
|
|
|
** [sqlite3_data_directory] variable is intended to act as a replacement for
|
|
|
** the current directory on the sub-platforms of Win32 where that concept is
|
|
|
-** not present, e.g. WinRT and UWP.
|
|
|
+** not present, e.g. WinRT and UWP. The [sqlite3_win32_set_directory8] and
|
|
|
+** [sqlite3_win32_set_directory16] interfaces behave exactly the same as the
|
|
|
+** sqlite3_win32_set_directory interface except the string parameter must be
|
|
|
+** UTF-8 or UTF-16, respectively.
|
|
|
*/
|
|
|
SQLITE_API int sqlite3_win32_set_directory(
|
|
|
unsigned long type, /* Identifier for directory being set or reset */
|
|
|
void *zValue /* New value for directory being set or reset */
|
|
|
);
|
|
|
+SQLITE_API int sqlite3_win32_set_directory8(unsigned long type, const char *zValue);
|
|
|
+SQLITE_API int sqlite3_win32_set_directory16(unsigned long type, const void *zValue);
|
|
|
|
|
|
/*
|
|
|
** CAPI3REF: Win32 Directory Types
|
|
|
@@ -6307,6 +6314,10 @@ struct sqlite3_index_info {
|
|
|
|
|
|
/*
|
|
|
** CAPI3REF: Virtual Table Scan Flags
|
|
|
+**
|
|
|
+** Virtual table implementations are allowed to set the
|
|
|
+** [sqlite3_index_info].idxFlags field to some combination of
|
|
|
+** these bits.
|
|
|
*/
|
|
|
#define SQLITE_INDEX_SCAN_UNIQUE 1 /* Scan visits at most 1 row */
|
|
|
|
|
|
@@ -7128,7 +7139,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
|
|
** using keywords as identifiers. Common techniques used to avoid keyword
|
|
|
** name collisions include:
|
|
|
** <ul>
|
|
|
-** <li> Put all indentifier names inside double-quotes. This is the official
|
|
|
+** <li> Put all identifier names inside double-quotes. This is the official
|
|
|
** SQL way to escape identifier names.
|
|
|
** <li> Put identifier names inside [...]. This is not standard SQL,
|
|
|
** but it is what SQL Server does and so lots of programmers use this
|
|
|
@@ -7147,6 +7158,138 @@ SQLITE_API int sqlite3_keyword_count(void);
|
|
|
SQLITE_API int sqlite3_keyword_name(int,const char**,int*);
|
|
|
SQLITE_API int sqlite3_keyword_check(const char*,int);
|
|
|
|
|
|
+/*
|
|
|
+** CAPI3REF: Dynamic String Object
|
|
|
+** KEYWORDS: {dynamic string}
|
|
|
+**
|
|
|
+** An instance of the sqlite3_str object contains a dynamically-sized
|
|
|
+** string under construction.
|
|
|
+**
|
|
|
+** The lifecycle of an sqlite3_str object is as follows:
|
|
|
+** <ol>
|
|
|
+** <li> ^The sqlite3_str object is created using [sqlite3_str_new()].
|
|
|
+** <li> ^Text is appended to the sqlite3_str object using various
|
|
|
+** methods, such as [sqlite3_str_appendf()].
|
|
|
+** <li> ^The sqlite3_str object is destroyed and the string it created
|
|
|
+** is returned using the [sqlite3_str_finish()] interface.
|
|
|
+** </ol>
|
|
|
+*/
|
|
|
+typedef struct sqlite3_str sqlite3_str;
|
|
|
+
|
|
|
+/*
|
|
|
+** CAPI3REF: Create A New Dynamic String Object
|
|
|
+** CONSTRUCTOR: sqlite3_str
|
|
|
+**
|
|
|
+** ^The [sqlite3_str_new(D)] interface allocates and initializes
|
|
|
+** a new [sqlite3_str] object. To avoid memory leaks, the object returned by
|
|
|
+** [sqlite3_str_new()] must be freed by a subsequent call to
|
|
|
+** [sqlite3_str_finish(X)].
|
|
|
+**
|
|
|
+** ^The [sqlite3_str_new(D)] interface always returns a pointer to a
|
|
|
+** valid [sqlite3_str] object, though in the event of an out-of-memory
|
|
|
+** error the returned object might be a special singleton that will
|
|
|
+** silently reject new text, always return SQLITE_NOMEM from
|
|
|
+** [sqlite3_str_errcode()], always return 0 for
|
|
|
+** [sqlite3_str_length()], and always return NULL from
|
|
|
+** [sqlite3_str_finish(X)]. It is always safe to use the value
|
|
|
+** returned by [sqlite3_str_new(D)] as the sqlite3_str parameter
|
|
|
+** to any of the other [sqlite3_str] methods.
|
|
|
+**
|
|
|
+** The D parameter to [sqlite3_str_new(D)] may be NULL. If the
|
|
|
+** D parameter in [sqlite3_str_new(D)] is not NULL, then the maximum
|
|
|
+** length of the string contained in the [sqlite3_str] object will be
|
|
|
+** the value set for [sqlite3_limit](D,[SQLITE_LIMIT_LENGTH]) instead
|
|
|
+** of [SQLITE_MAX_LENGTH].
|
|
|
+*/
|
|
|
+SQLITE_API sqlite3_str *sqlite3_str_new(sqlite3*);
|
|
|
+
|
|
|
+/*
|
|
|
+** CAPI3REF: Finalize A Dynamic String
|
|
|
+** DESTRUCTOR: sqlite3_str
|
|
|
+**
|
|
|
+** ^The [sqlite3_str_finish(X)] interface destroys the sqlite3_str object X
|
|
|
+** and returns a pointer to a memory buffer obtained from [sqlite3_malloc64()]
|
|
|
+** that contains the constructed string. The calling application should
|
|
|
+** pass the returned value to [sqlite3_free()] to avoid a memory leak.
|
|
|
+** ^The [sqlite3_str_finish(X)] interface may return a NULL pointer if any
|
|
|
+** errors were encountered during construction of the string. ^The
|
|
|
+** [sqlite3_str_finish(X)] interface will also return a NULL pointer if the
|
|
|
+** string in [sqlite3_str] object X is zero bytes long.
|
|
|
+*/
|
|
|
+SQLITE_API char *sqlite3_str_finish(sqlite3_str*);
|
|
|
+
|
|
|
+/*
|
|
|
+** CAPI3REF: Add Content To A Dynamic String
|
|
|
+** METHOD: sqlite3_str
|
|
|
+**
|
|
|
+** These interfaces add content to an sqlite3_str object previously obtained
|
|
|
+** from [sqlite3_str_new()].
|
|
|
+**
|
|
|
+** ^The [sqlite3_str_appendf(X,F,...)] and
|
|
|
+** [sqlite3_str_vappendf(X,F,V)] interfaces uses the [built-in printf]
|
|
|
+** functionality of SQLite to append formatted text onto the end of
|
|
|
+** [sqlite3_str] object X.
|
|
|
+**
|
|
|
+** ^The [sqlite3_str_append(X,S,N)] method appends exactly N bytes from string S
|
|
|
+** onto the end of the [sqlite3_str] object X. N must be non-negative.
|
|
|
+** S must contain at least N non-zero bytes of content. To append a
|
|
|
+** zero-terminated string in its entirety, use the [sqlite3_str_appendall()]
|
|
|
+** method instead.
|
|
|
+**
|
|
|
+** ^The [sqlite3_str_appendall(X,S)] method appends the complete content of
|
|
|
+** zero-terminated string S onto the end of [sqlite3_str] object X.
|
|
|
+**
|
|
|
+** ^The [sqlite3_str_appendchar(X,N,C)] method appends N copies of the
|
|
|
+** single-byte character C onto the end of [sqlite3_str] object X.
|
|
|
+** ^This method can be used, for example, to add whitespace indentation.
|
|
|
+**
|
|
|
+** ^The [sqlite3_str_reset(X)] method resets the string under construction
|
|
|
+** inside [sqlite3_str] object X back to zero bytes in length.
|
|
|
+**
|
|
|
+** These methods do not return a result code. ^If an error occurs, that fact
|
|
|
+** is recorded in the [sqlite3_str] object and can be recovered by a
|
|
|
+** subsequent call to [sqlite3_str_errcode(X)].
|
|
|
+*/
|
|
|
+SQLITE_API void sqlite3_str_appendf(sqlite3_str*, const char *zFormat, ...);
|
|
|
+SQLITE_API void sqlite3_str_vappendf(sqlite3_str*, const char *zFormat, va_list);
|
|
|
+SQLITE_API void sqlite3_str_append(sqlite3_str*, const char *zIn, int N);
|
|
|
+SQLITE_API void sqlite3_str_appendall(sqlite3_str*, const char *zIn);
|
|
|
+SQLITE_API void sqlite3_str_appendchar(sqlite3_str*, int N, char C);
|
|
|
+SQLITE_API void sqlite3_str_reset(sqlite3_str*);
|
|
|
+
|
|
|
+/*
|
|
|
+** CAPI3REF: Status Of A Dynamic String
|
|
|
+** METHOD: sqlite3_str
|
|
|
+**
|
|
|
+** These interfaces return the current status of an [sqlite3_str] object.
|
|
|
+**
|
|
|
+** ^If any prior errors have occurred while constructing the dynamic string
|
|
|
+** in sqlite3_str X, then the [sqlite3_str_errcode(X)] method will return
|
|
|
+** an appropriate error code. ^The [sqlite3_str_errcode(X)] method returns
|
|
|
+** [SQLITE_NOMEM] following any out-of-memory error, or
|
|
|
+** [SQLITE_TOOBIG] if the size of the dynamic string exceeds
|
|
|
+** [SQLITE_MAX_LENGTH], or [SQLITE_OK] if there have been no errors.
|
|
|
+**
|
|
|
+** ^The [sqlite3_str_length(X)] method returns the current length, in bytes,
|
|
|
+** of the dynamic string under construction in [sqlite3_str] object X.
|
|
|
+** ^The length returned by [sqlite3_str_length(X)] does not include the
|
|
|
+** zero-termination byte.
|
|
|
+**
|
|
|
+** ^The [sqlite3_str_value(X)] method returns a pointer to the current
|
|
|
+** content of the dynamic string under construction in X. The value
|
|
|
+** returned by [sqlite3_str_value(X)] is managed by the sqlite3_str object X
|
|
|
+** and might be freed or altered by any subsequent method on the same
|
|
|
+** [sqlite3_str] object. Applications must not used the pointer returned
|
|
|
+** [sqlite3_str_value(X)] after any subsequent method call on the same
|
|
|
+** object. ^Applications may change the content of the string returned
|
|
|
+** by [sqlite3_str_value(X)] as long as they do not write into any bytes
|
|
|
+** outside the range of 0 to [sqlite3_str_length(X)] and do not read or
|
|
|
+** write any byte after any subsequent sqlite3_str method call.
|
|
|
+*/
|
|
|
+SQLITE_API int sqlite3_str_errcode(sqlite3_str*);
|
|
|
+SQLITE_API int sqlite3_str_length(sqlite3_str*);
|
|
|
+SQLITE_API char *sqlite3_str_value(sqlite3_str*);
|
|
|
+
|
|
|
/*
|
|
|
** CAPI3REF: SQLite Runtime Status
|
|
|
**
|
|
|
@@ -8416,11 +8559,11 @@ SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
|
|
|
** method of a [virtual table], then it returns true if and only if the
|
|
|
** column is being fetched as part of an UPDATE operation during which the
|
|
|
** column value will not change. Applications might use this to substitute
|
|
|
-** a lighter-weight value to return that the corresponding [xUpdate] method
|
|
|
-** understands as a "no-change" value.
|
|
|
+** a return value that is less expensive to compute and that the corresponding
|
|
|
+** [xUpdate] method understands as a "no-change" value.
|
|
|
**
|
|
|
** If the [xColumn] method calls sqlite3_vtab_nochange() and finds that
|
|
|
-** the column is not changed by the UPDATE statement, they the xColumn
|
|
|
+** the column is not changed by the UPDATE statement, then the xColumn
|
|
|
** method can optionally return without setting a result, without calling
|
|
|
** any of the [sqlite3_result_int|sqlite3_result_xxxxx() interfaces].
|
|
|
** In that case, [sqlite3_value_nochange(X)] will return true for the
|
|
|
@@ -8915,7 +9058,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
|
|
|
** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
|
|
|
** values of D and S.
|
|
|
** The size of the database is written into *P even if the
|
|
|
-** SQLITE_SERIALIZE_NOCOPY bit is set but no contigious copy
|
|
|
+** SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy
|
|
|
** of the database exists.
|
|
|
**
|
|
|
** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the
|