</para>
<programlisting>
-CREATE TABLE EMPLOYEE (
- emplid NOT NULL number(38),
- first_name NOT NULL varchar2(30),
- last_name NOT NULL varchar2(30),
- emall varchar2(100),
- companyid NOT NULL number(38),
- managerid number(38)
-)
-
-CREATE TABLE COMPANY (
- companyid NOT NULL number(38),
- name NOT NULL varchar2(100),
- presidentid NOT NULL number(38)
-)
+CREATE TABLE EMPLOYEE ( emplid NOT NULL number(38),
+ first_name NOT NULL varchar2(30),
+ last_name NOT NULL varchar2(30),
+ email varchar2(100),
+ companyid NOT NULL number(38),
+ managerid number(38))
+
+CREATE TABLE COMPANY ( companyid NOT NULL number(38),
+ name NOT NULL varchar2(100),
+ presidentid NOT NULL number(38))
</programlisting>
<para>
(clsql:def-view-class company ()
((companyid
- :db-type :key
+ :db-kind :key
:db-constraints :not-null
:type integer
:initarg :companyid)
<listitem>
<para>
- <symbol>:db-type</symbol> - A string which will be used as the
+ <symbol>:column-</symbol> - A string which will be used as the
type specifier for this slots column definition in the database.
</para></listitem>
<listitem>
<para>
- <symbol>:nulls-ok</symbol> - If &t;, all &sql; &null; values
- retrieved from the database become nil; if &nil;, all &null;
- values retrieved are converted by
- <function>DATABASE-NULL-VALUE</function>. </para></listitem>
+ <symbol>:void-value</symbol> - The Lisp value to return if the
+ field is &null;. The default is &nil;.</para></listitem>
<listitem>
<para>
<para>
In an &sql; only application, the <symbol>EMPLOYEE</symbol> and
<symbol>COMPANY</symbol> tables can be queried to determine things
-like, "Who is Vladamir's manager?", What company does Josef work
+like, "Who is Vladamir's manager?", "What company does Josef work
for?", and "What employees work for Widgets Inc.". This is done by
joining tables with an &sql; query.
</para>
</para>
<para>
-Note: the file <filename>doc/clsql-tutorial.lisp</filename> contains
+Note: the file <filename>examples/clsql-tutorial.lisp</filename> contains
view class definitions which you can load into your list at this point
in order to play along at home.
</para>