Greg Slepak avatar Greg Slepak committed 9802c6c

improved api stuff through resources/api.lsp

Comments (0)

Files changed (36)

 
   * all code uses new ++,--,extend,write,read functions (still compatible with older newlisps)
   * added 'extract' and '<-' functions to core utils
+  * Route.Resource has been updated with a 'catch-all' function.
   * added documentation for MAX_POST_LENGTH in request.lsp
   * $BINARY can now handle large data (compensated for a newLISP bug in 'read-buffer').
   * DF:activate-plugin can now be used to load all lisp files in a directory

example-site/dragonfly-api/DF.DB/database.lsp.html

-<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>database.lsp</title>
-
-<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
-</head>
-
-<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
-			link="#376590" vlink="#551A8B" alink="#ffAA28">
-<blockquote>
-<center><h1>database.lsp</h1></center>
-<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;DF.DB, DF.SQL, DF.BLOB</h2><p>Generic database access interface for <a href="http://www.rundragonfly.com">Dragonfly</a> using Objective newLISP</p>
-<b>Version: </b>1.1<br/>
-<b>Author: </b>Greg Slepak<br/>
-<b>Location: </b><a href="http://www.taoeffect.com/newlisp/database.lsp.txt">http://www.taoeffect.com/newlisp/database.lsp.txt</a><br/>
- <p>The purpose of this module is to standardize the interface to
- access databases. This will allow you, for the most part, to write your code once
- and easily switch the type of database that you're using.</p>
- <p>To accomplish this, the interface introduces three Objective newLISP classes:
- <tt>DF.DB</tt>, <tt>DF.SQL</tt>, and <tt>DF.BLOB</tt>.</p>
- <h3>DF.DB</h3>
- A <tt>DF.DB</tt> object represents a database connection. Using it you connect to
- the database and execute SQL queries.
- <h3>DF.SQL</h3>
- A <tt>DF.SQL</tt> object is a wrapper around an SQL statement, is retrieved through one of
- two functions: <tt>DF.DB:execute-query</tt> and the lower-level <tt>DF.DB:preprare-sql</tt>.
- <p>It is used to retrieve rows from the result set of a query one-by-one.</p>
- <h3>DF.BLOB</h3>
- <tt>DF.BLOB</tt> is used to insert and retrieve (possibly large) binary data into databases.
- It is needed for two reasons:
- <ol>
- <li>newLISP uses strings to buffer and store binary data, and that's already used to store text.</li>
- <li>BLOBs can be very large, so by storing them in a context we avoid excessive copying.</li>
- </ol>
- <p>Unlike the other two classes, <tt>DF.BLOB</tt> provides a basic working implementation for <tt>DF.SQL</tt> subclasses
- to use. You may of course subclass it if your database requires additional functionality. It requires
- special usage considerations, see its documentation below.</p>
- <h3>Example</h3>
- <pre>
- (push-autorelease-pool) ; we<tt>re going to be using DF.BLOB</tt>s.
- (setf db (instantiate Sqlite3 ":memory:"))
- (if-not db (throw-error "couldn't open db"))
- (db:execute-update "CREATE TABLE fish (id INTEGER PRIMARY KEY, name TEXT, weight REAL, blah BLOB)")
- (db:execute-update "INSERT INTO fish (name,weight) VALUES (?,?)" '("flipper" 234.123))
- (db:execute-update "INSERT INTO fish (name,weight) VALUES (?1,?2)" '(("?1" "catfish") ("?2" 100.3)))
- (db:execute-update "INSERT INTO fish (blah) VALUES (?)" (list (DF.BLOB (dup "\000" 10))))
- (db:execute-update "INSERT INTO fish (blah) VALUES (:cat)" (list (list ":cat" (DF.BLOB (dup "\000" 10)))))
- (setf sql (db:execute-query "SELECT * FROM fish"))
- (do-while (list? row)
-     (push-autorelease-pool) ; "in case" we end up fetching a lot of large blobs
-     (setf row (sql:next-row))
-     (println "row: " row)
-     (pop-autorelease-pool)
- )
- (deallocate sql)
- (deallocate db)
- (pop-autorelease-pool) ; deallocate the blobs we created</pre>
- <h3>Requirements</h3>
- <ul>
- <li>Dragonfly newLISP Web Framework (see note below)</li>
- <li>newLISP 10.1.9 or higher is <b>strongly recommended</b>, but any version after 10.1 should work.</li>
- <li>Objective newLISP 1.0</li>
- <li>Libraries for a supported database</li>
- </ul><br/>
- <a href="http://www.rundragonfly.com">Dragonfly</a> is only required for its logging functions. You can easily implement your own
- versions of <tt>DF:log-err</tt>, <tt>DF:log-debug</tt>, and the other functions found in Dragonfly&apos;s <tt>log.lsp</tt>.
- <h3>Version history</h3>
- <b>1.1</b> &bull; <tt>DF.BLOB</tt> added<br/>
- <b>1.0</b> &bull; initial release
-
-
-
-
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="_DF.DB"></a><h3><font color=#CC0000>DF.DB</font></h3>
-<b>syntax: DF.DB</b><br/>
- <p>Represents a database connection. You create a DF.DB object
- like so:</p>
- <pre>(instantiate <em>DF.DB-Subclass</em> [<em>connection</em> [<em>args...</em>]])</pre>
- <p>What type should be represented by <em>connection</em> is undefined, but
- it&apos;s recommended that subclasses use strings. If <em>connection</em> is specified
- the a connected instance must be returned (or <tt>nil</tt> upon failure).</p>
- <p>The possibly optional <em>args...</em> are specific to which subclass you're using. See its
- corresponding documentation.</p>
- <p>Instances must have code in their <tt>dealloc</tt> method so that they can properly cleanup their resources
- (e.g. shutdown connection) if deallocated with <tt>deallocate</tt>.</p>
-
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.DB_open"></a><h3><font color=#CC0000>DF.DB:open</font></h3>
-<b>syntax: (<font color=#CC0000>DF.DB:open</font> <em>connection</em>)</b><br/>
- <p>Returns <tt>true</tt> if the connection was opened successfully, <tt>nil</tt>
- if there was an error opening the connection, or throws an exception
- if already connected.</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.DB_close"></a><h3><font color=#CC0000>DF.DB:close</font></h3>
-<b>syntax: (<font color=#CC0000>DF.DB:close</font>)</b><br/>
- <p>Returns <tt>true</tt> if the connection was closed successfully or was
- already closed, or <tt>nil</tt> if there was an error closing the connection.</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.DB_prepare-sql"></a><h3><font color=#CC0000>DF.DB:prepare-sql</font></h3>
-<b>syntax: (<font color=#CC0000>DF.DB:prepare-sql</font> <em>str-sql</em>)</b><br/>
-<b>parameter: </b><em>str-sql</em> - A single SQL statement. Does not need to end in ';'<br/>
- <p>Returns a <tt>DF.SQL</tt> object upon success, <tt>nil</tt> on failure, or throws
- an exception if not connected.</p>
- <p><b>important:</b> If your SQL statement contains placeholders (to be
- bound later using <tt>DF.SQL:bind-params</tt>) you may not mix and match placeholder styles!
- Pick one placeholder style and stick with it for the entire statement.</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.DB_execute-update"></a><h3><font color=#CC0000>DF.DB:execute-update</font></h3>
-<b>syntax: (<font color=#CC0000>DF.DB:execute-update</font> <em>str-sql</em> [<em>list-params</em>])</b><br/>
-<b>parameter: </b><em>str-sql</em> - A single SQL statement. Does not need to end in ';'<br/>
-<b>parameter: </b><em>list-params</em> - A list of parameters to bind to a parameterized query<br/>
- <p>Same as <tt>DF.DB:execute-query</tt> but returns <tt>true</tt> instead of a <tt>DF.SQL</tt> object upon success.
- Useful for SQL such as "UPDATE" and "INSERT".</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.DB_execute-query"></a><h3><font color=#CC0000>DF.DB:execute-query</font></h3>
-<b>syntax: (<font color=#CC0000>DF.DB:execute-query</font> <em>str-sql</em> [<em>list-params</em>])</b><br/>
-<b>parameter: </b><em>str-sql</em> - A single SQL statement. Does not need to end in ';'<br/>
-<b>parameter: </b><em>list-params</em> - A list of parameters to bind to a parameterized query<br/>
- <p>A short-hand for <tt>DF.DB:prepare-sql</tt> and <tt>DF.SQL:bind-params</tt>. Returns
- a <tt>DF.SQL</tt> object upon success, <tt>nil</tt> on failure, or throws an exception if
- not connected.</p>
- <p><b>see:</b> documentation for <tt>DF.SQL:bind-params</tt> for more info on <em>list-params</em>.
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.DB_rows-for-query"></a><h3><font color=#CC0000>DF.DB:rows-for-query</font></h3>
-<b>syntax: (<font color=#CC0000>DF.DB:rows-for-query</font> <em>str-sql</em> [<em>list-params</em>])</b><br/>
- <p>Same as <tt>DF.DB:execute-query</tt> but retrieves all of the rows and returns them as a list of results.</p>
- <p><b>important:</b> If any columns contain BLOB types, you <b><i>must</i></b> have
- an autorelease pool allocated prior to calling this function!</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.DB_rowid"></a><h3><font color=#CC0000>DF.DB:rowid</font></h3>
-<b>syntax: (<font color=#CC0000>DF.DB:rowid</font>)</b><br/>
- <p>Returns the row id for the last row that was inserted or throws an
- exception if not connected.</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.DB_changes"></a><h3><font color=#CC0000>DF.DB:changes</font></h3>
-<b>syntax: (<font color=#CC0000>DF.DB:changes</font>)</b><br/>
- <p>Returns how many rows were affected by the last INSERT/UPDATE, or throws
- an exception of not connected</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.DB_version"></a><h3><font color=#CC0000>DF.DB:version</font></h3>
-<b>syntax: (<font color=#CC0000>DF.DB:version</font>)</b><br/>
- <p>Returns the version number of the database library being used as an integer.</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.DB_table-exists?"></a><h3><font color=#CC0000>DF.DB:table-exists?</font></h3>
-<b>syntax: (<font color=#CC0000>DF.DB:table-exists?</font> <em>table-name</em>)</b><br/>
- <p>Returns nil or non-nil depending on whether the table named <tt>table-name</tt> exists,
- or throws an exception if not connected.</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.DB_connected?"></a><h3><font color=#CC0000>DF.DB:connected?</font></h3>
-<b>syntax: (<font color=#CC0000>DF.DB:connected?</font>)</b><br/>
-<p><b>return: </b>nil or non-nil depending on whether this <tt>DF.DB</tt> object has an active connection.</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.DB_last-error"></a><h3><font color=#CC0000>DF.DB:last-error</font></h3>
-<b>syntax: (<font color=#CC0000>DF.DB:last-error</font>)</b><br/>
-<p><b>return: </b>a list of two elements: the most recent error code and a description string.</p>
-
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="_DF.SQL"></a><h3><font color=#CC0000>DF.SQL</font></h3>
-<b>syntax: DF.SQL</b><br/>
- <p>Represents a prepared statement. It is used to bind values to a statement's parameters
- and retrieve the results of a query.</p>
- <p>You do not create a DF.SQL instance yourself but obtain one through <tt>DF.DB:prepare-sql</tt>.
- However, if you've obtained an instance then you are responsible for freeing its memory
- and closing its connection when you're finished with it.</p>
- <p>Subclasses should make sure that their <tt>dealloc</tt> method calls <tt>DF.SQL:close</tt> so that
- statements can be freed and closed in one function call using <tt>deallocate</tt>.</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.SQL_bind-params"></a><h3><font color=#CC0000>DF.SQL:bind-params</font></h3>
-<b>syntax: (<font color=#CC0000>DF.SQL:bind-params</font> <em>list-params</em>)</b><br/>
- <p>Binds the placeholders of this SQL statement to the values in <em>list-params</em>.</p>
- <p><em>list-params</em> may be simply a list of values, or an association list of key/value
- pairs, depending on the placeholder pattern used in the SQL. Placeholder styles
- <b>may not</b> be mixed per SQL statement.</p>
- <p>Values may be any of newLISP's primitives. To specify a BLOB wrap your string
- in a <tt>DF.BLOB</tt>:</p>
- <b>example:</b>
- <pre>
- ; "weight" is a REAL and "blah" is a BLOB
- (push-autorelease-pool) ; create our autorelease pool since we're using DF.BLOB
- (setf sql (db:prepare-sql "INSERT INTO fish (weight,blah) VALUES (?,?)"))
- (sql:bind-params (list 1043.3 (DF.BLOB (dup "\000" 5))))
- (println (sql:next-row))
- (deallocate sql)
- (pop-autorelease-pool)
- </pre>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.SQL_next-row"></a><h3><font color=#CC0000>DF.SQL:next-row</font></h3>
-<b>syntax: (<font color=#CC0000>DF.SQL:next-row</font>)</b><br/>
- <p>Returns a row as a list from the result set of a statement, <tt>true</tt> if
- there are no more rows to return, or <tt>nil</tt> if there was an error.</p>
- <b>example:</b>
- <pre> (push-autorelease-pool) ; only necessary if there's a BLOB column
- (while (list? (setf row (sql:next-row)))
- 	(println "row: " row)
- )
- (pop-autorelease-pool) ; free any blobs</pre>
- <p><b>important:</b> If any columns contain BLOB types, you <b><i>must</i></b> have
- an autorelease pool allocated prior to calling this function!</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.SQL_reset"></a><h3><font color=#CC0000>DF.SQL:reset</font></h3>
-<b>syntax: (<font color=#CC0000>DF.SQL:reset</font>)</b><br/>
- <p>Resets the statement so that it can be re-used without preparing another
- statement (which is more efficient). After reseting a statement you typically
- use <tt>DF.SQL:bind-params</tt> to bind new values and then <tt>DF.SQL:next-row</tt>.</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.SQL_close"></a><h3><font color=#CC0000>DF.SQL:close</font></h3>
-<b>syntax: (<font color=#CC0000>DF.SQL:close</font>)</b><br/>
- <p>Releases the resources used by the SQL statement represented by this object.
- You cannot use it anymore after calling this method, the only thing left to do
- is to <tt>deallocate</tt> it, and since sublasses of <tt>DF.SQL</tt> must call <tt>close</tt> in
- their <tt>dealloc</tt> methods, it&apos;s often simpler to call <tt>deallocate</tt> on the object instead.</p>
- <p>Returns <tt>true</tt> upon success, <tt>nil</tt> on failure or if already closed.</p>
-
-
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="DF.BLOB_DF.BLOB"></a><h3><font color=#CC0000>DF.BLOB:DF.BLOB</font></h3>
-<b>syntax: (<font color=#CC0000>DF.BLOB:DF.BLOB</font> <em>str-blob</em>)</b><br/>
- <p>An object wrapper around a blob of data represented by <em>str-blob</em>, used
- for efficient passing of possibly large binary data.</p>
- <p>Unlike most other <tt>ObjNL</tt> classes, you typically create an instance
- by simply calling its constructor instead of calling <tt>instantiate</tt> yourself.
- It will then <tt>instantiate</tt> and <tt>autorelease</tt> a <tt>DF.BLOB</tt> instance containing the data
- in <tt>DF.BLOB:blob</tt>.</p>
- <p><b>important:</b> An autorelease pool <b>must</b> be in place when using the
- constructor to instantiate a blob!</p>
- <p><b>see:</b> the introduction to this document for example usage.</p>
-
-
-<br/><br/><center>- &part; -</center><br/>
-<center><font face='Arial' size='-2' color='#444444'>
-generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
-and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
-</font></center>
-</blockquote>
-</body>
-</html>

example-site/dragonfly-api/DF.DB/database_sqlite3.lsp.html

-<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>database_sqlite3.lsp</title>
-
-<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
-</head>
-
-<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
-			link="#376590" vlink="#551A8B" alink="#ffAA28">
-<blockquote>
-<center><h1>database_sqlite3.lsp</h1></center>
-<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;Sqlite3</h2><p>SQLite3 subclass of DF.DB. Only lists Sqlite3 specific functions.</p>
-<b>Version: </b>1.1.1<br/>
-<b>Author: </b>Greg Slepak <br/>
-<b>Location: </b><a href="http://www.taoeffect.com/newlisp/database_sqlite3.lsp.txt">http://www.taoeffect.com/newlisp/database_sqlite3.lsp.txt</a><br/>
- <h3>Features not found in newLISP's sqlite3.lsp:</h3>
- <ul>
- <li>Multiple connections</li>
- <li>Multiple active SQL statements</li>
- <li>Supports reuse of SQL statements through parameter rebinding</li>
- <li>Supports BLOB data-type as per <tt>DF.DB</tt> and <tt>DF.BLOB</tt> specification</li>
- <li>Conforms to generic <tt>DF.DB</tt> interface</li>
- <li>Grabs integers directly through 64-bit function</li>
- <li>Can go through results row-by-row</li>
- <li>Allows specification of custom sqlite3 library page with <tt>SQLITE3_LIBRARY_PATH</tt></li>
- <li>Uses the latest Sqlite3 library functions if they are available</li>
- <li>Better error handling</li>
- </ul>
- <h3>Requirements</h3>
- See module <a href="http://www.taoeffect.com/newlisp/database.lsp.html">DF.DB</a> for requirements.
- <h3>Version history</h3>
- <b>1.1.1</b> &bull; improved readability in error logging, fixed binding of integers on 32-bit newlisp builds<br/>
- <b>1.1.0</b> &bull; support for <tt>DF.BLOB</tt><br/>
- <b>1.0.0</b> &bull; initial release
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="_Sqlite3"></a><h3><font color=#CC0000>Sqlite3</font></h3>
-<b>syntax: Sqlite3</b><br/>
- <p>Represents a connection to an SQLite3 database. Create one like so:</p>
- <pre>(instantiate Sqlite3 [<em>str-filepath</em> [<em>flags</em> [<em>vfs-module</em>]]])</pre>
- <p>If <em>str-filepath</em> is specified a connected instance will be returned or <tt>nil</tt>
- upon failure to connect. If they are not specified then an unconnected instance
- will be returned.</p>
- <p><b>see:</b> documentation for <tt>Sqlite3:open</tt> for an explanation of the parameters.</p>
-
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Sqlite3_open"></a><h3><font color=#CC0000>Sqlite3:open</font></h3>
-<b>syntax: (<font color=#CC0000>Sqlite3:open</font> <em>str-filepath</em> [<em>flags</em> [<em>vfs-module</em>]])</b><br/>
- <p><em>str-filepath</em> specifies the path to the sqlite3 database, but it can also be
- ":memory:" to indicate an in-memory database.</p>
- <p><em>flags</em> and <em>vfs-module</em> are optional parameters as defined in the sqlite
- reference <a href="http://www.sqlite.org/c3ref/open.html">documentation</a> for
- <tt>sqlite3_open_v2</tt>. Your installation of sqlite3 may need to be updated for this to be available.</p>
- <p>For return values see <tt>DF.DB:open</tt>.</p>
-
-
-
-
-
-
-
-
-
-
-
-
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Sqlite3_set-timeout"></a><h3><font color=#CC0000>Sqlite3:set-timeout</font></h3>
-<b>syntax: (<font color=#CC0000>Sqlite3:set-timeout</font> <em>int-ms</em>)</b><br/>
- <p>Sets the sqlite3's busy timeout for this connection in milliseconds.</p>
- <p>By default the timeout is set to 30 seconds.</p>
-<p><b>return: </b>nil or non-nil on success</p>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<br/><br/><center>- &part; -</center><br/>
-<center><font face='Arial' size='-2' color='#444444'>
-generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
-and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
-</font></center>
-</blockquote>
-</body>
-</html>

example-site/dragonfly-api/DF.DB/index.html

-<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>Index</title>
-
-<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
-</head>
-
-<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
-			link="#376590" vlink="#551A8B" alink="#ffAA28">
-<blockquote>
-<center><h1>Index</h1></center>
-<a href="database.lsp.html"><br/><br/><h2>Module:&nbsp;DF.DB, DF.SQL, DF.BLOB</h2></a>
-<p>Generic database access interface for <a href="http://www.rundragonfly.com">Dragonfly</a> using Objective newLISP</p>
-<a href="database.lsp.html#_DF.DB">DF.DB</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_open">open</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_close">close</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_prepare-sql">prepare-sql</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_execute-update">execute-update</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_execute-query">execute-query</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_rows-for-query">rows-for-query</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_rowid">rowid</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_changes">changes</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_version">version</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_table-exists?">table-exists?</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_connected?">connected?</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_last-error">last-error</a>&nbsp; &nbsp; <a href="database.lsp.html#_DF.SQL">DF.SQL</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.SQL_bind-params">bind-params</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.SQL_next-row">next-row</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.SQL_reset">reset</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.SQL_close">close</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.BLOB_DF.BLOB">DF.BLOB</a>&nbsp; &nbsp; <a href="database_sqlite3.lsp.html"><br/><br/><h2>Module:&nbsp;Sqlite3</h2></a>
-<p>SQLite3 subclass of DF.DB. Only lists Sqlite3 specific functions.</p>
-<a href="database_sqlite3.lsp.html#_Sqlite3">Sqlite3</a>&nbsp; &nbsp; <a href="database_sqlite3.lsp.html#Sqlite3_open">open</a>&nbsp; &nbsp; <a href="database_sqlite3.lsp.html#Sqlite3_set-timeout">set-timeout</a>&nbsp; &nbsp; 
-<br/><br/><center>- &part; -</center><br/>
-<center><font face='Arial' size='-2' color='#444444'>
-generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
-and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
-</font></center>
-</blockquote>
-</body>
-</html>

example-site/dragonfly-api/ObjNL.lsp.html

 			link="#376590" vlink="#551A8B" alink="#ffAA28">
 <blockquote>
 <center><h1>ObjNL.lsp</h1></center>
-<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;ObjNL.lsp</h2><p>Objective newLISP - Real Object Oriented Programming for newLISP</p>
+<p><a href="index.html">Module index</a></p><br/><h2>Module:&nbsp;ObjNL.lsp</h2><p>Objective newLISP - Real Object Oriented Programming for newLISP</p>
 <b>Version: </b>1.0<br/>
 <b>Author: </b>Greg Slepak<br/>
 <b>Location: </b><a href="http://www.taoeffect.com/newlisp/ObjNL.lsp.txt">http://www.taoeffect.com/newlisp/ObjNL.lsp.txt</a><br/>

example-site/dragonfly-api/SMTP/index.html

 			link="#376590" vlink="#551A8B" alink="#ffAA28">
 <blockquote>
 <center><h1>Index</h1></center>
-<a href="smtp.lsp.html"><br/><br/><h2>Module:&nbsp;smtp.lsp </h2></a>
+<a href="smtp.lsp.html"><br/><h2>Module:&nbsp;smtp.lsp </h2></a>
 <p>Send mail using SMTP protocol</p>
 <a href="smtp.lsp.html#SMTP_send-mail">send-mail</a>&nbsp; &nbsp; <a href="smtp.lsp.html#SMTP_get-error-text">get-error-text</a>&nbsp; &nbsp; <a href="smtp.lsp.html#SMTP_clear-attachments">clear-attachments</a>&nbsp; &nbsp; <a href="smtp.lsp.html#SMTP_attach-document">attach-document</a>&nbsp; &nbsp; <a href="smtp.lsp.html#SMTP_encode64-widthsafe">encode64-widthsafe</a>&nbsp; &nbsp; <a href="smtp.lsp.html#SMTP_encode64-line">encode64-line</a>&nbsp; &nbsp; 
 <br/><br/><center>- &part; -</center><br/>

example-site/dragonfly-api/SMTP/smtp.lsp.html

 			link="#376590" vlink="#551A8B" alink="#ffAA28">
 <blockquote>
 <center><h1>smtp.lsp</h1></center>
-<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;smtp.lsp </h2><p>Send mail using SMTP protocol</p>
+<p><a href="index.html">Module index</a></p><br/><h2>Module:&nbsp;smtp.lsp </h2><p>Send mail using SMTP protocol</p>
 <b>Version: </b>3.0 - Partial rewrite for Dragonfly. Addition attachments, custom port and proper utf8 encoding for subject/message/attachments<br/>
 <b>Version: </b>2.3 - fix in mail-send-body, thanks to Alessandro<br/>
 <b>Version: </b>2.2 - doc changes<br/>

example-site/dragonfly-api/db/database.lsp.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>database.lsp</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>database.lsp</h1></center>
+<p><a href="index.html">Module index</a></p><br/><h2>Module:&nbsp;database</h2><p>Generic database access interface for <a href="http://www.rundragonfly.com">Dragonfly</a> using Objective newLISP</p>
+<b>Version: </b>1.2<br/>
+<b>Author: </b>Greg Slepak<br/>
+<b>Location: </b><a href="http://www.taoeffect.com/newlisp/database.lsp.txt">http://www.taoeffect.com/newlisp/database.lsp.txt</a><br/>
+ <p>The purpose of this module is to standardize the interface to
+ access databases. This will allow you, for the most part, to write your code once
+ and easily switch the type of database that you're using.</p>
+ <p>To accomplish this, the interface introduces three Objective newLISP classes:
+ <tt>DF.DB</tt>, <tt>DF.SQL</tt>, and <tt>DF.BLOB</tt>.</p>
+ <h3>DF.DB</h3>
+ A <tt>DF.DB</tt> object represents a database connection. Using it you connect to
+ the database and execute SQL queries.
+ <h3>DF.SQL</h3>
+ A <tt>DF.SQL</tt> object is a wrapper around an SQL statement, is retrieved through one of
+ two functions: <tt>DF.DB:execute-query</tt> and the lower-level <tt>DF.DB:preprare-sql</tt>.
+ <p>It is used to retrieve rows from the result set of a query one-by-one.</p>
+ <h3>DF.BLOB</h3>
+ <tt>DF.BLOB</tt> is used to insert and retrieve (possibly large) binary data into databases.
+ It is needed for two reasons:
+ <em>ol</em>
+ <li>newLISP uses strings to buffer and store binary data, and that's already used to store text.</li>
+ <li>BLOBs can be very large, so by storing them in a context we avoid excessive copying.</li>
+ <em>/ol</em>
+ <p>Unlike the other two classes, <tt>DF.BLOB</tt> provides a basic working implementation for <tt>DF.SQL</tt> subclasses
+ to use. You may of course subclass it if your database requires additional functionality. It requires
+ special usage considerations, see its documentation below.</p>
+ <h3>Example</h3>
+ <pre>
+ (push-autorelease-pool) ; we<tt>re going to be using DF.BLOB</tt>s.
+ (setf db (instantiate Sqlite3 ":memory:"))
+ (if-not db (throw-error "couldn't open db"))
+ (db:execute-update "CREATE TABLE fish (id INTEGER PRIMARY KEY, name TEXT, weight REAL, blah BLOB)")
+ (db:execute-update "INSERT INTO fish (name,weight) VALUES (?,?)" '("flipper" 234.123))
+ (db:execute-update "INSERT INTO fish (name,weight) VALUES (?1,?2)" '(("?1" "catfish") ("?2" 100.3)))
+ (db:execute-update "INSERT INTO fish (blah) VALUES (?)" (list (DF.BLOB (dup "\000" 10))))
+ (db:execute-update "INSERT INTO fish (blah) VALUES (:cat)" (list (list ":cat" (DF.BLOB (dup "\000" 10)))))
+ (setf sql (db:execute-query "SELECT * FROM fish"))
+ (do-while (list? row)
+     (push-autorelease-pool) ; "in case" we end up fetching a lot of large blobs
+     (setf row (sql:next-row))
+     (println "row: " row)
+     (pop-autorelease-pool)
+ )
+ (deallocate sql)
+ (deallocate db)
+ (pop-autorelease-pool) ; deallocate the blobs we created</pre>
+ <h3>Requirements</h3>
+ <ul>
+ <li>Dragonfly newLISP Web Framework (see note below)</li>
+ <li>newLISP 10.1.9 or higher is <b>strongly recommended</b>, but any version after 10.1 should work.</li>
+ <li>Objective newLISP 1.0</li>
+ <li>Libraries for a supported database</li>
+ </ul><br/>
+ <a href="http://www.rundragonfly.com">Dragonfly</a> is only required for its logging functions. You can easily implement your own
+ versions of <tt>DF:log-err</tt>, <tt>DF:log-debug</tt>, and the other functions found in Dragonfly&apos;s <tt>log.lsp</tt>.
+ <h3>Version history</h3>
+ <b>1.2</b> &bull; added <tt>DF.SQL:col-name</tt> and <tt>DF.SQL:col-count</tt> to specification
+ <b>1.1</b> &bull; <tt>DF.BLOB</tt> added<br/>
+ <b>1.0</b> &bull; initial release
+
+
+
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_DF.DB"></a><h3><font color=#CC0000>DF.DB</font></h3>
+<b>syntax: DF.DB</b><br/>
+ <p>Represents a database connection. You create a DF.DB object
+ like so:</p>
+ <pre>(instantiate <em>DF.DB-Subclass</em> [<em>connection</em> [<em>args...</em>]])</pre>
+ <p>What type should be represented by <em>connection</em> is undefined, but
+ it&apos;s recommended that subclasses use strings. If <em>connection</em> is specified
+ the a connected instance must be returned (or <tt>nil</tt> upon failure).</p>
+ <p>The possibly optional <em>args...</em> are specific to which subclass you're using. See its
+ corresponding documentation.</p>
+ <p>Instances must have code in their <tt>dealloc</tt> method so that they can properly cleanup their resources
+ (e.g. shutdown connection) if deallocated with <tt>deallocate</tt>.</p>
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.DB_open"></a><h3><font color=#CC0000>DF.DB:open</font></h3>
+<b>syntax: (<font color=#CC0000>DF.DB:open</font> <em>connection</em>)</b><br/>
+ <p>Returns <tt>true</tt> if the connection was opened successfully, <tt>nil</tt>
+ if there was an error opening the connection, or throws an exception
+ if already connected.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.DB_close"></a><h3><font color=#CC0000>DF.DB:close</font></h3>
+<b>syntax: (<font color=#CC0000>DF.DB:close</font>)</b><br/>
+ <p>Returns <tt>true</tt> if the connection was closed successfully or was
+ already closed, or <tt>nil</tt> if there was an error closing the connection.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.DB_prepare-sql"></a><h3><font color=#CC0000>DF.DB:prepare-sql</font></h3>
+<b>syntax: (<font color=#CC0000>DF.DB:prepare-sql</font> <em>str-sql</em>)</b><br/>
+<b>parameter: </b><em>str-sql</em> - A single SQL statement. Does not need to end in ';'<br/>
+ <p>Returns a <tt>DF.SQL</tt> object upon success, <tt>nil</tt> on failure, or throws
+ an exception if not connected.</p>
+ <p><b>important:</b> If your SQL statement contains placeholders (to be
+ bound later using <tt>DF.SQL:bind-params</tt>) you may not mix and match placeholder styles!
+ Pick one placeholder style and stick with it for the entire statement.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.DB_execute-update"></a><h3><font color=#CC0000>DF.DB:execute-update</font></h3>
+<b>syntax: (<font color=#CC0000>DF.DB:execute-update</font> <em>str-sql</em> [<em>list-params</em>])</b><br/>
+<b>parameter: </b><em>str-sql</em> - A single SQL statement. Does not need to end in ';'<br/>
+<b>parameter: </b><em>list-params</em> - A list of parameters to bind to a parameterized query<br/>
+ <p>Same as <tt>DF.DB:execute-query</tt> but returns <tt>true</tt> instead of a <tt>DF.SQL</tt> object upon success.
+ Useful for SQL such as "UPDATE" and "INSERT".</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.DB_execute-query"></a><h3><font color=#CC0000>DF.DB:execute-query</font></h3>
+<b>syntax: (<font color=#CC0000>DF.DB:execute-query</font> <em>str-sql</em> [<em>list-params</em>])</b><br/>
+<b>parameter: </b><em>str-sql</em> - A single SQL statement. Does not need to end in ';'<br/>
+<b>parameter: </b><em>list-params</em> - A list of parameters to bind to a parameterized query<br/>
+ <p>A short-hand for <tt>DF.DB:prepare-sql</tt> and <tt>DF.SQL:bind-params</tt>. Returns
+ a <tt>DF.SQL</tt> object upon success, <tt>nil</tt> on failure, or throws an exception if
+ not connected.</p>
+ <p><b>see:</b> documentation for <tt>DF.SQL:bind-params</tt> for more info on <em>list-params</em>.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.DB_rows-for-query"></a><h3><font color=#CC0000>DF.DB:rows-for-query</font></h3>
+<b>syntax: (<font color=#CC0000>DF.DB:rows-for-query</font> <em>str-sql</em> [<em>list-params</em>])</b><br/>
+ <p>Same as <tt>DF.DB:execute-query</tt> but retrieves all of the rows and returns them as a list of results.</p>
+ <p><b>important:</b> If any columns contain BLOB types, you <b><i>must</i></b> have
+ an autorelease pool allocated prior to calling this function!</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.DB_rowid"></a><h3><font color=#CC0000>DF.DB:rowid</font></h3>
+<b>syntax: (<font color=#CC0000>DF.DB:rowid</font>)</b><br/>
+ <p>Returns the row id for the last row that was inserted or throws an
+ exception if not connected.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.DB_changes"></a><h3><font color=#CC0000>DF.DB:changes</font></h3>
+<b>syntax: (<font color=#CC0000>DF.DB:changes</font>)</b><br/>
+ <p>Returns how many rows were affected by the last INSERT/UPDATE, or throws
+ an exception of not connected</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.DB_version"></a><h3><font color=#CC0000>DF.DB:version</font></h3>
+<b>syntax: (<font color=#CC0000>DF.DB:version</font>)</b><br/>
+ <p>Returns the version number of the database library being used as an integer.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.DB_table-exists?"></a><h3><font color=#CC0000>DF.DB:table-exists?</font></h3>
+<b>syntax: (<font color=#CC0000>DF.DB:table-exists?</font> <em>table-name</em>)</b><br/>
+ <p>Returns nil or non-nil depending on whether the table named <tt>table-name</tt> exists,
+ or throws an exception if not connected.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.DB_connected?"></a><h3><font color=#CC0000>DF.DB:connected?</font></h3>
+<b>syntax: (<font color=#CC0000>DF.DB:connected?</font>)</b><br/>
+<p><b>return: </b>nil or non-nil depending on whether this <tt>DF.DB</tt> object has an active connection.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.DB_last-error"></a><h3><font color=#CC0000>DF.DB:last-error</font></h3>
+<b>syntax: (<font color=#CC0000>DF.DB:last-error</font>)</b><br/>
+<p><b>return: </b>a list of two elements: the most recent error code and a description string.</p>
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_DF.SQL"></a><h3><font color=#CC0000>DF.SQL</font></h3>
+<b>syntax: DF.SQL</b><br/>
+ <p>Represents a prepared statement. It is used to bind values to a statement's parameters
+ and retrieve the results of a query.</p>
+ <p>You do not create a DF.SQL instance yourself but obtain one through <tt>DF.DB:prepare-sql</tt>.
+ However, if you've obtained an instance then you are responsible for freeing its memory
+ and closing its connection when you're finished with it.</p>
+ <p>Subclasses should make sure that their <tt>dealloc</tt> method calls <tt>DF.SQL:close</tt> so that
+ statements can be freed and closed in one function call using <tt>deallocate</tt>.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.SQL_bind-params"></a><h3><font color=#CC0000>DF.SQL:bind-params</font></h3>
+<b>syntax: (<font color=#CC0000>DF.SQL:bind-params</font> <em>list-params</em>)</b><br/>
+ <p>Binds the placeholders of this SQL statement to the values in <em>list-params</em>.</p>
+ <p><em>list-params</em> may be simply a list of values, or an association list of key/value
+ pairs, depending on the placeholder pattern used in the SQL. Placeholder styles
+ <b>may not</b> be mixed per SQL statement.</p>
+ <p>Values may be any of newLISP's primitives. To specify a BLOB wrap your string
+ in a <tt>DF.BLOB</tt>:</p>
+ <b>example:</b>
+ <pre>
+ ; "weight" is a REAL and "blah" is a BLOB
+ (push-autorelease-pool) ; create our autorelease pool since we're using DF.BLOB
+ (setf sql (db:prepare-sql "INSERT INTO fish (weight,blah) VALUES (?,?)"))
+ (sql:bind-params (list 1043.3 (DF.BLOB (dup "\000" 5))))
+ (println (sql:next-row))
+ (deallocate sql)
+ (pop-autorelease-pool)
+ </pre>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.SQL_next-row"></a><h3><font color=#CC0000>DF.SQL:next-row</font></h3>
+<b>syntax: (<font color=#CC0000>DF.SQL:next-row</font>)</b><br/>
+ <p>Returns a row as a list from the result set of a statement, <tt>true</tt> if
+ there are no more rows to return, or <tt>nil</tt> if there was an error.</p>
+ <b>example:</b>
+ <pre> (push-autorelease-pool) ; only necessary if there's a BLOB column
+ (while (list? (setf row (sql:next-row)))
+ 	(println "row: " row)
+ )
+ (pop-autorelease-pool) ; free any blobs</pre>
+ <p><b>important:</b> If any columns contain BLOB types, you <b><i>must</i></b> have
+ an autorelease pool allocated prior to calling this function!</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.SQL_reset"></a><h3><font color=#CC0000>DF.SQL:reset</font></h3>
+<b>syntax: (<font color=#CC0000>DF.SQL:reset</font>)</b><br/>
+ <p>Resets the statement so that it can be re-used without preparing another
+ statement (which is more efficient). After reseting a statement you typically
+ use <tt>DF.SQL:bind-params</tt> to bind new values and then <tt>DF.SQL:next-row</tt>.</p>
+
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.SQL_close"></a><h3><font color=#CC0000>DF.SQL:close</font></h3>
+<b>syntax: (<font color=#CC0000>DF.SQL:close</font>)</b><br/>
+ <p>Releases the resources used by the SQL statement represented by this object.
+ You cannot use it anymore after calling this method, the only thing left to do
+ is to <tt>deallocate</tt> it, and since sublasses of <tt>DF.SQL</tt> must call <tt>close</tt> in
+ their <tt>dealloc</tt> methods, it&apos;s often simpler to call <tt>deallocate</tt> on the object instead.</p>
+ <p>Returns <tt>true</tt> upon success, <tt>nil</tt> on failure or if already closed.</p>
+
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="DF.BLOB_DF.BLOB"></a><h3><font color=#CC0000>DF.BLOB:DF.BLOB</font></h3>
+<b>syntax: (<font color=#CC0000>DF.BLOB:DF.BLOB</font> <em>str-blob</em>)</b><br/>
+ <p>An object wrapper around a blob of data represented by <em>str-blob</em>, used
+ for efficient passing of possibly large binary data.</p>
+ <p>Unlike most other <tt>ObjNL</tt> classes, you typically create an instance
+ by simply calling its constructor instead of calling <tt>instantiate</tt> yourself.
+ It will then <tt>instantiate</tt> and <tt>autorelease</tt> a <tt>DF.BLOB</tt> instance containing the data
+ in <tt>DF.BLOB:blob</tt>.</p>
+ <p><b>important:</b> An autorelease pool <b>must</b> be in place when using the
+ constructor to instantiate a blob!</p>
+ <p><b>see:</b> the introduction to this document for example usage.</p>
+
+
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

example-site/dragonfly-api/db/database_orm.lsp.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>database_orm.lsp</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>database_orm.lsp</h1></center>
+<p><a href="index.html">Module index</a></p><br/><h2>Module:&nbsp;database_orm</h2><p>DB.OBJ - Simple ORM class for DF.DB</p>
+<b>Version: </b>1.0<br/>
+<b>Author: </b>Greg Slepak<br/>
+ <p></p>
+ <p>To accomplish this, the interface introduces three Objective newLISP classes:
+ <tt>DF.DB</tt>, <tt>DF.SQL</tt>, and <tt>DF.BLOB</tt>.</p>
+ <h3>DF.SQL</h3>
+ A <tt>DF.SQL</tt> object is a wrapper around an SQL statement, is retrieved through one of
+ two functions: <tt>DF.DB:execute-query</tt> and the lower-level <tt>DF.DB:preprare-sql</tt>.
+ <p>It is used to retrieve rows from the result set of a query one-by-one.</p>
+ <h3>Example</h3>
+ <pre>
+ (push-autorelease-pool) ; we<tt>re going to be using DF.BLOB</tt>s.
+ (setf db (instantiate Sqlite3 ":memory:"))
+ (if-not db (throw-error "couldn't open db"))
+ (db:execute-update "CREATE TABLE fish (id INTEGER PRIMARY KEY, name TEXT, weight REAL, blah BLOB)")
+ (db:execute-update "INSERT INTO fish (name,weight) VALUES (?,?)" '("flipper" 234.123))
+ (db:execute-update "INSERT INTO fish (name,weight) VALUES (?1,?2)" '(("?1" "catfish") ("?2" 100.3)))
+ (db:execute-update "INSERT INTO fish (blah) VALUES (?)" (list (DF.BLOB (dup "\000" 10))))
+ (db:execute-update "INSERT INTO fish (blah) VALUES (:cat)" (list (list ":cat" (DF.BLOB (dup "\000" 10)))))
+ (setf sql (db:execute-query "SELECT * FROM fish"))
+ (do-while (list? row)
+     (push-autorelease-pool) ; "in case" we end up fetching a lot of large blobs
+     (setf row (sql:next-row))
+     (println "row: " row)
+     (pop-autorelease-pool)
+ )
+ (deallocate sql)
+ (deallocate db)
+ (pop-autorelease-pool) ; deallocate the blobs we created</pre>
+ <h3>Version history</h3>
+ <b>1.0</b> &bull; initial release
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

example-site/dragonfly-api/db/database_sqlite3.lsp.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>database_sqlite3.lsp</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>database_sqlite3.lsp</h1></center>
+<p><a href="index.html">Module index</a></p><br/><h2>Module:&nbsp;database_sqlite3</h2><p>SQLite3 subclass of DF.DB. Only lists Sqlite3 specific functions.</p>
+<b>Version: </b>1.2<br/>
+<b>Author: </b>Greg Slepak <br/>
+<b>Location: </b><a href="http://www.taoeffect.com/newlisp/database_sqlite3.lsp.txt">http://www.taoeffect.com/newlisp/database_sqlite3.lsp.txt</a><br/>
+ <h3>Features not found in newLISP's sqlite3.lsp:</h3>
+ <ul>
+ <li>Multiple connections</li>
+ <li>Multiple active SQL statements</li>
+ <li>Supports reuse of SQL statements through parameter rebinding</li>
+ <li>Supports BLOB data-type as per <tt>DF.DB</tt> and <tt>DF.BLOB</tt> specification</li>
+ <li>Supports <tt>true</tt> by converting it to value 1 (as integer)</li>
+ <li>Conforms to generic <tt>DF.DB</tt> interface</li>
+ <li>Grabs integers directly through 64-bit function</li>
+ <li>Can go through results row-by-row</li>
+ <li>Allows specification of custom sqlite3 library page with <tt>SQLITE3_LIBRARY_PATH</tt></li>
+ <li>Uses the latest Sqlite3 library functions if they are available</li>
+ <li>Better error handling</li>
+ </ul>
+ <h3>Requirements</h3>
+ See module <a href="http://www.taoeffect.com/newlisp/database.lsp.html">DF.DB</a> for requirements.
+ <h3>Version history</h3>
+ <b>1.2.0</b> &bull; temporary fix for handling of floats, sqlite3 functions globally for speed, binding <tt>true</tt> is handled as 1
+ <b>1.1.2</b> &bull; fixed a bug in <tt>get-string-cast</tt> and implemented <tt>DF.SQL:col-name</tt>
+ <b>1.1.1</b> &bull; improved readability in error logging, fixed binding of integers on 32-bit newlisp builds<br/>
+ <b>1.1.0</b> &bull; support for <tt>DF.BLOB</tt><br/>
+ <b>1.0.0</b> &bull; initial release
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_Sqlite3"></a><h3><font color=#CC0000>Sqlite3</font></h3>
+<b>syntax: Sqlite3</b><br/>
+ <p>Represents a connection to an SQLite3 database. Create one like so:</p>
+ <pre>(instantiate Sqlite3 [<em>str-filepath</em> [<em>flags</em> [<em>vfs-module</em>]]])</pre>
+ <p>If <em>str-filepath</em> is specified a connected instance will be returned or <tt>nil</tt>
+ upon failure to connect. If they are not specified then an unconnected instance
+ will be returned.</p>
+ <p><b>see:</b> documentation for <tt>Sqlite3:open</tt> for an explanation of the parameters.</p>
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Sqlite3_open"></a><h3><font color=#CC0000>Sqlite3:open</font></h3>
+<b>syntax: (<font color=#CC0000>Sqlite3:open</font> <em>str-filepath</em> [<em>flags</em> [<em>vfs-module</em>]])</b><br/>
+ <p><em>str-filepath</em> specifies the path to the sqlite3 database, but it can also be
+ ":memory:" to indicate an in-memory database.</p>
+ <p><em>flags</em> and <em>vfs-module</em> are optional parameters as defined in the sqlite
+ reference <a href="http://www.sqlite.org/c3ref/open.html">documentation</a> for
+ <tt>sqlite3_open_v2</tt>. Your installation of sqlite3 may need to be updated for this to be available.</p>
+ <p>For return values see <tt>DF.DB:open</tt>.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Sqlite3_set-timeout"></a><h3><font color=#CC0000>Sqlite3:set-timeout</font></h3>
+<b>syntax: (<font color=#CC0000>Sqlite3:set-timeout</font> <em>int-ms</em>)</b><br/>
+ <p>Sets the sqlite3's busy timeout for this connection in milliseconds.</p>
+ <p>By default the timeout is set to 30 seconds.</p>
+<p><b>return: </b>nil or non-nil on success</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TODO: figure out how to do this properly, test on a bunch of different architectures
+       for bind-float it may actually be the opposite (string for 32, double for 64)
+
+
+
+
+
+
+
+
+
+
+
+
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

example-site/dragonfly-api/db/database_utils.lsp.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>database_utils.lsp</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>database_utils.lsp</h1></center>
+<p><a href="index.html">Module index</a></p><br/><h2>Module:&nbsp;database_utils</h2><p>Utilities for using DF.DB</p>
+<b>Version: </b>1.0<br/>
+<b>Author: </b>Greg Slepak<br/>
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_cast-if"></a><h3><font color=#CC0000>cast-if</font></h3>
+<b>syntax: (<font color=#CC0000>cast-if</font> <em>fn-test</em> <em>to</em> <em>from</em>)</b><br/>
+ Equivalent to: <tt>(if (fn-test from) to from)</tt>
+
+
+
+
+
+
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

example-site/dragonfly-api/db/index.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Index</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>Index</h1></center>
+<a href="database.lsp.html"><br/><h2>Module:&nbsp;database</h2></a>
+<p>Generic database access interface for <a href="http://www.rundragonfly.com">Dragonfly</a> using Objective newLISP</p>
+<a href="database.lsp.html#_DF.DB">DF.DB</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_open">open</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_close">close</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_prepare-sql">prepare-sql</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_execute-update">execute-update</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_execute-query">execute-query</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_rows-for-query">rows-for-query</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_rowid">rowid</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_changes">changes</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_version">version</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_table-exists?">table-exists?</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_connected?">connected?</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.DB_last-error">last-error</a>&nbsp; &nbsp; <a href="database.lsp.html#_DF.SQL">DF.SQL</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.SQL_bind-params">bind-params</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.SQL_next-row">next-row</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.SQL_reset">reset</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.SQL_close">close</a>&nbsp; &nbsp; <a href="database.lsp.html#DF.BLOB_DF.BLOB">DF.BLOB</a>&nbsp; &nbsp; <a href="database_orm.lsp.html"><br/><h2>Module:&nbsp;database_orm</h2></a>
+<p>DB.OBJ - Simple ORM class for DF.DB</p>
+<a href="database_sqlite3.lsp.html"><br/><h2>Module:&nbsp;database_sqlite3</h2></a>
+<p>SQLite3 subclass of DF.DB. Only lists Sqlite3 specific functions.</p>
+<a href="database_sqlite3.lsp.html#_Sqlite3">Sqlite3</a>&nbsp; &nbsp; <a href="database_sqlite3.lsp.html#Sqlite3_open">open</a>&nbsp; &nbsp; <a href="database_sqlite3.lsp.html#Sqlite3_set-timeout">set-timeout</a>&nbsp; &nbsp; <a href="database_utils.lsp.html"><br/><h2>Module:&nbsp;database_utils</h2></a>
+<p>Utilities for using DF.DB</p>
+<a href="database_utils.lsp.html#_cast-if">cast-if</a>&nbsp; &nbsp; 
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

example-site/dragonfly-api/dragonfly.lsp.html

 			link="#376590" vlink="#551A8B" alink="#ffAA28">
 <blockquote>
 <center><h1>dragonfly.lsp</h1></center>
-<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;dragonfly.lsp</h2><p>The heart of Dragonfly - A newLISP web framework for rapid web development.</p>
-<b>Version: </b>0.50<br/>
+<p><a href="index.html">Module index</a></p><br/><h2>Module:&nbsp;dragonfly.lsp</h2><p>The heart of Dragonfly - A newLISP web framework for rapid web development.</p>
+<b>Version: </b>0.70<br/>
 <b>Author: </b>Team Dragonfly 2009<br/>
 <b>Location: </b><a href="http://code.google.com/p/dragonfly-newlisp/">http://code.google.com/p/dragonfly-newlisp/</a><br/>
  <br>This file is the main entry-point of the Dragonfly framework and
 
 
 
+
+
 <br/><br/><center>- &sect; -</center><br/>
 <a name="_DF_PAGE"></a><h3><font color=#CC0000>DF_PAGE</font></h3>
 <b>syntax: DF_PAGE</b><br/>
 <b>syntax: (<font color=#CC0000>DF:activate-plugin</font> <em>str-plugin-name</em> [<em>str-plugin-name-2</em> ...])</b><br/>
 <b>parameter: </b><em>str-plugin-name</em> - The name of the plugin to load, without the ".lsp" extension.<br/>
  <br>Loads (once only) a the named plugin from the <tt>plugins-inactive</tt> folder.
+ <br>If <em>str-plugin-name</em> refers to a directory, then loads all of the ".lsp" files in that directory.
 
 <br/><br/><center>- &sect; -</center><br/>
 <a name="DF_web-root"></a><h3><font color=#CC0000>DF:web-root</font></h3>

example-site/dragonfly-api/gendocs

 # place ObjNL.lsp at the bottom
 newlispdoc ../dragonfly-framework/dragonfly.lsp `find -E ../dragonfly-framework/lib -regex "[./a-z_-]+lsp" | xargs` ../dragonfly-framework/lib/ObjNL.lsp
 
-if [ ! -d ./DF.DB ] ; then
-	mkdir -v DF.DB
+if [ ! -d ./db ] ; then
+	mkdir -v db
 fi
 
-# we link to DF.DB etc from the guide on included plugins
+# we link to db etc from the guide on included plugins
 
-cd DF.DB
+cd db
 
 newlispdoc ../../dragonfly-framework/plugins-inactive/db/*.lsp
 
 cd ..
 
-if [ ! -d ./SMTP ] ; then
-	mkdir -v SMTP
+if [ ! -d ./smtp ] ; then
+	mkdir -v smtp
 fi
 
-cd SMTP
+cd smtp
 
 newlispdoc ../../dragonfly-framework/plugins-inactive/smtp.lsp
 

example-site/dragonfly-api/index.html

 			link="#376590" vlink="#551A8B" alink="#ffAA28">
 <blockquote>
 <center><h1>Index</h1></center>
-<a href="dragonfly.lsp.html"><br/><br/><h2>Module:&nbsp;dragonfly.lsp</h2></a>
+<a href="dragonfly.lsp.html"><br/><h2>Module:&nbsp;dragonfly.lsp</h2></a>
 <p>The heart of Dragonfly - A newLISP web framework for rapid web development.</p>
-<a href="dragonfly.lsp.html#_DF_PAGE">DF_PAGE</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#_DF_SELF">DF_SELF</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#_DF_SELF_DIR">DF_SELF_DIR</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#_STDOUT">STDOUT</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_activate-plugin">activate-plugin</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_web-root">web-root</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_view-path">view-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_partial-path">partial-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_resource-path">resource-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_include">include</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_display-file">display-file</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_display-partial">display-partial</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_display-view">display-view</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_display-error">display-error</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_eval-template">eval-template</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_die">die</a>&nbsp; &nbsp; <a href="log.lsp.html"><br/><br/><h2>Module:&nbsp;log.lsp</h2></a>
+<a href="dragonfly.lsp.html#_DF_PAGE">DF_PAGE</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#_DF_SELF">DF_SELF</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#_DF_SELF_DIR">DF_SELF_DIR</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#_STDOUT">STDOUT</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_activate-plugin">activate-plugin</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_web-root">web-root</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_view-path">view-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_partial-path">partial-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_resource-path">resource-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_include">include</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_display-file">display-file</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_display-partial">display-partial</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_display-view">display-view</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_display-error">display-error</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_eval-template">eval-template</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#DF_die">die</a>&nbsp; &nbsp; <a href="log.lsp.html"><br/><h2>Module:&nbsp;log.lsp</h2></a>
 <p>Provides convenient logging facility for all of Dragonfly.</p>
-<a href="log.lsp.html#Dragonfly_log-func">log-func</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-debug">log-debug</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-info">log-info</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-warn">log-warn</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-err">log-err</a>&nbsp; &nbsp; <a href="request.lsp.html"><br/><br/><h2>Module:&nbsp;request.lsp</h2></a>
+<a href="log.lsp.html#Dragonfly_log-func">log-func</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-debug">log-debug</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-info">log-info</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-warn">log-warn</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-err">log-err</a>&nbsp; &nbsp; <a href="request.lsp.html"><br/><h2>Module:&nbsp;request.lsp</h2></a>
 <p></p>
-<a href="request.lsp.html#_$GET">$GET</a>&nbsp; &nbsp; <a href="request.lsp.html#_$POST">$POST</a>&nbsp; &nbsp; <a href="request.lsp.html#_$FILES">$FILES</a>&nbsp; &nbsp; <a href="request.lsp.html#_$COOKIES">$COOKIES</a>&nbsp; &nbsp; <a href="request.lsp.html#_$BINARY">$BINARY</a>&nbsp; &nbsp; <a href="request.lsp.html#_MAX_POST_LENGTH">MAX_POST_LENGTH</a>&nbsp; &nbsp; <a href="request.lsp.html#_utf8-urlencode">utf8-urlencode</a>&nbsp; &nbsp; <a href="request.lsp.html#_utf8-urldecode">utf8-urldecode</a>&nbsp; &nbsp; <a href="response.lsp.html"><br/><br/><h2>Module:&nbsp;response.lsp</h2></a>
+<a href="request.lsp.html#_$GET">$GET</a>&nbsp; &nbsp; <a href="request.lsp.html#_$POST">$POST</a>&nbsp; &nbsp; <a href="request.lsp.html#_$FILES">$FILES</a>&nbsp; &nbsp; <a href="request.lsp.html#_$COOKIES">$COOKIES</a>&nbsp; &nbsp; <a href="request.lsp.html#_$BINARY">$BINARY</a>&nbsp; &nbsp; <a href="request.lsp.html#_MAX_POST_LENGTH">MAX_POST_LENGTH</a>&nbsp; &nbsp; <a href="request.lsp.html#_utf8-urlencode">utf8-urlencode</a>&nbsp; &nbsp; <a href="request.lsp.html#_utf8-urldecode">utf8-urldecode</a>&nbsp; &nbsp; <a href="response.lsp.html"><br/><h2>Module:&nbsp;response.lsp</h2></a>
 <p></p>
-<a href="response.lsp.html#Response_status">status</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_header">header</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_cookie">cookie</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_send-headers">send-headers</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_redirect">redirect</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_send-headers-with-status">send-headers-with-status</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_content-type">content-type</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_extension->type">extension->type</a>&nbsp; &nbsp; <a href="utils.lsp.html"><br/><br/><h2>Module:&nbsp;utils.lsp</h2></a>
+<a href="response.lsp.html#Response_status">status</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_header">header</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_cookie">cookie</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_send-headers">send-headers</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_redirect">redirect</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_send-headers-with-status">send-headers-with-status</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_content-type">content-type</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_extension->type">extension->type</a>&nbsp; &nbsp; <a href="utils.lsp.html"><br/><h2>Module:&nbsp;utils.lsp</h2></a>
 <p></p>
-<a href="utils.lsp.html#_add-to-load-path">add-to-load-path</a>&nbsp; &nbsp; <a href="utils.lsp.html#_file-ext">file-ext</a>&nbsp; &nbsp; <a href="utils.lsp.html#_del-ext">del-ext</a>&nbsp; &nbsp; <a href="utils.lsp.html#_basename">basename</a>&nbsp; &nbsp; <a href="utils.lsp.html#_dirname">dirname</a>&nbsp; &nbsp; <a href="utils.lsp.html#_regex-captcha">regex-captcha</a>&nbsp; &nbsp; <a href="utils.lsp.html#_load-files-in-dir">load-files-in-dir</a>&nbsp; &nbsp; <a href="utils.lsp.html#_wrap-func">wrap-func</a>&nbsp; &nbsp; <a href="utils.lsp.html#_SET_DF_SELF">SET_DF_SELF</a>&nbsp; &nbsp; <a href="utils.lsp.html#_NEWLISP64">NEWLISP64</a>&nbsp; &nbsp; <a href="utils.lsp.html#_get-ptr">get-ptr</a>&nbsp; &nbsp; <a href="utils.lsp.html#_throw-not-implemented">throw-not-implemented</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html"><br/><br/><h2>Module:&nbsp;ObjNL.lsp</h2></a>
+<a href="utils.lsp.html#_add-to-load-path">add-to-load-path</a>&nbsp; &nbsp; <a href="utils.lsp.html#_file-ext">file-ext</a>&nbsp; &nbsp; <a href="utils.lsp.html#_del-ext">del-ext</a>&nbsp; &nbsp; <a href="utils.lsp.html#_basename">basename</a>&nbsp; &nbsp; <a href="utils.lsp.html#_dirname">dirname</a>&nbsp; &nbsp; <a href="utils.lsp.html#_regex-captcha">regex-captcha</a>&nbsp; &nbsp; <a href="utils.lsp.html#_load-files-in-dir">load-files-in-dir</a>&nbsp; &nbsp; <a href="utils.lsp.html#_wrap-func">wrap-func</a>&nbsp; &nbsp; <a href="utils.lsp.html#_SET_DF_SELF">SET_DF_SELF</a>&nbsp; &nbsp; <a href="utils.lsp.html#_define-smacro">define-smacro</a>&nbsp; &nbsp; <a href="utils.lsp.html#_NEWLISP64">NEWLISP64</a>&nbsp; &nbsp; <a href="utils.lsp.html#_get-ptr">get-ptr</a>&nbsp; &nbsp; <a href="utils.lsp.html#_throw-not-implemented">throw-not-implemented</a>&nbsp; &nbsp; <a href="utils.lsp.html#_<-"><-</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html"><br/><h2>Module:&nbsp;ObjNL.lsp</h2></a>
 <p>Objective newLISP - Real Object Oriented Programming for newLISP</p>
 <a href="ObjNL.lsp.html#_ObjNL">ObjNL</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#ObjNL_ObjNL">ObjNL</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#ObjNL_dealloc">dealloc</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#ObjNL_equals">equals</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#_new-class">new-class</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#_instantiate">instantiate</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#_add-interface">add-interface</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#_deallocate">deallocate</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#_implements?">implements?</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#_retain">retain</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#_release">release</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#_autorelease">autorelease</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#_push-autorelease-pool">push-autorelease-pool</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#_pop-autorelease-pool">pop-autorelease-pool</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#_.">.</a>&nbsp; &nbsp; <a href="ObjNL.lsp.html#_.&">.&</a>&nbsp; &nbsp; 
 <br/><br/><center>- &part; -</center><br/>

example-site/dragonfly-api/log.lsp.html

 			link="#376590" vlink="#551A8B" alink="#ffAA28">
 <blockquote>
 <center><h1>log.lsp</h1></center>
-<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;log.lsp</h2><p>Provides convenient logging facility for all of Dragonfly.</p>
+<p><a href="index.html">Module index</a></p><br/><h2>Module:&nbsp;log.lsp</h2><p>Provides convenient logging facility for all of Dragonfly.</p>
 <b>Author: </b>Greg Slepak<br/>
  <p>To avoid checking the value of <tt>Dragonfly:LOG_LEVEL</tt> each time something is logged
  the logging functions that correspond to a lower logging level are disabled

example-site/dragonfly-api/request.lsp.html

 <blockquote>
 <center><h1>request.lsp</h1></center>
 <p><a href="index.html">Module index</a></p>
-<br/><br/><br/><h2>Module:&nbsp;request.lsp</h2><b>Author: </b>Greg Slepak <greg at taoeffect.com><br/>
+<br/><h2>Module:&nbsp;request.lsp</h2><b>Author: </b>Greg Slepak <greg at taoeffect.com><br/>
  <h3>$GET/$POST</h3>
  These are very similar to the PHP $_GET and $_POST associative arrays.
  Use them to retrieve the GET/POST values.

example-site/dragonfly-api/response.lsp.html

 			link="#376590" vlink="#551A8B" alink="#ffAA28">
 <blockquote>
 <center><h1>response.lsp</h1></center>
-<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;response.lsp</h2><b>Author: </b>Greg Slepak<br/>
+<p><a href="index.html">Module index</a></p><br/><h2>Module:&nbsp;response.lsp</h2><b>Author: </b>Greg Slepak<br/>
 
 
 

example-site/dragonfly-api/smtp/index.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Index</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>Index</h1></center>
+<a href="smtp.lsp.html"><br/><h2>Module:&nbsp;smtp.lsp </h2></a>
+<p>Send mail using SMTP protocol</p>
+<a href="smtp.lsp.html#SMTP_send-mail">send-mail</a>&nbsp; &nbsp; <a href="smtp.lsp.html#SMTP_get-error-text">get-error-text</a>&nbsp; &nbsp; <a href="smtp.lsp.html#SMTP_clear-attachments">clear-attachments</a>&nbsp; &nbsp; <a href="smtp.lsp.html#SMTP_attach-document">attach-document</a>&nbsp; &nbsp; <a href="smtp.lsp.html#SMTP_encode64-widthsafe">encode64-widthsafe</a>&nbsp; &nbsp; <a href="smtp.lsp.html#SMTP_encode64-line">encode64-line</a>&nbsp; &nbsp; 
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

example-site/dragonfly-api/smtp/smtp.lsp.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>smtp.lsp</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>smtp.lsp</h1></center>
+<p><a href="index.html">Module index</a></p><br/><h2>Module:&nbsp;smtp.lsp </h2><p>Send mail using SMTP protocol</p>
+<b>Version: </b>3.0 - Partial rewrite for Dragonfly. Addition attachments, custom port and proper utf8 encoding for subject/message/attachments<br/>
+<b>Version: </b>2.3 - fix in mail-send-body, thanks to Alessandro<br/>
+<b>Version: </b>2.2 - doc changes<br/>
+<b>Version: </b>2.1 - changes for 10.0<br/>
+<b>Version: </b>2.0 - March 2008, Cormullion added AUTH PLAIN authentication <br/>
+<b>Author: </b>Lutz Mueller 2001-2009, Cormullion 2008, Greg Slepak 2009-2010<br/>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="SMTP_send-mail"></a><h3><font color=#CC0000>SMTP:send-mail</font></h3>
+<b>syntax: (<font color=#CC0000>SMTP:send-mail</font> <em>str-from</em> <em>str-to</em> <em>str-subject</em> <em>str-message</em> [<em>str-server</em> [<em>str-usr</em> <em>str-pass</em> [<em>int-port</em>]]])</b><br/>
+<b>parameter: </b><em>str-from</em> - The email address of the sender.<br/>
+<b>parameter: </b><em>str-to</em> - The email address of the recipient.<br/>
+<b>parameter: </b><em>str-subject</em> - The subject line of the email.<br/>
+<b>parameter: </b><em>str-message</em> - The message part of the email.<br/>
+<b>parameter: </b><em>str-server</em> - The address of the SMTP server (default: "localhost")<br/>
+<b>parameter: </b><em>str-user</em> - Optional user name for authentication.<br/>
+<b>parameter: </b><em>str-pass</em> - Optional password for authentication.<br/>
+<b>parameter: </b><em>int-port</em> - Optional port to communicate on (default: 25)<br/>
+<p><b>return: </b>On success <tt>true</tt>, on failure <tt>nil</tt>.</p>
+ In case the function fails returning <tt>nil</tt>, the function
+ <tt>SMTP:get-error-text</tt> can be used to receive the error text.
+<br/><br/>
+<b>example:</b><blockquote><pre> (SMTP:send-mail "jdoe@asite.com" "somebody@isp.com" "Greetings" 
+   "How are you today? - john doe -" "smtp.asite.com" "jdoe" "secret") 
+ 
+ This logs in to the server, tries to authenticate using the username 'jdoe' and password 'secret' (if supplied), 
+ and sends an email with the format: 
+
+  From:    jdoe@asite.com 
+  To:      somebody@isp.com 
+  Subject: Greetings 
+  Message: How are you today? - John Doe - </pre></blockquote>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="SMTP_get-error-text"></a><h3><font color=#CC0000>SMTP:get-error-text</font></h3>
+<b>syntax: (<font color=#CC0000>SMTP:get-error-text</font>)</b><br/>
+ <p>Call this to get the reason <tt>send-mail</tt> returned <tt>nil</tt>.</p>
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="SMTP_clear-attachments"></a><h3><font color=#CC0000>SMTP:clear-attachments</font></h3>
+<b>syntax: (<font color=#CC0000>SMTP:clear-attachments</font>)</b><br/>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="SMTP_attach-document"></a><h3><font color=#CC0000>SMTP:attach-document</font></h3>
+<b>syntax: (<font color=#CC0000>SMTP:attach-document</font> <em>str-content</em> <em>str-filename</em> [<em>str-disposition</em> [<em>str-mime-type</em> [<em>str-encoding</em>]]])</b><br/>
+<b>parameter: </b><em>str-content</em> - The attachment data.<br/>
+<b>parameter: </b><em>str-filename</em> - How you'd like your attachment to appear named in the email.<br/>
+<b>parameter: </b><em>str-disposition</em> - "attachment" or "inline". default is "attachment".<br/>
+<b>parameter: </b><em>str-mime-type</em> - default is "application/octet-stream".<br/>
+<b>parameter: </b><em>str-encoding</em> - default is "base64". If <tt>encoding</tt> is "base64" it will be automatically transformed using <tt>encode64-widthsafe</tt><br/>
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="SMTP_encode64-widthsafe"></a><h3><font color=#CC0000>SMTP:encode64-widthsafe</font></h3>
+<b>syntax: (<font color=#CC0000>SMTP:encode64-widthsafe</font> <em>buff-data</em>)</b><br/>
+ <p>Useful for attaching binary data such as images. Converts the data into base64
+ and chops it up so that the lines are not longer than 76 characters long, making
+ it safe to include in the body of emails.</p>
+ <p>If the attachment's encoding to "base64" (which it is by default), this function
+ will automatically applied to the <em>str-content</em> of the email.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="SMTP_encode64-line"></a><h3><font color=#CC0000>SMTP:encode64-line</font></h3>
+<b>syntax: (<font color=#CC0000>SMTP:encode64-line</font> <em>str-line</em>)</b><br/>
+ <p>Creates a base64 UTF-8 compatible string, suitable for including foreign characters
+ in the subjects of emails. This is used by <tt>send-mail</tt> automatically on the filename
+ of any attachments, as well as the subject of the email.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

example-site/dragonfly-api/utils.lsp.html

 			link="#376590" vlink="#551A8B" alink="#ffAA28">
 <blockquote>
 <center><h1>utils.lsp</h1></center>
-<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;utils.lsp</h2><b>Author: </b>Greg Slepak <greg at taoeffect.com><br/>
+<p><a href="index.html">Module index</a></p><br/><h2>Module:&nbsp;utils.lsp</h2><b>Author: </b>Greg Slepak <greg at taoeffect.com><br/>
  <p>This file not only provides the functions documented below, but
  it also plays a role in globally overriding certain functions in the MAIN context.</p>
  <p>The overridden functions include: <tt>load</tt>, <tt>print</tt>, and <tt>println</tt>.</p>
  in their <tt>Route:run</tt> methods, prior to loading the files. This is the recommended way of
  calling this function.</p>
 <br/><br/><center>- &sect; -</center><br/>
+<a name="_define-smacro"></a><h3><font color=#CC0000>define-smacro</font></h3>
+<b>syntax: (<font color=#CC0000>define-smacro</font>)</b><br/>
+ <p>Defines a "safe macro", free of variable capture issues. Note though
+ that it does this by placing the macro in its own context, so be careful
+ when choosing its name!</p>
+<br/><br/><center>- &sect; -</center><br/>
 <a name="_NEWLISP64"></a><h3><font color=#CC0000>NEWLISP64</font></h3>
 <b>syntax: NEWLISP64</b><br/>
  <p>A constant that is <tt>true</tt> if we're running the 64-bit version of newLISP.</p>
 <a name="_throw-not-implemented"></a><h3><font color=#CC0000>throw-not-implemented</font></h3>
 <b>syntax: (<font color=#CC0000>throw-not-implemented</font>)</b><br/>
  <p>Used to indicate that an ObjNL method *must* be overwritten.</p>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_<-"></a><h3><font color=#CC0000><-</font></h3>
+<b>syntax: (<font color=#CC0000><-</font> <em>key</em> <em>assoc-list</em>)</b><br/>
+ <p>An alias for <tt>lookup</tt></p>
 
 
 <br/><br/><center>- &part; -</center><br/>

example-site/dragonfly-framework/dragonfly.lsp

 (define (run)
 	(SET_DF_SELF path)
 	(load path)
-	(set 'ctx-str (string "Resource." (join (map title-case (parse resource_name "_")))))
-	(set 'ctx-sym (sym ctx-str))
-	
-	; If no action is specified, use the default function
-	(if (null? resource_action) (set 'resource_action ctx-str))
-	(set 'action (eval (sym resource_action ctx-sym)))
-	
-	(if-not (lambda? action) (DF:die ctx-str ":" resource_action " not defined!"))
-	
-	; call the action on the resource with the optional parameters
-	(action (int resource_id) (if-not (null? response_format) response_format))
+	(letn (
+			ctx-str (string "Resource." (join (map title-case (parse resource_name "_"))))
+		    ctx-sym (sym ctx-str)
+		)
+		; If no action is specified, use the default function
+		(when (null? resource_action) (setf resource_action ctx-str))
+		(setf action (eval (sym resource_action ctx-sym)))
+		; if the requested action doesn't exist we call the catch-all method
+		(unless (lambda? action)
+			(setf action (lambda () (eval (append (list (sym 'catch-all ctx-sym) resource_action) $args))))
+		)
+		; call the action on the resource with the optional parameters
+		(action (int resource_id) (if-not (null? response_format) response_format))
+	)
 )
 
 (context 'Dragonfly)

example-site/dragonfly-framework/lib/classes.lsp

 ;  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 
-(new Class 'Resource) ; nothing so far, but inherit for future compatibility
 (new Class 'Route)
 
 (context Route)
 (define (matches?) nil)
 (define (run) nil)
 
+(context 'Resource)
+(define (Resource:Resource)
+	(Dragonfly:die (context) " has no default action!")
+)
+(define (catch-all action id rformat) ; 'format' is a protected symbol
+	(Dragonfly:die (context) ":" action " not defined!")
+)
+
 (context MAIN)

example-site/dragonfly-framework/plugins-inactive/artfulcode/json.lsp

   (case (type-of lisp)
     ("boolean" (if lisp "true" "false"))
     ("quote" (lisp->json (eval lisp)))
-    ("symbol" (format {"%s"} (name lisp)))
+    ("symbol" (format {"%s"} (term lisp)))
     ("string" (format {"%s"} (simple-escape lisp)))
     ("integer" (string lisp))
     ("float" (string lisp))
                         (join (map (fn (pair)
                                      (format {"%s": %s}
                                              (if (symbol? (pair 0))
-                                                 (name (pair 0))
+                                                 (term (pair 0))
                                                  (string (pair 0)))
                                              (lisp->json (pair 1))))
                                    lisp)
     ("context" (let ((values '()))
                  (dotree (s lisp)
                    (push (format {"%s": %s}
-                                 (name s)
+                                 (term s)
                                  (lisp->json (eval s)))
                          values -1))
                  (format "{ %s }" (join values ", "))))

example-site/dragonfly-framework/plugins-inactive/artfulcode/session.lsp

     ((true? key) (context (session-context) key))
     (true (let ((alist '()))
             (dotree (s (session-context))
-              (push (list (name s) (context (session-context) (name s))) alist -1))
+              (push (list (term s) (context (session-context) (term s))) alist -1))
             alist))))
 
 ;===============================================================================

example-site/dragonfly-framework/plugins-inactive/artfulcode/util.lsp

 (define (type-of:type-of x)
   (let ((type (type-of:types (& 0xf ((dump x) 1)))))
 	  (if (and (= "list" type) (context? (first x)))
-	      (name (first x))
+	      (term (first x))
 		    type)))
 
 ;; @syntax (gensym [<ctx>])
 (define _gensym:_gensym)
 
 (define (gensym:gensym (ctx MAIN) , ctx-name new-sym)
-  (setf ctx-name (name ctx))
+  (setf ctx-name (term ctx))
   (if (_gensym ctx-name)
     (begin
       (setf new-sym (string "gensym-" (_gensym ctx-name (+ 1 (_gensym ctx-name)))))
 ;; format as with the 'assoc' function, but the result is the same as the 'lookup'
 ;; function, except the multiple values are returned correctly.</p>
 ;; @example
-;; (set 'data '((name "Joe") (friends "John" "Steve")))
+;; (set 'data '((term "Joe") (friends "John" "Steve")))
 ;; (get-assoc (data 'name))
 ;; => "Joe"
 ;; (get-assoc (data 'friends))

example-site/dragonfly-framework/plugins-inactive/db/database.lsp

-;; @module DF.DB, DF.SQL, DF.BLOB
+;; @module database
 ;; @description Generic database access interface for <a href="http://www.rundragonfly.com">Dragonfly</a> using Objective newLISP
 ;; @version 1.2
 ;; @author Greg Slepak

example-site/dragonfly-framework/plugins-inactive/db/database_orm.lsp

 ;; @module database_orm
-;; @description DB.OBJ - Simple ORM Singleton class for DF.DB
+;; @description DB.OBJ - Simple ORM class for DF.DB
 ;; @version 1.0
 ;; @author Greg Slepak
+;; <p></p>
+;; <p>To accomplish this, the interface introduces three Objective newLISP classes:
+;; 'DF.DB', 'DF.SQL', and 'DF.BLOB'.</p>
+;; <h3>DF.SQL</h3>
+;; A 'DF.SQL' object is a wrapper around an SQL statement, is retrieved through one of
+;; two functions: 'DF.DB:execute-query' and the lower-level 'DF.DB:preprare-sql'.
+;; <p>It is used to retrieve rows from the result set of a query one-by-one.</p>
+;; <h3>Example</h3>
+;; <pre>
+;; (push-autorelease-pool) ; we're going to be using DF.BLOB's.
+;; (setf db (instantiate Sqlite3 ":memory:"))
+;; (if-not db (throw-error "couldn't open db"))
+;; (db:execute-update "CREATE TABLE fish (id INTEGER PRIMARY KEY, name TEXT, weight REAL, blah BLOB)")
+;; (db:execute-update "INSERT INTO fish (name,weight) VALUES (?,?)" '("flipper" 234.123))
+;; (db:execute-update "INSERT INTO fish (name,weight) VALUES (?1,?2)" '(("?1" "catfish") ("?2" 100.3)))
+;; (db:execute-update "INSERT INTO fish (blah) VALUES (?)" (list (DF.BLOB (dup "\000" 10))))
+;; (db:execute-update "INSERT INTO fish (blah) VALUES (:cat)" (list (list ":cat" (DF.BLOB (dup "\000" 10)))))
+;; (setf sql (db:execute-query "SELECT * FROM fish"))
+;; (do-while (list? row)
+;;     (push-autorelease-pool) ; "in case" we end up fetching a lot of large blobs
+;;     (setf row (sql:next-row))
+;;     (println "row: " row)
+;;     (pop-autorelease-pool)
+;; )
+;; (deallocate sql)
+;; (deallocate db)
+;; (pop-autorelease-pool) ; deallocate the blobs we created</pre>
+;; <h3>Version history</h3>
+;; <b>1.0</b> &bull; initial release
 
 (DF:activate-plugin "db/database_utils")
 

example-site/dragonfly-framework/plugins-inactive/db/database_sqlite3.lsp

-;; @module Sqlite3
+;; @module database_sqlite3
 ;; @description SQLite3 subclass of DF.DB. Only lists Sqlite3 specific functions.
 ;; @version 1.2
 ;; @author Greg Slepak 

example-site/dragonfly-framework/plugins-inactive/db/database_utils.lsp

 
 (context MAIN)
 
+;; @syntax (cast-if <fn-test> <to> <from>)
+;; Equivalent to: '(if (fn-test from) to from)'
 (define (cast-if test to from)
 	(if (test from) to from)
 )

example-site/resources/api.lsp

+;; @author Greg Slepak
+
+(new Resource 'Resource.Api)
+(context 'Resource.Api)
+
+(define (Resource.Api:Resource.Api)
+	(catch-all)
+)
+
+(define (catch-all action)
+	(setf api-path (string "dragonfly-api" (if action (string "/" action) "" )))
+	(Response:content-type Response:html-type)
+	(DF:display-view "dragonfly_api")
+)
+
+(context MAIN)

example-site/views/dragonfly_ajax-api.html

 (activate-plugin "dragonfly_api")
 
 (let (path ($POST "path"))
-	; security check! make sure they ain't asking
-	; for something they shouldn't be asking for!
-	(if (and (find "dragonfly-api" path) (not (find "../" path)) (ends-with path ".html"))
+	; security check! make sure they ain't asking for something they shouldn't be asking for!
+	(if (and (find "dragonfly-api" path) (not (find ".." path)) (ends-with path ".html"))
 		(include path)
 		(die "bad path: " path)
 	)

example-site/views/dragonfly_api.html

 	<div id="content">
 				
 		<div class="title nomargin">
-			<p><% (title "| Dragonfly web framework") %><p>
+			<p><% (title "| Dragonfly web framework") %> | <%=Resource.Api:api-path%><p>
 		</div>
 		
 		<!-- This inserts a div with id #api-browser -->
-		<% (api-browser "dragonfly-api") %>
+		<%
+		(if Resource.Api:api-path
+			(api-browser Resource.Api:api-path)
+			(api-browser "dragonfly-api")
+		)
+		%>
 		
 		<div class="line-dotted"></div>
 

example-site/views/dragonfly_db_api.html

-<%
-(activate-plugin "dragonfly_api")
-(display-partial "doctype")
-%>
-<head>
-	<%
-	(display-partial "header")
-	(script (web-root "includes/js/jquery.scrollTo-min.js"))
-	%>
-</head>
-<body>
-
-<div id="wrap">
-	<div id="header">
-		<% (display-partial "navigation") %>	
-		<div class="clear"></div>
-	</div>
-
-	<div id="content">
-				
-		<div class="title nomargin">
-			<p><% (title "| Dragonfly web framework") %><p>
-		</div>
-		
-		<!-- This inserts a div with id #api-browser -->
-		<% (api-browser "dragonfly-api/DF.DB") %>
-		
-		<div class="line-dotted"></div>
-
-		<% (benchmark-result) %>
-		
-		<div class="line-dotted"></div>
-		
-		
-	</div><!-- END CONTENT -->
-	
-</div><!-- END WRAP -->
-<% (display-partial "footer") %>
-

example-site/views/dragonfly_smtp_api.html

-<%
-(activate-plugin "dragonfly_api")
-(display-partial "doctype")
-%>
-<head>
-	<%
-	(display-partial "header")
-	(script (web-root "includes/js/jquery.scrollTo-min.js"))
-	%>
-</head>
-<body>
-
-<div id="wrap">
-	<div id="header">
-		<% (display-partial "navigation") %>	
-		<div class="clear"></div>
-	</div>
-
-	<div id="content">
-				
-		<div class="title nomargin">
-			<p><% (title "| Dragonfly web framework") %><p>
-		</div>
-		
-		<!-- This inserts a div with id #api-browser -->
-		<% (api-browser "dragonfly-api/SMTP") %>
-		
-		<div class="line-dotted"></div>
-
-		<% (benchmark-result) %>
-		
-		<div class="line-dotted"></div>
-		
-		
-	</div><!-- END CONTENT -->
-	
-</div><!-- END WRAP -->
-<% (display-partial "footer") %>
-

example-site/views/partials/navigation.html

 				<dd><% (link_to "Changes between versions" "changes")%>
 				
 				<dt>API Reference</dt>
-				<dd><% (link_to "Core API" "dragonfly_api") %></dd>
-				<dd><% (link_to "Dragonfly DB" "dragonfly_db_api") %></dd>
-				<dd><% (link_to "Dragonfly SMTP" "dragonfly_smtp_api") %></dd>
+				<dd><% (link_to "Core API" "api") %></dd>
+				<dd><% (link_to "Dragonfly DB" "api/db") %></dd>
+				<dd><% (link_to "Dragonfly SMTP" "api/smtp") %></dd>
 			</dl>
 		</div>
 	</li>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.