Documentation Source Text

Changes On Branch mobile-friendly
Login

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

Changes In Branch mobile-friendly Excluding Merge-Ins

This is equivalent to a diff from 363a0d0503 to 6fc0f8db82

2016-09-02
14:38
Restructure the website to be more mobile friendly. Put CSS into a separate sqlite.css file. Use responsive layout techniques. This is a work-in-progress. (check-in: 8e1edafe16 user: drh tags: trunk)
12:22
Fix the hyperlink on the logo. (Closed-Leaf check-in: 6fc0f8db82 user: drh tags: mobile-friendly)
12:17
Fix typos and tighten some sentences in the prosupport page. (check-in: ec9d984cb5 user: drh tags: mobile-friendly)
2016-08-31
16:53
Update the "fancyformat.tcl" script to use pages/hdom.tcl to parse html. (check-in: 78f2f948fb user: dan tags: trunk)
12:02
Use the experimental mobile-friendly menu. (check-in: b24301fa11 user: drh tags: mobile-friendly)
10:07
Fix date formats in the Last-Modified header. (check-in: 363a0d0503 user: drh tags: trunk)
07:00
Fix a build error in the previous commit. (check-in: 1e433b2be3 user: dan tags: trunk)

Added common_links.tcl.





























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
proc common_links {} {
  hd_puts \
{<ul class=nounderline>
<li> <a href="features.html">Features</a> </li>
<li> <a href="whentouse.html">When to use SQLite</a> </li>
<li> <a href="faq.html">Frequently Asked Questions</a> </li>
<li> <a href="quickstart.html">Getting Started</a> </li>
<li> <a href="chronology.html">Prior Releases</a>
<li> <a href="lang.html">SQL Syntax</a>
<ul>
<li> <a href="pragma.html#toc">Pragmas</a>
<li> <a href="lang_corefunc.html">SQL functions</a>
<li> <a href="lang_datefunc.html">Date &amp; time functions</a>
<li> <a href="lang_aggfunc.html">Aggregate functions</a>
<li> <a href="json1.html">JSON functions</a>
</ul>
</li>
<li> <a href="c3ref/intro.html">C/C++ Interface Spec</a>
<ul>
<li> <a href="cintro.html">Introduction</a>
<li> <a href="c3ref/funclist.html">List of C-language APIs</a>
</ul>
</li>
<li> <a href="tclsqlite.html">The TCL Interface Spec</a>
<li> <a href="http://www.sqlite.org/src/timeline">Commit History</a> </li>
<li> <a href="http://www.sqlite.org/src/wiki?name=Bug+Reports">Report a Bug</a> </li>
<li> <a href="news.html">News</a> </li>
</ul>
}
}

Changes to document_header.tcl.

1
2
3
4
5
6

7

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

136

137



138
139
140
141
142



143
144
145







146
147
148
149
150
151

152
153
154
155










156






157
158
159
160
161
162
163
164
165


