r9752: 10 Jul 2004 Kevin Rosenberg <kevin@rosenberg.net>
[clsql.git] / doc / ref-oodml.xml
1 <?xml version='1.0' ?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % myents SYSTEM "entities.inc">
5 %myents;
6 ]>
7
8 <!-- Object Oriented Data Manipulation Language --> 
9 <reference id="ref-oodml"> 
10   <title>Object Oriented Data Manipulation Language (OODML)</title> 
11     <partintro>
12     <para>
13       Object Oriented Data Manipulation Language (OODML) provides a Common Lisp
14       Object System (CLOS) interface to SQL databases. View classes are defined with
15       the <link linkend="ref-ooddl">OODDL</link> interface and objects are read and
16       written with the OODML.
17     </para>
18     <para>
19       The main function for reading data with the OODML is the <link
20       linkend="select"><function>select</function></link>
21       function. The <function>select</function> is also used in the
22       FDML. However, when <function>select</function> is given a view
23       class name, it returns a list of instances of view classes.
24     </para>
25     <para>
26       View class instances can be updated to reflect any changes in
27       the database with the functions <link
28       linkend="update-slot-from-record"><function>update-slot-from-record</function></link>
29       and <link
30       linkend="update-instance-from-records"><function>update-instance-from-records</function></link>.
31     </para>
32     <para>To update the database to reflect changes made to instances of view classes, use the functions <link
33       linkend="update-records-from-instance"><function>update-records-from-instance</function></link>,
34       <link
35       linkend="update-record-from-slot"><function>update-record-from-slot</function></link>, and
36       <link
37       linkend="update-record-from-slots"><function>update-record-from-slots</function></link>.
38     </para>
39     <para>
40       The function <link
41       linkend="delete-instance-records"><function>delete-instance-records</function></link>
42       deletes the records corresponding to an instance of a view
43       class.
44     </para>
45   </partintro>
46
47   <refentry id="db-auto-sync">
48     <refnamediv>
49       <refname>*DB-AUTO-SYNC*</refname>
50       <refpurpose>Enables SQL storage during Lisp object creation.</refpurpose>
51       <refclass>Variable</refclass>
52     </refnamediv>
53     <refsect1>
54       <title>Value Type</title>
55       <para>
56         Boolean
57       </para> 
58     </refsect1>
59     <refsect1>
60       <title>Initial Value</title>
61       <para>&nil;</para>
62     </refsect1>
63     <refsect1>
64       <title>Description</title> 
65       <para>
66         When this variable is &t; an instance is stored in the SQL
67         database when the instance is created by
68         <function>make-instance</function>. When this variable is
69         &nil;, which is the default value, &clsql; behaves like
70         &commonsql;: instances of view classes are stored to the SQL
71         database only when <link
72         linkend="update-record-from-slots"><function>update-record-from-slots</function></link>
73         is called.
74       </para>
75     </refsect1>
76     <refsect1>
77       <title>Examples</title>
78       <screen>
79         (let ((instance (make-instance 'foo)))
80           (update-record-from-slots instance))
81
82         ;; is equivalent to
83
84         (let ((*db-auto-sync* t))
85           (make-instance 'foo))
86       </screen>
87     </refsect1>
88     <refsect1>
89       <title>Affected By</title>
90       <para>None.</para>
91     </refsect1>
92     <refsect1>
93       <title>See Also</title>
94       <simplelist>
95         <member><link linkend="update-record-from-slots"><function>update-record-from-slots</function></link></member>
96       </simplelist>
97     </refsect1>
98     <refsect1>
99       <title>Notes</title>
100       <para>None.</para>
101     </refsect1>
102   </refentry>
103
104   <refentry id="default-update-objects-max-len">
105     <refnamediv>
106       <refname>*DEFAULT-UPDATE-OBJECTS-MAX-LEN*</refname>
107       <refpurpose>The default maximum number of objects each query to perform a join</refpurpose>
108       <refclass>Variable</refclass>
109     </refnamediv>
110     <refsect1>
111       <title>Value Type</title>
112       <para>
113         (or null integer)
114       </para> 
115     </refsect1>
116     <refsect1>
117       <title>Initial Value</title>
118       <para>&nil;</para>
119     </refsect1>
120     <refsect1>
121       <title>Description</title>
122       <para>
123         This special variable provides the default value for the
124         <parameter>max-len</parameter> argument of the function <link
125         linkend="update-object-joins"><function>update-object-joins</function></link>.
126       </para>
127     </refsect1>
128     <refsect1>
129       <title>Examples</title>
130       <screen>
131         (setq *default-update-objects-max-len* 100)
132       </screen>
133     </refsect1>
134     <refsect1>
135       <title>Affected By</title>
136       <para>None.</para>
137     </refsect1>
138     <refsect1>
139       <title>See Also</title>
140       <simplelist>
141         <member><link linkend="update-object-joins"><function>update-object-joins</function></link></member>
142       </simplelist>
143     </refsect1>
144     <refsect1>
145       <title>Notes</title>
146       <para>None.</para>
147     </refsect1>
148   </refentry>
149
150   <refentry id="delete-instance-records">
151     <refnamediv>
152       <refname>DELETE-INSTANCE-RECORDS</refname>
153       <refpurpose>Delete SQL records represented by a view class
154       object.</refpurpose>
155       <refclass>Function</refclass>
156     </refnamediv>
157     <refsect1>
158       <title>Syntax</title>
159       <synopsis>
160       <function>(delete-instance-records object)</function> => <returnvalue><!-- result --></returnvalue></synopsis>
161     </refsect1>
162     <refsect1>
163       <title>Arguments and Values</title>
164       <variablelist>
165         <varlistentry>
166           <term><parameter>object</parameter></term>
167           <listitem>
168             <para>
169               An instance of a view class.
170             </para>
171           </listitem>
172         </varlistentry>
173       </variablelist>
174     </refsect1>
175     <refsect1>
176       <title>Description</title>
177       <para>Deletes the records represented by
178       <parameter>object</parameter> in the appropriate table of the
179       database associated with <parameter>object</parameter>. If
180       <parameter>object</parameter> is not yet associated with a
181       database, an error is signalled.
182       </para>
183     </refsect1>
184     <refsect1>
185       <title>Examples</title>
186       <screen>
187         * (def-view-class tab () ((a :type integer :db-kind :key) (b :type string)))
188         #&lt;clsql-sys::db-standard-class tab> 
189         * (defvar obj (let ((*db-auto-sync* t))
190                         (make-instance 'tab :a 5 :b "the string")))
191         * (start-sql-recording :type :both)
192         * (delete-instance-records obj)                 
193       </screen>
194     </refsect1>
195     <refsect1>
196       <title>Side Effects</title>
197       <para>
198         Deletes data from the SQL database.
199       </para>
200     </refsect1>
201     <refsect1>
202       <title>Affected by</title>
203       <para>
204         Permissions granted by the SQL database to the user in the database connection.
205       </para>
206     </refsect1>
207     <refsect1>
208       <title>Exceptional Situations</title>
209       <para>
210         An exception may be signaled if the database connection user does not have
211         sufficient privileges to modify the database.
212       </para>
213     </refsect1>
214     <refsect1>
215       <title>See Also</title>
216       <para>
217         <simplelist>
218           <member><link linkend="update-records"><function>update-records</function></link></member>
219           <member><link linkend="update-records-from-instance"><function>update-records-from-instance</function></link></member>
220         </simplelist>
221       </para>
222     </refsect1>
223     <refsect1>
224       <title>Notes</title>
225       <para>
226         Instances are referenced in the database by values stored in the key slots. If
227         <function>delete-records-from-instance</function> is called with an instance of a class that does
228         not contain any keys, then all records in that table will be deleted. 
229       </para>
230     </refsect1>
231   </refentry> 
232
233   <refentry id="instance-refreshed">
234     <refnamediv>
235       <refname>INSTANCE-REFRESHED</refname>
236       <refpurpose>User hook to call on object refresh.</refpurpose>
237       <refclass>Generic function</refclass>
238     </refnamediv>
239     <refsect1>
240       <title>Syntax</title>
241       <synopsis>
242       <function>(instance-refreshed object)</function> => <returnvalue><!-- result --></returnvalue></synopsis>
243     </refsect1>
244     <refsect1>
245       <title>Arguments and Values</title>
246       <variablelist>
247         <varlistentry>
248           <term><parameter>object</parameter></term>
249           <listitem>
250             <para>
251               The view class object which is being refreshed.
252             </para>
253           </listitem>
254         </varlistentry>
255       </variablelist>
256     </refsect1>
257     <refsect1>
258       <title>Description</title>
259       <para>Provides a hook which is called within an object oriented
260       call to <function>select</function> with a non-nil value of
261       <parameter>refresh</parameter> when the View Class instance
262       <parameter>object</parameter> has been updated from the
263       database. A method specialised on
264       <type>standard-db-object</type> is provided which has no
265       effects. Methods specialised on particular View Classes can be
266       used to specify any operations that need to be made on View
267       Classes instances which have been updated in calls to
268       <function>select</function>.
269       </para>
270     </refsect1>
271     <refsect1>
272       <title>Examples</title>
273       <screen>
274         <!-- examples -->
275       </screen>
276     </refsect1>
277     <refsect1>
278       <title>Side Effects</title>
279       <para>
280         The user hook function may cause side effects.
281       </para>
282     </refsect1>
283     <refsect1>
284       <title>Exceptional Situations</title>
285       <para>
286         None.
287       </para>
288     </refsect1>
289     <refsect1>
290       <title>See Also</title>
291       <para>
292         <simplelist>
293           <member><link linkend="select"><function>select</function></link></member>
294         </simplelist>
295       </para>
296     </refsect1>
297   </refentry> 
298
299   <refentry id="update-instance-from-records">
300     <refnamediv>
301       <refname>UPDATE-INSTANCE-FROM-RECORDS</refname>
302       <refpurpose>Update slot values from database.</refpurpose>
303       <refclass>Function</refclass>
304     </refnamediv>
305     <refsect1>
306       <title>Syntax</title>
307       <synopsis>
308       <function>(update-instance-from-records object &amp;key database)</function> => <returnvalue><!-- result --></returnvalue></synopsis>
309     </refsect1>
310     <refsect1>
311       <title>Arguments and Values</title>
312       <variablelist>
313         <varlistentry>
314           <term><parameter>object</parameter></term>
315           <listitem>
316             <para>
317               An instance of a view class.
318             </para>
319           </listitem>
320         </varlistentry>
321         <varlistentry>
322           <term><parameter>database</parameter></term>
323           <listitem>
324             <para>
325               A database connection.
326             </para>
327           </listitem>
328         </varlistentry>
329       </variablelist>
330     </refsect1>
331     <refsect1>
332       <title>Description</title>
333       <para>Updates the slot values of the View Class instance
334       <parameter>object</parameter> using the attribute values of the
335       appropriate table of <parameter>database</parameter> which
336       defaults to the database associated with
337       <parameter>object</parameter> or, if <parameter>object</parameter> is not associated
338       with a database, <variable>*default-database*</variable>.  Join slots are updated but
339       instances of the class on which the join is made are not
340       updated.
341       </para>
342     </refsect1>
343     <refsect1>
344       <title>Examples</title>
345       <screen>
346         <!-- examples -->
347       </screen>
348     </refsect1>
349     <refsect1>
350       <title>Side Effects</title>
351       <para>
352         Slot values of <parameter>object</parameter> may be modified.
353       </para>
354     </refsect1>
355     <refsect1>
356       <title>Affected by</title>
357       <para>
358         <simplelist>
359           Data in SQL database.
360         </simplelist>
361       </para>
362     </refsect1>
363     <refsect1>
364       <title>Exceptional Situations</title>
365       <para>
366         If <parameter>database</parameter> is not able to be read.
367       </para>
368     </refsect1>
369     <refsect1>
370       <title>See Also</title>
371       <para>
372         <simplelist>
373           <!-- see also --> 
374         </simplelist>
375       </para>
376     </refsect1>
377     <refsect1>
378       <title>Notes</title>
379       <para>
380         <!-- notes --> 
381       </para>
382     </refsect1>
383   </refentry> 
384
385   <refentry id="update-objects-joins">
386     <refnamediv>
387       <refname>UPDATE-OBJECTS-JOINS</refname>
388       <refpurpose>Updates joined slots of objects.</refpurpose>
389       <refclass>Function</refclass>
390     </refnamediv>
391     <refsect1>
392       <title>Syntax</title>
393       <synopsis>
394       <function>(update-objects-joins objects &amp;key (slots t) (force-p t) class-name (max-len *default-update-objects-max-len*))</function> => <returnvalue><!-- result --></returnvalue></synopsis>
395     </refsect1>
396     <refsect1>
397       <title>Arguments and Values</title>
398       <variablelist>
399         <varlistentry>
400           <term><parameter>objects</parameter></term>
401           <listitem>
402             <para>
403               A list of instances of a view class.
404             </para>
405           </listitem>
406         </varlistentry>
407         <varlistentry>
408           <term><parameter>slots</parameter></term>
409           <listitem>
410             <para>
411             </para>
412           </listitem>
413         </varlistentry>
414         <varlistentry>
415           <term><parameter>force-p</parameter></term>
416           <listitem>
417             <para>
418             </para>
419           </listitem>
420         </varlistentry>
421         <varlistentry>
422           <term><parameter>class-name</parameter></term>
423           <listitem>
424             <para>
425               A list of instances of a view class.
426             </para>
427           </listitem>
428         </varlistentry>
429         <varlistentry>
430           <term><parameter>max-len</parameter></term>
431           <listitem>
432             <para>
433             </para>
434           </listitem>
435         </varlistentry>
436       </variablelist>
437     </refsect1>
438     <refsect1>
439       <title>Description</title>
440       <para>Updates from the records of the appropriate database
441       tables the join slots specified by <parameter>slots</parameter>
442       in the supplied list of View Class instances
443       <parameter>objects</parameter>. <parameter>slots</parameter>
444       when &t; means that all join slots with :retrieval :immediate
445       are updated. <parameter>class-name</parameter> is used to
446       specify the View Class of all instance in
447       <parameter>objects</parameter>, when &nil; then the class of the
448       first instance in <parameter>objects</parameter> is
449       used. <parameter>force-p</parameter> when &t; means that all
450       join slots are updated whereas a value of &nil; means that only
451       unbound join slots are updated. <parameter>max-len</parameter>
452       when non-nil specifies that
453       <function>update-object-joins</function> may issue multiple
454       database queries with a maximum of
455       <parameter>max-len</parameter> instances updated in each query.
456       </para>
457     </refsect1>
458     <refsect1>
459       <title>Examples</title>
460       <screen>
461         <!-- examples -->
462       </screen>
463     </refsect1>
464     <refsect1>
465       <title>Side Effects</title>
466       <para>
467         <!-- side effects --> 
468       </para>
469     </refsect1>
470     <refsect1>
471       <title>Affected by</title>
472       <para>
473         <simplelist>
474       <simplelist>
475         <member><link
476         linkend="default-update-objects-max-len"><variable>*default-update-objects-max-len*</variable></link></member>
477       </simplelist>
478         </simplelist>
479       </para>
480     </refsect1>
481     <refsect1>
482       <title>Exceptional Situations</title>
483       <para>
484         Database errors.
485       </para>
486     </refsect1>
487     <refsect1>
488       <title>See Also</title>
489       <para>
490         <simplelist>
491           <!-- see also --> 
492         </simplelist>
493       </para>
494     </refsect1>
495     <refsect1>
496       <title>Notes</title>
497       <para>
498         <!-- notes --> 
499       </para>
500     </refsect1>
501   </refentry>
502
503   <refentry id="update-record-from-slot">
504     <refnamediv>
505       <refname>UPDATE-RECORD-FROM-SLOT</refname>
506       <refpurpose>Updates database from slot value.</refpurpose>
507       <refclass>Function</refclass>
508     </refnamediv>
509     <refsect1>
510       <title>Syntax</title>
511       <synopsis>
512       <function>(update-record-from-slot object slot &amp;key database)</function> => <returnvalue><!-- result --></returnvalue></synopsis>
513     </refsect1>
514     <refsect1>
515       <title>Arguments and Values</title>
516       <variablelist>
517         <varlistentry>
518           <term><parameter>object</parameter></term>
519           <listitem>
520             <para>
521               An instance of a view class.
522             </para>
523           </listitem>
524         </varlistentry>
525         <varlistentry>
526           <term><parameter>slot</parameter></term>
527           <listitem>
528             <para>
529               The name of a slot in <parameter>object</parameter>.
530             </para>
531           </listitem>
532         </varlistentry>
533         <varlistentry>
534           <term><parameter>database</parameter></term>
535           <listitem>
536             <para>
537               A database connection.
538             </para>
539           </listitem>
540         </varlistentry>
541       </variablelist>
542     </refsect1>
543     <refsect1>
544       <title>Description</title>
545       <para>Updates the value stored in the column represented by the
546       slot, specified by the CLOS slot name
547       <parameter>slot</parameter>, of View Class instance
548       <parameter>object</parameter>. <parameter>database</parameter>
549       specifies the database in which the update is made only if
550       <parameter>object</parameter> is not associated with a
551       database. In this case, a record is created in
552       <parameter>database</parameter> and the attribute represented by
553       <parameter>slot</parameter> is initialised from the value of the
554       supplied slots with other attributes having default
555       values. Furthermore, <parameter>object</parameter> becomes
556       associated with <parameter>database</parameter>.
557       </para>
558     </refsect1>
559     <refsect1>
560       <title>Examples</title>
561       <screen>
562         <!-- examples -->
563       </screen>
564     </refsect1>
565     <refsect1>
566       <title>Side Effects</title>
567       <para>
568         Modifies database.
569       </para>
570     </refsect1>
571     <refsect1>
572       <title>Affected By</title>
573       <para>
574         Nothing.
575       </para>
576     </refsect1>
577     <refsect1>
578       <title>Exceptional Situations</title>
579       <para>
580         Database errors.
581       </para>
582     </refsect1>
583     <refsect1>
584       <title>See Also</title>
585       <para>
586         <simplelist>
587           <member><link linkend="update-record-from-slots"><function>update-record-from-slots</function></link></member>
588           <member><link linkend="update-records-from-instance"><function>update-records-from-instance</function></link></member>
589         </simplelist>
590       </para>
591     </refsect1>
592     <refsect1>
593       <title>notes</title>
594       <para>
595         <!-- notes --> 
596       </para>
597     </refsect1>
598   </refentry> 
599
600   <refentry id="update-record-from-slots">
601     <refnamediv>
602       <refname>update-record-from-slots</refname>
603       <refpurpose>update database from slots of view class object.</refpurpose>
604       <refclass>function</refclass>
605     </refnamediv>
606     <refsect1>
607       <title>syntax</title>
608       <synopsis>
609       <function>(update-record-from-slots object slots &amp;key (database *default-database*))</function> => <returnvalue><!-- result --></returnvalue></synopsis>
610     </refsect1>
611     <refsect1>
612       <title>Arguments and Values</title>
613       <variablelist>
614         <varlistentry>
615           <term><parameter>object</parameter></term>
616           <listitem>
617             <para>
618               An instance of a view class.
619             </para>
620           </listitem>
621         </varlistentry>
622         <varlistentry>
623           <term><parameter>slots</parameter></term>
624           <listitem>
625             <para>
626               A list of slot names in <parameter>object</parameter>.
627             </para>
628           </listitem>
629         </varlistentry>
630         <varlistentry>
631           <term><parameter>database</parameter></term>
632           <listitem>
633             <para>
634               A database connection.
635             </para>
636           </listitem>
637         </varlistentry>
638       </variablelist>
639     </refsect1>
640     <refsect1>
641       <title>Description</title>
642       <para>Updates the values stored in the columns represented by
643       the slots, specified by the clos slot names
644       <parameter>slots</parameter>, of view class instance
645       <parameter>object</parameter>. <parameter>database</parameter>
646       specifies the database in which the update is made only if
647       <parameter>object</parameter> is not associated with a
648       database. In this case, a record is created in the appropriate
649       table of <parameter>database</parameter> and the attributes
650       represented by <parameter>slots</parameter> are initialised from
651       the values of the supplied slots with other attributes having
652       default values. Furthermore, <parameter>object</parameter>
653       becomes associated with <parameter>database</parameter>.
654       </para>
655     </refsect1>
656     <refsect1>
657       <title>Examples</title>
658       <screen>
659         <!-- examples -->
660       </screen>
661     </refsect1>
662     <refsect1>
663       <title>Side Effects</title>
664       <para>
665         Modifies the SQL database.
666       </para>
667     </refsect1>
668     <refsect1>
669       <title>Affected by</title>
670       <para>
671         Nothing.
672       </para>
673     </refsect1>
674     <refsect1>
675       <title>Exceptional Situations</title>
676       <para>
677         Database errors.
678       </para>
679     </refsect1>
680     <refsect1>
681       <title>See Also</title>
682       <para>
683         <simplelist>
684           <member><link linkend="update-record-from-slot"><function>update-record-from-slot</function></link></member>
685           <member><link linkend="update-records-from-instance"><function>update-records-from-instance</function></link></member>
686         </simplelist>
687       </para>
688     </refsect1>
689     <refsect1>
690       <title>Notes</title>
691       <para>
692         <!-- notes --> 
693       </para>
694     </refsect1>
695   </refentry> 
696
697
698   <refentry id="update-records-from-instance">
699     <refnamediv>
700       <refname>UPDATE-RECORDS-FROM-INSTANCE</refname>
701       <refpurpose>Update database from view class object.</refpurpose>
702       <refclass>Function</refclass>
703     </refnamediv>
704     <refsect1>
705       <title>Syntax</title>
706       <synopsis>
707       <function>(update-records-from-instance object &amp;key (database *default-database*))</function> => <returnvalue><!-- result --></returnvalue></synopsis>
708     </refsect1>
709     <refsect1>
710       <title>Arguments and Values</title>
711       <variablelist>
712         <varlistentry>
713           <term><parameter>object</parameter></term>
714           <listitem>
715             <para>
716               An instance of a view class.
717             </para>
718           </listitem>
719         </varlistentry>
720         <varlistentry>
721           <term><parameter>database</parameter></term>
722           <listitem>
723             <para>
724               A database connection.
725             </para>
726           </listitem>
727         </varlistentry>
728       </variablelist>
729     </refsect1>
730     <refsect1>
731       <title>Description</title>
732       <para>Using an instance of a View Class,
733       <parameter>object</parameter>, update the table that stores its
734       instance data. <parameter>database</parameter> specifies the
735       database in which the update is made only if
736       <parameter>object</parameter> is not associated with a
737       database. In this case, a record is created in the appropriate
738       table of <parameter>database</parameter> using values from the
739       slot values of <parameter>object</parameter>, and
740       <parameter>object</parameter> becomes associated with
741       <parameter>database</parameter>.
742       </para>
743     </refsect1>
744     <refsect1>
745       <title>Examples</title>
746       <screen>
747         <!-- examples -->
748       </screen>
749     </refsect1>
750     <refsect1>
751       <title>Side Effects</title>
752       <para>
753         Modifies the database.
754       </para>
755     </refsect1>
756     <refsect1>
757       <title>Affected by</title>
758       <para>
759         Nothing.
760       </para>
761     </refsect1>
762     <refsect1>
763       <title>Exceptional Situations</title>
764       <para>
765         Database errors.
766       </para>
767     </refsect1>
768     <refsect1>
769       <title>See Also</title>
770       <para>
771         <simplelist>
772           <member><link linkend="update-record-from-slot"><function>update-record-from-slot</function></link></member>
773           <member><link linkend="update-record-from-slots"><function>update-record-from-slots</function></link></member>
774         </simplelist>
775       </para>
776     </refsect1>
777     <refsect1>
778       <title>Notes</title>
779       <para>
780         <!-- notes --> 
781       </para>
782     </refsect1>
783   </refentry> 
784
785   <refentry id="update-slot-from-record">
786     <refnamediv>
787       <refname>UPDATE-SLOT-FROM-RECORD</refname>
788       <refpurpose>Update objects slot from database.</refpurpose>
789       <refclass>Function</refclass>
790     </refnamediv>
791     <refsect1>
792       <title>Syntax</title>
793       <synopsis>
794       <function>(update-slot-from-record object slot &amp;key (database *default-database*))</function> => <returnvalue><!-- result --></returnvalue></synopsis>
795     </refsect1>
796     <refsect1>
797       <title>Arguments and Values</title>
798       <variablelist>
799         <varlistentry>
800           <term><parameter>object</parameter></term>
801           <listitem>
802             <para>
803               An instance of a view class.
804             </para>
805           </listitem>
806         </varlistentry>
807         <varlistentry>
808           <term><parameter>slot</parameter></term>
809           <listitem>
810             <para>
811               The name of a slot in <parameter>object</parameter>.
812             </para>
813           </listitem>
814         </varlistentry>
815         <varlistentry>
816           <term><parameter>database</parameter></term>
817           <listitem>
818             <para>
819               A database connection.
820             </para>
821           </listitem>
822         </varlistentry>
823       </variablelist>
824     </refsect1>
825     <refsect1>
826       <title>Description</title>
827       <para>Updates the slot value, specified by the CLOS slot name
828       <parameter>slot</parameter>, of the View Class instance
829       <parameter>object</parameter> using the attribute values of the
830       appropriate table of <parameter>database</parameter> which
831       defaults to the database associated with
832       <parameter>object</parameter> or, if
833       <parameter>object</parameter> is not associated with a database,
834       <variable>*default-database*</variable>.  Join slots are updated
835       but instances of the class on which the join is made are not
836       updated.
837       </para>
838     </refsect1>
839     <refsect1>
840       <title>Examples</title>
841       <screen>
842         <!-- examples -->
843       </screen>
844     </refsect1>
845     <refsect1>
846       <title>Side Effects</title>
847       <para>
848         Modifies the slot value of the object.
849       </para>
850     </refsect1>
851     <refsect1>
852       <title>Affected by</title>
853       <para>
854         <simplelist>
855           <member>Data in SQL database.</member>
856         </simplelist>
857       </para>
858     </refsect1>
859     <refsect1>
860       <title>Exceptional Situations</title>
861       <para>
862         Database errors.
863       </para>
864     </refsect1>
865     <refsect1>
866       <title>See Also</title>
867       <para>
868         <simplelist>
869           <!-- see also --> 
870         </simplelist>
871       </para>
872     </refsect1>
873     <refsect1>
874       <title>Notes</title>
875       <para>
876         <!-- notes --> 
877       </para>
878     </refsect1>
879   </refentry> 
880
881 </reference>