- Documentation update.
[cl-trane.git] / doc / TRANE-COMMON.html
blob0f0c8e10850ead00c1280d5f421db09f5d0fa3d6
1 <html><head><title>TRANE-COMMON</title></head><body><h3>API for package TRANE-COMMON</h3>
2 <blockquote>UNDOCUMENTED</blockquote>
3 <p><b>*config*</b>&nbsp;&nbsp;&nbsp;<i>variable</i></p>
4 <blockquote>Parsed configuration file.</blockquote>
5 <blockquote>Initial value: <tt>#S(PY-CONFIGPARSER:CONFIG :DEFAULTS #S(PY-CONFIGPARSER::SECTION :NAME "DEFAULT" :OPTIONS NIL) :SECTIONS NIL :OPTION-NAME-TRANSFORM-FN #<Compiled-function STRING-DOWNCASE #x30004037C60F> :SECTION-NAME-TRANSFORM-FN #<Compiled-function IDENTITY #x3000400DF02F>)</tt></blockquote>
6 <p><b>*db*</b>&nbsp;&nbsp;&nbsp;<i>variable</i></p>
7 <blockquote>Database connection specification</blockquote>
8 <blockquote>Initial value: <tt>NIL</tt></blockquote>
9 <p><b>*error-context-hook*</b>&nbsp;&nbsp;&nbsp;<i>variable</i></p>
10 <blockquote>When set to a function designator, designated function will be
11 FUNCALled when generating error report, with condition instance as
12 an argument, and result will be inserted into error report as an
13 error context.</blockquote>
14 <blockquote>Initial value: <tt>KUCHENNIK::KUCHENNIK-ERROR-CONTEXT</tt></blockquote>
15 <p><b>*error-report-pathname-defaults*</b>&nbsp;&nbsp;&nbsp;<i>variable</i></p>
16 <blockquote>Base pathname for error reports when written to file.
18 Defaults to "error" in *DEFAULT-PATHNAME-DEFAULTS*.</blockquote>
19 <blockquote>Initial value: <tt>#P"state/error"</tt></blockquote>
20 <p><b>*handler-package*</b>&nbsp;&nbsp;&nbsp;<i>variable</i></p>
21 <blockquote>Package, in which HANDLER-FUNCTION looks for handlers.
23 When NIL, *PACKAGE* is assumed, which is probably not what you want.</blockquote>
24 <blockquote>Initial value: <tt>NIL</tt></blockquote>
25 <p>(<b>cache-dao</b> dao)&nbsp;&nbsp;&nbsp;<i>function</i></p>
26 <blockquote>Manually add DAO to cache used by WITH-DAO-CACHE.
28 Returns DAO</blockquote><p><b>DIRTINESS-MIXIN</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
29 <p><b>DIRTY-P</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
30 <p>(<b>execute*</b> statements &optional query-log)&nbsp;&nbsp;&nbsp;<i>function</i></p>
31 <blockquote>Execute a possibly nested list of sql STATEMENTS.
33 STATEMENTS may be either S-SQL expressions, literal SQL strings, or
34 lists of statements.</blockquote><p><b>FORMAT-ERROR-REPORT</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
35 <p>(<b>handler-function</b> &rest name-parts)&nbsp;&nbsp;&nbsp;<i>function</i></p>
36 <blockquote>Return handler function whose name consists of NAME-PARTS.
38 Handler function name is NAME-PARTS joined with slash signes, and
39 starting with a slash; NIL part means an empty place. E.g. for
40 NAME-PARTS :FOO :BAR :BAZ, it's /FOO/BAR/BAZ; for :FOO NIL it's /FOO/;
41 and for NIL :XYZZY it's //XYZZY.
43 If symbol with such name exists in *HANDLER-PACKAGE* (or in *PACKAGE*,
44 if *HANDLER-PACKAGE* is NIL, but probably it's not what you want), and
45 it names a function, this function is returned.</blockquote><p>(<b>hex-md5</b> sequence)&nbsp;&nbsp;&nbsp;<i>function</i></p>
46 <blockquote>Return MD5 checksum of SEQUENCE as a hexadecimal string.</blockquote><p>(<b>id</b> x)&nbsp;&nbsp;&nbsp;<i>generic-function</i></p>
47 <blockquote>Numeric ID or :NULL for DAOs and, if it makes sense, other objects.
49 Usually it will be a reader method automatically defined for ID column of a DAO.</blockquote><p>(<b>init-config</b> &rest files)&nbsp;&nbsp;&nbsp;<i>function</i></p>
50 <blockquote>Read in the configuration from files, defaulting to ones listed in *CONFIG-FILES*.
52 Should be first thing called in final init routine.</blockquote><p>(<b>init-db-connection</b> &optional section-name connect-toplevel-p)&nbsp;&nbsp;&nbsp;<i>function</i></p>
53 <blockquote>Initialize database connection from config.ini</blockquote><p>(<b>invoke-sendmail</b> sender rcpt body-and-headers &key sendmail-binary)&nbsp;&nbsp;&nbsp;<i>function</i></p>
54 <blockquote>Invoke sendmail binary.
56 SENDER is envelope sender address, RCPT is envelope recipient
57 address (may be a list), BODY-AND-HEADERS is fed to sendmail binary as
58 stdin and it may be a string or an input stream. SENDMAIL-BINARY is
59 full path to sendmail binary, as a string, default is taken from
60 *CONFIG* section mailing, variable sendmail.</blockquote><p>(<b>make-keyword</b> str)&nbsp;&nbsp;&nbsp;<i>function</i></p>
61 <blockquote>Convert a string or symbol to a keyword.</blockquote><p><b>MARK-AS-DIRTY</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
62 <p>(<b>named-lambda</b> name args &body body)&nbsp;&nbsp;&nbsp;<i>function</i></p>
63 <blockquote>Version of LAMBDA that returns anonymous function defined with
64 FLET and named NAME, which it's PRINTed with a name in most Lisp
65 implementations.</blockquote><p>(<b>null-or</b> v)&nbsp;&nbsp;&nbsp;<i>function</i></p>
66 <blockquote>If V is NIL or an empty string, return :NULL, otherwise return V.</blockquote><p>(<b>qp-utf8</b> string)&nbsp;&nbsp;&nbsp;<i>function</i></p>
67 <blockquote>Encode STRING as quoted-printable UTF-8</blockquote><p>(<b>random-string</b> &key alphabet min-length max-length)&nbsp;&nbsp;&nbsp;<i>function</i></p>
68 <blockquote>Simple random string for initial password to use in account activation process.</blockquote><p><b>REPORT-ERROR</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
69 <p><b>REPORT-ERROR-BY-EMAIL</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
70 <p><b>REPORT-ERROR-TO-FILE</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
71 <p>(<b>salted-password</b> salt password)&nbsp;&nbsp;&nbsp;<i>function</i></p>
72 <blockquote>Return Base64-encoded MD5 checksum of SALT concatenated with PASSWORD.</blockquote><p>(<b>slug</b> x)&nbsp;&nbsp;&nbsp;<i>generic-function</i></p>
73 <blockquote>Get short, unique, urlified name of OBJECT.</blockquote><p>(<b>slug-dao</b> class slug)&nbsp;&nbsp;&nbsp;<i>function</i></p>
74 <blockquote>Select DAO of CLASS having "slug" column set to SLUG.</blockquote><p><b>SLUGIFY</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
75 <p><b>START-HUNCHENTOOT</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
76 <p>(<b>unless-null</b> v)&nbsp;&nbsp;&nbsp;<i>function</i></p>
77 <blockquote>If V equals :NULL, return NIL, otherwise return V.</blockquote><p><b>UPDATE-DAO-IF-DIRTY</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
78 <p>(<b>with-dao-cache</b> &body body)&nbsp;&nbsp;&nbsp;<i>function</i></p>
79 <blockquote>Cache DAOs within dynamic extent of BODY.
81 Within BODY, DAO objects obtained by GET-DAO are cached to avoid
82 repeated queries fot the same objects. DAO objects are added
83 automatically before being returned by GET-DAO, or can be added
84 manually with CACHE-DAO (e.g. when obtained by QUERY-DAO).</blockquote><font size=-1><p>Documentation generated by <a href="http://homepage.mac.com/svc/lispdoc/">lispdoc</a> running on Clozure Common Lisp</p></font></body></html>