This file is indexed.

/usr/share/doc/python-apsw/html/apsw.html is in python-apsw-doc 3.8.2-r1-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
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
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
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
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
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>APSW Module &mdash; APSW 3.8.2-r1 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '3.8.2-r1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="copyright" title="Copyright" href="copyright.html" />
    <link rel="top" title="APSW 3.8.2-r1 documentation" href="index.html" />
    <link rel="next" title="Connections to a database" href="connection.html" />
    <link rel="prev" title="Extensions" href="extensions.html" />
 
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-26815066-1']);
  _gaq.push(['_trackPageview']);
</script>

  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="connection.html" title="Connections to a database"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="extensions.html" title="Extensions"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">APSW 3.8.2-r1 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <span class="target" id="module-apsw"></span><div class="section" id="apsw-module">
<h1>APSW Module<a class="headerlink" href="#apsw-module" title="Permalink to this headline"></a></h1>
<p>The module is the main interface to SQLite.  Methods and data on the
module have process wide effects.  You can instantiate the
<a class="reference internal" href="connection.html#apsw.Connection" title="apsw.Connection"><tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt></a> and <a class="reference internal" href="blob.html#apsw.zeroblob" title="apsw.zeroblob"><tt class="xref py py-class docutils literal"><span class="pre">zeroblob</span></tt></a> objects using
<a class="reference internal" href="connection.html#apsw.Connection" title="apsw.Connection"><tt class="xref py py-meth docutils literal"><span class="pre">Connection()</span></tt></a> and <a class="reference internal" href="blob.html#apsw.zeroblob" title="apsw.zeroblob"><tt class="xref py py-meth docutils literal"><span class="pre">zeroblob()</span></tt></a> respectively.</p>
<div class="section" id="api-reference">
<h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline"></a></h2>
<dl class="data">
<dt id="apsw.SQLITE_VERSION_NUMBER">
<tt class="descname">SQLITE_VERSION_NUMBER</tt><a class="headerlink" href="#apsw.SQLITE_VERSION_NUMBER" title="Permalink to this definition"></a></dt>
<dd><p>The integer version number of SQLite that APSW was compiled
against.  For example SQLite 3.6.4 will have the value <em>3006004</em>.
This number may be different than the actual library in use if the
library is shared and has been updated.  Call
<a class="reference internal" href="#apsw.sqlitelibversion" title="apsw.sqlitelibversion"><tt class="xref py py-meth docutils literal"><span class="pre">sqlitelibversion()</span></tt></a> to get the actual library version.</p>
</dd></dl>

<dl class="method">
<dt id="apsw.apswversion">
<tt class="descname">apswversion</tt><big>(</big><big>)</big> &rarr; string<a class="headerlink" href="#apsw.apswversion" title="Permalink to this definition"></a></dt>
<dd><p>Returns the APSW version.</p>
</dd></dl>

<span class="target" id="index-0"></span><dl class="attribute">
<dt id="apsw.compile_options">
<tt class="descname">compile_options</tt><a class="headerlink" href="#apsw.compile_options" title="Permalink to this definition"></a></dt>
<dd><p>A tuple of the options used to compile SQLite.  For example it
will be something like this:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">(</span><span class="s">&#39;ENABLE_LOCKING_STYLE=0&#39;</span><span class="p">,</span> <span class="s">&#39;TEMP_STORE=1&#39;</span><span class="p">,</span> <span class="s">&#39;THREADSAFE=1&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/compileoption_get.html">sqlite3_compileoption_get</a></p>
</dd></dl>

<span class="target" id="index-1"></span><dl class="method">
<dt id="apsw.complete">
<tt class="descname">complete</tt><big>(</big><em>statement</em><big>)</big> &rarr; bool<a class="headerlink" href="#apsw.complete" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if the input string comprises one or more complete SQL
statements by looking for an unquoted trailing semi-colon.</p>
<p>An example use would be if you were prompting the user for SQL
statements and needed to know if you had a whole statement, or
needed to ask for another line:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">statement</span><span class="o">=</span><span class="nb">raw_input</span><span class="p">(</span><span class="s">&quot;SQL&gt; &quot;</span><span class="p">)</span>
<span class="k">while</span> <span class="ow">not</span> <span class="n">apsw</span><span class="o">.</span><span class="n">complete</span><span class="p">(</span><span class="n">statement</span><span class="p">):</span>
   <span class="n">more</span><span class="o">=</span><span class="nb">raw_input</span><span class="p">(</span><span class="s">&quot;  .. &quot;</span><span class="p">)</span>
   <span class="n">statement</span><span class="o">=</span><span class="n">statement</span><span class="o">+</span><span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span><span class="o">+</span><span class="n">more</span>
