r9561: Added reference documentation for CLSQL package.
[clsql.git] / doc / ref-ooddl.xml
diff --git a/doc/ref-ooddl.xml b/doc/ref-ooddl.xml
new file mode 100644 (file)
index 0000000..568cb1a
--- /dev/null
@@ -0,0 +1,392 @@
+<?xml version='1.0' ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % myents SYSTEM "entities.inc">
+%myents;
+]>
+
+<!-- Object Oriented Data Definition Language --> 
+<reference id="ref-ooddl"> 
+  <title>Object Oriented Data Definition Language (OODDL)</title> 
+    <partintro>
+    <para>
+      <!-- introduction --> 
+    </para>
+  </partintro>
+
+  <refentry id="standard-db-object">
+    <refnamediv>
+      <refname>STANDARD-DB-OBJECT</refname>
+      <refpurpose>Superclass for all &clsql; View Classes.</refpurpose>
+      <refclass>Class</refclass>
+    </refnamediv>
+    <refsect1>
+      <title>Class Precedence List</title>
+      <para>
+        <simplelist type="inline">
+          <member><type>standard-db-object</type></member>
+          <member><type>standard-object</type></member>
+          <member><type>t</type></member>
+        </simplelist>
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Description</title> <para>This class is the superclass
+      of all &clsql; View Classes.</para>
+    </refsect1>
+    <refsect1>
+      <title class="contenttitle">Class details</title>
+      <programlisting>(defclass STANDARD-DB-OBJECT ()(...))</programlisting>
+    </refsect1>
+    <refsect1>
+      <title class="contenttitle">Slots</title>
+      <para>
+        <simplelist> 
+          <property>slot VIEW-DATABASE is of type T</property>
+        </simplelist> 
+      </para>
+    </refsect1>
+  </refentry>
+
+  <refentry id="default-varchar-length">
+    <refnamediv>
+      <refname>*DEFAULT-VARCHAR-LENGTH*</refname>
+      <refpurpose><!-- purpose --></refpurpose>
+      <refclass>Variable</refclass>
+    </refnamediv>
+    <refsect1>
+      <title>Value Type</title>
+      <para>
+        <!-- value type --> 
+      </para> 
+    </refsect1>
+    <refsect1>
+      <title>Initial Value</title>
+      <para><symbol>nil</symbol></para>
+    </refsect1>
+    <refsect1>
+      <title>Description</title>
+      <!-- description --> 
+    </refsect1>
+    <refsect1>
+      <title>Examples</title>
+      <screen>
+        <!-- examples --> 
+      </screen>
+    </refsect1>
+    <refsect1>
+      <title>Affected By</title>
+      <para>None.</para>
+    </refsect1>
+    <refsect1>
+      <title>See Also</title>
+      <para>None.</para>
+    </refsect1>
+    <refsect1>
+      <title>Notes</title>
+      <para>None.</para>
+    </refsect1>
+  </refentry>
+
+  <refentry id="create-view-from-class">
+    <refnamediv>
+      <refname>CREATE-VIEW-FROM-CLASS</refname>
+      <refpurpose><!-- purpose --></refpurpose>
+      <refclass>Function</refclass>
+    </refnamediv>
+    <refsect1>
+      <title>Syntax</title>
+      <synopsis>
+      <function> (CREATE-VIEW-FROM-CLASS VIEW-CLASS-NAME &amp;KEY (DATABASE *DEFAULT-DATABASE*)) [function]</function> => <returnvalue><!-- result --></returnvalue></synopsis>
+    </refsect1>
+    <refsect1>
+      <title>Arguments and Values</title>
+      <variablelist>
+        <!-- arguments and values --> 
+      </variablelist>
+    </refsect1>
+    <refsect1>
+      <title>Description</title>
+      <para>Creates a table as defined by the View Class
+      VIEW-CLASS-NAME in DATABASE which defaults to
+      *DEFAULT-DATABASE*.
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Examples</title>
+      <screen>
+        <!-- examples -->
+      </screen>
+    </refsect1>
+    <refsect1>
+      <title>Side Effects</title>
+      <para>
+        <!-- side effects --> 
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Affected by</title>
+      <para>
+        <simplelist>
+          <!-- affected by --> 
+        </simplelist>
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Exceptional Situations</title>
+      <para>
+        <!-- execeptional situations -->
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>See Also</title>
+      <para>
+        <simplelist>
+          <!-- see also --> 
+        </simplelist>
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Notes</title>
+      <para>
+        <!-- notes --> 
+      </para>
+    </refsect1>
+  </refentry>
+
+  <refentry id="def-view-class">
+    <refnamediv>
+      <refname>DEF-VIEW-CLASS</refname>
+      <refpurpose><!-- purpose --></refpurpose>
+      <refclass>Function</refclass>
+    </refnamediv>
+    <refsect1>
+      <title>Syntax</title>
+      <synopsis>
+      <function> (DEF-VIEW-CLASS CLASS SUPERS SLOTS &amp;REST CL-OPTIONS) [macro]</function> => <returnvalue><!-- result --></returnvalue></synopsis>
+    </refsect1>
+    <refsect1>
+      <title>Arguments and Values</title>
+      <variablelist>
+        <!-- arguments and values --> 
+      </variablelist>
+    </refsect1>
+    <refsect1>
+      <title>Description</title>
+      <para>Creates a View Class called CLASS whose slots SLOTS can
+      map onto the attributes of a table in a database. If SUPERS is
+      nil then the superclass of CLASS will be STANDARD-DB-OBJECT,
+      otherwise SUPERS is a list of superclasses for CLASS which
+      must include STANDARD-DB-OBJECT or a descendent of this
+      class. The syntax of DEFCLASS is extended through the addition
+      of a class option :base-table which defines the database table
+      onto which the View Class maps and which defaults to
+      CLASS. The DEFCLASS syntax is also extended through additional
+      slot options. The :db-kind slot option specifies the kind of
+      DB mapping which is performed for this slot and defaults to
+      :base which indicates that the slot maps to an ordinary column
+      of the database table. A :db-kind value of :key indicates that
+      this slot is a special kind of :base slot which maps onto a
+      column which is one of the unique keys for the database table,
+      the value :join indicates this slot represents a join onto
+      another View Class which contains View Class objects, and the
+      value :virtual indicates a standard CLOS slot which does not
+      map onto columns of the database table. If a slot is specified
+      with :db-kind :join, the slot option :db-info contains a list
+      which specifies the nature of the join. For slots of :db-kind
+      :base or :key, the :type slot option has a special
+      interpretation such that Lisp types, such as string, integer
+      and float are automatically converted into appropriate SQL
+      types for the column onto which the slot maps. This behaviour
+      may be over-ridden using the :db-type slot option which is a
+      string specifying the vendor-specific database type for this
+      slot's column definition in the database. The :column slot
+      option specifies the name of the SQL column which the slot
+      maps onto, if :db-kind is not :virtual, and defaults to the
+      slot name. The :void-value slot option specifies the value to
+      store if the SQL value is NULL and defaults to NIL. The
+      :db-constraints slot option is a string representing an SQL
+      table constraint expression or a list of such strings.
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Examples</title>
+      <screen>
+        <!-- examples -->
+      </screen>
+    </refsect1>
+    <refsect1>
+      <title>Side Effects</title>
+      <para>
+        <!-- side effects --> 
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Affected by</title>
+      <para>
+        <simplelist>
+          <!-- affected by --> 
+        </simplelist>
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Exceptional Situations</title>
+      <para>
+        <!-- execeptional situations -->
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>See Also</title>
+      <para>
+        <simplelist>
+          <!-- see also --> 
+        </simplelist>
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Notes</title>
+      <para>
+        <!-- notes --> 
+      </para>
+    </refsect1>
+  </refentry>
+
+  <refentry id="drop-view-from-class">
+    <refnamediv>
+      <refname>DROP-VIEW-FROM-CLASS</refname>
+      <refpurpose><!-- purpose --></refpurpose>
+      <refclass>Function</refclass>
+    </refnamediv>
+    <refsect1>
+      <title>Syntax</title>
+      <synopsis>
+      <function> (DROP-VIEW-FROM-CLASS VIEW-CLASS-NAME &amp;KEY (DATABASE *DEFAULT-DATABASE*)) [function]</function> => <returnvalue><!-- result --></returnvalue></synopsis>
+    </refsect1>
+    <refsect1>
+      <title>Arguments and Values</title>
+      <variablelist>
+        <!-- arguments and values --> 
+      </variablelist>
+    </refsect1>
+    <refsect1>
+      <title>Description</title>
+      <para>Removes a table defined by the View Class
+      VIEW-CLASS-NAME from DATABASE which defaults to
+      *DEFAULT-DATABASE*.
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Examples</title>
+      <screen>
+        <!-- examples -->
+      </screen>
+    </refsect1>
+    <refsect1>
+      <title>Side Effects</title>
+      <para>
+        <!-- side effects --> 
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Affected by</title>
+      <para>
+        <simplelist>
+          <!-- affected by --> 
+        </simplelist>
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Exceptional Situations</title>
+      <para>
+        <!-- execeptional situations -->
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>See Also</title>
+      <para>
+        <simplelist>
+          <!-- see also --> 
+        </simplelist>
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Notes</title>
+      <para>
+        <!-- notes --> 
+      </para>
+    </refsect1>
+  </refentry>
+
+  <refentry id="list-classes">
+    <refnamediv>
+      <refname>LIST-CLASSES</refname>
+      <refpurpose><!-- purpose --></refpurpose>
+      <refclass>Function</refclass>
+    </refnamediv>
+    <refsect1>
+      <title>Syntax</title>
+      <synopsis>
+      <function> (LIST-CLASSES &amp;KEY (TEST #'IDENTITY) (ROOT-CLASS (FIND-CLASS 'STANDARD-DB-OBJECT)) (DATABASE *DEFAULT-DATABASE*)) [function]</function> => <returnvalue><!-- result --></returnvalue></synopsis>
+    </refsect1>
+    <refsect1>
+      <title>Arguments and Values</title>
+      <variablelist>
+        <!-- arguments and values --> 
+      </variablelist>
+    </refsect1>
+    <refsect1>
+      <title>Description</title>
+      <para>Returns a list of all the View Classes which
+      are connected to DATABASE, which defaults to
+      *DEFAULT-DATABASE*, and which descend from the class
+      ROOT-CLASS and which satisfy the function TEST. By
+      default ROOT-CLASS is STANDARD-DB-OBJECT and TEST is
+      IDENTITY.
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Examples</title>
+      <screen>
+        <!-- examples -->
+      </screen>
+    </refsect1>
+    <refsect1>
+      <title>Side Effects</title>
+      <para>
+        <!-- side effects --> 
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Affected by</title>
+      <para>
+        <simplelist>
+          <!-- affected by --> 
+        </simplelist>
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Exceptional Situations</title>
+      <para>
+        <!-- execeptional situations -->
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>See Also</title>
+      <para>
+        <simplelist>
+          <!-- see also --> 
+        </simplelist>
+      </para>
+    </refsect1>
+    <refsect1>
+      <title>Notes</title>
+      <para>
+        <!-- notes --> 
+      </para>
+    </refsect1>
+  </refentry>
+
+
+
+
+</reference>