proc document_header {title path {search {}}} {
  set ret [subst -nocommands {
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  <html><head>

  <meta http-equiv="content-type" content="text/html; charset=UTF-8">

  <title>$title</title>
  <style type="text/css">
    body {
        margin: auto;
        font-family: Verdana, sans-serif;
        padding: 8px 1%;
    }
    
    .nounderline a { text-decoration: none }

    a { color: #044a64 }
    a:visited { color: #734559 }
    
    .logo { position:absolute; margin:3px; }
    .tagline {
      float:right;
      text-align:right;
      font-style:italic;
      width:300px;
      margin:12px;
      margin-top:58px;
    }

    .menubar {
      clear: both;
      border-radius: 8px;
      background: #044a64;
      padding: 0px;
      margin: 0px;
      cell-spacing: 0px;
    }    
    .toolbar {
      text-align: center;
      line-height: 1.6em;
      margin: 0;
      padding: 0px 8px;
    }
    .toolbar a { color: white; text-decoration: none; padding: 6px 12px; }
    .toolbar a:visited { color: white; }
    .toolbar a:hover { color: #044a64; background: white; }
    
    .content    { margin: 5%; }
    .content dt { font-weight:bold; }
    .content dd { margin-bottom: 25px; margin-left:20%; }
    .content ul { padding:0px; padding-left: 15px; margin:0px; }
    
    /* Things for "fancyformat" documents start here. */
    .fancy img+p {font-style:italic}
    .fancy .codeblock i { color: darkblue; }
    .fancy h1,.fancy h2,.fancy h3,.fancy h4 {font-weight:normal;color:#044a64}
    .fancy h2 { margin-left: 10px }
    .fancy h3 { margin-left: 20px }
    .fancy h4 { margin-left: 30px }
    .fancy th {white-space:xnowrap;text-align:left;border-bottom:solid 1px #444}
    .fancy th, .fancy td {padding: 0.2em 1ex; vertical-align:top}
    .fancy .toct { color: #044a64 ! important }
    .fancy #toc a        { color: darkblue ; text-decoration: none }
    .fancy .todo         { color: #AA3333 ; font-style : italic }
    .fancy .todo:before  { content: 'TODO:' }
    .fancy p.todo        { border: solid #AA3333 1px; padding: 1ex }
    .fancy img { display:block; }
    .fancy :link:hover, .fancy :visited:hover { background: wheat }
    .fancy p,.fancy ul,.fancy ol,.fancy dl { margin: 1em 5ex }
    .fancy li p { margin: 1em 0 }
    .fancy blockquote { margin-left : 10ex }
    /* End of "fancyformat" specific rules. */

    .yyterm {
      background: #fff;
      border: 1px solid #000;
      border-radius: 11px;
      padding-left: 4px;
      padding-right: 4px;
    }

    .doccat a {
      color: #044a64 ;
      text-decoration: none;
    }
    .doccat h {
      font-weight: bold;
    }
    .doccat h a {
      font-size: smaller;
      color: black;
    }
    .doccat {
      padding-left: 2ex;
      padding-right: 2ex;
      white-space:nowrap;
    }
    .doccat li {
      list-style-type: none;
      font-size: smaller;
      line-height: 150%; 
    }
    .doccat ul {
      margin-top: 0.5em;
    }

    .footer {
      padding-top: 2px;
      padding-bottom: 1px;
      border-top: 2px solid #044a64;
    }

    </style>
    </head>
  }]

  if {[file exists DRAFT]} {
    set tagline {<font size="6" color="red">*** DRAFT ***</font>}
  } else {
    set tagline {Small. Fast. Reliable.<br>Choose any three.}
  }

  append ret [subst -nocommands {<body>
    <div><!-- container div to satisfy validator -->
    
    <div class=nosearch>
    <a href="${path}index.html">
    <img class="logo" src="${path}images/sqlite370_banner.gif" alt="SQLite Logo"
     border="0"></a>
    <div><!-- IE hack to prevent disappearing logo--></div>
    <div class="tagline">${tagline}</div>

    <table width=100% class="menubar"><tr>
      <td width=100%>

      <div class="toolbar">

        <a href="${path}about.html">About</a>



        <a href="${path}docs.html">Documentation</a>
        <a href="${path}download.html">Download</a>
        <a href="${path}copyright.html">License</a>
        <a href="${path}support.html">Support</a>
        <a href="http://www.hwaci.com/sw/sqlite/prosupport.html">Purchase</a>



      </div>
  }]








  if {$search==""} {
    set initval   "Search with FTS5..."
    set initstyle {font-style:italic;color:#044a64}
  } else {
    set initval   $search
    set initstyle {font-style:normal;color:black}

  }

  append ret [subst -nocommands {
    <script>










      /* 






      ** Set the cookie named "name" to value "value". Expires in "days" days.
      */
      function createCookie(name,value,days) {
        if (days) {
          var date = new Date();
          date.setTime(date.getTime()+(days*24*60*60*1000));
          var expires = "; expires="+date.toGMTString();
        }else{
          var expires = "";






>

>

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|









<
<


|
<
|
|
|
<
|
>
|
>
|
>
>
>
|
|
|
|
|
>
>
>
|
<
|
>
>
>
>
>
>
>
|
|
<
<
|
|
>
|



>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
|
<







1
2
3
4
5
6
7
8
9
10










































































































11
12
13
14
15
16
17
18
19
20


21
22
23

24
25
26

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

44
45
46
47
48
49
50
51
52
53


54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

79
80
81
82
83
84
85


proc document_header {title path {search {}}} {
  set ret [subst -nocommands {
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  <html><head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link href="${path}sqlite.css" rel="stylesheet">
  <title>$title</title>










































































































  </head>
  }]

  if {[file exists DRAFT]} {
    set tagline {<font size="6" color="red">*** DRAFT ***</font>}
  } else {
    set tagline {Small. Fast. Reliable.<br>Choose any three.}
  }

  append ret [subst -nocommands {<body>


    <div class=nosearch>
    <a href="${path}index.html">
    <img class="logo" src="${path}images/sqlite370_banner.gif" alt="SQLite" border="0"></a>

    <div><!-- IE hack to prevent disappearing logo --></div>
    <div class="tagline desktoponly">
      $tagline

    </div>
    </div>
    <div class="menu mainmenu">
    <ul>
    <li><a href="${path}index.html">Home</a>
    <li class='mobileonly'><a href="javascript:void(0)" onclick='toggle_div("submenu")'>
                           Menu</a>
    <li class='wideonly'><a href='${path}about.html'>About</a>
    <li class='desktoponly'><a href="${path}docs.html">Documentation</a>
    <li class='desktoponly'><a href="${path}download.html">Download</a>
    <li class='wideonly'><a href='${path}copyright.html'>License</a>
    <li class='desktoponly'><a href="${path}support.html">Support</a>
    <li class='desktoponly'><a href="${path}prosupport.html">Purchase</a>
    <li class='search' id='search_menubutton'>
    <a href="javascript:void(0)" onclick='toggle_div("searchmenu")'>Search</a>
    </ul>
    </div>

    <div class="menu submenu" id="submenu">
    <ul>
    <li><a href='${path}docs.html'>Documentation</a>
    <li><a href='${path}support.html'>Support</a>
    <li><a href='${path}prosupport.html'>Purchase</a>
    </ul>
    </div>
    <div class="searchmenu" id="searchmenu">
    <form method="GET" action="search">
    <span class="desktoponly">Search for:</span> <input type="text" name="q">


    <input type="submit" value="Go">
    </form>
    </div>
  }]

  append ret [subst -nocommands {
    <script>
      function toggle_div(nm) {
        var w = document.getElementById(nm);
        if( w.style.display=="block" ){
          w.style.display = "none";
        }else{
          w.style.display = "block";
        }
      }
      function div_off(nm){document.getElementById(nm).style.display="none";}
      window.onbeforeunload = function(e){div_off("submenu");}

      /* Disable the Search feature if we are not operating from CGI, since */
      /* Search is accomplished using CGI and will not work without it. */
      if( !location.origin.match(/http/) ){
        document.getElementById("search_menubutton").style.display = "none";
      }
      
      /* Set the cookie named "name" to value "value". Expires in "days" days. */

      function createCookie(name,value,days) {
        if (days) {
          var date = new Date();
          date.setTime(date.getTime()+(days*24*60*60*1000));
          var expires = "; expires="+date.toGMTString();
        }else{
          var expires = "";
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230


231
232
      /* 
      ** Delete cookie "name".
      */
      function eraseCookie(name) {
        createCookie(name,"",-1);
      }

      gMsg = "Search with FTS5..."
      function entersearch() {
        var q = document.getElementById("q");
        if( q.value == gMsg ) { q.value = "" }
        q.style.color = "black"
        q.style.fontStyle = "normal"
      }
      function leavesearch() {
        var q = document.getElementById("q");
        if( q.value == "" ) { 
          q.value = gMsg
          q.style.color = "#044a64"
          q.style.fontStyle = "italic"
        }
      }
      function hideorshow(btn,obj){
        var x = document.getElementById(obj);
        var b = document.getElementById(btn);
        if( x.style.display!='none' ){
          x.style.display = 'none';
          b.innerHTML='show';
        }else{
          x.style.display = '';
          b.innerHTML='hide';
        }
        return false;
      }
    </script>
    <td>
        <div style="padding:0 1em 0px 0;white-space:nowrap">
        <form name=f method="GET" action="${path}search">
          <input id=q name=q type=search
           onfocus="entersearch()" onblur="leavesearch()" style="width:24ex;padding:1px 1ex; border:solid white 1px; font-size:0.9em ; $initstyle;" value="$initval">
          <input type=submit value="Go" style="border:solid white 1px;background-color:#044a64;color:white;font-size:0.9em;padding:0 1ex">
        </form>
        </div>
      </table>
    </div>    <!-- matches "div class=nosearch" -->
  }]



  return $ret
}







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<













<
<
<
<
<
<
<
|
<
<


>
>


104
105
106
107
108
109
110















111
112
113
114
115
116
117
118
119
120
121
122
123







124


125
126
127
128
129
130
      /* 
      ** Delete cookie "name".
      */
      function eraseCookie(name) {
        createCookie(name,"",-1);
      }
















      function hideorshow(btn,obj){
        var x = document.getElementById(obj);
        var b = document.getElementById(btn);
        if( x.style.display!='none' ){
          x.style.display = 'none';
          b.innerHTML='show';
        }else{
          x.style.display = '';
          b.innerHTML='hide';
        }
        return false;
      }
    </script>







    </div>


  }]

  regsub -all {\n+\s+} [string trim $ret] \n ret
  regsub -all {\s*/\*[- a-z0-9A-Z"*\n]+\*/} $ret {} ret
  return $ret
}

Changes to pages/about.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<title>About SQLite</title>

<h1 align=center>About SQLite</h1>

<table align="right" border="1" cellpadding="10" hspace="20" cellspacing="0">
<tr><td>
<b>See Also...</b>
<p><ul>
<li> <a href="index.html">Home</a> </li>
<li> <a href="features.html">Features</a> </li>
<li> <a href="whentouse.html">When to use SQLite</a> </li>
<li> <a href="faq.html">Frequently Asked Questions</a> </li>
<li> <a href="famous.html">Well-known Users</a> </li>
<li> <a href="chronology.html">Prior Releases</a>
<li> <a href="quickstart.html">Getting Started</a> </li>
<li> <a href="lang.html">SQL Syntax</a>
<ul>
<li> <a href="pragma.html#toc">Pragmas</a>
<li> <a href="lang_corefunc.html">SQL functions</a>
<li> <a href="lang_datefunc.html">Date &amp; time functions</a>
<li> <a href="lang_aggfunc.html">Aggregate functions</a>
</ul>
</li>
<li> <a href="c3ref/intro.html">C/C++ Interface Spec</a>
<ul>
<li> <a href="cintro.html">Introduction</a>
<li> <a href="c3ref/funclist.html">List of C-language APIs</a>
</ul>
</li>
<li> <a href="tclsqlite.html">The TCL Interface Spec</a>
<li> <a href="http://www.sqlite.org/src/timeline">Commit History</a> </li>
<li> <a href="http://www.sqlite.org/src/wiki?name=Bug+Reports">Report a Bug</a> </li>
<li> <a href="news.html">News</a> </li>
<li> <a href="sitemap.html">Sitemap</a> </li>
</ul></p>
</table>

<p>SQLite is an in-process library that implements a
<a href="selfcontained.html">self-contained</a>, 
<a href="serverless.html">serverless</a>,
<a href="zeroconf.html">zero-configuration</a>,
<a href="transactional.html">transactional</a>
SQL database engine.




|
<
|
<
<
<
<
<
<
<
<
<
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1
2
3
4
5

6









7




8














9
10
11
12
13
14
15
<title>About SQLite</title>

<h1 align=center>About SQLite</h1>

<div class="rightsidebar desktoponly border2px">

<h4 align="center">See Also</h4>









<tcl>common_links</tcl>




</div>















<p>SQLite is an in-process library that implements a
<a href="selfcontained.html">self-contained</a>, 
<a href="serverless.html">serverless</a>,
<a href="zeroconf.html">zero-configuration</a>,
<a href="transactional.html">transactional</a>
SQL database engine.

Changes to pages/capi3ref.in.

216
217
218
219
220
221
222





















223

224
225
226
227






228
229
230
231
232



















233
234
235
236

237
238
239
240
241
242
243
244
245






246
247

248
249








250

251





252








253








254


255
256
257
258
259
260
261
  set oldname [string tolower $oldname]
  regsub {^sqlite_} $oldname {c_} oldname
  regsub {^sqlite3_} $oldname {} oldname
  regsub { } $oldname _ name
  return $name.html
}






















# Output HTML that displays the list $lx in $N columns

#
proc output_list {title N lx} {
  hd_putsnl {<table width="100%" cellpadding="0"><tr>}
  if {$title!=""} {






    hd_putsnl "<td colspan=$N>$title</td></tr><tr>"
  }
  set len [llength $lx]
  set n [expr {($len + $N - 1)/$N}]
  for {set i 0} {$i<$N} {incr i} {



















    set start [expr {$i*$n}]
    set end [expr {($i+1)*$n}]
    hd_puts {<td valign="top"><ul>}
    for {set j $start} {$j<$end} {incr j} {

      set entry [lindex $lx $j]
      if {$entry!=""} {
        foreach {link label s} $entry break
        if {$s==1} {
          hd_resolve "<li>\[$link|$label\]&nbsp;&nbsp;"
          hd_resolve "\[experimental | <small><i>(exp)</i></small>\]</li>"
        } elseif {$s==2} {
          hd_resolve "<li>\[$link|$label\]&nbsp;&nbsp;"
          hd_resolve "\[deprecated | <small><i>(obs)</i></small>\]</li>"






        } else {
          hd_resolve "<li>\[$link|$label\]</li>"

        }
        hd_puts \n








      }

    }





    hd_putsnl {</ul></td>}








  }








  hd_putsnl {</tr></table>}


}

hd_open_aux c3ref/intro.html
hd_header Introduction
hd_enable_main 0
hd_keywords *capi3ref {C-language Interface}
</tcl>







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>

|
<
|
>
>
>
>
>
>
|
|
|
<
<
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
<
|
>
|
<
|
|
|
|
|
|
|
>
>
>
>
>
>
|
<
>
|
|
>
>
>
>
>
>
>
>
|
>
|
>
>
>
>
>
|
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
|
>
>







216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247

248
249
250
251
252
253
254
255
256
257


258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278

279
280
281

282
283
284
285
286
287
288
289
290
291
292
293
294
295

296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
  set oldname [string tolower $oldname]
  regsub {^sqlite_} $oldname {c_} oldname
  regsub {^sqlite3_} $oldname {} oldname
  regsub { } $oldname _ name
  return $name.html
}

# Convert the keyword $kw into an appropriate relative URI
#
proc keyword_to_uri {kw} {
  global hd llink glink
  if {[string match {*.html} $kw]} {return $kw}
  if {$hd(enable-main)} {
    set fn $hd(fn-main)
    if {[info exists llink($fn:$kw)]} {
      return $hd(rootpath-main)$llink($fn:$kw)
    }
    if {[info exists glink($kw)]} {
      return $hd(rootpath-main)$glink($kw)
    }
  }
  if {$hd(enable-aux)} {
    if {[info exists glink($kw)]} {
      return $hd(rootpath-aux)$glink($kw)
    }
  }
  return ""
}

# Generate a Javascript table containing the URL and Label from $lx
#
proc output_list_javascript {lx} {

  set sep {[}
  foreach entry $lx {
    foreach {link label s} $entry break
    set url [keyword_to_uri $link]
    hd_puts "${sep}{\"u\":\"$url\",\"x\":\"$label\",\"s\":$s}"
    set sep ",\n"
  }
  hd_putsnl "\];"
}



# Output HTML/JS that displays the list $lx in multiple columns
# under the assumption that each column is $w pixels wide.
#
# $lx is a list of triples.  Each triple is {KEYWORD LABEL S}.  The
# S determines a suffix added to each list element:
#
#    0:     Add nothing (the default and common case)
#    1:     Add the "(exp)" suffix
#    2:     Strike through the text and do not hyperlink
#    3:     Strike through the text and add &sup1
#    4:     Add &sup2
#    5:     Add &sup3
#
# This routine is used to generate lists in other modules as well:
# lang.in, pragma.in, session.in.
#
proc output_list {title w lx} {
  global listcount hd
  if {![info exists listcount]} {
    set listcount 1
  } else {

    incr listcount
  }
  set tx listtab$listcount

  set vx listitems$listcount
  hd_puts "<style>\n#$tx tr td {vertical-align:top;}\n"
  hd_puts "</style>\n"
  hd_putsnl "<table id='$tx' width='100%'></table>"
  hd_putsnl "<script>"
  hd_puts "var $vx = "
  if {$hd(enable-main) && $hd(enable-aux)} {
    set hd(enable-main) 0
    output_list_javascript $lx
    set hd(enable-main) 1
    set hd(enable-aux) 0
    output_list_javascript $lx
    set hd(enable-aux) 1
  } else {

    output_list_javascript $lx
  }
  hd_putsnl "var j = 0;"
  hd_putsnl "var w = Math.max(document.documentElement.clientWidth, \
             window.innerWidth || 0);"
  hd_putsnl "var nCol = Math.floor(w/$w);"
  hd_putsnl "if(nCol<=0) nCol=1;"
  hd_putsnl "var nRow = Math.ceil(($vx.length+1)/nCol);"
  if {$title!=""} {
    hd_putsnl "var h=\"<tr><td colspan=\"+nCol;"
    hd_putsnl "h += \">$title</td></tr><tr><td><ul class='multicol_list'>\""
  } else {
    hd_putsnl "var h=\"<tr><td><ul class='multicol_list'>\""
  }
  hd_putsnl "var ea"
  hd_putsnl "for(var i=0; i<$vx.length; i++){"
  hd_putsnl "  if( (++j)>nRow ){"
  hd_putsnl "    h += \"</ul></td>\\n<td><ul class='multicol_list'>\\n\";"
  hd_putsnl "    j = 1;"
  hd_putsnl "  }"
  hd_putsnl "  if($vx\[i\].u==\"\" || $vx\[i\].s==2){"
  hd_putsnl "    h += \"<li>\""
  hd_putsnl "    ea = \"\""
  hd_putsnl "  }else{"
  hd_putsnl "    h += \"<li><a href='\";"
  hd_putsnl "    h += $vx\[i\].u;"
  hd_putsnl "    h += \"'>\";"
  hd_putsnl "    ea = \"</a>\""
  hd_putsnl "  }"
  hd_putsnl "  if($vx\[i\].s==2 || $vx\[i\].s==3) h += \"<s>\""
  hd_putsnl "  h += $vx\[i\].x;"
  hd_putsnl "  if($vx\[i\].s==2 || $vx\[i\].s==3) h += \"</s>\""
  hd_putsnl "  h += ea"
  hd_putsnl "  if($vx\[i\].s==1) h += \"<small><i>(exp)</i></small>\\n\";"
  hd_putsnl "  if($vx\[i\].s==3) h += \"&sup1\\n\";"
  hd_putsnl "  if($vx\[i\].s==4) h += \"&sup2\\n\";"
  hd_putsnl "  if($vx\[i\].s==5) h += \"&sup3\\n\";"
  hd_putsnl "}"
  hd_putsnl "document.getElementById(\"$tx\").innerHTML = h;"
  hd_putsnl "</script>"
}

hd_open_aux c3ref/intro.html
hd_header Introduction
hd_enable_main 0
hd_keywords *capi3ref {C-language Interface}
</tcl>
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
hd_header {List Of SQLite Objects}
hd_enable_main 0
hd_putsnl {<a href="intro.html"><h2>SQLite C Interface</h2></a>}
hd_enable_main 1
</tcl>
<h2>List Of Objects:</h2>
<tcl>
output_list "" 3 [lsort -nocase $objlist]
hd_enable_main 0
hd_putsnl {<p>Other lists:
<a href="constlist.html">Constants</a> and
<a href="funclist.html">Functions</a> and
<a href="../rescode.html">Result Codes</a>.}
hd_close_aux
hd_enable_main 1







|







520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
hd_header {List Of SQLite Objects}
hd_enable_main 0
hd_putsnl {<a href="intro.html"><h2>SQLite C Interface</h2></a>}
hd_enable_main 1
</tcl>
<h2>List Of Objects:</h2>
<tcl>
output_list "" 280 [lsort -nocase $objlist]
hd_enable_main 0
hd_putsnl {<p>Other lists:
<a href="constlist.html">Constants</a> and
<a href="funclist.html">Functions</a> and
<a href="../rescode.html">Result Codes</a>.}
hd_close_aux
hd_enable_main 1
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
hd_putsnl {<a href="intro.html"><h2>SQLite C Interface</h2></a>}
hd_enable_main 1
</tcl>
<h2>List Of Constants:</h2>
<p>Also available: [error codes|list of error codes]</p>
<tcl>
set clist [lsort -index 1 $clist]
output_list "" 2 $clist
hd_enable_main 0
hd_putsnl {<p>Other lists:
<a href="objlist.html">Objects</a> and
<a href="funclist.html">Functions</a> and
<a href="../rescode.html">Result Codes</a>.</p>}
hd_enable_main 1
hd_close_aux







|







558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
hd_putsnl {<a href="intro.html"><h2>SQLite C Interface</h2></a>}
hd_enable_main 1
</tcl>
<h2>List Of Constants:</h2>
<p>Also available: [error codes|list of error codes]</p>
<tcl>
set clist [lsort -index 1 $clist]
output_list "" 400 $clist
hd_enable_main 0
hd_putsnl {<p>Other lists:
<a href="objlist.html">Objects</a> and
<a href="funclist.html">Functions</a> and
<a href="../rescode.html">Result Codes</a>.</p>}
hd_enable_main 1
hd_close_aux
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
hd_header {List Of SQLite Functions}
hd_keywords *capi3ref_funclist {C-API function list}
hd_enable_main 0
hd_putsnl {<a href="intro.html"><h2>SQLite C Interface</h2></a>}
hd_enable_main 1
</tcl>
<h2>List Of Functions:</h2>
<p>Note: Functions marked with "[experimental | <small><i>(exp)</i></small>]"
are [experimental] and functions marked with
[deprecated | <small><i>(obs)</i></small>] are [deprecated].</p>
<tcl>
set funclist [lsort -index 1 $funclist]
output_list "" 3 $funclist
hd_enable_main 0
hd_putsnl {<p>Other lists:
<a href="constlist.html">Constants</a> and
<a href="objlist.html">Objects</a> and
<a href="../rescode.html">Result Codes</a></p>}
hd_enable_main 1
hd_close_aux







|
|
|


|







594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
hd_header {List Of SQLite Functions}
hd_keywords *capi3ref_funclist {C-API function list}
hd_enable_main 0
hd_putsnl {<a href="intro.html"><h2>SQLite C Interface</h2></a>}
hd_enable_main 1
</tcl>
<h2>List Of Functions:</h2>
<p>Note: Functions marked with "<small><i>(exp)</i></small>"
are [experimental] and functions whose names are
<s>struck through</s> are [deprecated].</p>
<tcl>
set funclist [lsort -index 1 $funclist]
output_list "" 315 $funclist
hd_enable_main 0
hd_putsnl {<p>Other lists:
<a href="constlist.html">Constants</a> and
<a href="objlist.html">Objects</a> and
<a href="../rescode.html">Result Codes</a></p>}
hd_enable_main 1
hd_close_aux
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
    hd_puts "</p>\n"
    return
  }
  set flst {}
  foreach x $lx {
    lappend flst [list $x $x 0]
  }
  output_list ${label}s: 3 $flst
  hd_puts "</p>\n"
}


# Output all the records
#
foreach c [lsort $content] {







|







645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
    hd_puts "</p>\n"
    return
  }
  set flst {}
  foreach x $lx {
    lappend flst [list $x $x 0]
  }
  output_list ${label}s: 350 $flst
  hd_puts "</p>\n"
}


# Output all the records
#
foreach c [lsort $content] {

Changes to pages/changes.in.

4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
  foreach {date desc options} $aChng($i) break
  if {[regexp {\(([0-9.]+)\)} $date all vers]} {
    set label [string map {. _} $vers]
    hd_fragment version_$label
  }
  hd_puts "<h3>$date</h3>"
  regsub -all {\yROOT/} $desc {} d2
  hd_resolve "<p><ul>$d2\n"
  foreach {key value} $options {
    if {$key=="backport"} {
      if {[info exists xrefChng($value)]} {set value $xrefChng($value)}
      set c2 $aChng([expr {$i+$value}])
      regexp {([-0-9]+) \((3\.\d+[.0-9]+)[ a-zA-Z]*\)} [lindex $c2 0] all xdate xvers
      set d2 [lindex $c2 1]
      regsub {(<p>[^\n]*\n)?<li>SQLITE_SOURCE_ID.*$} $d2 {} d2







|







4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
  foreach {date desc options} $aChng($i) break
  if {[regexp {\(([0-9.]+)\)} $date all vers]} {
    set label [string map {. _} $vers]
    hd_fragment version_$label
  }
  hd_puts "<h3>$date</h3>"
  regsub -all {\yROOT/} $desc {} d2
  hd_resolve "<p><ul class='lessindent'>$d2\n"
  foreach {key value} $options {
    if {$key=="backport"} {
      if {[info exists xrefChng($value)]} {set value $xrefChng($value)}
      set c2 $aChng([expr {$i+$value}])
      regexp {([-0-9]+) \((3\.\d+[.0-9]+)[ a-zA-Z]*\)} [lindex $c2 0] all xdate xvers
      set d2 [lindex $c2 1]
      regsub {(<p>[^\n]*\n)?<li>SQLITE_SOURCE_ID.*$} $d2 {} d2
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
    hd_enable_main 0
    hd_puts "<h2>SQLite Release $vers On $dateonly</h2>"
    regsub -all {<a href="(?!http:)} $desc {<a href="../} desc
    foreach {key value} $options {
      if {$key=="inadditionto"} {
        set d2 [lindex $aChng([expr {$i+$value}]) 1]
        regsub {(<p>[^\n]*\n)?<li>SQLITE_SOURCE_ID.*$} $d2 {} d2
        hd_resolve "<p><ul>$d2</ul></p>"
      }
    }
    regsub -all {\yROOT/\y} $desc {../} d2
    hd_resolve "<p><ul>$d2\n"
    foreach {key value} $options {
      if {$key=="patchagainst"} {
        if {[info exists xrefChng($value)]} {set value $xrefChng($value)}
        set c2 $aChng([expr {$i+$value}])
        regexp {([-0-9]+) \((3\.\d+[.0-9]+)[ a-zA-Z]*\)} [lindex $c2 0] all date vers
        set d2 [lindex $c2 1]
        regsub -all {\yROOT/} $d2 {../} d2
        regsub {(<p>[^\n]*\n)?<li>SQLITE_SOURCE_ID.*$} $d2 {} d2
        hd_resolve "</ul></p>\n"
        hd_resolve "<p><b>Changes carried forward from version $vers ($date):</b></p>\n"
        hd_resolve "<p><ul>$d2\n"
      }
      if {$key=="backport"} {
        if {[info exists xrefChng($value)]} {set value $xrefChng($value)}
        set c2 $aChng([expr {$i+$value}])
        regexp {([-0-9]+) \((3\.\d+\.[.0-9]+)[ a-zA-Z]*\)} [lindex $c2 0] all date vers
        set d2 [lindex $c2 1]
        regsub {(<p>[^\n]*\n)?<li>SQLITE_SOURCE_ID.*$} $d2 {} d2







|



|










|







4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
    hd_enable_main 0
    hd_puts "<h2>SQLite Release $vers On $dateonly</h2>"
    regsub -all {<a href="(?!http:)} $desc {<a href="../} desc
    foreach {key value} $options {
      if {$key=="inadditionto"} {
        set d2 [lindex $aChng([expr {$i+$value}]) 1]
        regsub {(<p>[^\n]*\n)?<li>SQLITE_SOURCE_ID.*$} $d2 {} d2
        hd_resolve "<p><ul class='lessindent'>$d2</ul></p>"
      }
    }
    regsub -all {\yROOT/\y} $desc {../} d2
    hd_resolve "<p><ul class='lessindent'>$d2\n"
    foreach {key value} $options {
      if {$key=="patchagainst"} {
        if {[info exists xrefChng($value)]} {set value $xrefChng($value)}
        set c2 $aChng([expr {$i+$value}])
        regexp {([-0-9]+) \((3\.\d+[.0-9]+)[ a-zA-Z]*\)} [lindex $c2 0] all date vers
        set d2 [lindex $c2 1]
        regsub -all {\yROOT/} $d2 {../} d2
        regsub {(<p>[^\n]*\n)?<li>SQLITE_SOURCE_ID.*$} $d2 {} d2
        hd_resolve "</ul></p>\n"
        hd_resolve "<p><b>Changes carried forward from version $vers ($date):</b></p>\n"
        hd_resolve "<p><ul class='lessindent'>$d2\n"
      }
      if {$key=="backport"} {
        if {[info exists xrefChng($value)]} {set value $xrefChng($value)}
        set c2 $aChng([expr {$i+$value}])
        regexp {([-0-9]+) \((3\.\d+\.[.0-9]+)[ a-zA-Z]*\)} [lindex $c2 0] all date vers
        set d2 [lindex $c2 1]
        regsub {(<p>[^\n]*\n)?<li>SQLITE_SOURCE_ID.*$} $d2 {} d2

Changes to pages/copyright.in.

1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<title>SQLite Copyright</title>


<h2>SQLite Is Public Domain</h2>

<table align="right" vspace="0" hspace="10" border="1" cellpadding="20">
<tr><td align="center">
<img src="images/nocopy.gif"><br>
SQLite is in the<br>
[http://en.wikipedia.org/wiki/Public_Domain | Public Domain]
</td></tr>
</table>

<p>
All of the code and documentation in SQLite has been dedicated to the
[http://en.wikipedia.org/wiki/Public_Domain|public domain]
by the authors.
All code authors, and representatives of the companies they work for,
have signed affidavits dedicating their contributions to

>



|
|



|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<title>SQLite Copyright</title>
<tcl>hd_keywords {copyright} {public-domain} {license}</tcl>

<h2>SQLite Is Public Domain</h2>

<div class="rightsidebar desktoponly">
<center>
<img src="images/nocopy.gif"><br>
SQLite is in the<br>
[http://en.wikipedia.org/wiki/Public_Domain | Public Domain]
</center>
</div>

<p>
All of the code and documentation in SQLite has been dedicated to the
[http://en.wikipedia.org/wiki/Public_Domain|public domain]
by the authors.
All code authors, and representatives of the companies they work for,
have signed affidavits dedicating their contributions to
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
No code has been taken from other projects or from the open
internet.  Every line of code can be traced back to its original
author, and all of those authors have public domain dedications
on file.  So the SQLite code base is clean and is
uncontaminated with licensed code from other projects.
</p>

<table border=0 align='right'>
<tr><td>
<form method="GET" action="http://www.hwaci.com/cgi-bin/license-step1">
<input type="submit" value="Buy An SQLite License">
</form>
</table>

<h2>Obtaining An License To Use SQLite</h2>

<p>
Even though SQLite is in the public domain and does not require
a license, some users want to obtain a license anyway.  Some reasons
for obtaining a license include:
</p>

<ul>
<li> Your company desires warranty of title and
     indemnity against claims of copyright infringement.
<li> You are using SQLite in a jurisdiction that does not recognize
     the public domain.  </li>
<li> You are using SQLite in a jurisdiction that does not recognize
     the right of an author to dedicate their work to the public
     domain. </li>
<li> You want to hold a tangible legal document
     as evidence that you have the legal right to use and distribute
     SQLite. </li>
<li> Your legal department tells you that you have to purchase a license.
     </li>
</ul>

<p>
If you feel like you really need to purchase a license for SQLite,
<a href="http://www.hwaci.com/">Hwaci</a>, the company that employs 
the architect and principal developers of SQLite, will 
<a href="http://www.hwaci.com/cgi-bin/license-step1">sell you
one</a>.
All proceeds from the sale of SQLite licenses are used to fund further
improvements to SQLite.
</p>

<h2>Contributed Code</h2>

<p>
In order to keep SQLite completely free and unencumbered by copyright,
all new contributors to the SQLite code base are asked to dedicate







|
<



|










|
















|


|
|







41
42
43
44
45
46
47
48

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
No code has been taken from other projects or from the open
internet.  Every line of code can be traced back to its original
author, and all of those authors have public domain dedications
on file.  So the SQLite code base is clean and is
uncontaminated with licensed code from other projects.
</p>

<div class="rightsidebar">

<form method="GET" action="http://www.hwaci.com/cgi-bin/license-step1">
<input type="submit" value="Buy An SQLite License">
</form>
</div>

<h2>Obtaining An License To Use SQLite</h2>

<p>
Even though SQLite is in the public domain and does not require
a license, some users want to obtain a license anyway.  Some reasons
for obtaining a license include:
</p>

<ul>
<li> Your company desires warranty of title and/or
     indemnity against claims of copyright infringement.
<li> You are using SQLite in a jurisdiction that does not recognize
     the public domain.  </li>
<li> You are using SQLite in a jurisdiction that does not recognize
     the right of an author to dedicate their work to the public
     domain. </li>
<li> You want to hold a tangible legal document
     as evidence that you have the legal right to use and distribute
     SQLite. </li>
<li> Your legal department tells you that you have to purchase a license.
     </li>
</ul>

<p>
If you feel like you really need to purchase a license for SQLite,
<a href="http://www.hwaci.com/">Hwaci</a>, the company that employs 
all the developers of SQLite, will 
<a href="http://www.hwaci.com/cgi-bin/license-step1">sell you
one</a>.
All proceeds from the sale of SQLite licenses are used to fund
continuing improvement and support of SQLite.
</p>

<h2>Contributed Code</h2>

<p>
In order to keep SQLite completely free and unencumbered by copyright,
all new contributors to the SQLite code base are asked to dedicate

Changes to pages/doclist.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<title>Alphabetical List Of SQLite Documents</title>
<h1 align=center>Alphabetical List Of SQLite Documents</h1>
<tcl>hd_keywords {*doclist}</tcl>

<table align=right border=1 cellpadding=10>
<tr><td>See Also:
<ul>
<li>[categorical listing of SQLite documents | Categorical Document List]
<li>[books about SQLite | Books About SQLite]
<li>[permuted index | Permuted Title Index]
<li>[keyword index | Website Keyword Index]
</ul>
</table>

<ol>
<tcl>
hd_keywords {alphabetical listing of SQLite documents}
db eval {
  SELECT filename, pagetitle
    FROM page
   WHERE pagetitle IS NOT NULL AND pagetitle!='No Title'
   ORDER BY pagetitle COLLATE nocase
} {
  hd_puts "<li><a href=\"$filename\">$pagetitle</a></li>\n"

|


|
|






|



|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<title>Alphabetical List Of SQLite Documents</title>
<h2 align=center>Alphabetical List Of Documents</h1>
<tcl>hd_keywords {*doclist}</tcl>

<var class="rightsidebar border2px desktoponly">
See Also:
<ul>
<li>[categorical listing of SQLite documents | Categorical Document List]
<li>[books about SQLite | Books About SQLite]
<li>[permuted index | Permuted Title Index]
<li>[keyword index | Website Keyword Index]
</ul>
</var>

<ol>
<tcl>
hd_keywords {alphabetical listing of documents}
db eval {
  SELECT filename, pagetitle
    FROM page
   WHERE pagetitle IS NOT NULL AND pagetitle!='No Title'
   ORDER BY pagetitle COLLATE nocase
} {
  hd_puts "<li><a href=\"$filename\">$pagetitle</a></li>\n"

Changes to pages/docs.in.

1
2
3
4


5

6

7
8
9

10

11
12
13


14
15

16
17
18
19
20
21
22
23
24
25
26
27










28








29
30

31
32
33
34
35
36
37



38
39



40
41
42
43
44


45


46
47
48
49
50
51
52
53
<title>SQLite Documentation</title>

<h1 align="center">Categorical Index Of SQLite Documents</h1>



<table width="100%" cellpadding="5">



<tcl>
hd_keywords {categorical listing of SQLite documents}




set ::lHead [list]
proc doc {name url desc} {
}


proc heading {text tag {caption {}}} {
  lappend ::lHead $text $tag 

}
source [file join $::DOC pages docsdata.tcl]

hd_puts "<table align=center class=nounderline>"
set i 0
set style "\"padding-right:8ex; padding-bottom: 1em\""
foreach {text tag} $::lHead {
  if {($i % 2)==0} { hd_puts <tr> }
  hd_puts "<th valign=top align=left style=$style> <a href=#$tag>$text</a>"
  incr i
}
hd_puts "</table>"



















proc doc {name url desc} {
  hd_puts {<tr><td valign="top" align="right" class=nounderline>}

  regsub -all { +} $name {\&nbsp;} name
  hd_puts "<a href=\"$url\">$name</a></td>"
  hd_puts {<td width="10"></td>}
  hd_puts {<td valign="top" align="left">}
  hd_resolve $desc
  hd_puts {</td></tr>}
}




proc heading {text tag {caption {}}} {



  hd_puts {<tr><td colspan=3 style="padding: 3ex 0 2ex 0">}
  hd_puts "<b><a name=$tag></a>$text</b>"
  if {$caption ne ""} {
    hd_puts {<br />}
    hd_puts "$caption"


  }


}

hd_puts "<table width=100% cellpadding=5>"
source [file join $::DOC pages docsdata.tcl]
hd_puts "</table>"

</tcl>
</table>


|
|
>
>
|
>
|
>
|
<
|
>
|
>
|
|

>
>
|
|
>

<
|
<
|
|
<
<
<
<

|
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>

<
>
|
<
<
<
<
<

>
>
>
|
|
>
>
>
|
|
<
|
|
>
>

>
>

<
<

<
|

|
1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
19
20
21
22
23
24

25

26
27




28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

50
51





52
53
54
55
56
57
58
59
60
61
62

63
64
65
66
67
68
69
70


71

72
73
74
<title>SQLite Documentation</title>

<h2 align="center">Documents By Category</h1>
<style>
.showhide {
  margin-left: 0;
  padding-left: 0;
  list-style-type: none;
}
.showhide > li {
  clear: both;

  padding-left: 1em;
  text-indent: -1em;
}
.showhide > li li {
  padding-left: 0;
  text-indent: 0;
}
.showhide ul {display: none;}
.showhide > li > a {
  text-decoration: none;
  color: black;
  cursor: pointer;
}

.sh_mark {

  float: left;
  width: 1em;




}
</style>
<script>
function showhide(n){
  var ul = document.getElementById("sh_sub_"+n)
  var mk = document.getElementById("sh_mark_"+n)
  if( ul.style.display!="block" ){
    ul.style.display = "block";
    mk.innerHTML = "&#x25bc;";
  } else {
    ul.style.display = "none";
    mk.innerHTML = "&#x25ba;";
  }
}
</script>
<ul class="showhide">
<tcl>
hd_keywords {categorical listing of SQLite documents} {documents by category}
set prevHead {}
set lDoc {}
set cnt 0
proc doc {name url desc} {

  global lDoc
  lappend lDoc $name $url





}
proc heading {text tag {caption {}}} {
  end_heading
  set ::prevHead $text
}
proc end_heading {} {
  global lDoc cnt prevHead
  if {$prevHead==""} return
  incr cnt
  hd_puts "<li><a onclick='showhide($cnt)'>"
  hd_puts "<span class='sh_mark' id='sh_mark_$cnt'>"

  hd_puts "&#x25ba;</span> $prevHead</a>\n"
  hd_putsnl "<ul id='sh_sub_$cnt'>"
  foreach {name url} $lDoc {
    hd_putsnl "<li><a href='$url'>$name</a>"
  }
  hd_putsnl </ul>
  set lDoc {}
}


source [file join $::DOC pages docsdata.tcl]

end_heading
</tcl>
</ul>

Changes to pages/docsdata.tcl.

26
27
28
29
30
31
32



33
34
35
36
37
38
39
}
doc {Frequently Asked Questions} {faq.html} {
  The title of the document says all...
}
doc {Books About SQLite} {books.html} {
  A list of independently written books about SQLite.
}



doc {Alphabetical Listing Of Documents} {doclist.html} {
  A list of all titled pages on this website, sorted by title.
}
doc {Website Keyword Index} {keyword_index.html} {
  A cross-reference from keywords to various pages within this website.
}
doc {Permuted Title Index} {sitemap.html#pindex} {







>
>
>







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
}
doc {Frequently Asked Questions} {faq.html} {
  The title of the document says all...
}
doc {Books About SQLite} {books.html} {
  A list of independently written books about SQLite.
}

heading {Document Lists And Indexes} lists

doc {Alphabetical Listing Of Documents} {doclist.html} {
  A list of all titled pages on this website, sorted by title.
}
doc {Website Keyword Index} {keyword_index.html} {
  A cross-reference from keywords to various pages within this website.
}
doc {Permuted Title Index} {sitemap.html#pindex} {

Changes to pages/fancyformat.tcl.

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  if {$args != ""} {
    #puts $args
    set ::hd(fragment) $zName
    eval hd_keywords $args
  }

  append ::TOC [subst {
    <div style="margin-left:[expr $iLevel*6]ex">
    <a href="#$zName">${zNumber} $zTitle</a>
    </a></div>
  }]

  return "<h$iLevel id=\"$zName\">$zNumber $zTitle</h$iLevel>\n"
}
proc h1 {args} {uplevel H 1 $args}







|







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  if {$args != ""} {
    #puts $args
    set ::hd(fragment) $zName
    eval hd_keywords $args
  }

  append ::TOC [subst {
    <div class="fancy-toc$iLevel">
    <a href="#$zName">${zNumber} $zTitle</a>
    </a></div>
  }]

  return "<h$iLevel id=\"$zName\">$zNumber $zTitle</h$iLevel>\n"
}
proc h1 {args} {uplevel H 1 $args}
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217

218


219
220

221
222
223
224
225
226
227
228
229
230
231


232
233
234
235
236
237
238
  append ret "</p>"
}

set ::Requirements [list]

proc CodeBlock {txt} {
  set txt [string trim $txt "\n"]
  set    out {<div class=codeblock style="margin:0 15ex">}
  append out {<table width=100% style="border:1px solid #80a796;padding:0 1ex;background-color:#EEEEEE"><tr><td><pre style="font-size:1.1em">}

  foreach line [split $txt "\n"] {
    if {![string is space $line]} {
      set nSpace [expr {
        [string length $line] - [string length [string trimleft $line]]
      }]
      if {[info exists nMinSpace]==0 || $nSpace<$nMinSpace} {
        set nMinSpace $nSpace
      }
    }
  }
  foreach line [split $txt "\n"] {
    set line [string range $line $nMinSpace end]
    append out "$line\n"
  }
  append out "</pre></table></div>"
  return $out
}


#-------------------------------------------------------------------------
# Return the <script>...</script> block containing the code for persistent
# show/hide on the TOC block. This is inserted into each page immediately
# after the "Table Of Contents" block.
#
proc javascript_toc_toggle {} {
  return {
    <script>
      function hide_toc(){
        var toc = document.getElementById('toc');
        var antitoc = document.getElementById('antitoc');

        toc.style.display = 'none';


        antitoc.style.display = '';
        eraseCookie('showtoc');

      }
      function show_toc(){
        var toc = document.getElementById('toc');
        var antitoc = document.getElementById('antitoc');
        toc.style.display = '';
        antitoc.style.display = 'none';
        createCookie('showtoc', 1, 365);
      }
      if( readCookie('showtoc') ) show_toc();
    </script>
  }


}


proc addtoc_cb {tag details args} {
  upvar #0 ::Addtoc G
  switch -glob -- $tag {








|
<















|










|

|
|
|
>
|
>
>
|
<
>
|
<
<
<
<
<
<

<


>
>







178
179
180
181
182
183
184
185

186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221

222
223






224

225
226
227
228
229
230
231
232
233
234
235
  append ret "</p>"
}

set ::Requirements [list]

proc CodeBlock {txt} {
  set txt [string trim $txt "\n"]
  set    out {<div class=codeblock><pre>}


  foreach line [split $txt "\n"] {
    if {![string is space $line]} {
      set nSpace [expr {
        [string length $line] - [string length [string trimleft $line]]
      }]
      if {[info exists nMinSpace]==0 || $nSpace<$nMinSpace} {
        set nMinSpace $nSpace
      }
    }
  }
  foreach line [split $txt "\n"] {
    set line [string range $line $nMinSpace end]
    append out "$line\n"
  }
  append out "</pre></div>"
  return $out
}


#-------------------------------------------------------------------------
# Return the <script>...</script> block containing the code for persistent
# show/hide on the TOC block. This is inserted into each page immediately
# after the "Table Of Contents" block.
#
proc javascript_toc_toggle {} {
  set x {
    <script>
      function toggle_toc(){
        var sub = document.getElementById("toc_sub")
        var mk = document.getElementById("toc_mk")
        if( sub.style.display!="block" ){
          sub.style.display = "block";
          mk.innerHTML = "&#x25bc;";
        } else {
          sub.style.display = "none";

          mk.innerHTML = "&#x25ba;";
        }






      }

    </script>
  }
  regsub -all {\n\s+} $x "\n" x
  return $x;
}


proc addtoc_cb {tag details args} {
  upvar #0 ::Addtoc G
  switch -glob -- $tag {

260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
            set D(id) "section_[string map {. _} [string range $HN 0 end-1]]" 
          } else {
            set D(id) "notoc[incr G(notoccounter)]"
          }
        }

        # Append the entry to the table-of-contents.
        append G(toc) "<div style=\"margin-left:[expr $level*6]ex\">"
        append G(toc) "<a href=\"#$D(id)\">$HN "
        set G(inHeading) 1
      }
      catch { unset D(nonumber) }
      catch { unset D(notoc) }

      # If there is a "tags" attribute, then add an [hd_fragment] command







|







257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
            set D(id) "section_[string map {. _} [string range $HN 0 end-1]]" 
          } else {
            set D(id) "notoc[incr G(notoccounter)]"
          }
        }

        # Append the entry to the table-of-contents.
        append G(toc) "<div class=\"fancy-toc$level\">"
        append G(toc) "<a href=\"#$D(id)\">$HN "
        set G(inHeading) 1
      }
      catch { unset D(nonumber) }
      catch { unset D(notoc) }

      # If there is a "tags" attribute, then add an [hd_fragment] command
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298

      append G(doc) [formattag $tag [array get D]]
      append G(doc) "$HN "
    }

    /h[1-6] { ;# End of current heading.
      if {$::Addtoc(inHeading)} {
        append G(toc) "</a></div>"
      }
      set G(inHeading) 0
      append G(doc) [formattag $tag $details]
    }

    title  { 
      set G(inTitle) 1







|







281
282
283
284
285
286
287
288
289
290
291
292
293
294
295

      append G(doc) [formattag $tag [array get D]]
      append G(doc) "$HN "
    }

    /h[1-6] { ;# End of current heading.
      if {$::Addtoc(inHeading)} {
        append G(toc) "</a></div>\n"
      }
      set G(inHeading) 0
      append G(doc) [formattag $tag $details]
    }

    title  { 
      set G(inTitle) 1
420
421
422
423
424
425
426
427
428
429
430
431

432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
  # before it. This stops the table of contents from being used for 
  # snippets on search results pages.
  #
  set toc [subst {
    <div class=fancy>

    <div class=nosearch>
      <div style="font-size:2em;text-align:center;color:#044a64">
        $::Addtoc(title)
      </div>
      <div id=toc style="display:none"> 
        <div style="margin:1em;color:#044a64">

          <span style="font-size:1.5em">Table Of Contents</span>
          <a class=toct style="margin-left:4ex" href="#" onclick="hide_toc()">
            &#91;hide&#93;
          </a>
        </div>
        $::Addtoc(toc) 
      </div>
      <div id=antitoc>
        <a class=toct style="margin-left:4ex" href="#" onclick="show_toc()">
          &#91;show table of contents&#93;
        </a>
      </div>
    </div>
    [javascript_toc_toggle]
  }]
  set fancy [subst {
    <div class=fancy>
    <div style="font-size:2em;text-align:center;color:#044a64">







<
|
|
|
<
>
|
<
<
<
<
|
<
<
<
<
<







417
418
419
420
421
422
423

424
425
426

427
428




429





430
431
432
433
434
435
436
  # before it. This stops the table of contents from being used for 
  # snippets on search results pages.
  #
  set toc [subst {
    <div class=fancy>

    <div class=nosearch>

      <div class="fancy_title">$::Addtoc(title)</div>
      <div class="fancy_toc">
         <a onclick="toggle_toc()">

         <span class="fancy_toc_mark" id="toc_mk">&#x25ba;</span>
         Table Of Contents</a>




         <div id="toc_sub">$::Addtoc(toc)</div>





      </div>
    </div>
    [javascript_toc_toggle]
  }]
  set fancy [subst {
    <div class=fancy>
    <div style="font-size:2em;text-align:center;color:#044a64">

Changes to pages/index.in.

1
2
3



4
5
6
7
8
9
10
11
12
13


14

15

16

17



18

19
20
21





22
23
24

25




26
27
28
29
30
31
32
<title>SQLite Home Page</title>

<table border="0" width="100%">



<tr><td valign="top" width="65%">
<p>SQLite is a software library that implements a
<a href="selfcontained.html">self-contained</a>, 
<a href="serverless.html">serverless</a>,
<a href="zeroconf.html">zero-configuration</a>,
<a href="transactional.html">transactional</a>
SQL database engine.
SQLite is the [most widely deployed]
database engine in the world.
The source code for SQLite is in the


<a href="copyright.html">public domain</a>.

<a href="about.html">More...</a></p>



<hr style="color: #044a64" height="2">





<h3>Sponsors</h3>
<p>Continuing enhancement and maintenance of SQLite is made possible
by <a href="consortium.html">SQLite Consortium</a> members, including:</p>






<a name="consortium_members"></a>
<center>

<table border="0" cellpadding="15">




<tcl>
set sponsors {
  {name   Mozilla
   url    https://www.mozilla.com/
   image  mozilla.gif
   blurb  "Working to preserve choice and innovation on the internet."
  }


|
>
>
>
|
|
<
<
|
<

|
|
|
>
>
|
>
|
>

>
|
>
>
>

>

|

>
>
>
>
>
|
|
|
>
|
>
>
>
>







1
2
3
4
5
6
7
8


9

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<title>SQLite Home Page</title>

<div class="rightsidebar desktoponly border2px">
<h3 align="center">Common Links</h3>
<tcl>common_links</tcl>
</div>

<p>SQLite is a high-reliablity, 


[serverless|embedded], [zero-configuration], [public-domain],

SQL database engine.
SQLite is the [most used] database engine in the world.
<a class="button" href="about.html">More Info</a></p>

<hr class="xhr">
<span class="hdrfont">Latest Release:&nbsp;&nbsp;</span>
<a href="releaselog/3_14_1.html">Version 3.14.1</a> on
2016-08-11.
<a class="button" href="download.html">Download</a>
<a class="button" href="chronology.html">Prior Releases</a>

<div class="mobileonly">
<hr class="xhr">
<h3>Common Links</h3>
<tcl>common_links</tcl>
</div>

<hr class="xhr">
<h3>Sponsors</h3>
<p>Ongoing development and support of SQLite is made possible in part
by <a href="consortium.html">SQLite Consortium</a> members, including:</p>
<a name="consortium_members"></a>
<style>
#sponsors {
  margin:auto;
  width:80%;
}
.onesponsor a img {
  width:200px;
  max-width:200px;
  padding:1ex;
}
</style>
<div id="sponsors"></div>
<script>
<tcl>
set sponsors {
  {name   Mozilla
   url    https://www.mozilla.com/
   image  mozilla.gif
   blurb  "Working to preserve choice and innovation on the internet."
  }
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
  }
  {name   Facebook
   url    https://www.facebook.com/
   image  fb.gif
   blurb  "Giving people the power to share and make the world more open and connected."
  }
}
set nspons [llength $sponsors]
for {set i 0} {$i<$nspons} {incr i} {
  if {$i%2==0} {hd_putsnl "<tr>"}
  hd_putsnl "  <td><a id='a$i'><img id='i$i'></a></td>"
  if {$i%2==1 || $i==$nspons-1} {hd_putsnl "</tr>"}
}
hd_putsnl "</table></center>"
hd_putsnl "<script language=\"JavaScript\">"
set sep {  var sponsors = [}
set nspons 0
foreach spons $sponsors {
  hd_putsnl $sep\173
  set sep ","
  unset -nocomplain x
  array set x $spons







<
<
<
<
<
<
<
<







73
74
75
76
77
78
79








80
81
82
83
84
85
86
  }
  {name   Facebook
   url    https://www.facebook.com/
   image  fb.gif
   blurb  "Giving people the power to share and make the world more open and connected."
  }
}








set sep {  var sponsors = [}
set nspons 0
foreach spons $sponsors {
  hd_putsnl $sep\173
  set sep ","
  unset -nocomplain x
  array set x $spons
86
87
88
89
90
91
92

93
94

95
96
97
98
99
100
101

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
  incr nspons
}
unset -nocomplain x
hd_putsnl "\];"
hd_puts {
  for(var i=0; i<sponsors.length; i++){sponsors[i].idx = Math.random();}
  sponsors.sort(function(a,b){return a.idx-b.idx});

  for(var i=0; i<sponsors.length; i++){
    var e = document.getElementById("a"+i);

    e.href = sponsors[i].href;
    var x = document.getElementById("i"+i);
    x.src = "images/foreignlogos/"+sponsors[i].src;
    if(sponsors[i].wx>0){
      x.width = sponsors[i].wx;
      x.height = sponsors[i].hx;
    }

  }
}
hd_putsnl "</script>"
</tcl>

</td>
<td width="20"></td><td bgcolor="#044a64" width="1"></td><td width="20"></td>
<td valign="top">
<h3>Current Status</h3>

<p><ul>
<li><a href="releaselog/3_14_1.html">Version 3.14.1</a>
of SQLite is recommended for all new development.
</li>
</ul></p>

<h3>Common Links</h3>

<p><ul class=nounderline>
<li> <a href="features.html">Features</a> </li>
<li> <a href="whentouse.html">When to use SQLite</a> </li>
<li> <a href="faq.html">Frequently Asked Questions</a> </li>
<li> <a href="quickstart.html">Getting Started</a> </li>
<li> <a href="chronology.html">Prior Releases</a>
<li> <a href="lang.html">SQL Syntax</a>
<ul>
<li> <a href="pragma.html#toc">Pragmas</a>
<li> <a href="lang_corefunc.html">SQL functions</a>
<li> <a href="lang_datefunc.html">Date &amp; time functions</a>
<li> <a href="lang_aggfunc.html">Aggregate functions</a>
<li> <a href="json1.html">JSON functions</a>
</ul>
</li>
<li> <a href="c3ref/intro.html">C/C++ Interface Spec</a>
<ul>
<li> <a href="cintro.html">Introduction</a>
<li> <a href="c3ref/funclist.html">List of C-language APIs</a>
</ul>
</li>
<li> <a href="tclsqlite.html">The TCL Interface Spec</a>
<li> <a href="http://www.sqlite.org/src/timeline">Commit History</a> </li>
<li> <a href="http://www.sqlite.org/src/wiki?name=Bug+Reports">Report a Bug</a> </li>
<li> <a href="news.html">News</a> </li>
</ul></p>

</td></tr>
</table>

<tcl>
source [file normalize [file join $::DOC pages footer.tcl]]
</tcl>








>

<
>
|
<
|
|
|
<
|
>
|
<
<

|
<
<
<
<
|
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
97
98
99
100
101
102
103
104
105

106
107

108
109
110

111
112
113


114
115




116








117

































  incr nspons
}
unset -nocomplain x
hd_putsnl "\];"
hd_puts {
  for(var i=0; i<sponsors.length; i++){sponsors[i].idx = Math.random();}
  sponsors.sort(function(a,b){return a.idx-b.idx});
  var h = "";
  for(var i=0; i<sponsors.length; i++){

    h += "<span class='onesponsor'><a href='";
    h += sponsors[i].href;

    h += "'><img src='images/foreignlogos/";
    h += sponsors[i].src;
    h += "'></a></span>\n";

  }
  document.getElementById("sponsors").innerHTML = h;
}


</tcl>
</script>




<br clear="both">








<hr class="xhr">

































Changes to pages/json1.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<title>The JSON1 Extension</title>
<tcl>hd_keywords json1 {the json1 extension} {JSON SQL functions}</tcl>

<table_of_contents>

<h1>Overview</h1>
<p>
The <b>json1</b> extension is a [loadable extension] that
implements thirteen [application-defined SQL functions] and
two [table-valued functions] that are useful for
managing [http://json.org/ | JSON] content stored in an SQLite database.
These are the scalar SQL functions implemented by json1:

<blockquote>
<center><table border=0 cellpadding=5>
<tcl>
set tabcnt 0
proc tabentry {fx desc lnk} {
  global tabcnt
  incr tabcnt
  hd_puts "<tr><td width=30 valign='top'>$tabcnt.</td>"
  hd_puts "<td valign='top' width='30%'>\n"
  set fx [string trim $fx]
  set hlink "<a href='#$lnk'>"
  regsub -all {^json\(} $fx "${hlink}json</a>(" fx
  regsub -all {(json_[a-z_]+)} $fx "$hlink\\1</a>" fx
  regsub -all {(value[1-9]?|path|label[1-9]?)} $fx "<i>\\1</i>" fx
  regsub -all {\((json)} $fx "(<i>\\1</i>" fx
  hd_puts $fx\n
  hd_puts "</td><td valign='top'>\n"
  hd_puts [string trim $desc]\n
  hd_puts "</td></tr>\n\n"
}
set tsctr 100
proc jexample {args} {
  hd_puts "<blockquote><table border=0 cellpadding=0>\n"
  foreach {sql res} $args {
    ### uncomment to generate test cases from the examples
    # global tsctr
    # puts "do_execsql_test json102-$tsctr \173"
    # incr tsctr 10
    # puts "  SELECT [string trim $sql];"
    # set x \173[string trim $res ']\175
    # puts "\175 \173$x\175"
    hd_puts "<tr><td>[string trim $sql]</td>\n"
    hd_puts "<td width='50' align='center'><b>&rarr;</b></td>\n"
    hd_puts "<td>[string trim $res]</td></tr>\n"
  }
  hd_puts "</table></blockquote>\n"
}

tabentry {json(json)} {
  Validate and minify a JSON string
} jmini

tabentry {json_array(value1,value2,...)} {
  Return a JSON array holding the function arguments.








|


|

|
<





<
|






|
<
|
|


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14

15
16
17
18
19

20
21
22
23
24
25
26
27

28
29
30
31
















32
33
34
35
36
37
38
<title>The JSON1 Extension</title>
<tcl>hd_keywords json1 {the json1 extension} {JSON SQL functions}</tcl>

<table_of_contents>

<h1>Overview</h1>
<p>
The <b>json1</b> extension is a [loadable extension] that
implements fourteen [application-defined SQL functions] and
two [table-valued functions] that are useful for
managing [http://json.org/ | JSON] content stored in an SQLite database.
Twelve of the fourteen SQL functions are  scalar functions:

<ol>

<tcl>
set tabcnt 0
proc tabentry {fx desc lnk} {
  global tabcnt
  incr tabcnt

  hd_puts "<li value='$tabcnt'>\n"
  set fx [string trim $fx]
  set hlink "<a href='#$lnk'>"
  regsub -all {^json\(} $fx "${hlink}json</a>(" fx
  regsub -all {(json_[a-z_]+)} $fx "$hlink\\1</a>" fx
  regsub -all {(value[1-9]?|path|label[1-9]?)} $fx "<i>\\1</i>" fx
  regsub -all {\((json)} $fx "(<i>\\1</i>" fx
  hd_puts "$fx\n"

  # hd_puts "[string trim $desc]\n"
  hd_puts "</li>\n\n"
}
set tsctr 100

















tabentry {json(json)} {
  Validate and minify a JSON string
} jmini

tabentry {json_array(value1,value2,...)} {
  Return a JSON array holding the function arguments.
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

136
























137
138
139
140
141
142
143
} jvalid

tabentry {json_quote(value)} {
  Convert an SQL value (a number or a string) into its corresponding JSON
  representation.
} jvalid
</tcl>
</table></center></blockquote>

<p>There are two aggregate SQL functions:

<blockquote><center><table border=0 cellpadding=5>
<tcl>
tabentry {json_group_array(value)} {
  Return a JSON array composed of all <i>value</i> elements 
  in the aggregation.
} jgrouparray

tabentry {json_group_object(name,value)} {
  Return a JSON object composed of all <i>name</i> and <i>value</i> pairs
  in the aggregation.
} jgroupobject
</tcl>
</table></center></blockquote>

<p>The [table-valued functions] implemented by this routine are:

<blockquote><center><table border=0 cellpadding=5>
<tcl>
tabentry {json_each(json)<br>json_each(json,path)} {
  Return one row describing each element in an array or object
  at the top-level or at "path" within the input JSON.
} jeach

tabentry {json_tree(json)<br>json_tree(json,path)} {
  Walk the JSON recursively starting at the top-level or at the
  specified "path" and return one row for each element.
} jtree
</tcl>

</table></center></blockquote>

























<tcl>hd_fragment howtocompile</tcl>
<h1>Compiling the JSON1 Extension</h1>

<p>
The [loadable extensions] documentation describes
how to [compile loadable extensions] as shared libraries.  The







|



|











|

|

|











>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
} jvalid

tabentry {json_quote(value)} {
  Convert an SQL value (a number or a string) into its corresponding JSON
  representation.
} jvalid
</tcl>
</ol>

<p>There are two aggregate SQL functions:

<ol>
<tcl>
tabentry {json_group_array(value)} {
  Return a JSON array composed of all <i>value</i> elements 
  in the aggregation.
} jgrouparray

tabentry {json_group_object(name,value)} {
  Return a JSON object composed of all <i>name</i> and <i>value</i> pairs
  in the aggregation.
} jgroupobject
</tcl>
</ol>

<p>The two [table-valued functions] are:

<ol>
<tcl>
tabentry {json_each(json)<br>json_each(json,path)} {
  Return one row describing each element in an array or object
  at the top-level or at "path" within the input JSON.
} jeach

tabentry {json_tree(json)<br>json_tree(json,path)} {
  Walk the JSON recursively starting at the top-level or at the
  specified "path" and return one row for each element.
} jtree
</tcl>
</ol>


<tcl>
hd_puts {
<style>
.jans {color: #050;}
.jex {color: #025;}
</style>
}
proc jexample {args} {
  hd_puts "<ul>\n"
  foreach {sql res} $args {
    ### uncomment to generate test cases from the examples
    # global tsctr
    # puts "do_execsql_test json102-$tsctr \173"
    # incr tsctr 10
    # puts "  SELECT [string trim $sql];"
    # set x \173[string trim $res ']\175
    # puts "\175 \173$x\175"
    hd_putsnl "<li><span class='jex'>[string trim $sql]</span>"
    hd_putsnl "<span class='jans'>&rarr; [string trim $res]</span></li>\n"
  }
  hd_puts "</ul>\n"
}
</tcl>

<tcl>hd_fragment howtocompile</tcl>
<h1>Compiling the JSON1 Extension</h1>

<p>
The [loadable extensions] documentation describes
how to [compile loadable extensions] as shared libraries.  The
248
249
250
251
252
253
254

255
256
257
258
259
260
261
262
come directly from another json1 function.

<h2>Compatibility</h2>

<p>
The json1 extension uses the [sqlite3_value_subtype()] and
[sqlite3_result_subtype()] interfaces that were introduced with

SQLite version 3.9.0.  Therefore the json1 extension will not work
in earlier versions of SQLite.

<h1>Function Details</h1>

<p>The following sections provide additional detail on the operation of
the various functions that are part of the json1 extension.








>
|







254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
come directly from another json1 function.

<h2>Compatibility</h2>

<p>
The json1 extension uses the [sqlite3_value_subtype()] and
[sqlite3_result_subtype()] interfaces that were introduced with
SQLite version 3.9.0 (circa 2015-10-14).
The json1 extension will not work
in earlier versions of SQLite.

<h1>Function Details</h1>

<p>The following sections provide additional detail on the operation of
the various functions that are part of the json1 extension.

374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
a single JSON value as their first argument followed by zero or more
pairs of path and value arguments, and return a new JSON string formed
by updating the input JSON by the path/value pairs.  The functions
differ only in how they deal with creating new values and overwriting
preexisting values.

<center>
<table border=1 cellpadding=3>
<tr>
<th>Function<th>Overwrite if already exists?<th>Create if does not exist?
<tr>
<td>json_insert()<td align='center'>No<td align='center'>Yes
<tr>
<td>json_replace()<td align='center'>Yes<td align='center'>No
<tr>







|







381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
a single JSON value as their first argument followed by zero or more
pairs of path and value arguments, and return a new JSON string formed
by updating the input JSON by the path/value pairs.  The functions
differ only in how they deal with creating new values and overwriting
preexisting values.

<center>
<table border=1 cellpadding=3 cellspacing=0>
<tr>
<th>Function<th>Overwrite if already exists?<th>Create if does not exist?
<tr>
<td>json_insert()<td align='center'>No<td align='center'>Yes
<tr>
<td>json_replace()<td align='center'>Yes<td align='center'>No
<tr>

Changes to pages/keyword_index.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<title>Website Keyword Index</title>
<h1 align=center>Website Keyword Index</h1>

<table align=right border=1 cellpadding=10>
<tr><td>Other Documentation Indices:
<ul>
<li>[categorical listing of SQLite documents | Categorical Document List]
<li>[books about SQLite | Books About SQLite]
<li>[doclist | Alphabetical List Of Documents]
<li>[permuted index | Permuted Document Title Index]
</ul>
</table>

<ul>
<tcl>
hd_keywords {keyword index}
db eval {
  UPDATE keyword SET indexKw=0
   WHERE kw GLOB '*s' AND indexKw
     AND EXISTS(SELECT 1 FROM keyword AS x
                 WHERE x.kw = substr(keyword.kw,1,length(keyword.kw)-1));

|

|
|






|

|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<title>Website Keyword Index</title>
<h2 align=center>Keyword Index</h1>

<var class="rightsidebar border2px desktoponly">
Other Documentation Indexes:
<ul>
<li>[categorical listing of SQLite documents | Categorical Document List]
<li>[books about SQLite | Books About SQLite]
<li>[doclist | Alphabetical List Of Documents]
<li>[permuted index | Permuted Document Title Index]
</ul>
</var>

<ul class='lessindent'>
<tcl>
hd_keywords {keyword index}
db eval {
  UPDATE keyword SET indexKw=0
   WHERE kw GLOB '*s' AND indexKw
     AND EXISTS(SELECT 1 FROM keyword AS x
                 WHERE x.kw = substr(keyword.kw,1,length(keyword.kw)-1));

Changes to pages/lang.in.

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76


77
78
79
80
81
82
83
    {{ANALYZE} analyze}
    {{INDEXED BY} indexedby}
    {{aggregate functions} aggfunc aggfunc}
    {{core functions} corefunc corefunc}
    {{date and time functions} datefunc datefunc}
    {keywords keywords {SQL keywords}}
  }
  set lang_section_break [expr {([llength $lang_section_list]+2)/3}]
  foreach {section} [lsort -index 0 -dictionary $lang_section_list] {
  foreach {s_title s_tag s_kw} $section {}
  if {$s_kw == ""} {
    set s_kw $s_title
  }
  if {$s_tag=="pragma.html"} {
    set url $s_tag
  } else {
    set url lang_$s_tag.html
  }
  hd_resolve "<li>\[$s_kw|$s_title\]</li>"
  incr i
  if {$i==$lang_section_break || $i==2*$lang_section_break} {
    hd_puts "</ul></td><td valign=\"top\"><ul>"
  }
}


</tcl>
</ul></td></tr></table>

<p>^The routines [sqlite3_prepare_v2()], [sqlite3_prepare()],
[sqlite3_prepare16()], [sqlite3_prepare16_v2()], 
[sqlite3_exec()], and [sqlite3_get_table()] accept
an SQL statement list (sql-stmt-list) which is a semicolon-separated







|

|
|
|
|
<
|
<
<

<
<
<
<
<
<
>
>







53
54
55
56
57
58
59
60
61
62
63
64
65

66


67






68
69
70
71
72
73
74
75
76
    {{ANALYZE} analyze}
    {{INDEXED BY} indexedby}
    {{aggregate functions} aggfunc aggfunc}
    {{core functions} corefunc corefunc}
    {{date and time functions} datefunc datefunc}
    {keywords keywords {SQL keywords}}
  }
  set lx {}
  foreach {section} [lsort -index 0 -dictionary $lang_section_list] {
    foreach {s_title s_tag s_kw} $section {}
    if {$s_kw == ""} {
      set s_kw $s_title
    }

    lappend lx [list $s_kw $s_title 0]


  }






  # The output_list proc is implemented in capi3ref.in.
  output_list {} 340 $lx
</tcl>
</ul></td></tr></table>

<p>^The routines [sqlite3_prepare_v2()], [sqlite3_prepare()],
[sqlite3_prepare16()], [sqlite3_prepare16_v2()], 
[sqlite3_exec()], and [sqlite3_get_table()] accept
an SQL statement list (sql-stmt-list) which is a semicolon-separated
2325
2326
2327
2328
2329
2330
2331

2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
function are different.  ^For example, the [agg_max|max()] function with a
single argument is an aggregate and the [max()] function with two or more
arguments is a simple function.

<tcl>
##############################################################################
Section {Core Functions} corefunc {*corefunc}

proc funcdef {syntax keywords desc} {
  hd_puts {<tr>}
  regsub -all {\s+} [string trim $syntax] {<br />} syntax
  regsub -all {\(([^*)]+)\)} $syntax {(<i>\1</i>)} syntax
  regsub -all {,} $syntax {</i>,<i>} syntax
  regsub -all {<i>\.\.\.</i>} $syntax {...} syntax
  hd_puts "<td valign=\"top\" align=\"right\" width=\"120\">"
  if {[llength $keywords]==0} {
    regexp {[a-z_]+} $syntax name
    hd_fragment $name *$name "${name}() SQL function"
  } else {
    set fragname [lindex $keywords 0]
    regsub -all {[^a-z]} $fragname {} fragname
    hd_fragment $fragname
    eval hd_keywords [string map {\n { }} $keywords]
  }
  hd_puts "$syntax</td>"
  hd_puts {<td valign="top">}
  hd_resolve $desc
  hd_puts {</td></tr>}
}
</tcl>

<p>The core functions shown below are available by default. 
[datefunc | Date &amp; Time functions],
[aggfunc | aggregate functions], and
[json1 | JSON functions] are documented separately.  An
application may define additional
functions written in C and added to the database engine using
the [sqlite3_create_function()] API.</p>

<table border=0 cellpadding=10>
<tcl>
funcdef {abs(X)} {} {
  ^The abs(X) function returns the absolute value of the numeric
  argument X.  ^Abs(X) returns NULL if X is NULL. 
  ^(Abs(X) returns 0.0 if X is a string or blob
  that cannot be converted to a numeric value.)^  ^If X is the 
  integer -9223372036854775808 then abs(X) throws an integer overflow
  error since there is no equivalent positive 64-bit two complement value.







>

<
|
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
|
<
<







2318
2319
2320
2321
2322
2323
2324
2325
2326

2327





2328













2329







2330


2331
2332
2333
2334
2335
2336
2337
function are different.  ^For example, the [agg_max|max()] function with a
single argument is an aggregate and the [max()] function with two or more
arguments is a simple function.

<tcl>
##############################################################################
Section {Core Functions} corefunc {*corefunc}
unset -nocomplain corefuncset
proc funcdef {syntax keywords desc} {

  global corefuncset





  regexp {^[a-z_]+} $syntax basesyntax













  set corefuncset($basesyntax) [list $syntax $keywords $desc]







}


funcdef {abs(X)} {} {
  ^The abs(X) function returns the absolute value of the numeric
  argument X.  ^Abs(X) returns NULL if X is NULL. 
  ^(Abs(X) returns 0.0 if X is a string or blob
  that cannot be converted to a numeric value.)^  ^If X is the 
  integer -9223372036854775808 then abs(X) throws an integer overflow
  error since there is no equivalent positive 64-bit two complement value.
2716
2717
2718
2719
2720
2721
2722
2723







2724
2725

































2726
2727
2728
2729
2730
2731
2732
  SQLite manages these zeroblobs very efficiently.  Zeroblobs can be used to
  reserve space for a BLOB that is later written using 
  [sqlite3_blob_open() | incremental BLOB I/O].
  ^This SQL function is implemented using the [sqlite3_result_zeroblob()]
  routine from the C/C++ interface.
}
</tcl>
</table>








<tcl>

































##############################################################################
Section {Date And Time Functions} datefunc {*datefunc {date and time functions}}
hd_keywords {date() SQL function} {time() SQL function}
hd_keywords {datetime() SQL function} {julianday() SQL function}
hd_keywords {strftime() SQL function}
</tcl>








|
>
>
>
>
>
>
>


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
  SQLite manages these zeroblobs very efficiently.  Zeroblobs can be used to
  reserve space for a BLOB that is later written using 
  [sqlite3_blob_open() | incremental BLOB I/O].
  ^This SQL function is implemented using the [sqlite3_result_zeroblob()]
  routine from the C/C++ interface.
}
</tcl>

<p>The core functions shown below are available by default. 
[datefunc | Date &amp; Time functions],
[aggfunc | aggregate functions], and
[json1 | JSON functions] are documented separately.  An
application may define additional
functions written in C and added to the database engine using
the [sqlite3_create_function()] API.</p>

<tcl>
set lx {}
foreach basesyntax [array names corefuncset] {
  foreach {syntax keywords desc} $corefuncset($basesyntax) break
  regexp {^[a-z_]+} $basesyntax fragment
  foreach coresyntax $syntax {
    lappend lx [list $fragment $coresyntax 0]
  }
}
output_list {} 225 [lsort -index 1 $lx]

hd_putsnl "<hr class='xhr'>"
hd_putsnl "<dl>"
foreach basesyntax [lsort [array names corefuncset]] {
  foreach {syntax keywords desc} $corefuncset($basesyntax) break
  regsub -all {\s+} [string trim $syntax] {<br />} syntax
  regsub -all {\(([^*)]+)\)} $syntax {(<i>\1</i>)} syntax
  regsub -all {,} $syntax {</i>,<i>} syntax
  regsub -all {<i>\.\.\.</i>} $syntax {...} syntax
  regexp {^[a-z]+} $basesyntax fragment
  if {[llength $keywords]==0} {
    regexp {[a-z_]+} $syntax name
    hd_fragment $name *$name "${name}() SQL function"
  } else {
    set fragname [lindex $keywords 0]
    regsub -all {[^a-z]} $fragname {} fragname
    hd_fragment $fragname
    eval hd_keywords [string map {\n { }} $keywords]
  }
  hd_puts "<dt><p><b>$syntax</b></dt>"
  hd_resolve "<dd><p>$desc</dd>\n"
}
hd_putsnl "</dl>"

##############################################################################
Section {Date And Time Functions} datefunc {*datefunc {date and time functions}}
hd_keywords {date() SQL function} {time() SQL function}
hd_keywords {datetime() SQL function} {julianday() SQL function}
hd_keywords {strftime() SQL function}
</tcl>

3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
[http://en.wikipedia.org/wiki/Gregorian_calendar | Gregorian calendar]
system.  It is also assumed that every
day is exactly 86400 seconds in duration.</p>

<tcl>
##############################################################################
Section {Aggregate Functions} aggfunc {*aggfunc}
</tcl>

<p>
The aggregate functions shown below are available by default.  Additional
aggregate functions written in C may be added using the 
[sqlite3_create_function()]</a>
API.</p>

<p>
^In any aggregate function that takes a single argument, that argument
can be preceded by the keyword DISTINCT.  ^In such cases, duplicate
elements are filtered before being passed into the aggregate function.
^For example, the function "count(distinct X)" will return the number
of distinct values of column X instead of the total number of non-null
values in column X.
</p>

<table border=0 cellpadding=10>
<tcl>
funcdef {avg(X)} {*avg {avg() aggregate function}} {
  ^The avg() function
  returns the average value of all non-NULL <i>X</i> within a
  group.  ^String and BLOB values that do not look like numbers are
  interpreted as 0.
  ^The result of avg() is always a floating point value as long as
  at there is at least one non-NULL input even if all







<
|
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<







3032
3033
3034
3035
3036
3037
3038

3039





3040











3041
3042
3043
3044
3045
3046
3047
[http://en.wikipedia.org/wiki/Gregorian_calendar | Gregorian calendar]
system.  It is also assumed that every
day is exactly 86400 seconds in duration.</p>

<tcl>
##############################################################################
Section {Aggregate Functions} aggfunc {*aggfunc}

unset -nocomplain corefuncset

















funcdef {avg(X)} {*avg {avg() aggregate function}} {
  ^The avg() function
  returns the average value of all non-NULL <i>X</i> within a
  group.  ^String and BLOB values that do not look like numbers are
  interpreted as 0.
  ^The result of avg() is always a floating point value as long as
  at there is at least one non-NULL input even if all
3120
3121
3122
3123
3124
3125
3126
3127
3128















3129

































3130
3131
3132
3133
3134
3135
3136

  <p>^Sum() will throw an "integer overflow" exception if all inputs
  are integers or NULL
  and an integer overflow occurs at any point during the computation.
  ^Total() never throws an integer overflow.
}
</tcl>
</table>
















<tcl>

































##############################################################################
Section INSERT insert {INSERT *INSERTs}

RecursiveBubbleDiagram insert-stmt
</tcl>

<p>The INSERT statement comes in three basic forms.  







|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173

  <p>^Sum() will throw an "integer overflow" exception if all inputs
  are integers or NULL
  and an integer overflow occurs at any point during the computation.
  ^Total() never throws an integer overflow.
}
</tcl>


<p>
The aggregate functions shown below are available by default.  Additional
aggregate functions written in C may be added using the 
[sqlite3_create_function()]</a>
API.</p>

<p>
^In any aggregate function that takes a single argument, that argument
can be preceded by the keyword DISTINCT.  ^In such cases, duplicate
elements are filtered before being passed into the aggregate function.
^For example, the function "count(distinct X)" will return the number
of distinct values of column X instead of the total number of non-null
values in column X.
</p>

<tcl>
set lx {}
foreach basesyntax [array names corefuncset] {
  foreach {syntax keywords desc} $corefuncset($basesyntax) break
  regexp {^[a-z_]+} $basesyntax fragment
  foreach coresyntax $syntax {
    lappend lx [list $fragment $coresyntax 0]
  }
}
output_list {} 225 [lsort -index 1 $lx]

hd_putsnl "<hr class='xhr'>"
hd_putsnl "<dl>"
foreach basesyntax [lsort [array names corefuncset]] {
  foreach {syntax keywords desc} $corefuncset($basesyntax) break
  regsub -all {\s+} [string trim $syntax] {<br />} syntax
  regsub -all {\(([^*)]+)\)} $syntax {(<i>\1</i>)} syntax
  regsub -all {,} $syntax {</i>,<i>} syntax
  regsub -all {<i>\.\.\.</i>} $syntax {...} syntax
  regexp {^[a-z]+} $basesyntax fragment
  if {[llength $keywords]==0} {
    regexp {[a-z_]+} $syntax name
    hd_fragment $name *$name "${name}() SQL function"
  } else {
    set fragname [lindex $keywords 0]
    regsub -all {[^a-z]} $fragname {} fragname
    hd_fragment $fragname
    eval hd_keywords [string map {\n { }} $keywords]
  }
  hd_puts "<dt><p><b>$syntax</b></dt>"
  hd_resolve "<dd><p>$desc</dd>\n"
}
hd_putsnl "</dl>"

##############################################################################
Section INSERT insert {INSERT *INSERTs}

RecursiveBubbleDiagram insert-stmt
</tcl>

<p>The INSERT statement comes in three basic forms.  
4850
4851
4852
4853
4854
4855
4856







4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
but some keywords may be omitted when SQL language features are
disabled.
^(Regardless of the compile-time configuration, any identifier that is not on
the following <tcl>hd_puts [llength $keyword_list]</tcl> element
list is not a keyword to the SQL parser in SQLite:
</p>








<blockquote>
<table width="100%"><tr>
<td align="left" valign="top" width="20%">
<tcl>
set n [llength $keyword_list]
set nCol 5
set nRow [expr {($n+$nCol-1)/$nCol}]
set i 0
foreach word $keyword_list {
  if {$i==$nRow} {
    hd_puts "</td><td valign=\"top\" align=\"left\" width=\"20%\">"
    set i 1
  } else {
    incr i
  }
  hd_puts "$word<br>\n"
}
</tcl>
</td></tr></table></blockquote>)^







>
>
>
>
>
>
>




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904















but some keywords may be omitted when SQL language features are
disabled.
^(Regardless of the compile-time configuration, any identifier that is not on
the following <tcl>hd_puts [llength $keyword_list]</tcl> element
list is not a keyword to the SQL parser in SQLite:
</p>

<tcl>
set lx {}
foreach word $keyword_list {
  lappend lx [list {} $word 0]
}
output_list {} 200 $lx
</tcl>
<blockquote>
<table width="100%"><tr>
<td align="left" valign="top" width="20%">
<tcl>















Changes to pages/mostdeployed.in.

1
2
3
4
5
6
7
8
9
<title>Most Widely Deployed SQL Database Engine</title>
<tcl>hd_keywords {most widely deployed}</tcl>

<h2>Most Widely Deployed and Used Database Engine</h2>

<p>SQLite is likely used more than all other database engines
combined.  Billions and billions of copies
of SQLite exist in the wild.  SQLite is found in:


|







1
2
3
4
5
6
7
8
9
<title>Most Widely Deployed SQL Database Engine</title>
<tcl>hd_keywords {most widely deployed} {most used} {most widely used}</tcl>

<h2>Most Widely Deployed and Used Database Engine</h2>

<p>SQLite is likely used more than all other database engines
combined.  Billions and billions of copies
of SQLite exist in the wild.  SQLite is found in:

Changes to pages/pragma.in.

1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560

1561
1562

1563
1564

1565
1566

1567
1568
1569
1570
1571

1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
    <p>When this pragma is on, the SQLITE_MASTER tables in which database
    can be changed using ordinary [UPDATE], [INSERT], and [DELETE]
    statements.)^  ^Warning:  misuse of this pragma can easily result in
    a corrupt database file.</p>
}

Section {List Of PRAGMAs} {toc} {{pragma list}}
</tcl>
<table border=0 width="100%" cellpadding=10>
<tr><td valign="top" align="left"><ul>
<tcl>
set allprag [lsort [array names PragmaRef]]
set nprag [llength $allprag]
set nrow [expr {($nprag+2)/3}]
for {set i 0} {$i<$nprag} {incr i} {
  set prag [lindex $allprag $i]
  set ref $PragmaRef($prag)
  if {[info exists PragmaLegacy($prag)]} {
    hd_puts "<li><a href=\"#pragma_$ref\"><s>$prag</s></a>&sup1;\n"

  } elseif {[info exists PragmaDebug($prag)]} {
    hd_puts "<li><a href=\"#pragma_$ref\"><i>$prag</i></a>&sup2;\n"

  } elseif {[info exists PragmaTest($prag)]} {
    hd_puts "<li><a href=\"#pragma_$ref\"><i>$prag</i></a>&sup3;\n"

  } else {
    hd_puts "<li><a href=\"#pragma_$ref\">$prag</a>\n"

  }
  if {$i%$nrow==($nrow-1) && $i+1<$nprag} {
    hd_puts "</ul></td><td valign=\"top\" align=\"left\"><ul>\n"
  }
}

</tcl>
</ul></td></tr></table>
<p>Notes:
<ol>
<li>Pragmas whose names are marked through in the list above
are deprecated.  They are not maintained.  They continue to exist
for historical compatibility only.
Do not use the deprecated pragmas in new applications.
Remove deprecated pragmas
from existing applications at your earliest opportunity.</blockquote>
<li>These pragmas are used for debugging SQLite and
are only available when SQLite is compiled using [SQLITE_DEBUG].
<li>These pragmas are used for testing SQLite and are not recommended
for use in application programs.</ol></p>
<tcl>
foreach prag [lsort [array names PragmaBody]] {
  hd_fragment pragma_$prag







|
<
<
<
|
<
<
<
<


<
>

<
>

<
>

<
>

<
<
|
<
>

<


|
|
|
<
<
<







1542
1543
1544
1545
1546
1547
1548
1549



1550




1551
1552

1553
1554

1555
1556

1557
1558

1559
1560


1561

1562
1563

1564
1565
1566
1567
1568



1569
1570
1571
1572
1573
1574
1575
    <p>When this pragma is on, the SQLITE_MASTER tables in which database
    can be changed using ordinary [UPDATE], [INSERT], and [DELETE]
    statements.)^  ^Warning:  misuse of this pragma can easily result in
    a corrupt database file.</p>
}

Section {List Of PRAGMAs} {toc} {{pragma list}}
set lx {}



foreach prag [array names PragmaRef] {




  set ref $PragmaRef($prag)
  if {[info exists PragmaLegacy($prag)]} {

    lappend lx [list "PRAGMA $ref" $prag 3]
  } elseif {[info exists PragmaDebug($prag)]} {

    lappend lx [list "PRAGMA $ref" $prag 4]
  } elseif {[info exists PragmaTest($prag)]} {

    lappend lx [list "PRAGMA $ref" $prag 5]
  } else {

    lappend lx [list "PRAGMA $ref" $prag 0]
  }


}

output_list {} 250 [lsort -index 1 $lx]
</tcl>

<p>Notes:
<ol>
<li>Pragmas whose names are <s>struck through</s>
are deprecated. Do not use them. They exist
for historical compatibility.



<li>These pragmas are used for debugging SQLite and
are only available when SQLite is compiled using [SQLITE_DEBUG].
<li>These pragmas are used for testing SQLite and are not recommended
for use in application programs.</ol></p>
<tcl>
foreach prag [lsort [array names PragmaBody]] {
  hd_fragment pragma_$prag

Added pages/prosupport.in.







































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<title>SQLite Pro Support</title>
<tcl>hd_keywords {professional support}</tcl>

<h1 align="center">
Professional Support &amp; Extension Products
</h1>

<tcl>
set entrylist {}
proc support_entry {itemno title desc cost link1 link2} {
  global entrylist
  lappend entrylist $itemno $title $desc $cost $link1 $link2
}
proc generate_support_html {} {
  global entrylist

  hd_putsnl "<div class='desktoponly'>"
  hd_putsnl "<table border=0 cellspacing=20 width='100%'>"
  foreach {itemno title desc cost link1 link2} $entrylist {
    hd_puts "<tr><td valign=top><b>$itemno.</b></td>"
    hd_putsnl "<td valign=top><b>$title.</b> $desc</td>"
    hd_putsnl "<td valign=top width=165>$cost</td>"
    foreach {tag url} $link1 break
    hd_puts   "<td valign=top align=left width=145>"
    hd_putsnl "<a class='button' href='$url'>$tag</a><br>"
    foreach {tag url} $link2 break
    hd_putsnl "<a class='button' href='$url'>$tag</a></td>"
    hd_putsnl "</tr>"
  }
  hd_putsnl "</table></div>"

  hd_putsnl "<div class='mobileonly'>"
  hd_putsnl "<ol>"
  foreach {itemno title desc cost link1 link2} $entrylist {
    hd_putsnl "<li value=$itemno><p>"
    hd_putsnl "<b>$title.</b> $desc"
    hd_putsnl "<p>Cost: $cost"
    foreach {tag url} $link1 break
    hd_putsnl "<p><a class='button' href='$url'>$tag</a>"
    foreach {tag url} $link2 break
    hd_putsnl "<a class='button' href='$url'>$tag</a>"
    hd_putsnl "</li>"
  }
  hd_putsnl "</ol></div>"

  set entrylist {}
}
</tcl>

<h2>Support
<font size=2>(<a href="#detail">details below</a>)</font></h2>

<tcl>
support_entry 1 {Public Mailing List} {
  Help and advice via email from a world-wide
  community of experts.
} Free \
 {Archives http://www.mail-archive.com/sqlite-users%40mailinglists.sqlite.org/}\
 {Sign-up http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users}

support_entry 2 {Annual Maintenance Subscription} {
  Private, expert email advice from the developers of SQLite.
} {$1500/year} \
  {{More Info} http://www.hwaci.com/sw/sqlite/ams.html} \
  {{Buy Now!} http://www.hwaci.com/cgi-bin/sams-step1}

support_entry 3 {Technical Support} {
  High-priority email and phone support directly from the SQLite developers.
  Guaranteed response time available as an option.
} {$8K-$35K/year} \
  {{More Info} http://www.hwaci.com/sw/sqlite/tech.html} \
  {{Request A Quote} http://www.hwaci.com/sw/sqlite/contact.html}

support_entry 4 {SQLite Consortium Membership} {
  Premium enterprise support including on-site visits and
  access to all proprietary extensions and test suites.
} {$75K/year} \
  {{More Info} http://www.hwaci.com/sw/sqlite/member.html} \
  {{Request A Quote} http://www.hwaci.com/sw/sqlite/contact.html}

generate_support_html
</tcl>

<h2>Licenses
<font size=2>(<a href="#ext">details below</a>)</font></h2>

<tcl>
support_entry 5 {SQLite License} {
  Warranty of title and perpetual right-to-use for the SQLite source code. 
} {$6000 one time fee} \
  {{More Info} https://www.sqlite.org/copyright.html} \
  {{Buy Now!} http://www.hwaci.com/cgi-bin/license-step1}

support_entry 6 {SQLite Encryption Extension (SEE)} {
   A drop-in replacement for public-domain SQLite source code that has 
   the added ability to read/write AES-encrypted databases. 
} {$2000 one time fee} \
  {{More Info} http://www.hwaci.com/sw/sqlite/see.html} \
  {{Buy Now!} http://www.hwaci.com/cgi-bin/see-step1}

support_entry 7 {Compressed And Encrypted Read-Only Database (CEROD)} {
   A drop-in replacement for public-domain SQLite source code
   that has the added ability to read database that has been both 
   compressed and encrypted. 
} {$2000 one time fee} \
  {{More Info} http://www.hwaci.com/sw/sqlite/cerod.html} \
  {{Buy Now!} http://www.hwaci.com/cgi-bin/scerod-step1}

support_entry 8 {The ZIPVFS Read/Write Compressed Database Extension} {
   The ZIPVFS extension automatically compresses and encrypts
   your data as it is written to disk, and decompressed and decrypts
   it while reading.
} {$4000 one time fee} \
  {{More Info} http://www.hwaci.com/sw/sqlite/zipvfs.html} \
  {{Buy Now!} http://www.hwaci.com/cgi-bin/zipvfs-step1}

generate_support_html
</tcl>

<h2>Special Services
<font size=2>(<a href="#th3">details below</a>)</font></h2>

<tcl>
support_entry 9 {TH3 Testing Support} {
  The <a href="https://sqlite.org/th3.html">TH3 test harness</a>
  is an aviation-grade test suite for SQLite. SQLite developers 
  can run TH3 on specialized hardware and/or using specialized
  compile-time options, according to customer specification, 
  either remotely or on customer premises. Pricing for this 
  services is on a case-by-case basis depending on requirements.
} {call} \
  {{More Info} https://www.sqlite.org/th3.html} \
  {{Request A Quote} http://www.hwaci.com/sw/sqlite/contact.html}

generate_support_html
</tcl>

<a name="detail"></a>
<h2>Further Information</h2>

<p>SQLite is free and works great.
Most people use SQLite without
any kind of license or support.</p>

<p>Free support for SQLite is available on the public
SQLite mailing list: 
<a href="mailto:sqlite-users@mailinglists.sqlite.org">sqlite-users@mailinglists.sqlite.org</a>.
The mailing list is monitored by a large
community of experts, including the core SQLite development team,
who are able to resolve just about
any problems with SQLite that you are likely to have.</p>

<p>You can browse the 
<a href="http://www.mail-archive.com/sqlite-users%40mailinglists.sqlite.org/">
mailing list archives</a> or
<a href="http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users">
sign-up</a> as a mailing list member.
To send a question to the mailing list, it is recommended that you
<a href="http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users">
sign-up</a>, but you can simply send an email message to
<a href="mailto:sqlite-users@mailinglists.sqlite.org">sqlite-users@mailinglists.sqlite.org</a> and
your question will probably appear on the mailing list in about 24 hours.
(Questions from non-members are moderated, which is the reason for the
24-hour delay.)

<p>If you do not want to discuss your issues on a public and open forum, an
<a href="http://www.hwaci.com/sw/sqlite/ams.html">Annual Maintenance 
Subscription</a> or "AMS" might
serve your needs better.
An AMS entitles you to private email support directly from the developers of
SQLite.  The level of support with an AMS is similar to the support one
gets from the public mail list except that an AMS includes a unilateral 
promise of non-disclosure, so with an AMS you can discuss your issues
with the SQLite developers in private, without the whole world watching.
An AMS costs $1500 per year.</p>

<p>Users with more advanced support needs can opt for a
<a href="http://www.hwaci.com/sw/sqlite/tech.html">Technical Support
Agreement</a>.
Technical support agreements are customized to the needs of each
individual client, but generally include direct telephone support
and priority handling of issues and bugs.  Guaranteed response time
is available as an option.  The cost of
technical support varies but is generally
in the range of $8000 to $35000 per year.</p>

<p>If SQLite is "mission critical" to your company, then you may
want to becoming an 
<a href="http://www.hwaci.com/sw/sqlite/member.html">SQLite Consortium 
Member</a>.  The SQLite
Consortium is a collaboration of companies who sponsor ongoing development
of SQLite in exchange for enterprise-level technical support, on-site
visits from the SQLite developers, unlimited access to all licensed
products, and strong guarantees that SQLite will remain in the public
domain, free and independent, and will not come under the control of
a competitor.  The cost of consortium membership is $75000 per year.</p>

<a name="ext"></a>
<h2>Software Licenses</h2>

<p>The SQLite source code is in the 
<a href="https://www.sqlite.org/copyright.html">public domain</a>,
and is free for use
by anyone and for any purpose.  No license is required.  However, some
users desire a license so that they can have warranty of title, or just
because their company lawyers say they need one.  A
<a href="http://www.hwaci.com/cgi-bin/license-step1">perpetual license</a> 
and warranty
of title for the core SQLite source code is available for this purpose.</p>

<p>The 
<a href="http://www.hwaci.com/cgi-bin/see-step1">SQLite Encryption
Extension (SEE)</a>,
the <a href="http://www.hwaci.com/cgi-bin/zipvfs-step1">ZIPVFS Extension</a>,
and the <a href="http://www.hwaci.com/cgi-bin/scerod-step1">Compressed and
Encrypted ReadOnly Database (CEROD)</a> extension are enhanced versions 
of SQLite that handle encrypted
and/or compressed databases.  SEE can read and write encrypted databases.
SEE encrypts all database content, including metadata, so that the database
file appears as white noise.  ZIPVFS 
compresses the database on-the-fly using application-supplied 
compression and decompression functions.
CEROD reads a compressed database that is
also optionally encrypted.  All of SEE, ZIPVFS, and CEROD are 
supplied in source code form only; the licensee is responsible for 
compiling the products for their chosen platform.  It is not difficult 
to compile any of these extension.  All products come in the form of an
<a href="https://www.sqlite.org/amalgamation.html">amalgamated source file</a>
named "sqlite3.c".  So compiling SEE, ZIPVFS, or CEROD into an application 
is simply a matter of substituting the SEE-, ZIPVFS-, or CEROD-enabled sqlite3.c 
source file in place of the public-domain sqlite3.c source file and recompiling.
Licenses for SEE, ZIPVFS, and CEROD are perpetual.
All three extension can read and write ordinary,
uncompressed and unencrypted database files.</p>

<a name="th3"></a>
<h2>Testing Services</h2>

<p>The <a href="https://www.sqlite.org/th3.html">Test Harness #3 (TH3)</a> is 
a suite of test cases for SQLite that provide 100% branch test coverage
(and 100% modified condition/decision coverage) for the core SQLite in
an as-deployed configuration using only published and documented interfaces.
TH3 is designed for use with embedded devices, and is compatible with
DO-178B.  Every release of the public-domain SQLite is tested using TH3,
and so all users benefit from the TH3 tests.  But the TH3 tests are not
themselves public.  Hardware or system manufactures who want to have
TH3 test run on their systems can negotiation a service agreement to have
the SQLite Developers run those tests.</p>

<h2>About The SQLite Team</h2>

<p>Paid support options and products are provided by
Hipp, Wyrick &amp; Company, Inc., (Hwaci), a 
<a href="http://en.wikipedia.org/wiki/Georgia_(U.S._state)">Georgia</a>
corporation 
with headquarters in
<a href="http://en.wikipedia.org/wiki/Charlotte,_North_Carolina">
Charlotte, North Carolina</a> and has been in business since
1992.
Hwaci has an international team of
employees and associates representing the best available talent.  
We are a 100% engineering company.  There is
no sales staff.
Our goal is to provide outstanding service and honest advice
without spin or sales-talk.</p>

<p>Hwaci is a small company but it is
also closely held and debt-free and has low
fixed costs, which means that it is largely immune to buy-outs,
take-overs, and market down-turns.  Hwaci intends to 
continue operating in its current form, and at roughly its current 
size until at least the year 2050.
We expect to be here when you need us,
even if that need is many years in the future.</p>
</body></html>

Changes to pages/rescode.in.

734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
}

</tcl>
<h1>Primary Result Code List</h1>
<p>The $nPrimCode result codes are 
   [result code definitions|defined in sqlite3.h] and are listed in
   alphabetical order below: 
<table border=0 width="100%" cellpadding=10>
  <tr><td valign="top" align="left"><ul>
<tcl>
set nrow [expr {($nPrimCode+2)/3}]
set i 0
foreach name [lsort [array names prim_rc]] {
  if {$i==$nrow} {
    hd_puts "</ul></td><td valign=\"top\" align=\"left\"><ul>\n"
    set i 0
  }
  incr i
  hd_resolve "<li> \[$name\] ($prim_rc($name))\n"
}
hd_puts "</td></td></table>\n\n"

hd_fragment extrc {extended result code} {extended result codes} \
                  {extended error code} {extended error codes}
</tcl>
<h1>Extended Result Code List</h1>
<p>The $nExtCode extended result codes
  are [extended result code definitions|defined in sqlite3.h] and are
  listed in alphabetical order below:
  <table border=0 width="100%" cellpadding=10>
  <tr><td valign="top" align="left"><ul>
<tcl>
set nrow [expr {($nExtCode+1)/2}]
set i 0
foreach name [lsort [array names ext_rc]] {
  if {$i==$nrow} {
    hd_puts "</ul></td><td valign=\"top\" align=\"left\"><ul>\n"
    set i 0
  }
  incr i
  hd_resolve "<li> \[$name\] ($ext_rc($name))\n"
}
hd_puts "</td></td></table>\n\n"

</tcl>
<h1>Result Code Meanings</h1>
<p>
The meanings for all $nResCode result code values are shown below,
in numeric order.








<
<

<
|

<
<
<
<
<
|

|








<
<

|
|

<
<
<
<
<
|

|







734
735
736
737
738
739
740


741

742
743





744
745
746
747
748
749
750
751
752
753
754


755
756
757
758





759
760
761
762
763
764
765
766
767
768
}

</tcl>
<h1>Primary Result Code List</h1>
<p>The $nPrimCode result codes are 
   [result code definitions|defined in sqlite3.h] and are listed in
   alphabetical order below: 


<tcl>

set lx {}
foreach name [lsort [array names prim_rc]] {





  lappend lx [list $name "$name&nbsp;($prim_rc($name))" 0]
}
output_list {} 320 $lx

hd_fragment extrc {extended result code} {extended result codes} \
                  {extended error code} {extended error codes}
</tcl>
<h1>Extended Result Code List</h1>
<p>The $nExtCode extended result codes
  are [extended result code definitions|defined in sqlite3.h] and are
  listed in alphabetical order below:


<tcl>

set lx {}
foreach name [lsort [array names ext_rc]] {





  lappend lx [list $name "$name&nbsp;($ext_rc($name))" 0]
}
output_list {} 450 $lx

</tcl>
<h1>Result Code Meanings</h1>
<p>
The meanings for all $nResCode result code values are shown below,
in numeric order.

Changes to pages/serverless.in.

1

2
3
4
5
6
7
8
<title>SQLite Is Serverless</title>


<h2>SQLite Is Serverless</h2>

<p>
Most SQL database engines are implemented as a separate server process.
Programs that want to access the database communicate with the server
using some kind of interprocess communication (typically TCP/IP) to send 

>







1
2
3
4
5
6
7
8
9
<title>SQLite Is Serverless</title>
<tcl>hd_keywords {serverless} {embedded}</tcl>

<h2>SQLite Is Serverless</h2>

<p>
Most SQL database engines are implemented as a separate server process.
Programs that want to access the database communicate with the server
using some kind of interprocess communication (typically TCP/IP) to send 

Changes to pages/session.in.

188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
proc convert_keyword_to_filename {oldname} {
  set oldname [string tolower $oldname]
  regsub {^sqlite_} $oldname {c_} oldname
  regsub {^sqlite3_} $oldname {} name
  return $name.html
}

# Output HTML that displays the list $lx in $N columns
#
proc output_list {N lx} {
  hd_putsnl {<table width="100%" cellpadding="5"><tr>}
  set len [llength $lx]
  set n [expr {($len + $N - 1)/$N}]
  for {set i 0} {$i<$N} {incr i} {
    set start [expr {$i*$n}]
    set end [expr {($i+1)*$n}]
    hd_puts {<td valign="top"><ul>}
    for {set j $start} {$j<$end} {incr j} {
      set entry [lindex $lx $j]
      if {$entry!=""} {
        foreach {link label s} $entry break
        if {$s==1} {
          hd_resolve "<li>\[$link|$label\]&nbsp;&nbsp;"
          hd_resolve "\[experimental | <small><i>(exp)</i></small>\]</li>"
        } elseif {$s==2} {
          hd_resolve "<li>\[$link|$label\]&nbsp;&nbsp;"
          hd_resolve "\[deprecated | <small><i>(obs)</i></small>\]</li>"
        } else {
          hd_resolve "<li>\[$link|$label\]</li>"
        }
        hd_puts \n
      }
    }
    hd_putsnl {</ul></td>}
  }
  hd_putsnl {</tr></table>}
}

hd_open_aux session/intro.html
hd_header Introduction
hd_enable_main 0
hd_keywords *session-capi {Session Extension C-language Interface}
</tcl>








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







188
189
190
191
192
193
194






























195
196
197
198
199
200
201
proc convert_keyword_to_filename {oldname} {
  set oldname [string tolower $oldname]
  regsub {^sqlite_} $oldname {c_} oldname
  regsub {^sqlite3_} $oldname {} name
  return $name.html
}
































hd_open_aux session/intro.html
hd_header Introduction
hd_enable_main 0
hd_keywords *session-capi {Session Extension C-language Interface}
</tcl>

315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
hd_header {List Of SQLite Objects}
hd_enable_main 0
hd_putsnl {<a href="intro.html"><h2>Session Module C Interface</h2></a>}
hd_enable_main 1
</tcl>
<h2>Objects:</h2>
<tcl>
output_list 3 [lsort $objlist]
hd_enable_main 0
hd_putsnl {<p>Other lists:
<a href="constlist.html">Constants</a> and
<a href="funclist.html">Functions</a>.}
hd_close_aux
hd_enable_main 1
hd_putsnl {<hr>}







|







285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
hd_header {List Of SQLite Objects}
hd_enable_main 0
hd_putsnl {<a href="intro.html"><h2>Session Module C Interface</h2></a>}
hd_enable_main 1
</tcl>
<h2>Objects:</h2>
<tcl>
output_list {} 300 [lsort $objlist]
hd_enable_main 0
hd_putsnl {<p>Other lists:
<a href="constlist.html">Constants</a> and
<a href="funclist.html">Functions</a>.}
hd_close_aux
hd_enable_main 1
hd_putsnl {<hr>}
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
hd_enable_main 0
hd_putsnl {<a href="intro.html"><h2>Session Module C Interface</h2></a>}
hd_enable_main 1
</tcl>
<h2>Constants:</h2>
<tcl>
set clist [lsort -index 1 $clist]
output_list 2 $clist
hd_enable_main 0
hd_putsnl {<p>Other lists:
<a href="objlist.html">Objects</a> and
<a href="funclist.html">Functions</a>.</p>}
hd_enable_main 1
hd_close_aux
hd_putsnl {<hr>}







|







318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
hd_enable_main 0
hd_putsnl {<a href="intro.html"><h2>Session Module C Interface</h2></a>}
hd_enable_main 1
</tcl>
<h2>Constants:</h2>
<tcl>
set clist [lsort -index 1 $clist]
output_list {} 400 $clist
hd_enable_main 0
hd_putsnl {<p>Other lists:
<a href="objlist.html">Objects</a> and
<a href="funclist.html">Functions</a>.</p>}
hd_enable_main 1
hd_close_aux
hd_putsnl {<hr>}
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
hd_enable_main 0
hd_putsnl {<a href="intro.html"><h2>Session Module C Interface</h2></a>}
hd_enable_main 1
</tcl>
<h2>Functions:</h2>
<tcl>
set funclist [lsort -index 1 $funclist]
output_list 3 $funclist
hd_enable_main 0
hd_putsnl {<p>Other lists:
<a href="constlist.html">Constants</a> and
<a href="objlist.html">Objects</a>.</p>}
hd_enable_main 1
hd_close_aux
hd_putsnl {<hr>}







|







353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
hd_enable_main 0
hd_putsnl {<a href="intro.html"><h2>Session Module C Interface</h2></a>}
hd_enable_main 1
</tcl>
<h2>Functions:</h2>
<tcl>
set funclist [lsort -index 1 $funclist]
output_list {} 300 $funclist
hd_enable_main 0
hd_putsnl {<p>Other lists:
<a href="constlist.html">Constants</a> and
<a href="objlist.html">Objects</a>.</p>}
hd_enable_main 1
hd_close_aux
hd_putsnl {<hr>}

Changes to pages/sitemap.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<title>SQLite Site Map</title>

<h2>Popular Pages:</h2>

<table border=0 width="100%">
<tr><td valign=top><ul>
<li> <a href="index.html">Home</a> </li>
<li> <a href="features.html">Features</a> </li>
<li> <a href="faq.html">Frequently Asked Questions</a> </li>
<li> <a href="famous.html">Well-known Users</a> </li>
<li> <a href="quickstart.html">Getting Started</a> </li>
<li> <a href="whentouse.html">When To Use SQLite</a> </li>
<li> <a href="different.html">Distinctive Features</a> </li>
<li> <a href="doclist.html">Alphabetical list of docs</a> </li>
<li> <a href="books.html">Books About SQLite</a> </li>
<li> <a href="keyword_index.html">Website Keyword Index</a> </li>
</ul><td valign=top><ul>
<li> <a href="copyright.html">Copyright</a>
<li> <a href="lang.html">SQL Syntax</a>
<ul>
<li> <a href="pragma.html#toc">Pragmas</a>
<li> <a href="lang_corefunc.html">SQL functions</a>
<li> <a href="lang_datefunc.html">Date &amp; time functions</a>
<li> <a href="lang_aggfunc.html">Aggregate functions</a>
</ul>
<li> <a href="c3ref/intro.html">C/C++ Interface Spec</a>
<ul>
<li> <a href="cintro.html">Introduction</a>
<li> <a href="c3ref/funclist.html">List of C-language APIs</a>
</ul>
</li>
<li> <a href="tclsqlite.html">The TCL Interface Spec</a>
</ul><td valign=top><ul>
<li> <a href="support.html#mailinglists">Mailing Lists</a> </li>
<li> <a href="news.html">News</a> </li>
<li> <a href="http://www.sqlite.org/src/wiki?name=Bug+Reports">Report a Bug</a> </li>
<li> <a href="download.html#cvs">Version control</a>
  <ul>
  <li> <a href="http://www.sqlite.org/src">Source code timeline</a> </li>
  <li> <a href="http://www.sqlite.org/docsrc">Documentation timeline</a> </li>
  </ul>
</ul>
</table>

<tcl>hd_fragment pindex {permuted index}</tcl>
<h2>Permuted Index:  
<small><a href="http://en.wikipedia.org/wiki/Key_Word_in_Context">(what is
this?)</a></small></h2>

<table align=right border=1 cellpadding=10>
<tr><td>Other Documentation Indices:
<ul>
<li>[categorical listing of SQLite documents | Categorical Document List]
<li>[books about SQLite | Books About SQLite]
<li>[doclist | Alphabetical List Of Documents]
<li>[keyword index | Website Keyword Index]
</ul>
</table>

<ul>
<tcl>
db eval {
  DROP TABLE IF EXISTS px;
  CREATE TEMP TABLE px(title COLLATE nocase,link);
}
db eval {SELECT pagetitle, filename FROM page WHERE pagetitle!='No Title'} {
  set nword [llength $pagetitle]


<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<
<

|
|






|

|







1
2

3








































4
5


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<title>SQLite Site Map</title>











































<tcl>hd_keywords {permuted index}</tcl>
<h2>Permuted Index</h2>



<var class="rightsidebar border2px desktoponly">
Other Documentation Indices:
<ul>
<li>[categorical listing of SQLite documents | Categorical Document List]
<li>[books about SQLite | Books About SQLite]
<li>[doclist | Alphabetical List Of Documents]
<li>[keyword index | Website Keyword Index]
</ul>
</var>

<ul class='lessindent'>
<tcl>
db eval {
  DROP TABLE IF EXISTS px;
  CREATE TEMP TABLE px(title COLLATE nocase,link);
}
db eval {SELECT pagetitle, filename FROM page WHERE pagetitle!='No Title'} {
  set nword [llength $pagetitle]
76
77
78
79
80
81
82
83
84
85
86
    set perm "$lastpart &#151; $firstpart"
    db eval {INSERT INTO px VALUES($perm,$filename)}
  }
}
db eval {
  SELECT title, link FROM px ORDER BY title
} {
  hd_puts "<li><a href=\"$link\">$title</a></li>"
} 
</tcl>
</ul>







|



33
34
35
36
37
38
39
40
41
42
43
    set perm "$lastpart &#151; $firstpart"
    db eval {INSERT INTO px VALUES($perm,$filename)}
  }
}
db eval {
  SELECT title, link FROM px ORDER BY title
} {
  hd_putsnl "<li><a href=\"$link\">$title</a></li>"
} 
</tcl>
</ul>

Changes to pages/support.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<title>SQLite Support Options</title>

<tcl>hd_fragment mailinglists {mailing lists}</tcl>
<h2>Free Public Mailing Lists</h2>

<blockquote>
<table border=0 cellspacing=10>
<tr><td valign="top">
<li><a href="http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users">
sqlite-users</a>
</td>
<td valign="top">General discussion for programmers using SQLite in their applications.  
<i>This is probably the mailing list you want!</i></td>
<td valign="top" align="center">
<form method="GET" action="http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users">
<input type="submit" value="Sign-up"></form></td>
<td valign="top" align="center">
<form method="GET" action="http://www.mail-archive.com/sqlite-users%40mailinglists.sqlite.org/">
<input type="submit" value="Archives"></form></td>
</form></td></tr>

<tr><td valign="top">
<li><a href="http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-dev">
sqlite-dev</a>
</td>
<td valign="top">Conversations about SQLite internals, for those who work
directly on enhancing SQLite itself.</td>
<td valign="top" align="center">
<form method="GET" action="http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-dev">
<input type="submit" value="Sign-up">
</form></td></tr>

<tr><td valign="top">
<li><a href="http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-announce">
<nobr>sqlite-announce</nobr></a>
</td>
<td valign="top">Announcements of new SQLite releases.</td>
<td valign="top" align="center">
<form method="GET" action="http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-announce">
<input type="submit" value="Sign-up">
</form></td></tr>
</table></blockquote>


<tcl>hd_fragment prosupport {professional support}</tcl>
<h2>Paid Professional Support</h2>

<p>
If you would like professional support for SQLite
or if you want custom modifications performed by the
original author of SQLite, these services are available for a modest fee.
For additional information visit
[http://www.hwaci.com/sw/sqlite/prosupport.html] or contact:</p>

<table border="0" cellpadding="15">
<tr><td valign="top">
D. Richard Hipp <br />
Hwaci - Applied Software Research <br />
704.948.4565 <br />
<a href="mailto:drh@hwaci.com">drh@hwaci.com</a>
</td><td valign="top">
<form method="GET" action="http://www.hwaci.com/sw/sqlite/prosupport.html">
<input type="submit" value="More Info"></form>
</td>
<!--<td valign="top">
<form method="GET" action="http://www.hwaci.com/cgi-bin/sams-step1">
<input type="submit" value="Buy Now!"></form>
</td>--></tr>
</table>

<h2>Proprietary SQLite Extensions</h2>

<p>The core SQLite library found on this website is in the
<a href="copyright.html">public domain</a>.  But there also exist
proprietary, licensed extensions to SQLite.</p>





|
<
|
|

<
|
|
<
|
<
<
|
<
|

|
|

<
|
|
<
|
<
|

|
|

<
|
<
|
<
|
<
|

|



|


|
<








|
<

<
<
<
<







1
2
3
4
5
6

7
8
9

10
11

12


13

14
15
16
17
18

19
20

21

22
23
24
25
26

27

28

29

30
31
32
33
34
35
36
37
38
39

40
41
42
43
44
45
46
47
48

49




50
51
52
53
54
55
56
<title>SQLite Support Options</title>

<tcl>hd_fragment mailinglists {mailing lists}</tcl>
<h2>Free Public Mailing Lists</h2>

<ul>

<li><p>
<a href="http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users">
sqlite-users</a>

&mdash; General discussion for programmers using SQLite in their applications.  
<i>This is probably the mailing list you want!</i>

<a class="button" href='http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users'>Sign-up</a>


<a class="button" href="http://www.mail-archive.com/sqlite-users%40mailinglists.sqlite.org/">Archives</a>

</li>

<li><p>
<a href="http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-dev">
sqlite-dev</a>

&mdash; Conversations about SQLite internals, for those who work
directly on enhancing SQLite itself.

<a class="button" href="http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-dev">Sign-up</a>

</li>

<li><p>
<a href="http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-announce">
<nobr>sqlite-announce</nobr></a>

&mdash; Announcements of new SQLite releases.</td>

<a class="button" href="http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-announce">Sign-up</a>

</li>

</ul>

<tcl>hd_fragment prosupport</tcl>
<h2>Paid Professional Support</h2>

<p>
If you would like [professional support] for SQLite
or if you want custom modifications performed by the
original author of SQLite, these services are available for a modest fee.
For additional information visit contact:</p>


<table border="0" cellpadding="15">
<tr><td valign="top">
D. Richard Hipp <br />
Hwaci - Applied Software Research <br />
704.948.4565 <br />
<a href="mailto:drh@hwaci.com">drh@hwaci.com</a>
</td><td valign="top">
<a class="button" href="prosupport.html">More Info</a>

</td>




</table>

<h2>Proprietary SQLite Extensions</h2>

<p>The core SQLite library found on this website is in the
<a href="copyright.html">public domain</a>.  But there also exist
proprietary, licensed extensions to SQLite.</p>

Changes to pages/syntax.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

28
29
30
31
32
33
34
35
36
37
38
39
<title>List of SQLite Syntax Diagrams</title>

<h1 align="center">List of SQLite Syntax Diagrams</h1>

<table border=0 cellspacing=25 width="100%"><tr>
<tcl>
  set n [llength $syntax_order]
  set lx [lsort $syntax_order]
  set ncol 3
  set percol [expr {($n+$ncol-1)/$ncol}]
  for {set ii 0} {$ii<$ncol} {incr ii} {
    hd_putsnl {<td valign='top' width='33%'>}
    hd_putsnl {<ul>}
    set max [expr {($ii+1)*$percol}]
    if {$max>$n} {set max $n}
    for {set jj [expr {$ii*$percol}]} {$jj<$max} {incr jj} {
      set name [lindex $lx $jj]
      hd_putsnl "<li><a href='syntax/$name.html'>$name</a></li>"
    }
    hd_putsnl {</ul></td>}
  }
</tcl>
</tr></table>
<tcl>
foreach name $syntax_order {
  file mkdir $::DEST/syntax
  hd_open_aux syntax/$name.html

  hd_enable_main 0
  hd_header "SQLite Syntax: $name"
  hd_keywords $name "$name syntax diagram"
  hd_putsnl "<h1 align='center'>$name</h1>"
  hd_putsnl "<blockquote>"
  hd_puts "<img alt=\"syntax diagram $name\" "
  hd_puts "src=\"../images/syntax/$name.gif\">"
  hd_putsnl "</img><br>"
  foreach {cx px} $syntax_linkage($name) break
  if {[llength $px]>0} {
    hd_puts "\nUsed by:"
    foreach c $px {




<

|
|
<
<
<
<
<
<
<
<
<
|
|
|
|
<
<
<



>


<

|







1
2
3
4

5
6
7









8
9
10
11



12
13
14
15
16
17

18
19
20
21
22
23
24
25
26
<title>List of SQLite Syntax Diagrams</title>

<h1 align="center">List of SQLite Syntax Diagrams</h1>


<tcl>
set lx {}
foreach name [lsort $syntax_order] {









  lappend lx [list syntax/$name.html $name 0]
}
output_list {} 300 $lx




foreach name $syntax_order {
  file mkdir $::DEST/syntax
  hd_open_aux syntax/$name.html
  hd_keywords $name "$name syntax diagram"
  hd_enable_main 0
  hd_header "SQLite Syntax: $name"

  hd_putsnl "<h1 align='center'>$name</h1>"
  hd_putsnl "<div class='imgcontainer'>"
  hd_puts "<img alt=\"syntax diagram $name\" "
  hd_puts "src=\"../images/syntax/$name.gif\">"
  hd_putsnl "</img><br>"
  foreach {cx px} $syntax_linkage($name) break
  if {[llength $px]>0} {
    hd_puts "\nUsed by:"
    foreach c $px {
56
57
58
59
60
61
62
63
64
65
66
    if {[llength $bklist]>0} {
      hd_puts "<br></br>\nSee also:"
      foreach c $bklist {
        hd_puts "&nbsp;&nbsp; <a href='../$c'>$c</a>"
      }
    }
  }
  hd_puts "\n</blockquote>\n\n"
  hd_close_aux
}
</tcl>







|



43
44
45
46
47
48
49
50
51
52
53
    if {[llength $bklist]>0} {
      hd_puts "<br></br>\nSee also:"
      foreach c $bklist {
        hd_puts "&nbsp;&nbsp; <a href='../$c'>$c</a>"
      }
    }
  }
  hd_puts "\n</div>\n\n"
  hd_close_aux
}
</tcl>

Changes to pages/syntaxdiagrams.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<title>Syntax Diagrams For SQLite</title>
<tcl>hd_keywords {syntax diagrams}</tcl>

<h1 align=center>Syntax Diagrams For SQLite</h1>

<tcl>

foreach name $syntax_order {
  # hd_fragment $name *$name "$name syntax diagram"
  hd_puts "<a name=\"$name\"></a>"
  hd_puts "<h4>$name:</h4>"
  hd_puts "<blockquote>\n"
  hd_puts "<img src=\"images/syntax/$name.gif\"></img><br></br>"
  foreach {cx px} $syntax_linkage($name) break
  if {[llength $px]>0} {
    hd_puts "\nUsed by:"
    foreach c $px {
      hd_puts "&nbsp;&nbsp; <a href=\"#$c\">$c</a>"
    }











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<title>Syntax Diagrams For SQLite</title>
<tcl>hd_keywords {syntax diagrams}</tcl>

<h1 align=center>Syntax Diagrams For SQLite</h1>

<tcl>

foreach name $syntax_order {
  # hd_fragment $name *$name "$name syntax diagram"
  hd_puts "<a name=\"$name\"></a>"
  hd_puts "<h4>$name:</h4>"
  hd_puts "<div class='imgcontainer'>\n"
  hd_puts "<img src=\"images/syntax/$name.gif\"></img><br></br>"
  foreach {cx px} $syntax_linkage($name) break
  if {[llength $px]>0} {
    hd_puts "\nUsed by:"
    foreach c $px {
      hd_puts "&nbsp;&nbsp; <a href=\"#$c\">$c</a>"
    }
33
34
35
36
37
38
39
40
41
42
    if {[llength $bklist]>0} {
      hd_puts "<br></br>\nSee also:"
      foreach c $bklist {
        hd_puts "&nbsp;&nbsp; <a href=\"$c\">$c</a>"
      }
    }
  }
  hd_puts "\n</blockquote>\n\n"
}
unset -nocomplain c cx px







|


33
34
35
36
37
38
39
40
41
42
    if {[llength $bklist]>0} {
      hd_puts "<br></br>\nSee also:"
      foreach c $bklist {
        hd_puts "&nbsp;&nbsp; <a href=\"$c\">$c</a>"
      }
    }
  }
  hd_puts "\n</div>\n\n"
}
unset -nocomplain c cx px

Changes to pages/version3.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<title>SQLite Version 3 Overview</title>

<p>
<center><table border="1" cellpadding="10" width="75%">
<tr><td bgcolor="#ffffbb">
<b>Editorial Note:</b>
This document was written in 2004 as a guide to programmers who were
transitioning from SQLite2 to SQLite3.
It is retained as part of the historical record of SQLite.
Modern programmers should refer to
more up-to-date documentation on SQLite is available elsewhere
on this website.
</table></center>

<h2>SQLite Version 3 Overview</h2>

<p>
SQLite version 3.0 introduces important changes to the library, including:










|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<title>SQLite Version 3 Overview</title>

<p>
<center><table border="1" cellpadding="10" width="75%">
<tr><td bgcolor="#ffffbb">
<b>Editorial Note:</b>
This document was written in 2004 as a guide to programmers who were
transitioning from SQLite2 to SQLite3.
It is retained as part of the historical record of SQLite.
Modern programmers should refer to
more up-to-date documentation on SQLite available elsewhere
on this website.
</table></center>

<h2>SQLite Version 3 Overview</h2>

<p>
SQLite version 3.0 introduces important changes to the library, including:

Changes to pages/zeroconf.in.

1

2
3
4
5
6
7
8
<title>Zero-Configuration</title>


<h2>SQLite Is A Zero-Configuration Database</h2>

<p>
SQLite does not need to be "installed" before it is used. 
There is no "setup" procedure.  There is no
server process that needs to be started, stopped, or configured.

>







1
2
3
4
5
6
7
8
9
<title>Zero-Configuration</title>
<tcl>hd_keywords {zero-configuration}</tcl>

<h2>SQLite Is A Zero-Configuration Database</h2>

<p>
SQLite does not need to be "installed" before it is used. 
There is no "setup" procedure.  There is no
server process that needs to be started, stopped, or configured.

Added rawpages/sqlite.css.

















































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
/* Style sheet for the SQLite Website and Documentation */
* {box-sizing:border-box;}
@media screen and (max-width: 800px){
  body {margin: 2px;}
}
body {
  margin-top: 0;
  font-family: Verdana, sans-serif;
}

/* Horizonal rules */
.xhr {
  color: #044a64;
  height: 2px;
}

/* Hyperlinks that look like buttons */
.button {
  background-color: #ddd;
  border: 2px solid #aaa;
  text-decoration: none;
  border-radius: 4px;
  padding: 0 1ex 0 1ex;
  white-space: nowrap;
  font-size: 90%;
  line-height: 150%;
  color: black;
}
.button:visited {
  color: black;
}

/* Sidebars on the right-hand side of the screen */
.rightsidebar {
  padding-right: 1ex;
  margin: 1ex;
  float: right;
}

/* Border box */
.border2px {
  border: 2px solid #044a64;
}

.hdrfont {
  font-weight:bold;
  font-size:115%;
}
.nounderline a { text-decoration: none }

a { color: #044a64 }
a:visited { color: #734559 }

.logo { float: left; margin:1px; }
.tagline {
  float:right;
  text-align:right;
  font-style:italic;
  width:300px;
  margin:12px;
  margin-top:58px;
}

/* Style common to both the main and submenu */
.menu::before {
  content: "";
  clear: both;     /* Clear the Logo and TagLine */
  display: block;
}
.menu ul {
  margin: 0;
  list-style-type: none;
  padding: 0;
  overflow: hidden;
}
.menu ul li {
  color: white;
}
.menu ul li a {
  display: block;
  color: white;
  text-align: center;
  padding: 0.7ex 1.4ex;
  text-decoration: none;
}

/* Styling specific to the main menu */
.mainmenu ul {
  background-color: #044a64;
  border-radius: 8px;
}
.mainmenu ul li {
  float: left;
}
.mainmenu ul li.search {
  float: right;
}

/* Styling specific to the submenu */
.submenu {
  display: none;
}
.submenu ul {
  color: white;
}
.submenu ul li {
  float: none;
  border-radius: 8px;
  background-color: #0482c4;
  border-top: 2px solid white;
}

/* Styling for the search menu */
.searchmenu {
  width: 100%;
  text-align: right;
  display: none;
  float: none;
  padding: 1ex:
  background-color: #0482c4;
  border-radius: 8px;
}

/* Add the "mobileonly" class to any elements that should be visible
** on narrow-screen mobile devices only */
@media screen and (min-width: 600px){
  /* Settings for wide desktop screens */
  .mobileonly {display: none;}
}
/* Add the "desktoponly" class to any elements that should be visible
** on desktops with at least 600 pixels of horizontal space. */
@media screen and (max-width: 600px){
  /* Settings for narrow mobile screens */
  .desktoponly {display: none;}
}
/* Add the "wideonly" class to any elements that should be visible
** on wide-screen desktops with  */
@media screen and (max-width: 800px){
  /* Settings for screens that are less than 800px wide */
  .wideonly {display: none;}
}

.content    { margin: 5%; }
.content dt { font-weight:bold; }
.content dd { margin-bottom: 25px; margin-left:20%; }
.content ul { padding:0px; padding-left: 15px; margin:0px; }

/* Things for "fancyformat" documents start here. */
.fancy img+p {font-style:italic}
.fancy .codeblock {
  display: table;
  border: 1px solid #80a796;
  padding: 1ex;
  background-color: #eee;
}
.fancy .codeblock pre {
  display: table-cell;
  font-size: 1em;
}
.fancy .codeblock i { color: darkblue; }
.fancy h1,.fancy h2,.fancy h3,.fancy h4 {font-weight:normal;color:#044a64}
.fancy th {white-space:xnowrap;text-align:left;border-bottom:solid 1px #444}
.fancy th, .fancy td {padding: 0.2em 1ex; vertical-align:top}
.toct { color: #044a64 ! important; }
#toc_sub a        { color: #044a64; text-decoration: none }
#toc_sub { display: none; margin-top: 1em; }
.fancy .todo         { color: #AA3333 ; font-style : italic }
.fancy .todo:before  { content: 'TODO:' }
.fancy p.todo        { border: solid #AA3333 1px; padding: 1ex }
.fancy img { display:block; }
.fancy :link:hover, .fancy :visited:hover { background: wheat }
.fancy_title {
  font-size: 2em;
  text-align: center;
  color: #044a64;
}
.fancy_toc {
  margin-top: 1em;
}
.fancy_toc > a {
  margin: 1em;
  margin-left: 0;
  font-size: 1.5em;
  color: #044a64;
  text-decoration: none;
  cursor: pointer;
}
@media screen and (min-width: 600px){
  /* Indentation amounts for non-mobile screens, 600 pixels or wider */
  .fancy p,.fancy ul,.fancy ol,.fancy dl { margin: 1em 5ex }
  .fancy li p { margin: 1em 0 }
  .fancy blockquote { margin-left : 10ex }
  .toct {margin-left:4ex;}
  .fancy-toc1 {margin-left:6ex;}
  .fancy-toc2 {margin-left:12ex;}
  .fancy-toc3 {margin-left:18ex;}
  .fancy-toc4 {margin-left:24ex;}
  .fancy-toc5 {margin-left:30ex;}
  .fancy-toc6 {margin-left:36ex;}
  .fancy .codeblock {margin:0 10ex;}
}
@media screen and (max-width: 600px){
  /* Indentation amounts for narrow mobile screens */
  .toct {margin-left:0;}
  .fancy-toc1 {padding-left:4ex;text-indent:-2ex;}
  .fancy-toc2 {padding-left:8ex;text-indent:-4ex;}
  .fancy-toc3 {padding-left:12ex;text-indent:-6ex;}
  .fancy-toc4 {padding-left:16ex;text-indent:-8ex;}
  .fancy-toc5 {padding-left:20ex;text-indent:-10ex;}
  .fancy-toc6 {padding-left:24ex;text-indent:-12ex;}
  .lessindent {padding-left: 1em; margin-left: 0;}
  .fancy .codeblock {margin:0 1ex;}
}
/* End of "fancyformat" specific rules. */

/* <ul> elements used for multi-column lists */
.multicol_list {padding-left:1em;margin-left:0;}

.yyterm {
  background: #fff;
  border: 1px solid #000;
  border-radius: 11px;
  padding-left: 4px;
  padding-right: 4px;
  line-height: 125%;
}

/* Container for an image */
.imgcontainer img {
  max-height: 100%;
  max-width: 100%;
}


.doccat a {
  color: #044a64 ;
  text-decoration: none;
}
.doccat h {
  font-weight: bold;
}
.doccat h a {
  font-size: smaller;
  color: black;
}
.doccat {
  padding-left: 2ex;
  padding-right: 2ex;
  white-space:nowrap;
}
.doccat li {
  list-style-type: none;
  font-size: smaller;
  line-height: 150%; 
}
.doccat ul {
  margin-top: 0.5em;
}

.footer {
  padding-top: 2px;
  padding-bottom: 1px;
  border-top: 2px solid #044a64;
}

Changes to search/buildsearchdb.tcl.

347
348
349
350
351
352
353
354
355
356
357
358
359
360
361

  # Extract the document text
  set text [extract_text_from_dom $dom generic_filterscript]

  # Insert into the database.
  set rowid [insert_entry -url $doc -title1 $title -content $text]

  if {$doc=="pragma.html"} {
    set lSection [extract_sections_from_pragma_dom $dom]
  } else {
    set lSection [extract_sections_from_dom $dom generic_filterscript]
  }

  set i [expr $rowid*1000]
  foreach section $lSection {







|







347
348
349
350
351
352
353
354
355
356
357
358
359
360
361

  # Extract the document text
  set text [extract_text_from_dom $dom generic_filterscript]

  # Insert into the database.
  set rowid [insert_entry -url $doc -title1 $title -content $text]

  if {0 && $doc=="pragma.html"} {
    set lSection [extract_sections_from_pragma_dom $dom]
  } else {
    set lSection [extract_sections_from_dom $dom generic_filterscript]
  }

  set i [expr $rowid*1000]
  foreach section $lSection {

Changes to search/search.tcl.

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
  foreach {key value} [array get ::env] {
    append ret "<tr><td>[htmlize $key]<td>[htmlize $value]"
  }
  append ret "</table>"
  return $ret
}

proc footer {} {
  return {
    <hr>
    <table align=right>
    <td>
      <i>Powered by <a href="http://www.sqlite.org/fts5.html">FTS5</a>.</i>
    </table>
  }
}

#-------------------------------------------------------------------------
# Add an entry to the log database for the current query. Which 
# returns $nRes results.
#
proc search_add_log_entry {nRes} {
  if {[info exists ::A(donotlog)]} return








<
<
<
<
<
<
<
<
<
<







90
91
92
93
94
95
96










97
98
99
100
101
102
103
  foreach {key value} [array get ::env] {
    append ret "<tr><td>[htmlize $key]<td>[htmlize $value]"
  }
  append ret "</table>"
  return $ret
}











#-------------------------------------------------------------------------
# Add an entry to the log database for the current query. Which 
# returns $nRes results.
#
proc search_add_log_entry {nRes} {
  if {[info exists ::A(donotlog)]} return

358
359
360
361
362
363
364
365
366
367
368
369
370
371
372


  # If the query returned more than 10 results, add up to 10 links to 
  # each set of 10 results (first link to results 1-10, second to 11-20, 
  # third to 21-30, as required).
  #
  if {$nRes>10} {
    set s(0) {border: solid #044a64 1px ; padding: 1ex ; margin: 1ex}
    set s(1) "$s(0);background:#044a64;color:white"
    append ret <center><p>
    for {set i 0} {$i < 10 && ($i*10)<$nRes} {incr i} {
      append ret [subst {
        <a style="$s([expr {($iStart/10)==$i}])" 
           href="search?[cgi_encode_args [list q $::A(q) i $i]]">[expr $i+1]</a>
      }]







|







348
349
350
351
352
353
354
355
356
357
358
359
360
361
362


  # If the query returned more than 10 results, add up to 10 links to 
  # each set of 10 results (first link to results 1-10, second to 11-20, 
  # third to 21-30, as required).
  #
  if {$nRes>10} {
    set s(0) {border:solid #044a64 1px;padding:1ex;margin:1ex;line-height:300%;}
    set s(1) "$s(0);background:#044a64;color:white"
    append ret <center><p>
    for {set i 0} {$i < 10 && ($i*10)<$nRes} {incr i} {
      append ret [subst {
        <a style="$s([expr {($iStart/10)==$i}])" 
           href="search?[cgi_encode_args [list q $::A(q) i $i]]">[expr $i+1]</a>
      }]
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412

  db transaction {
    set t [ttime { 
      if {[catch searchresults srchout]} {
        set A(q) [string tolower $A(q)]
        set srchout [searchresults]
      }
      set doc "$srchout [footer]" 
    }]
  }
  append doc "<p>Page generated in $t."
  return $doc

  # return [cgi_env_dump]
}

#=========================================================================








|


|







385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402

  db transaction {
    set t [ttime { 
      if {[catch searchresults srchout]} {
        set A(q) [string tolower $A(q)]
        set srchout [searchresults]
      }
      set doc $srchout
    }]
  }
  append doc "<p>Page generated by <a href='fts5.html'>FTS5</a> in about $t."
  return $doc

  # return [cgi_env_dump]
}

#=========================================================================

Changes to wrap.tcl.

37
38
39
40
41
42
43

44
45
46
47
48
49
50
set DOC [lindex $argv 0]
set SRC [lindex $argv 1]
set DEST [lindex $argv 2]
set HOMEDIR [pwd]            ;# Also remember our home directory.

source [file dirname [info script]]/pages/fancyformat.tcl
source [file dirname [info script]]/document_header.tcl


# Open the SQLite database.
#
sqlite3 db docinfo.db
db eval {
  ATTACH 'history.db' AS history;
  BEGIN;







>







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
set DOC [lindex $argv 0]
set SRC [lindex $argv 1]
set DEST [lindex $argv 2]
set HOMEDIR [pwd]            ;# Also remember our home directory.

source [file dirname [info script]]/pages/fancyformat.tcl
source [file dirname [info script]]/document_header.tcl
source [file dirname [info script]]/common_links.tcl

# Open the SQLite database.
#
sqlite3 db docinfo.db
db eval {
  ATTACH 'history.db' AS history;
  BEGIN;
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509

  #if {!$anonymous_flag} {
  #  hd_resolve "<h4>\[$name:\]</h4>"
  #}
  hd_resolve "<p><b>\[$name:\]</b></p>"
  set alt "alt=\"syntax diagram $name\""
  if {$hd(enable-main)} {
    puts $hd(main) "<blockquote>\n\
        <img $alt src=\"$hd(rootpath-main)images/syntax/$name.gif\"></img>\n\
        </blockquote>"
  }
  if {$hd(enable-aux)} {
    puts $hd(aux) "<blockquote>\n\
        <img $alt src=\"$hd(rootpath-aux)images/syntax/$name.gif\"></img>\n\
        </blockquote>"
  }
}
proc HiddenBubbleDiagram {name} {
  global hd
  set alt "alt=\"syntax diagram $name\""
  hd_resolve "<p><b>\[$name:\]</b> "
  if {$hd(enable-main)} {
    set a [hd_id]
    set b [hd_id]
    puts $hd(main) \
     "<button id='$a' onclick='hideorshow(\"$a\",\"$b\")'>show</button>\
      </p>\n\
      <blockquote id='$b' style='display:none;'>\n\
      <img $alt src=\"$hd(rootpath-main)images/syntax/$name.gif\"></img>\n\
      </blockquote>"
  }
  if {$hd(enable-aux)} {
    set a [hd_id]
    set b [hd_id]
    puts $hd(aux) \
     "<button id='$a' onclick='hideorshow(\"$a\",\"$b\")'>show</button>\
      </p>\n\
      <blockquote id='$b' style='display:none;'>\n\
      <img $alt src=\"$hd(rootpath-aux)images/syntax/$name.gif\"></img>\n\
      </blockquote>"
  }
}
proc RecursiveBubbleDiagram_helper {class name openlist exclude} {
  global hd syntax_linkage
  set alt "alt=\"syntax diagram $name\""
  hd_resolve "<p><b>\[$name:\]</b>\n"
  set a [hd_id]
  set b [hd_id]
  set openflag 0
  set open2 {}
  foreach x $openlist {
    if {$x==$name} {
      set openflag 1
    } else {
      lappend open2 $x
    }
  }
  if {$openflag} {
    puts $hd($class) \
      "<button id='$a' onclick='hideorshow(\"$a\",\"$b\")'>hide</button></p>\n\
       <blockquote id='$b'>\n\
       <img $alt src=\"$hd(rootpath-$class)images/syntax/$name.gif\" />"
  } else {
    puts $hd($class) \
      "<button id='$a' onclick='hideorshow(\"$a\",\"$b\")'>show</button></p>\n\
       <blockquote id='$b' style='display:none;'>\n\
       <img $alt src=\"$hd(rootpath-$class)images/syntax/$name.gif\" />"
  }
  if {[info exists syntax_linkage($name)]} {
    foreach {cx px} $syntax_linkage($name) break
    foreach c $cx {
      if {[lsearch $exclude $c]>=0} continue
      RecursiveBubbleDiagram_helper $class $c $open2 [concat $exclude $cx]
    }  
  }
  puts $hd($class) "</blockquote>"
}
proc RecursiveBubbleDiagram {args} {
  global hd
  set show 1
  set a2 {}
  foreach name $args {
    if {$name=="--initially-hidden"} {







|

|


|

|












|

|







|

|




















|




|









|







428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510

  #if {!$anonymous_flag} {
  #  hd_resolve "<h4>\[$name:\]</h4>"
  #}
  hd_resolve "<p><b>\[$name:\]</b></p>"
  set alt "alt=\"syntax diagram $name\""
  if {$hd(enable-main)} {
    puts $hd(main) "<div class='imgcontainer'>\n\
        <img $alt src=\"$hd(rootpath-main)images/syntax/$name.gif\"></img>\n\
        </div>"
  }
  if {$hd(enable-aux)} {
    puts $hd(aux) "<div class='imgcontainer'>\n\
        <img $alt src=\"$hd(rootpath-aux)images/syntax/$name.gif\"></img>\n\
        </div>"
  }
}
proc HiddenBubbleDiagram {name} {
  global hd
  set alt "alt=\"syntax diagram $name\""
  hd_resolve "<p><b>\[$name:\]</b> "
  if {$hd(enable-main)} {
    set a [hd_id]
    set b [hd_id]
    puts $hd(main) \
     "<button id='$a' onclick='hideorshow(\"$a\",\"$b\")'>show</button>\
      </p>\n\
      <div id='$b' style='display:none;' class='imgcontainer'>\n\
      <img $alt src=\"$hd(rootpath-main)images/syntax/$name.gif\"></img>\n\
      </div>"
  }
  if {$hd(enable-aux)} {
    set a [hd_id]
    set b [hd_id]
    puts $hd(aux) \
     "<button id='$a' onclick='hideorshow(\"$a\",\"$b\")'>show</button>\
      </p>\n\
      <div id='$b' style='display:none;' class='imgcontainer'>\n\
      <img $alt src=\"$hd(rootpath-aux)images/syntax/$name.gif\"></img>\n\
      </div>"
  }
}
proc RecursiveBubbleDiagram_helper {class name openlist exclude} {
  global hd syntax_linkage
  set alt "alt=\"syntax diagram $name\""
  hd_resolve "<p><b>\[$name:\]</b>\n"
  set a [hd_id]
  set b [hd_id]
  set openflag 0
  set open2 {}
  foreach x $openlist {
    if {$x==$name} {
      set openflag 1
    } else {
      lappend open2 $x
    }
  }
  if {$openflag} {
    puts $hd($class) \
      "<button id='$a' onclick='hideorshow(\"$a\",\"$b\")'>hide</button></p>\n\
       <div id='$b' class='imgcontainer'>\n\
       <img $alt src=\"$hd(rootpath-$class)images/syntax/$name.gif\" />"
  } else {
    puts $hd($class) \
      "<button id='$a' onclick='hideorshow(\"$a\",\"$b\")'>show</button></p>\n\
       <div id='$b' style='display:none;' class='imgcontainer'>\n\
       <img $alt src=\"$hd(rootpath-$class)images/syntax/$name.gif\" />"
  }
  if {[info exists syntax_linkage($name)]} {
    foreach {cx px} $syntax_linkage($name) break
    foreach c $cx {
      if {[lsearch $exclude $c]>=0} continue
      RecursiveBubbleDiagram_helper $class $c $open2 [concat $exclude $cx]
    }  
  }
  puts $hd($class) "</div>"
}
proc RecursiveBubbleDiagram {args} {
  global hd
  set show 1
  set a2 {}
  foreach name $args {
    if {$name=="--initially-hidden"} {