Changeset 2978 in project for sqlite3-tinyclos/sqlite3-tinyclos.html

02/02/07 10:16:27 (14 years ago)
Thomas Chust

[sqlite3-tinyclos] Updated compiler flags to pull in tinyclos

1 edited


  • sqlite3-tinyclos/sqlite3-tinyclos.html

    r384 r2978  
    11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
    2 <!-- Generated by eggdoc Revision: 1.17  -->
     2<!-- Generated by eggdoc Revision: 1.20  -->
    2626                    border-top: 1px solid #448;
    2727                    padding-left: 1em;
    28      }
     28                    margin-bottom: 1.2em;
     29     }
     30     DIV.subsubsection {
     31                    border-top: 1px dotted #99c;
     32                    /* border-left: 1px solid #99c; */
     33                    padding-left: 1em;
     34                    margin-bottom: 1.2em;
     35     }
     36     DIV.subsubsubsection {
     37                    border-top: 1px solid #ddf;
     38                    padding-left: 1em;
     39                    margin-bottom: 1.2em;
     40     }
    2942         DIV.section {
    3043                 margin-bottom: 1.5em;
    4558                 margin: 0 0 1em 0;
    4659        }
    47         LI {
     60        UL LI {
    4861                list-style: none;
    4962        }
    5568                color: #113;
    5669                margin-bottom: 0.5em;
     70        }
     71        H4, H5, H6 {
     72                color: #113;
     73                margin-bottom: 1.0em;
     74        }
     75        H5 {
     76                font-weight: normal;
     77                font-style: italic;
     78                font-size: 100%;
     79                margin-top: 1.2em;
     80        }
     81        H6 {
     82                font-weight: bold;
     83                font-size: 85%;
     84                margin-top: 1.2em;
    5785        }
    5886     DIV#eggheader {
    101129       padding: 0.2em;
    102130       border: 1px solid #aac;
     131       border-collapse: collapse;
    103132       width: 100%;
    104133     }
    109138     }
    110139     TH {
    111        border-bottom: 1px solid black;
    112      } --></style></head>
     140       text-align: left;
     141       border-bottom: 1px solid #aac;
     142       padding: 0.25em 0.5em 0.25em 0.5em;
     143     }
     144     TD { padding: 0.25em 0.5em 0.25em 0.5em; }
     145     --></style></head>
    114147<div id="header">
     160<li>1.2.3 Fixed compiler flags to pull in tinyclos</li>
    127161<li>1.2.2 Alternative superclass for generated classes added</li>
    128162<li>1.2.0 Superclasses of generated classes can be specified arbitrarily</li>
    142176<p>In the simplest case you just create the database with its schema of tables and then call <tt>sqlite3:define-stored-object-class</tt> once for each table you want to access through this interface. See the example below for a first impression.</p>
    143177<div class="subsection">
    144 <p><b>The class generator procedure</b></p>
     178<h4>The class generator procedure</h4>
    146180<dt class="definition"><strong>procedure:</strong> (sqlite3:define-stored-object-class (db &lt;sqlite3:database&gt;) (table &lt;string&gt;) #!key prefix name symbol add-super supers slots) =&gt; &lt;void&gt;</dt>
    154188<p>For all columns in the table that are not part of the primary key, two accessor methods for retrieving and setting them are defined, with names computed by <tt>sqlite3:field-name-&gt;getter-symbol</tt> and <tt>sqlite3:field-name-&gt;setter-symbol</tt> respectively. If a list is passed in the keyword argument <tt>no-getter-or-setter</tt> and it contains the name of a database field, no getter or setter is created for this field. Likewise no getter is generated for columns mentioned in <tt>no-getter</tt> and no setter is generated for those mentioned in <tt>no-setter</tt>.</p></dd></dl></div>
    155189<div class="subsection">
    156 <p><b>Generated getter and setter methods</b></p>
     190<h4>Generated getter and setter methods</h4>
    158192<dt class="definition"><strong>method:</strong> (&lt;prefix&gt;&lt;name&gt; (self &lt;subclass of sqlite3:stored-object&gt;)) =&gt; &lt;top&gt;
    164198<p>These methods defined by <tt>sqlite3:define-stored-object-class</tt> set the value of a field in the database. For boolean fields, whose names start with <tt>is_</tt> in the database, an automatic conversion from <tt>#f</tt> to <tt>0</tt> and anything else to <tt>1</tt> is performed.</p></dd></dl></div>
    165199<div class="subsection">
    166 <p><b>Metaclasses and classes</b></p>
     200<h4>Metaclasses and classes</h4>
    168202<dt class="definition"><strong>class:</strong> &lt;sqlite3:stored-object-class&gt;</dt>
    180214<p><em>Note that this class can only be used sensibly with tables that have a single integer primary key. Also note that instances of this class should only be created with proper exclusive locks on the database in place.</em></p></dd></dl></div>
    181215<div class="subsection">
    182 <p><b>Methods</b></p>
    184218<p>The following methods are common to the standard metaclass and class:</p>
    236270<p>Sets the column <tt>name</tt> to the given <tt>value</tt> in the table apropriate for this object where the primary key columns have the values stored in this object.</p></dd></dl></div>
    237271<div class="subsection">
    238 <p><b>Helper procedures</b></p>
     272<h4>Helper procedures</h4>
    240274<dt class="definition"><strong>procedure:</strong> (sqlite3:field-name-&gt;getter-symbol (name &lt;string&gt;) #!optional ((prefix &lt;string|symbol&gt;) &quot;&quot;)) =&gt; &lt;symbol&gt;</dt>
Note: See TracChangeset for help on using the changeset viewer.