#include "sqlite3.h"
+/*
+** CAPI3REF: Session Object Handle
+*/
typedef struct sqlite3_session sqlite3_session;
+
+/*
+** CAPI3REF: Changeset Iterator Handle
+*/
typedef struct sqlite3_changeset_iter sqlite3_changeset_iter;
/*
+** CAPI3REF: Create A New Session Object
+**
** Create a new session object attached to database handle db. If successful,
** a pointer to the new object is written to *ppSession and SQLITE_OK is
** returned. If an error occurs, *ppSession is set to NULL and an SQLite
);
/*
+** CAPI3REF: Delete A Session Object
+**
** Delete a session object previously allocated using
** [sqlite3session_create()]. Once a session object has been deleted, the
** results of attempting to use pSession with any other session module
void sqlite3session_delete(sqlite3_session *pSession);
/*
+** CAPI3REF: Enable Or Disable A Session Object
+**
** Enable or disable the recording of changes by a session object. When
** enabled, a session object records changes made to the database. When
** disabled - it does not. A newly created session object is enabled.
int sqlite3session_enable(sqlite3_session *pSession, int bEnable);
/*
+** CAPI3REF: Attach a Table to a Session Object
+**
** Attach a table to a session. All subsequent changes made to the table
** while the session object is enabled will be recorded. See documentation
** for [sqlite3session_changeset()] for further details.
);
/*
+** CAPI3REF: Generate A Changeset From A Session Object
+**
** Obtain a changeset containing changes to the tables attached to the
** session object passed as the first argument. If successful,
** set *ppChangeset to point to a buffer containing the changeset
**
** The contents of a changeset may be traversed using an iterator created
** using the [sqlite3changeset_start()] API. A changeset may be applied to
-** a database with a compatible schema using the [sqlite3changset_apply()]
+** a database with a compatible schema using the [sqlite3changeset_apply()]
** API.
**
** Following a successful call to this function, it is the responsibility of
** the caller to eventually free the buffer that *ppChangeset points to using
** [sqlite3_free()].
**
-** <h2>Changeset Generation</h2>
+** <h3>Changeset Generation</h3>
**
** Once a table has been attached to a session object, the session object
** records the primary key values of all new rows inserted into the table.
);
/*
+** CAPI3REF: Create An Iterator To Traverse A Changeset
+**
** Create an iterator used to iterate through the contents of a changeset.
** If successful, *pp is set to point to the iterator handle and SQLITE_OK
** is returned. Otherwise, if an error occurs, *pp is set to zero and an
);
/*
+** CAPI3REF: Advance A Changeset Iterator
+**
** This function may only be used with iterators created by function
** [sqlite3changeset_start()]. If it is called on an iterator passed to
** a conflict-handler callback by [sqlite3changeset_apply()], SQLITE_MISUSE
int sqlite3changeset_next(sqlite3_changeset_iter *pIter);
/*
+** CAPI3REF: Obtain The Current Operation From A Changeset Iterator
+**
** The pIter argument passed to this function may either be an iterator
** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
** created by [sqlite3changeset_start()]. In the latter case, the most recent
);
/*
+** CAPI3REF: Obtain old.* Values From A Changeset Iterator
+**
** The pIter argument passed to this function may either be an iterator
** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
** created by [sqlite3changeset_start()]. In the latter case, the most recent
);
/*
+** CAPI3REF: Obtain new.* Values From A Changeset Iterator
+**
** The pIter argument passed to this function may either be an iterator
** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
** created by [sqlite3changeset_start()]. In the latter case, the most recent
);
/*
+** CAPI3REF: Obtain Conflicting Row Values From A Changeset Iterator
+**
** This function should only be used with iterator objects passed to a
** conflict-handler callback by [sqlite3changeset_apply()] with either
** SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If this function
/*
-** Finalize an iterator allocated with sqlite3changeset_start().
+** CAPI3REF: Finalize a Changeset Iterator
+**
+** This function is used to finalize an iterator allocated with
+** sqlite3changeset_start().
**
** This function should only be called on iterators created using the
** [sqlite3changeset_start()] function. If an application calls this
int sqlite3changeset_finalize(sqlite3_changeset_iter *pIter);
/*
+** CAPI3REF: Invert A Changeset
+**
** This function is used to "invert" a changeset object. Applying an inverted
** changeset to a database reverses the effects of applying the uninverted
** changeset. Specifically:
);
/*
+** CAPI3REF: Apply A Changeset To A Database
+**
** Apply a changeset to a database. This function attempts to update the
** "main" database attached to handle db with the changes found in the
** changeset passed via the second and third arguments.
** [SQLITE_CHANGESET_REPLACE].
**
** <dt>UPDATE Changes<dd>
-** For each DELETE change, this function checks if the target database
+** For each UPDATE change, this function checks if the target database
** contains a row with the same primary key value (or values) as the
** original row values stored in the changeset. If it does, and the values
** stored in all non-primary key columns also match the values stored in
);
/*
+** CAPI3REF: Constants Passed to The Conflict Handler
+**
** Values that may be passed as the second argument to a conflict-handler.
**
** <dl>
#define SQLITE_CHANGESET_CONSTRAINT 4
/*
-** Valid return values from a conflict-handler.
+** CAPI3REF: Constants Returned By The Conflict Handler
+**
+** A conflict handler callback must return one of the following three values.
**
** <dl>
** <dt>SQLITE_CHANGESET_OMIT<dd>
-C Fix\sa\sproblem\sinvolving\ssession\sobjects\sand\sattached\sdatabases.
-D 2011-03-19T19:19:26
+C Documentation\sformat\supdates\sto\ssqlite3session.h.
+D 2011-03-20T11:20:41
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 27701a1653595a1f2187dc61c8117e00a6c1d50f
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F ext/session/session1.test 3f982c74ee4ba97069917cc35aae25b4ed858e6a
F ext/session/session2.test 96ff08995ab9935d1992ac554a240052883a0ebc
F ext/session/sqlite3session.c d211ce2e95483dfc144494f6c67879d85dddabfa
-F ext/session/sqlite3session.h 9551c002efd5fde07c52994c6b592308e0df2d6a
+F ext/session/sqlite3session.h 3b99c2498ca86c8d45b29d3956225e09faabc414
F ext/session/test_session.c 2559ef68e421c7fb83e2c19ef08a17343b70d535
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 825df75ba453c853953e17ec29653e11c46f92bb
-R 1e82a0bf18f9b8bb4d549f268721a5ef
+P ad91d30073a8faa7eb064dd2e1cc4d2297d7b3f8
+R b83a18c2f45208301f57e8f22417178c
U dan
-Z 935cff1eff2f640f29c72314cdd47105
+Z e800e514ce176ffa56c1f9535016cce8