</pre></div>
</div>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/complete.html">sqlite3_complete</a></p>
</dd></dl>

<span class="target" id="index-2"></span><dl class="method">
<dt id="apsw.config">
<tt class="descname">config</tt><big>(</big><em>op</em><span class="optional">[</span>, <em>*args</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#apsw.config" title="Permalink to this definition"></a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>op</strong> &#8211; A <a class="reference external" href="https://sqlite.org/c3ref/c_config_chunkalloc.html">configuration operation</a></li>
<li><strong>args</strong> &#8211; Zero or more arguments as appropriate for <em>op</em></li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Many operations don&#8217;t make sense from a Python program.  The
following configuration operations are supported: SQLITE_CONFIG_LOG,
SQLITE_CONFIG_SINGLETHREAD, SQLITE_CONFIG_MULTITHREAD,
SQLITE_CONFIG_SERIALIZED, SQLITE_CONFIG_URI, SQLITE_CONFIG_MEMSTATUS
and SQLITE_CONFIG_COVERING_INDEX_SCAN.</p>
<p>See <a class="reference internal" href="tips.html#diagnostics-tips"><em>tips</em></a> for an example of how to receive
log messages (SQLITE_CONFIG_LOG)</p>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/config.html">sqlite3_config</a></p>
</dd></dl>

<dl class="attribute">
<dt id="apsw.connection_hooks">
<tt class="descname">connection_hooks</tt><a class="headerlink" href="#apsw.connection_hooks" title="Permalink to this definition"></a></dt>
<dd><p>The purpose of the hooks is to allow the easy registration of
<a class="reference internal" href="connection.html#apsw.Connection.createscalarfunction" title="apsw.Connection.createscalarfunction"><tt class="xref py py-meth docutils literal"><span class="pre">functions</span></tt></a>,
<a class="reference internal" href="vtable.html#virtualtables"><em>virtual tables</em></a> or similar items with
each <a class="reference internal" href="connection.html#apsw.Connection" title="apsw.Connection"><tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt></a> as it is created. The default value is an empty
list. Whenever a Connection is created, each item in
apsw.connection_hooks is invoked with a single parameter being
the new Connection object. If the hook raises an exception then
the creation of the Connection fails.</p>
<p>If you wanted to store your own defined functions in the
database then you could define a hook that looked in the
relevant tables, got the Python text and turned it into the
functions.</p>
</dd></dl>

<span class="target" id="index-3"></span><dl class="method">
<dt id="apsw.enablesharedcache">
<tt class="descname">enablesharedcache</tt><big>(</big><em>bool</em><big>)</big><a class="headerlink" href="#apsw.enablesharedcache" title="Permalink to this definition"></a></dt>
<dd><p>If you use the same <a class="reference internal" href="connection.html#apsw.Connection" title="apsw.Connection"><tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt></a> across threads or use
multiple <a class="reference internal" href="connection.html#apsw.Connection" title="apsw.Connection"><tt class="xref py py-class docutils literal"><span class="pre">connections</span></tt></a> accessing the same file,
then SQLite can <a class="reference external" href="https://sqlite.org/sharedcache.html">share the cache between them</a>.  It is <a class="reference internal" href="tips.html#sharedcache"><em>not
recommended</em></a> that you use this.</p>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/enable_shared_cache.html">sqlite3_enable_shared_cache</a></p>
</dd></dl>

<dl class="method">
<dt id="apsw.exceptionfor">
<tt class="descname">exceptionfor</tt><big>(</big><em>int</em><big>)</big> &rarr; Exception<a class="headerlink" href="#apsw.exceptionfor" title="Permalink to this definition"></a></dt>
<dd><p>If you would like to raise an exception that corresponds to a
particular SQLite <a class="reference external" href="https://sqlite.org/c3ref/c_abort.html">error code</a> then call this function.
It also understands <a class="reference external" href="https://sqlite.org/c3ref/c_ioerr_access.html">extended error codes</a>.</p>
<p>For example to raise <a class="reference external" href="https://sqlite.org/c3ref/c_ioerr_access.html">SQLITE_IOERR_ACCESS</a>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">raise</span> <span class="n">apsw</span><span class="o">.</span><span class="n">exceptionfor</span><span class="p">(</span><span class="n">apsw</span><span class="o">.</span><span class="n">SQLITE_IOERR_ACCESS</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>

<dl class="method">
<dt id="apsw.fork_checker">
<tt class="descname">fork_checker</tt><big>(</big><big>)</big><a class="headerlink" href="#apsw.fork_checker" title="Permalink to this definition"></a></dt>
<dd><p><strong>Note</strong> This method is not available on Windows as it does not
support the fork system call.</p>
<p>SQLite does not allow the use of database connections across <a class="reference external" href="http://en.wikipedia.org/wiki/Fork_(operating_system)">forked</a> processes
(see the <a class="reference external" href="https://sqlite.org/faq.html#q6">SQLite FAQ Q6</a>).
(Forking creates a child process that is a duplicate of the parent
including the state of all data structures in the program.  If you
do this to SQLite then parent and child would both consider
themselves owners of open databases and silently corrupt each
other&#8217;s work and interfere with each other&#8217;s locks.)</p>
<p>One example of how you may end up using fork is if you use the
<a class="reference external" href="http://docs.python.org/library/multiprocessing.html">multiprocessing module</a> which uses
fork to make child processes.</p>
<p>If you do use fork or multiprocessing on a platform that supports
fork then you <strong>must</strong> ensure database connections and their objects
(cursors, backup, blobs etc) are not used in the parent process, or
are all closed before calling fork or starting a <a class="reference external" href="http://docs.python.org/library/multiprocessing.html#process-and-exceptions">Process</a>.
(Note you must call close to ensure the underlying SQLite objects
are closed.  It is also a good idea to call <a class="reference external" href="http://docs.python.org/library/gc.html#gc.collect">gc.collect(2)</a> to ensure
anything you may have missed is also deallocated.)</p>
<p>Once you run this method, extra checking code is inserted into
SQLite&#8217;s mutex operations (at a very small performance penalty) that
verifies objects are not used across processes.  You will get a
<a class="reference internal" href="exceptions.html#apsw.ForkingViolationError" title="apsw.ForkingViolationError"><tt class="xref py py-exc docutils literal"><span class="pre">ForkingViolationError</span></tt></a> if you do so.  Note that due to the way
Python&#8217;s internals work, the exception will be delivered to
<cite>sys.excepthook</cite> in addition to the normal exception mechanisms and
may be reported by Python after the line where the issue actually
arose.  (Destructors of objects you didn&#8217;t close also run between
lines.)</p>
<p>You should only call this method as the first line after importing
APSW, as it has to shutdown and re-initialize SQLite.  If you have
any SQLite objects already allocated when calling the method then
the program will later crash.  The recommended use is to use the fork
checking as part of your test suite.</p>
</dd></dl>

<dl class="method">
<dt id="apsw.format_sql_value">
<tt class="descname">format_sql_value</tt><big>(</big><em>value</em><big>)</big> &rarr; string<a class="headerlink" href="#apsw.format_sql_value" title="Permalink to this definition"></a></dt>
<dd><p>Returns a Python string (unicode) representing the supplied value in
SQL syntax.  Python 2 note: You must supply unicode strings not
plain strings.</p>
</dd></dl>

<span class="target" id="index-4"></span><dl class="method">
<dt id="apsw.initialize">
<tt class="descname">initialize</tt><big>(</big><big>)</big><a class="headerlink" href="#apsw.initialize" title="Permalink to this definition"></a></dt>
<dd><p>It is unlikely you will want to call this method as SQLite automatically initializes.</p>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/initialize.html">sqlite3_initialize</a></p>
</dd></dl>

<span class="target" id="index-5"></span><dl class="method">
<dt id="apsw.log">
<tt class="descname">log</tt><big>(</big><em>level</em>, <em>message</em><big>)</big><a class="headerlink" href="#apsw.log" title="Permalink to this definition"></a></dt>
<dd><p>Calls the SQLite logging interface.  Note that you must format the
message before passing it to this method:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">apsw</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="n">apsw</span><span class="o">.</span><span class="n">SQLITE_NOMEM</span><span class="p">,</span> <span class="s">&quot;Need </span><span class="si">%d</span><span class="s"> bytes of memory&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="mi">1234</span><span class="p">,))</span>
</pre></div>
</div>
<p>See <a class="reference internal" href="tips.html#diagnostics-tips"><em>tips</em></a> for an example of how to
receive log messages.</p>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/log.html">sqlite3_log</a></p>
</dd></dl>

<dl class="method">
<dt id="apsw.main">
<tt class="descname">main</tt><big>(</big><big>)</big><a class="headerlink" href="#apsw.main" title="Permalink to this definition"></a></dt>
<dd><p>Call this to run the interactive shell.  It automatically passes
in sys.argv[1:] and exits Python when done.</p>
</dd></dl>

<span class="target" id="index-6"></span><dl class="method">
<dt id="apsw.memoryhighwater">
<tt class="descname">memoryhighwater</tt><big>(</big><em>reset=False</em><big>)</big> &rarr; int<a class="headerlink" href="#apsw.memoryhighwater" title="Permalink to this definition"></a></dt>
<dd><p>Returns the maximum amount of memory SQLite has used.  If <em>reset</em> is
True then the high water mark is reset to the current value.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#apsw.status" title="apsw.status"><tt class="xref py py-meth docutils literal"><span class="pre">status()</span></tt></a></p>
</div>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/memory_highwater.html">sqlite3_memory_highwater</a></p>
</dd></dl>

<span class="target" id="index-7"></span><dl class="method">
<dt id="apsw.memoryused">
<tt class="descname">memoryused</tt><big>(</big><big>)</big> &rarr; int<a class="headerlink" href="#apsw.memoryused" title="Permalink to this definition"></a></dt>
<dd><p>Returns the amount of memory SQLite is currently using.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#apsw.status" title="apsw.status"><tt class="xref py py-meth docutils literal"><span class="pre">status()</span></tt></a></p>
</div>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/memory_highwater.html">sqlite3_memory_used</a></p>
</dd></dl>

<span class="target" id="index-8"></span><dl class="method">
<dt id="apsw.randomness">
<tt class="descname">randomness</tt><big>(</big><em>bytes</em><big>)</big> &rarr; data<a class="headerlink" href="#apsw.randomness" title="Permalink to this definition"></a></dt>
<dd><p>Gets random data from SQLite&#8217;s random number generator.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bytes</strong> &#8211; How many bytes to return</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">(Python 2) string, (Python 3) bytes</td>
</tr>
</tbody>
</table>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/randomness.html">sqlite3_randomness</a></p>
</dd></dl>

<span class="target" id="index-9"></span><dl class="method">
<dt id="apsw.releasememory">
<tt class="descname">releasememory</tt><big>(</big><em>bytes</em><big>)</big> &rarr; int<a class="headerlink" href="#apsw.releasememory" title="Permalink to this definition"></a></dt>
<dd><p>Requests SQLite try to free <em>bytes</em> bytes of memory.  Returns how
many bytes were freed.</p>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/release_memory.html">sqlite3_release_memory</a></p>
</dd></dl>

<span class="target" id="index-10"></span><dl class="method">
<dt id="apsw.shutdown">
<tt class="descname">shutdown</tt><big>(</big><big>)</big><a class="headerlink" href="#apsw.shutdown" title="Permalink to this definition"></a></dt>
<dd><p>It is unlikely you will want to call this method and there is no
need to do so.  It is a <strong>really</strong> bad idea to call it unless you
are absolutely sure all <a class="reference internal" href="connection.html#apsw.Connection" title="apsw.Connection"><tt class="xref py py-class docutils literal"><span class="pre">connections</span></tt></a>,
<a class="reference internal" href="blob.html#apsw.blob" title="apsw.blob"><tt class="xref py py-class docutils literal"><span class="pre">blobs</span></tt></a>, <a class="reference internal" href="cursor.html#apsw.Cursor" title="apsw.Cursor"><tt class="xref py py-class docutils literal"><span class="pre">cursors</span></tt></a>, <a class="reference internal" href="vfs.html#apsw.VFS" title="apsw.VFS"><tt class="xref py py-class docutils literal"><span class="pre">vfs</span></tt></a>
etc have been closed, deleted and garbage collected.</p>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/initialize.html">sqlite3_shutdown</a></p>
</dd></dl>

<span class="target" id="index-11"></span><dl class="method">
<dt id="apsw.softheaplimit">
<tt class="descname">softheaplimit</tt><big>(</big><em>bytes</em><big>)</big> &rarr; oldlimit<a class="headerlink" href="#apsw.softheaplimit" title="Permalink to this definition"></a></dt>
<dd><p>Requests SQLite try to keep memory usage below <em>bytes</em> bytes and
returns the previous setting.</p>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/soft_heap_limit64.html">sqlite3_soft_heap_limit64</a></p>
</dd></dl>

<span class="target" id="index-12"></span><dl class="method">
<dt id="apsw.sqlite3_sourceid">
<tt class="descname">sqlite3_sourceid</tt><big>(</big><big>)</big> &rarr; string<a class="headerlink" href="#apsw.sqlite3_sourceid" title="Permalink to this definition"></a></dt>
<dd><p>Returns the exact checkin information for the SQLite 3 source
being used.</p>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/libversion.html">sqlite3_sourceid</a></p>
</dd></dl>

<span class="target" id="index-13"></span><dl class="method">
<dt id="apsw.sqlitelibversion">
<tt class="descname">sqlitelibversion</tt><big>(</big><big>)</big> &rarr; string<a class="headerlink" href="#apsw.sqlitelibversion" title="Permalink to this definition"></a></dt>
<dd><p>Returns the version of the SQLite library.  This value is queried at
run time from the library so if you use shared libraries it will be
the version in the shared library.</p>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/libversion.html">sqlite3_libversion</a></p>
</dd></dl>

<span class="target" id="index-14"></span><dl class="method">
<dt id="apsw.status">
<tt class="descname">status</tt><big>(</big><em>op</em>, <em>reset=False) -&gt; (int</em>, <em>int</em><big>)</big><a class="headerlink" href="#apsw.status" title="Permalink to this definition"></a></dt>
<dd><p>Returns current and highwater measurements.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>op</strong> &#8211; A <a class="reference external" href="https://sqlite.org/c3ref/c_status_malloc_size.html">status parameter</a></li>
<li><strong>reset</strong> &#8211; If <em>True</em> then the highwater is set to the current value</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A tuple of current value and highwater value</p>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<ul class="last simple">
<li><a class="reference internal" href="example.html#example-status"><em>Status example</em></a></li>
</ul>
</div>
<p>Calls: <a class="reference external" href="https://sqlite.org/c3ref/status.html">sqlite3_status</a></p>
</dd></dl>

<dl class="attribute">
<dt id="apsw.using_amalgamation">
<tt class="descname">using_amalgamation</tt><a class="headerlink" href="#apsw.using_amalgamation" title="Permalink to this definition"></a></dt>
<dd><p>If True then <a class="reference external" href="https://sqlite.org/cvstrac/wiki?p=TheAmalgamation">SQLite amalgamation</a> is in
use (statically compiled into APSW).  Using the amalgamation means
that SQLite shared libraries are not used and will not affect your
code.</p>
</dd></dl>

<dl class="method">
<dt id="apsw.vfsnames">
<tt class="descname">vfsnames</tt><big>(</big><em>) -&gt; list(string</em><big>)</big><a class="headerlink" href="#apsw.vfsnames" title="Permalink to this definition"></a></dt>
<dd><p>Returns a list of the currently installed <a class="reference internal" href="vfs.html#vfs"><em>vfs</em></a>.  The first
item in the list is the default vfs.</p>
</dd></dl>

</div>
<div class="section" id="sqlite-constants">
<span id="sqliteconstants"></span><h2>SQLite constants<a class="headerlink" href="#sqlite-constants" title="Permalink to this headline"></a></h2>
<p>SQLite has <a class="reference external" href="https://sqlite.org/c3ref/constlist.html">many constants</a> used in various
interfaces.  To use a constant such as <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OK</span></tt>, just
use <tt class="docutils literal"><span class="pre">apsw.SQLITE_OK</span></tt>.</p>
<p>The same values can be used in different contexts. For example
<tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OK</span></tt> and <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CREATE_INDEX</span></tt> both have a value
of zero. For each group of constants there is also a mapping (dict)
available that you can supply a string to and get the corresponding
numeric value, or supply a numeric value and get the corresponding
string. These can help improve diagnostics/logging, calling other
modules etc. For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">apsw</span><span class="o">.</span><span class="n">mapping_authorizer_function</span><span class="p">[</span><span class="s">&quot;SQLITE_READ&quot;</span><span class="p">]</span><span class="o">=</span><span class="mi">20</span>
<span class="n">apsw</span><span class="o">.</span><span class="n">mapping_authorizer_function</span><span class="p">[</span><span class="mi">20</span><span class="p">]</span><span class="o">=</span><span class="s">&quot;SQLITE_READ&quot;</span>
</pre></div>
</div>
<dl class="data">
<dt id="apsw.mapping_access">
<tt class="descname">mapping_access</tt><a class="headerlink" href="#apsw.mapping_access" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_access_exists.html">Flags for the xAccess VFS method</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_ACCESS_EXISTS</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_ACCESS_READ</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_ACCESS_READWRITE</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_authorizer_function">
<tt class="descname">mapping_authorizer_function</tt><a class="headerlink" href="#apsw.mapping_authorizer_function" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_alter_table.html">Authorizer Action Codes</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_ALTER_TABLE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_ANALYZE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_ATTACH</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_COPY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CREATE_INDEX</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CREATE_TABLE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CREATE_TEMP_INDEX</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CREATE_TEMP_TABLE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CREATE_TEMP_TRIGGER</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CREATE_TEMP_VIEW</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CREATE_TRIGGER</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CREATE_VIEW</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CREATE_VTABLE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DELETE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DETACH</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DROP_INDEX</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DROP_TABLE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DROP_TEMP_INDEX</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DROP_TEMP_TABLE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DROP_TEMP_TRIGGER</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DROP_TEMP_VIEW</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DROP_TRIGGER</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DROP_VIEW</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DROP_VTABLE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FUNCTION</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_INSERT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_PRAGMA</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_READ</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_REINDEX</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_SAVEPOINT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_SELECT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_TRANSACTION</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_UPDATE</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_authorizer_return">
<tt class="descname">mapping_authorizer_return</tt><a class="headerlink" href="#apsw.mapping_authorizer_return" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_deny.html">Authorizer Return Codes</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DENY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IGNORE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OK</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_bestindex_constraints">
<tt class="descname">mapping_bestindex_constraints</tt><a class="headerlink" href="#apsw.mapping_bestindex_constraints" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_index_constraint_eq.html">Virtual Table Constraint Operator Codes</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_INDEX_CONSTRAINT_EQ</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_INDEX_CONSTRAINT_GE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_INDEX_CONSTRAINT_GT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_INDEX_CONSTRAINT_LE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_INDEX_CONSTRAINT_LT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_INDEX_CONSTRAINT_MATCH</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_config">
<tt class="descname">mapping_config</tt><a class="headerlink" href="#apsw.mapping_config" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_config_covering_index_scan.html">Configuration Options</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_COVERING_INDEX_SCAN</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_GETMALLOC</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_GETMUTEX</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_GETPCACHE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_GETPCACHE2</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_HEAP</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_LOG</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_LOOKASIDE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_MALLOC</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_MEMSTATUS</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_MMAP_SIZE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_MULTITHREAD</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_MUTEX</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_PAGECACHE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_PCACHE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_PCACHE2</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_SCRATCH</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_SERIALIZED</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_SINGLETHREAD</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_SQLLOG</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_URI</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONFIG_WIN32_HEAPSIZE</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_db_config">
<tt class="descname">mapping_db_config</tt><a class="headerlink" href="#apsw.mapping_db_config" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_dbconfig_enable_fkey.html">Database Connection Configuration Options</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBCONFIG_ENABLE_FKEY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBCONFIG_ENABLE_TRIGGER</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBCONFIG_LOOKASIDE</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_db_status">
<tt class="descname">mapping_db_status</tt><a class="headerlink" href="#apsw.mapping_db_status" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_dbstatus_options.html">Status Parameters for database connections</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBSTATUS_CACHE_HIT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBSTATUS_CACHE_MISS</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBSTATUS_CACHE_USED</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBSTATUS_CACHE_WRITE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBSTATUS_DEFERRED_FKS</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBSTATUS_LOOKASIDE_HIT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBSTATUS_LOOKASIDE_USED</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBSTATUS_MAX</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBSTATUS_SCHEMA_USED</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_DBSTATUS_STMT_USED</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_device_characteristics">
<tt class="descname">mapping_device_characteristics</tt><a class="headerlink" href="#apsw.mapping_device_characteristics" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_iocap_atomic.html">Device Characteristics</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOCAP_ATOMIC</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOCAP_ATOMIC16K</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOCAP_ATOMIC1K</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOCAP_ATOMIC2K</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOCAP_ATOMIC32K</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOCAP_ATOMIC4K</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOCAP_ATOMIC512</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOCAP_ATOMIC64K</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOCAP_ATOMIC8K</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOCAP_POWERSAFE_OVERWRITE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOCAP_SAFE_APPEND</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOCAP_SEQUENTIAL</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_extended_result_codes">
<tt class="descname">mapping_extended_result_codes</tt><a class="headerlink" href="#apsw.mapping_extended_result_codes" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_abort_rollback.html">Extended Result Codes</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_ABORT_ROLLBACK</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_BUSY_RECOVERY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_BUSY_SNAPSHOT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CANTOPEN_CONVPATH</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CANTOPEN_FULLPATH</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CANTOPEN_ISDIR</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CANTOPEN_NOTEMPDIR</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONSTRAINT_CHECK</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONSTRAINT_COMMITHOOK</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONSTRAINT_FOREIGNKEY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONSTRAINT_FUNCTION</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONSTRAINT_NOTNULL</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONSTRAINT_PRIMARYKEY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONSTRAINT_ROWID</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONSTRAINT_TRIGGER</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONSTRAINT_UNIQUE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONSTRAINT_VTAB</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CORRUPT_VTAB</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_ACCESS</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_BLOCKED</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_CHECKRESERVEDLOCK</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_CLOSE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_CONVPATH</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_DELETE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_DELETE_NOENT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_DIR_CLOSE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_DIR_FSYNC</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_FSTAT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_FSYNC</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_GETTEMPPATH</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_LOCK</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_MMAP</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_NOMEM</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_RDLOCK</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_READ</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_SEEK</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_SHMLOCK</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_SHMMAP</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_SHMOPEN</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_SHMSIZE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_SHORT_READ</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_TRUNCATE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_UNLOCK</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR_WRITE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LOCKED_SHAREDCACHE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_NOTICE_RECOVER_ROLLBACK</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_NOTICE_RECOVER_WAL</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_READONLY_CANTLOCK</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_READONLY_RECOVERY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_READONLY_ROLLBACK</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_WARNING_AUTOINDEX</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_file_control">
<tt class="descname">mapping_file_control</tt><a class="headerlink" href="#apsw.mapping_file_control" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_fcntl_busyhandler.html">Standard File Control Opcodes</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_BUSYHANDLER</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_CHUNK_SIZE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_FILE_POINTER</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_LOCKSTATE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_MMAP_SIZE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_OVERWRITE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_PERSIST_WAL</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_POWERSAFE_OVERWRITE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_PRAGMA</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_SIZE_HINT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_SYNC_OMITTED</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_TEMPFILENAME</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_TRACE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_VFSNAME</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FCNTL_WIN32_AV_RETRY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_GET_LOCKPROXYFILE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LAST_ERRNO</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_SET_LOCKPROXYFILE</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_limits">
<tt class="descname">mapping_limits</tt><a class="headerlink" href="#apsw.mapping_limits" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_limit_attached.html">Run-Time Limit Categories</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LIMIT_ATTACHED</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LIMIT_COLUMN</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LIMIT_COMPOUND_SELECT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LIMIT_EXPR_DEPTH</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LIMIT_FUNCTION_ARG</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LIMIT_LENGTH</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LIMIT_LIKE_PATTERN_LENGTH</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LIMIT_SQL_LENGTH</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LIMIT_TRIGGER_DEPTH</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LIMIT_VARIABLE_NUMBER</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LIMIT_VDBE_OP</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_locking_level">
<tt class="descname">mapping_locking_level</tt><a class="headerlink" href="#apsw.mapping_locking_level" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_lock_exclusive.html">File Locking Levels</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LOCK_EXCLUSIVE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LOCK_NONE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LOCK_PENDING</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LOCK_RESERVED</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LOCK_SHARED</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_open_flags">
<tt class="descname">mapping_open_flags</tt><a class="headerlink" href="#apsw.mapping_open_flags" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_open_autoproxy.html">Flags For File Open Operations</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_AUTOPROXY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_CREATE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_DELETEONCLOSE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_EXCLUSIVE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_FULLMUTEX</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_MAIN_DB</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_MAIN_JOURNAL</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_MASTER_JOURNAL</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_MEMORY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_NOMUTEX</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_PRIVATECACHE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_READONLY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_READWRITE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_SHAREDCACHE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_SUBJOURNAL</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_TEMP_DB</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_TEMP_JOURNAL</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_TRANSIENT_DB</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_URI</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OPEN_WAL</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_result_codes">
<tt class="descname">mapping_result_codes</tt><a class="headerlink" href="#apsw.mapping_result_codes" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_abort.html">Result Codes</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_ABORT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_AUTH</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_BUSY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CANTOPEN</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CONSTRAINT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CORRUPT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_EMPTY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_ERROR</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FORMAT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_FULL</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_INTERNAL</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_INTERRUPT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_IOERR</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_LOCKED</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_MISMATCH</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_MISUSE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_NOLFS</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_NOMEM</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_NOTADB</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_NOTFOUND</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_NOTICE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_OK</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_PERM</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_PROTOCOL</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_RANGE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_READONLY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_SCHEMA</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_TOOBIG</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_WARNING</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_status">
<tt class="descname">mapping_status</tt><a class="headerlink" href="#apsw.mapping_status" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_status_malloc_count.html">Status Parameters</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_STATUS_MALLOC_COUNT</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_STATUS_MALLOC_SIZE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_STATUS_MEMORY_USED</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_STATUS_PAGECACHE_OVERFLOW</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_STATUS_PAGECACHE_SIZE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_STATUS_PAGECACHE_USED</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_STATUS_PARSER_STACK</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_STATUS_SCRATCH_OVERFLOW</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_STATUS_SCRATCH_SIZE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_STATUS_SCRATCH_USED</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_sync">
<tt class="descname">mapping_sync</tt><a class="headerlink" href="#apsw.mapping_sync" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_sync_dataonly.html">Synchronization Type Flags</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_SYNC_DATAONLY</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_SYNC_FULL</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_SYNC_NORMAL</span></tt></div></blockquote>
</dd></dl>

<dl class="data">
<dt id="apsw.mapping_wal_checkpoint">
<tt class="descname">mapping_wal_checkpoint</tt><a class="headerlink" href="#apsw.mapping_wal_checkpoint" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference external" href="https://sqlite.org/c3ref/c_checkpoint_full.html">Checkpoint operation parameters</a></p>
<blockquote>
<div><tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CHECKPOINT_FULL</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CHECKPOINT_PASSIVE</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SQLITE_CHECKPOINT_RESTART</span></tt></div></blockquote>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">APSW Module</a><ul>
<li><a class="reference internal" href="#api-reference">API Reference</a></li>
<li><a class="reference internal" href="#sqlite-constants">SQLite constants</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="extensions.html"
                        title="previous chapter">Extensions</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="connection.html"
                        title="next chapter">Connections to a database</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/apsw.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="connection.html" title="Connections to a database"
             >next</a> |</li>
        <li class="right" >
          <a href="extensions.html" title="Extensions"
             >previous</a> |</li>
        <li><a href="index.html">APSW 3.8.2-r1 documentation</a> &raquo;</li> 
      </ul>
    </div>

    <div class="footer">
        &copy; <a href="copyright.html">Copyright</a> 2004-2013, Roger Binns &lt;rogerb@rogerbinns.com&gt;.
      Last updated on Dec 08, 2013.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
<div class="footer">This page uses <a href="http://analytics.google.com/">
Google Analytics</a> to collect statistics. You can disable it by blocking
the JavaScript coming from www.google-analytics.com.
<script type="text/javascript">
  (function() {
    var ga = document.createElement('script');
    ga.src = ('https:' == document.location.protocol ?
              'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    ga.setAttribute('async', 'true');
    document.documentElement.firstChild.appendChild(ga);
  })();
</script>
</div>

  </body>
</html>