/usr/share/doc/cl-sql/html/update-record-from-slots.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 41 42 43 44 45 46 47 48 49 50 | <?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>UPDATE-RECORD-FROM-SLOTS</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-oodml.html" title="Object Oriented Data Manipulation Language (OODML)" /><link rel="prev" href="update-record-from-slot.html" title="UPDATE-RECORD-FROM-SLOT" /><link rel="next" href="update-instance-from-records.html" title="UPDATE-INSTANCE-FROM-RECORDS" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">UPDATE-RECORD-FROM-SLOTS</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="update-record-from-slot.html">Prev</a> </td><th width="60%" align="center">Object Oriented Data Manipulation Language (OODML)</th><td width="20%" align="right"> <a accesskey="n" href="update-instance-from-records.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="update-record-from-slots"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>UPDATE-RECORD-FROM-SLOTS — Update database from slots of view class object.<strong>function</strong></p></div><div class="refsect1"><a id="idp64281744"></a><h2>syntax</h2><pre class="synopsis">
<code class="function">update-record-from-slots</code> <em class="replaceable"><code>object</code></em> <em class="replaceable"><code>slots</code></em> &key <em class="replaceable"><code>database</code></em> => <span class="returnvalue"></span></pre></div><div class="refsect1"><a id="idp64285728"></a><h2>Arguments and Values</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>object</code></em></span></dt><dd><p>
An instance of a <a class="glossterm" href="glossary.html#gloss-view-class"><em class="glossterm">View Class</em></a>.
</p></dd><dt><span class="term"><em class="parameter"><code>slots</code></em></span></dt><dd><p>
A list of slot names in <em class="parameter"><code>object</code></em>.
</p></dd><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></dl></div></div><div class="refsect1"><a id="idp64296272"></a><h2>Description</h2><p>Updates the values stored in the columns represented by
the slots, specified by the clos slot names
<em class="parameter"><code>slots</code></em>, of <a class="glossterm" href="glossary.html#gloss-view-class"><em class="glossterm">View Class</em></a> instance
<em class="parameter"><code>object</code></em>. <em class="parameter"><code>database</code></em>
specifies the database in which the update is made only if
<em class="parameter"><code>object</code></em> is not associated with a
database. In this case, a record is created in the appropriate
table of <em class="parameter"><code>database</code></em> and the attributes
represented by <em class="parameter"><code>slots</code></em> are initialised from
the values of the supplied slots with other attributes having
default values. Furthermore, <em class="parameter"><code>object</code></em>
becomes associated with <em class="parameter"><code>database</code></em>.
</p></div><div class="refsect1"><a id="idp64304352"></a><h2>Examples</h2><pre class="screen">
(select [last-name] [email] :from [employee] :where [= [emplid] 1] :field-names nil)
=> (("Lenin" "lenin@soviet.org"))
(defvar *e1* (car (select 'employee :where [= [slot-value 'employee 'emplid] 1] :flatp t)))
=> *E1*
(slot-value *e1* 'last-name)
=> "Lenin"
(slot-value *e1* 'email)
=> "lenin@soviet.org"
(setf (slot-value *e1* 'last-name) "Ivanovich")
=> "Ivanovich"
(setf (slot-value *e1* 'email) "v.ivanovich@soviet.org")
=> "v.ivanovich@soviet.org"
(update-record-from-slots *e1* '(email last-name))
=>
(select [last-name] [email] :from [employee] :where [= [emplid] 1] :field-names nil)
=> (("Ivanovich" "v.ivanovich@soviet.org"))
</pre></div><div class="refsect1"><a id="idp64306592"></a><h2>Side Effects</h2><p>
Modifies the SQL database.
</p></div><div class="refsect1"><a id="idp64307952"></a><h2>Affected by</h2><p>
Nothing.
</p></div><div class="refsect1"><a id="idp64309296"></a><h2>Exceptional Situations</h2><p>
Database errors.
</p></div><div class="refsect1"><a id="idp64310656"></a><h2>See Also</h2><p>
</p><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="link" href="update-record-from-slot.html" title="UPDATE-RECORD-FROM-SLOT"><code class="function">update-record-from-slot</code></a></td></tr><tr><td><a class="link" href="update-records-from-instance.html" title="UPDATE-RECORDS-FROM-INSTANCE"><code class="function">update-records-from-instance</code></a></td></tr></table><p>
</p></div><div class="refsect1"><a id="idp64315248"></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="update-record-from-slot.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ref-oodml.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="update-instance-from-records.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">UPDATE-RECORD-FROM-SLOT </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> UPDATE-INSTANCE-FROM-RECORDS</td></tr></table></div></body></html>
|