This file is indexed.

/usr/share/doc/cl-sql/html/with-transaction.html is in cl-sql 6.5.0-1.

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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!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>WITH-TRANSACTION</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /><link rel="home" href="index.html" title="CLSQL Users' Guide" /><link rel="up" href="ref-transaction.html" title="Transaction Handling" /><link rel="prev" href="set-autocommit.html" title="SET-AUTOCOMMIT" /><link rel="next" href="ref-ooddl.html" title="Object Oriented Data Definition Language (OODDL)" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">WITH-TRANSACTION</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="set-autocommit.html">Prev</a> </td><th width="60%" align="center">Transaction Handling</th><td width="20%" align="right"> <a accesskey="n" href="ref-ooddl.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="with-transaction"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>WITH-TRANSACTION — Execute a body of code within a transaction.<strong>Macro</strong></p></div><div class="refsect1"><a id="idp63579728"></a><h2>Syntax</h2><pre class="synopsis">
      <code class="function">with-transaction</code> &amp;key <em class="replaceable"><code>database</code></em> &amp;rest <em class="replaceable"><code>body</code></em> =&gt; <span class="returnvalue">result</span></pre></div><div class="refsect1"><a id="idp63583248"></a><h2>Arguments and Values</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>database</code></em></span></dt><dd><p>A 
            <a class="glossterm" href="glossary.html#gloss-database-object"><em class="glossterm">database
            object</em></a>. This will default to the value
            of <span class="symbol">*default-database*</span>.</p></dd><dt><span class="term"><em class="parameter"><code>body</code></em></span></dt><dd><p>
              A body of Lisp code. 
            </p></dd><dt><span class="term"><em class="parameter"><code>result</code></em></span></dt><dd><p>The result of executing <em class="parameter"><code>body</code></em>.</p></dd></dl></div></div><div class="refsect1"><a id="idp62572224"></a><h2>Description</h2><p>Starts a transaction in the database specified by
      <em class="parameter"><code>database</code></em>, which is
      <span class="symbol">*default-database*</span> by default, and executes
      <em class="parameter"><code>body</code></em> within that transaction. If
      <em class="parameter"><code>body</code></em> aborts or throws,
      <em class="parameter"><code>database</code></em> is rolled back and otherwise the
      transaction is committed.
      </p></div><div class="refsect1"><a id="idp62576880"></a><h2>Examples</h2><pre class="screen">
(in-transaction-p)
=&gt; NIL
(select [email] :from [employee] :where [= [emplid] 1] :flatp t :field-names nil)
=&gt; ("lenin@soviet.org")
(with-transaction () 
   (update-records [employee] 
                   :av-pairs '((email "lenin-nospam@soviet.org"))
                   :where [= [emplid] 1]))
=&gt; NIL
(select [email] :from [employee] :where [= [emplid] 1] :flatp t :field-names nil)
=&gt; ("lenin-nospam@soviet.org")
(in-transaction-p)
=&gt; NIL
      </pre></div><div class="refsect1"><a id="idp62578928"></a><h2>Side Effects</h2><p>
        Changes specified in <em class="parameter"><code>body</code></em> may be made
        to the underlying database if <em class="parameter"><code>body</code></em>
        completes successfully.
      </p></div><div class="refsect1"><a id="idp62581712"></a><h2>Affected by</h2><p>
        None. 
      </p></div><div class="refsect1"><a id="idp62583056"></a><h2>Exceptional Situations</h2><p>
        Signals an error of type <span class="symbol">sql-database-error</span>
        if <em class="parameter"><code>database</code></em> is not a database object.
        </p></div><div class="refsect1"><a id="idp62585600"></a><h2>See Also</h2><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="link" href="start-transaction.html" title="START-TRANSACTION"><code class="function">start-transaction</code></a></td></tr><tr><td><a class="link" href="commit.html" title="COMMIT"><code class="function">commit</code></a></td></tr><tr><td><a class="link" href="rollback.html" title="ROLLBACK"><code class="function">rollback</code></a></td></tr><tr><td><a class="link" href="add-transaction-commit-hook.html" title="ADD-TRANSACTION-COMMIT-HOOK"><code class="function">add-transaction-commit-hook</code></a></td></tr><tr><td><a class="link" href="add-transaction-rollback-hook.html" title="ADD-TRANSACTION-ROLLBACK-HOOK"><code class="function">add-transaction-rollback-hook</code></a></td></tr></table></div><div class="refsect1"><a id="idp62593520"></a><h2>Notes</h2><p>
        None. 
      </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="set-autocommit.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ref-transaction.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ref-ooddl.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SET-AUTOCOMMIT </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Object Oriented Data Definition Language (OODDL)</td></tr></table></div></body></html>