adl/docs/adl.to-selmer-routes.html

21 lines
12 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>adl.to-selmer-routes documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Adl</span> <span class="project-version">1.4.7-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>adl</span></div></div></li><li class="depth-2 branch"><a href="adl.main.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>main</span></div></a></li><li class="depth-2 branch"><a href="adl.to-cache.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-cache</span></div></a></li><li class="depth-2 branch"><a href="adl.to-hugsql-queries.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-hugsql-queries</span></div></a></li><li class="depth-2 branch"><a href="adl.to-json-routes.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-json-routes</span></div></a></li><li class="depth-2 branch"><a href="adl.to-psql.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-psql</span></div></a></li><li class="depth-2 branch"><a href="adl.to-reframe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-reframe</span></div></a></li><li class="depth-2 branch current"><a href="adl.to-selmer-routes.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-selmer-routes</span></div></a></li><li class="depth-2 branch"><a href="adl.to-selmer-templates.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-selmer-templates</span></div></a></li><li class="depth-2 branch"><a href="adl.to-swagger.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-swagger</span></div></a></li><li class="depth-2"><a href="adl.validator.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validator</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="adl.to-selmer-routes.html#var-compose-fetch-auxlist-data"><div class="inner"><span>compose-fetch-auxlist-data</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-compose-fetch-record"><div class="inner"><span>compose-fetch-record</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-compose-get-menu-options"><div class="inner"><span>compose-get-menu-options</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-file-header"><div class="inner"><span>file-header</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-generate-handler-resolver"><div class="inner"><span>generate-handler-resolver</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-handler-name"><div class="inner"><span>handler-name</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-make-defroutes"><div class="inner"><span>make-defroutes</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-make-form-get-handler-content"><div class="inner"><span>make-form-get-handler-content</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-make-form-post-handler-content"><div class="inner"><span>make-form-post-handler-content</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-make-get-handler"><div class="inner"><span>make-get-handler</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-make-handlers"><div class="inner"><span>make-handlers</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-make-list-get-handler-content"><div class="inner"><span>make-list-get-handler-content</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-make-page-get-handler-content"><div class="inner"><span>make-page-get-handler-content</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-make-post-handler"><div class="inner"><span>make-post-handler</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-make-route"><div class="inner"><span>make-route</span></div></a></li><li class="depth-1"><a href="adl.to-selmer-routes.html#var-to-selmer-routes"><div class="inner"><span>to-selmer-routes</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">adl.to-selmer-routes</h1><div class="doc"><div class="markdown"><p>Application Description Language: generate routes for user interface requests.</p>
</div></div><div class="public anchor" id="var-compose-fetch-auxlist-data"><h3>compose-fetch-auxlist-data</h3><div class="usage"><code>(compose-fetch-auxlist-data auxlist entity application)</code></div><div class="doc"><div class="markdown"><p>Compose Clojure code to fetch data to populate this <code>auxlist</code> of a form editing a record of this <code>entity</code> within this <code>application</code>.</p>
</div></div></div><div class="public anchor" id="var-compose-fetch-record"><h3>compose-fetch-record</h3><div class="usage"><code>(compose-fetch-record e a)</code></div><div class="doc"><div class="markdown"><p>Compose Clojure code to retrieve a single record of entity <code>e</code> in application <code>a</code>; in addition to the fields of the record in the database, the record should also contain the values of the <code>link</code> and <code>list</code> properties of the entity, retrieved from their tables. TODO: what about <code>entity</code> properties?.</p>
</div></div></div><div class="public anchor" id="var-compose-get-menu-options"><h3>compose-get-menu-options</h3><div class="usage"><code>(compose-get-menu-options property nearside application)</code></div><div class="doc"><div class="markdown"><p>Compose Clojure code to fetch from the database menu options for this <code>property</code> within this <code>application</code>.</p>
</div></div></div><div class="public anchor" id="var-file-header"><h3>file-header</h3><div class="usage"><code>(file-header application)</code></div><div class="doc"><div class="markdown"><p>*<em>TODO</em>: write docs</p>
</div></div></div><div class="public anchor" id="var-generate-handler-resolver"><h3>generate-handler-resolver</h3><div class="usage"><code>(generate-handler-resolver application)</code></div><div class="doc"><div class="markdown"><p>Dodgy, dodgy, dodgy. Generate code which will look up functions in the manual and in this namespace. Im sure someone who really knew what they were doing could write this more elegantly.</p>
</div></div></div><div class="public anchor" id="var-handler-name"><h3>handler-name</h3><div class="usage"><code>(handler-name f e a m)</code></div><div class="doc"><div class="markdown"><p>Generate the name of the appropriate handler function for form <code>f</code> of entity <code>e</code> of application <code>a</code> for method <code>m</code>, where <code>f</code>, <code>e</code>, and <code>a</code> are expected to be elements and <code>m</code> is expected to be one of the keywords <code>:put</code> <code>:get</code>.</p>
</div></div></div><div class="public anchor" id="var-make-defroutes"><h3>make-defroutes</h3><div class="usage"><code>(make-defroutes application)</code></div><div class="doc"><div class="markdown"><p>Generate a <code>defroutes</code> declaration for all routes of all forms, pages and lists within this <code>application</code>.</p>
</div></div></div><div class="public anchor" id="var-make-form-get-handler-content"><h3>make-form-get-handler-content</h3><div class="usage"><code>(make-form-get-handler-content f e a n)</code></div><div class="doc"><div class="markdown"><p>Compose Clojure code to form body of an HTTP <code>GET</code> handler for the form <code>f</code> of the entity <code>e</code> within application <code>a</code>. The argument <code>n</code> is not used.</p>
</div></div></div><div class="public anchor" id="var-make-form-post-handler-content"><h3>make-form-post-handler-content</h3><div class="usage"><code>(make-form-post-handler-content f e a n)</code></div><div class="doc"><div class="markdown"><p>Generate the body of the post handler for the form <code>f</code> of entity <code>e</code> in application <code>a</code>. The argument <code>n</code> is bound to the name of the function, but is not currently used.</p>
<p>Literally the only thing the post handler has to do is to execute the database store operation. Then it can hand off to the get handler.</p>
</div></div></div><div class="public anchor" id="var-make-get-handler"><h3>make-get-handler</h3><div class="usage"><code>(make-get-handler f e a)</code></div><div class="doc"><div class="markdown"><p>Generate a Clojure function to handle HTTP <code>GET</code> requests for form, list or page <code>f</code> of entity <code>e</code> within application <code>a</code>.</p>
</div></div></div><div class="public anchor" id="var-make-handlers"><h3>make-handlers</h3><div class="usage"><code>(make-handlers e application)</code></div><div class="doc"><div class="markdown"><p>Generate all the Selmer route handlers for all the forms, lists and pages of the entity <code>e</code> within this <code>application</code>.</p>
</div></div></div><div class="public anchor" id="var-make-list-get-handler-content"><h3>make-list-get-handler-content</h3><div class="usage"><code>(make-list-get-handler-content f e a n)</code></div><div class="doc"><div class="markdown"><p>Compose Clojure code to form body of an HTTP <code>GET</code> handler for the list <code>f</code> of the entity <code>e</code> within application <code>a</code>. The argument <code>n</code> is ignored.</p>
</div></div></div><div class="public anchor" id="var-make-page-get-handler-content"><h3>make-page-get-handler-content</h3><div class="usage"><code>(make-page-get-handler-content f e a n)</code></div><div class="doc"><div class="markdown"><p>Compose Clojure code to form body of an HTTP <code>GET</code> handler for the page <code>f</code> of the entity <code>e</code> within application <code>a</code>. The argument <code>n</code> is ignored.</p>
</div></div></div><div class="public anchor" id="var-make-post-handler"><h3>make-post-handler</h3><div class="usage"><code>(make-post-handler f e a)</code></div><div class="doc"><div class="markdown"><p>Generate an HTTP <code>POST</code> handler for the page, form or list <code>f</code> of the entity <code>e</code> of application <code>a</code>.</p>
</div></div></div><div class="public anchor" id="var-make-route"><h3>make-route</h3><div class="usage"><code>(make-route m n)</code></div><div class="doc"><div class="markdown"><p>Make a route for method <code>m</code> to request the resource with name <code>n</code>.</p>
</div></div></div><div class="public anchor" id="var-to-selmer-routes"><h3>to-selmer-routes</h3><div class="usage"><code>(to-selmer-routes application)</code></div><div class="doc"><div class="markdown"><p>Generate a <code>/routes/auto.clj</code> file for this <code>application</code>.</p>
</div></div></div></div></body></html>