Documentation Source Text

Check-in [59b5461497]
Login

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

Overview
Comment:Cause the comments within example code in sessionsintro.html to be in blue italic type.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 59b5461497a7648cc97a5deb897e5363726d74d3
User & Date: dan 2016-09-02 19:04:26
Context
2016-09-03
19:43
Improved hyperlinks in the history of releases. check-in: a5156889f3 user: drh tags: trunk
2016-09-02
19:04
Cause the comments within example code in sessionsintro.html to be in blue italic type. check-in: 59b5461497 user: dan tags: trunk
18:36
Update the "famous users" page to try to make it more mobile-friendly. check-in: 709a8a255b user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/fancyformat.tcl.

116
117
118
119
120
121
122
123
124


125
126
127
128
129
130
131
132
133

      set pre ""
      foreach line [split $txt "\n"] {
        set line [string range $line $nMinSpace end]
        append pre "$line\n"
      }

      set ts "border:1px solid #80a796;padding:0 1ex;background-color:#EEEEEE"
      set new [string trim [subst {


        <div class=codeblock><pre>$pre</pre></div>
      }]]
      set newnode [$dom parsenode $new]
      [$N parent] addChild -before $N $newnode
      $N detach
    }

    # Add alternating light and dark rows to <table striped> blocks.
    #







|
|
>
>
|
<







116
117
118
119
120
121
122
123
124
125
126
127

128
129
130
131
132
133
134

      set pre ""
      foreach line [split $txt "\n"] {
        set line [string range $line $nMinSpace end]
        append pre "$line\n"
      }

      if {[$N attr -default "" class]=="C"} {
        set pre [string map [list /* <i>/* */ */</i>] $pre]
      }

      set new "<div class=codeblock><pre>$pre</pre></div>"

      set newnode [$dom parsenode $new]
      [$N parent] addChild -before $N $newnode
      $N detach
    }

    # Add alternating light and dark rows to <table striped> blocks.
    #

Changes to pages/sessionintro.in.

278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
...
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
...
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
           [sqlite3session_changeset()] or [sqlite3session_patchset()] is
           called a second time on a session ojbect the changeset or patchset
           still reflects all changes that have taken place on the connection
           since the session was created. A session object is not reset or
           zeroed by a call to sqlite3session_changeset() or patchset().
</ol>

<codeblock>
  /*
  ** Argument zSql points to a buffer containing an SQL script to execute 
  ** against the database handle passed as the first argument. As well as
  ** executing the SQL script, this function collects a changeset recording
  ** all changes made to the "main" database file. Assuming no error occurs,
  ** output variables (*ppChangeset) and (*pnChangeset) are set to point
  ** to a buffer containing the changeset and the size of the changeset in
................................................................................
Usually, a single call to [sqlite3changeset_apply()], as depicted in the
example code below, suffices.

<p> In cases where it is complicated, the complications in applying a 
changeset lie in conflict resolution. Refer to the API documentation linked
above for details.

  <codeblock>
    /*
    ** Conflict handler callback used by apply_changeset(). See below.
    */
    static int xConflict(void *pCtx, int eConflict, sqlite3_changset_iter *pIter){
      int ret = (int)pCtx;
      return ret;
    }
................................................................................
  <li><p> An iterator is deleted using a call to the 
          [sqlite3changeset_finalize()] API. If an error occured while
          iterating, an SQLite error code is returned (even if the same error
          code has already been returned by sqlite3changeset_next()). Or,
          if no error has occurred, SQLITE_OK is returned.
</ol>

  <codeblock>
    /*
    ** Print the contents of the changeset to stdout.
    */
    static int print_changeset(void *pChangeset, int nChangeset){
      int rc;
      sqlite3_changeset_iter *pIter = 0;








|







 







|







 







|







278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
...
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
...
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
           [sqlite3session_changeset()] or [sqlite3session_patchset()] is
           called a second time on a session ojbect the changeset or patchset
           still reflects all changes that have taken place on the connection
           since the session was created. A session object is not reset or
           zeroed by a call to sqlite3session_changeset() or patchset().
</ol>

<codeblock class=C>
  /*
  ** Argument zSql points to a buffer containing an SQL script to execute 
  ** against the database handle passed as the first argument. As well as
  ** executing the SQL script, this function collects a changeset recording
  ** all changes made to the "main" database file. Assuming no error occurs,
  ** output variables (*ppChangeset) and (*pnChangeset) are set to point
  ** to a buffer containing the changeset and the size of the changeset in
................................................................................
Usually, a single call to [sqlite3changeset_apply()], as depicted in the
example code below, suffices.

<p> In cases where it is complicated, the complications in applying a 
changeset lie in conflict resolution. Refer to the API documentation linked
above for details.

  <codeblock class=C>
    /*
    ** Conflict handler callback used by apply_changeset(). See below.
    */
    static int xConflict(void *pCtx, int eConflict, sqlite3_changset_iter *pIter){
      int ret = (int)pCtx;
      return ret;
    }
................................................................................
  <li><p> An iterator is deleted using a call to the 
          [sqlite3changeset_finalize()] API. If an error occured while
          iterating, an SQLite error code is returned (even if the same error
          code has already been returned by sqlite3changeset_next()). Or,
          if no error has occurred, SQLITE_OK is returned.
</ol>

  <codeblock class=C>
    /*
    ** Print the contents of the changeset to stdout.
    */
    static int print_changeset(void *pChangeset, int nChangeset){
      int rc;
      sqlite3_changeset_iter *pIter = 0;