/usr/share/doc/cl-sql/html/update-record-from-slot.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 | <?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-SLOT</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-records-from-instance.html" title="UPDATE-RECORDS-FROM-INSTANCE" /><link rel="next" href="update-record-from-slots.html" title="UPDATE-RECORD-FROM-SLOTS" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">UPDATE-RECORD-FROM-SLOT</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="update-records-from-instance.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-record-from-slots.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="update-record-from-slot"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>UPDATE-RECORD-FROM-SLOT — Updates database from slot value.<strong>Function</strong></p></div><div class="refsect1"><a id="idp64245040"></a><h2>Syntax</h2><pre class="synopsis">
<code class="function">update-record-from-slot</code> <em class="replaceable"><code>object</code></em> <em class="replaceable"><code>slot</code></em> &key <em class="replaceable"><code>database</code></em> => <span class="returnvalue"></span></pre></div><div class="refsect1"><a id="idp64249008"></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>slot</code></em></span></dt><dd><p>
The name of a slot 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="idp64259552"></a><h2>Description</h2><p>Updates the value stored in the column represented by the
slot, specified by the CLOS slot name
<em class="parameter"><code>slot</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
<em class="parameter"><code>database</code></em> and the attribute represented by
<em class="parameter"><code>slot</code></em> is initialised from the value 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="idp64267504"></a><h2>Examples</h2><pre class="screen">
(select [email] :from [employee] :where [= [emplid] 1] :field-names nil :flatp t)
=> ("lenin@soviet.org")
(defvar *e1* (car (select 'employee :where [= [slot-value 'employee 'emplid] 1] :flatp t)))
=> *E1*
(slot-value *e1* 'email)
=> "lenin@soviet.org"
(setf (slot-value *e1* 'email) "v.lenin@soviet.org")
=> "v.lenin@soviet.org"
(update-record-from-slot *e1* 'email)
=>
(select [email] :from [employee] :where [= [emplid] 1] :field-names nil :flatp t)
=> ("v.lenin@soviet.org")
</pre></div><div class="refsect1"><a id="idp64269600"></a><h2>Side Effects</h2><p>
Modifies database.
</p></div><div class="refsect1"><a id="idp64270960"></a><h2>Affected By</h2><p>
Nothing.
</p></div><div class="refsect1"><a id="idp64272304"></a><h2>Exceptional Situations</h2><p>
Database errors.
</p></div><div class="refsect1"><a id="idp64273664"></a><h2>See Also</h2><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="link" href="update-record-from-slots.html" title="UPDATE-RECORD-FROM-SLOTS"><code class="function">update-record-from-slots</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></div><div class="refsect1"><a id="idp64277840"></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-records-from-instance.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-record-from-slots.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">UPDATE-RECORDS-FROM-INSTANCE </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> UPDATE-RECORD-FROM-SLOTS</td></tr></table></div></body></html>
|