/ Check-in [843c15a5]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Mention that the snapshot interfaces are only available if SQLite is compiled with SQLITE_ENABLE_SNAPSHOT.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | snapshot-get
Files: files | file ages | folders
SHA1: 843c15a552657ca43ff200edb7da7566752d7941
User & Date: drh 2015-12-11 03:27:36
Context
2015-12-11
12:44
Add the experimental snapshot interface. Because it is experimental, it is subject to change or removal at a later date. check-in: 9b124a5a user: drh tags: trunk
03:27
Mention that the snapshot interfaces are only available if SQLite is compiled with SQLITE_ENABLE_SNAPSHOT. Closed-Leaf check-in: 843c15a5 user: drh tags: snapshot-get
03:20
Disable the snapshot test scripts if not compiled with SQLITE_ENABLE_SNAPSHOT. check-in: 5fd008f0 user: drh tags: snapshot-get
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqlite.h.in.

  7920   7920   ** ^If schema S of [database connection] D is not a [WAL mode] database
  7921   7921   ** that is in a read transaction, then [sqlite3_snapshot_get(D,S,P)]
  7922   7922   ** leaves the *P value unchanged and returns an appropriate [error code].
  7923   7923   **
  7924   7924   ** The [sqlite3_snapshot] object returned from a successful call to
  7925   7925   ** [sqlite3_snapshot_get()] must be freed using [sqlite3_snapshot_free()]
  7926   7926   ** to avoid a memory leak.
         7927  +**
         7928  +** The [sqlite3_snapshot_get()] interface is only available when the
         7929  +** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
  7927   7930   */
  7928         -SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(sqlite3*,const char*,sqlite3_snapshot **ppSnapshot);
         7931  +SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
         7932  +  sqlite3 *db,
         7933  +  const char *zSchema,
         7934  +  sqlite3_snapshot **ppSnapshot
         7935  +);
  7929   7936   
  7930   7937   /*
  7931   7938   ** CAPI3REF: Start a read transaction on an historical snapshot
  7932   7939   ** EXPERIMENTAL
  7933   7940   **
  7934   7941   ** ^The [sqlite3_snapshot_open(D,S,P)] interface attempts to move the
  7935   7942   ** read transaction that is currently open on schema S of
................................................................................
  7938   7945   ** or an appropriate [error code] if it fails.
  7939   7946   **
  7940   7947   ** ^In order to succeed, a call to [sqlite3_snapshot_open(D,S,P)] must be
  7941   7948   ** the first operation, apart from other sqlite3_snapshot_open() calls,
  7942   7949   ** following the [BEGIN] that starts a new read transaction.
  7943   7950   ** ^A [snapshot] will fail to open if it has been overwritten by a 
  7944   7951   ** [checkpoint].  
         7952  +**
         7953  +** The [sqlite3_snapshot_open()] interface is only available when the
         7954  +** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
  7945   7955   */
  7946         -SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(sqlite3*,const char*,sqlite3_snapshot*);
         7956  +SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
         7957  +  sqlite3 *db,
         7958  +  const char *zSchema,
         7959  +  sqlite3_snapshot *pSnapshot
         7960  +);
  7947   7961   
  7948   7962   /*
  7949   7963   ** CAPI3REF: Destroy a snapshot
  7950   7964   ** EXPERIMENTAL
  7951   7965   **
  7952   7966   ** ^The [sqlite3_snapshot_free(P)] interface destroys [sqlite3_snapshot] P.
  7953   7967   ** The application must eventually free every [sqlite3_snapshot] object
  7954   7968   ** using this routine to avoid a memory leak.
         7969  +**
         7970  +** The [sqlite3_snapshot_free()] interface is only available when the
         7971  +** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
  7955   7972   */
  7956   7973   SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
  7957   7974   
  7958   7975   /*
  7959   7976   ** Undo the hack that converts floating point types to integer for
  7960   7977   ** builds on processors without floating point support.
  7961   7978   */