@@ -146,9 +146,9 @@ extern "C" {
146146** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147147** [sqlite_version()] and [sqlite_source_id()].
148148*/
149- #define SQLITE_VERSION "3.45.3 "
150- #define SQLITE_VERSION_NUMBER 3045003
151- #define SQLITE_SOURCE_ID "2024-04-15 13:34:05 8653b758870e6ef0c98d46b3ace27849054af85da891eb121e9aaa537f1ealt1 "
149+ #define SQLITE_VERSION "3.46.1 "
150+ #define SQLITE_VERSION_NUMBER 3046001
151+ #define SQLITE_SOURCE_ID "2024-08-13 09:16:08 c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69aalt1 "
152152
153153/*
154154** CAPI3REF: Run-Time Library Version Numbers
@@ -764,11 +764,11 @@ struct sqlite3_file {
764764** </ul>
765765** xLock() upgrades the database file lock. In other words, xLock() moves the
766766** database file lock in the direction NONE toward EXCLUSIVE. The argument to
767- ** xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never
767+ ** xLock() is always one of SHARED, RESERVED, PENDING, or EXCLUSIVE, never
768768** SQLITE_LOCK_NONE. If the database file lock is already at or above the
769769** requested lock, then the call to xLock() is a no-op.
770770** xUnlock() downgrades the database file lock to either SHARED or NONE.
771- * If the lock is already at or below the requested lock state, then the call
771+ ** If the lock is already at or below the requested lock state, then the call
772772** to xUnlock() is a no-op.
773773** The xCheckReservedLock() method checks whether any database connection,
774774** either in this process or in some other process, is holding a RESERVED,
@@ -3305,8 +3305,8 @@ SQLITE_API int sqlite3_set_authorizer(
33053305#define SQLITE_RECURSIVE 33 /* NULL NULL */
33063306
33073307/*
3308- ** CAPI3REF: Tracing And Profiling Functions
3309- ** METHOD: sqlite3
3308+ ** CAPI3REF: Deprecated Tracing And Profiling Functions
3309+ ** DEPRECATED
33103310**
33113311** These routines are deprecated. Use the [sqlite3_trace_v2()] interface
33123312** instead of the routines described here.
@@ -6947,6 +6947,12 @@ SQLITE_API int sqlite3_autovacuum_pages(
69476947** The exceptions defined in this paragraph might change in a future
69486948** release of SQLite.
69496949**
6950+ ** Whether the update hook is invoked before or after the
6951+ ** corresponding change is currently unspecified and may differ
6952+ ** depending on the type of change. Do not rely on the order of the
6953+ ** hook call with regards to the final result of the operation which
6954+ ** triggers the hook.
6955+ **
69506956** The update hook implementation must not do anything that will modify
69516957** the database connection that invoked the update hook. Any actions
69526958** to modify the database connection must be deferred until after the
@@ -8417,7 +8423,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
84178423** The sqlite3_keyword_count() interface returns the number of distinct
84188424** keywords understood by SQLite.
84198425**
8420- ** The sqlite3_keyword_name(N,Z,L) interface finds the N-th keyword and
8426+ ** The sqlite3_keyword_name(N,Z,L) interface finds the 0-based N-th keyword and
84218427** makes *Z point to that keyword expressed as UTF8 and writes the number
84228428** of bytes in the keyword into *L. The string that *Z points to is not
84238429** zero-terminated. The sqlite3_keyword_name(N,Z,L) routine returns
@@ -9996,24 +10002,45 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
999610002** <li value="2"><p>
999710003** ^(If the sqlite3_vtab_distinct() interface returns 2, that means
999810004** that the query planner does not need the rows returned in any particular
9999- ** order, as long as rows with the same values in all "aOrderBy" columns
10000- ** are adjacent.)^ ^(Furthermore, only a single row for each particular
10001- ** combination of values in the columns identified by the "aOrderBy" field
10002- ** needs to be returned.)^ ^It is always ok for two or more rows with the same
10003- ** values in all "aOrderBy" columns to be returned, as long as all such rows
10004- ** are adjacent. ^The virtual table may, if it chooses, omit extra rows
10005- ** that have the same value for all columns identified by "aOrderBy".
10006- ** ^However omitting the extra rows is optional.
10005+ ** order, as long as rows with the same values in all columns identified
10006+ ** by "aOrderBy" are adjacent.)^ ^(Furthermore, when two or more rows
10007+ ** contain the same values for all columns identified by "colUsed", all but
10008+ ** one such row may optionally be omitted from the result.)^
10009+ ** The virtual table is not required to omit rows that are duplicates
10010+ ** over the "colUsed" columns, but if the virtual table can do that without
10011+ ** too much extra effort, it could potentially help the query to run faster.
1000710012** This mode is used for a DISTINCT query.
1000810013** <li value="3"><p>
10009- ** ^(If the sqlite3_vtab_distinct() interface returns 3, that means
10010- ** that the query planner needs only distinct rows but it does need the
10011- ** rows to be sorted.)^ ^The virtual table implementation is free to omit
10012- ** rows that are identical in all aOrderBy columns, if it wants to, but
10013- ** it is not required to omit any rows. This mode is used for queries
10014+ ** ^(If the sqlite3_vtab_distinct() interface returns 3, that means the
10015+ ** virtual table must return rows in the order defined by "aOrderBy" as
10016+ ** if the sqlite3_vtab_distinct() interface had returned 0. However if
10017+ ** two or more rows in the result have the same values for all columns
10018+ ** identified by "colUsed", then all but one such row may optionally be
10019+ ** omitted.)^ Like when the return value is 2, the virtual table
10020+ ** is not required to omit rows that are duplicates over the "colUsed"
10021+ ** columns, but if the virtual table can do that without
10022+ ** too much extra effort, it could potentially help the query to run faster.
10023+ ** This mode is used for queries
1001410024** that have both DISTINCT and ORDER BY clauses.
1001510025** </ol>
1001610026**
10027+ ** <p>The following table summarizes the conditions under which the
10028+ ** virtual table is allowed to set the "orderByConsumed" flag based on
10029+ ** the value returned by sqlite3_vtab_distinct(). This table is a
10030+ ** restatement of the previous four paragraphs:
10031+ **
10032+ ** <table border=1 cellspacing=0 cellpadding=10 width="90%">
10033+ ** <tr>
10034+ ** <td valign="top">sqlite3_vtab_distinct() return value
10035+ ** <td valign="top">Rows are returned in aOrderBy order
10036+ ** <td valign="top">Rows with the same value in all aOrderBy columns are adjacent
10037+ ** <td valign="top">Duplicates over all colUsed columns may be omitted
10038+ ** <tr><td>0<td>yes<td>yes<td>no
10039+ ** <tr><td>1<td>no<td>yes<td>no
10040+ ** <tr><td>2<td>no<td>yes<td>yes
10041+ ** <tr><td>3<td>yes<td>yes<td>yes
10042+ ** </table>
10043+ **
1001710044** ^For the purposes of comparing virtual table output values to see if the
1001810045** values are same value for sorting purposes, two NULL values are considered
1001910046** to be the same. In other words, the comparison operator is "IS"
@@ -12058,6 +12085,30 @@ SQLITE_API int sqlite3changegroup_schema(sqlite3_changegroup*, sqlite3*, const c
1205812085*/
1205912086SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pData);
1206012087
12088+ /*
12089+ ** CAPI3REF: Add A Single Change To A Changegroup
12090+ ** METHOD: sqlite3_changegroup
12091+ **
12092+ ** This function adds the single change currently indicated by the iterator
12093+ ** passed as the second argument to the changegroup object. The rules for
12094+ ** adding the change are just as described for [sqlite3changegroup_add()].
12095+ **
12096+ ** If the change is successfully added to the changegroup, SQLITE_OK is
12097+ ** returned. Otherwise, an SQLite error code is returned.
12098+ **
12099+ ** The iterator must point to a valid entry when this function is called.
12100+ ** If it does not, SQLITE_ERROR is returned and no change is added to the
12101+ ** changegroup. Additionally, the iterator must not have been opened with
12102+ ** the SQLITE_CHANGESETAPPLY_INVERT flag. In this case SQLITE_ERROR is also
12103+ ** returned.
12104+ */
12105+ SQLITE_API int sqlite3changegroup_add_change(
12106+ sqlite3_changegroup*,
12107+ sqlite3_changeset_iter*
12108+ );
12109+
12110+
12111+
1206112112/*
1206212113** CAPI3REF: Obtain A Composite Changeset From A Changegroup
1206312114** METHOD: sqlite3_changegroup
@@ -12862,8 +12913,8 @@ struct Fts5PhraseIter {
1286212913** EXTENSION API FUNCTIONS
1286312914**
1286412915** xUserData(pFts):
12865- ** Return a copy of the context pointer the extension function was
12866- ** registered with .
12916+ ** Return a copy of the pUserData pointer passed to the xCreateFunction()
12917+ ** API when the extension function was registered .
1286712918**
1286812919** xColumnTotalSize(pFts, iCol, pnToken):
1286912920** If parameter iCol is less than zero, set output variable *pnToken
0 commit comments