PageRenderTime 20ms CodeModel.GetById 12ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/core/m_search.html

https://code.google.com/p/zotonic/
HTML | 65 lines | 54 code | 11 blank | 0 comment | 0 complexity | b740852152feec91c570f6774618b4d9 MD5 | raw file
 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 2<html>
 3<head>
 4<title>Module m_search</title>
 5<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
 6</head>
 7<body bgcolor="white">
 8<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
 9<hr>
10
11<h1>Module m_search</h1>
12<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Search model, used as an interface to the search functions of modules etc.
13<p>Copyright Š 2009 Marc Worrell
14  Date: 2009-04-15</p>
15
16<p><b>Behaviours:</b> <a href="gen_model.html"><tt>gen_model</tt></a>.</p>
17<p><b>Authors:</b> Marc Worrell (<a href="mailto:marc@worrell.nl"><tt>marc@worrell.nl</tt></a>).</p>
18
19<h2><a name="description">Description</a></h2>Search model, used as an interface to the search functions of modules etc.
20<h2><a name="index">Function Index</a></h2>
21<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#get_result-3">get_result/3</a></td><td></td></tr>
22<tr><td valign="top"><a href="#m_find_value-3">m_find_value/3</a></td><td>Fetch the value for the key from a model source.</td></tr>
23<tr><td valign="top"><a href="#m_to_list-2">m_to_list/2</a></td><td>Transform a model value to a list, used for template loops.</td></tr>
24<tr><td valign="top"><a href="#m_value-2">m_value/2</a></td><td>Transform a model value so that it can be formatted or piped through filters.</td></tr>
25<tr><td valign="top"><a href="#search-2">search/2</a></td><td>Perform a search, wrap the result in a m_search_result record.</td></tr>
26<tr><td valign="top"><a href="#search_pager-2">search_pager/2</a></td><td>Perform a paged search, wrap the result in a m_search_result record.</td></tr>
27</table>
28
29<h2><a name="functions">Function Details</a></h2>
30
31<h3 class="function"><a name="get_result-3">get_result/3</a></h3>
32<div class="spec">
33<p><tt>get_result(N, M_search_result, Context) -&gt; any()</tt></p>
34</div>
35
36<h3 class="function"><a name="m_find_value-3">m_find_value/3</a></h3>
37<div class="spec">
38<p><tt>m_find_value(SearchProps::Key, M::Source, Context) -&gt; term()</tt></p>
39</div><p>Fetch the value for the key from a model source</p>
40
41<h3 class="function"><a name="m_to_list-2">m_to_list/2</a></h3>
42<div class="spec">
43<p><tt>m_to_list(M::Source, Context) -&gt; List</tt></p>
44</div><p>Transform a model value to a list, used for template loops</p>
45
46<h3 class="function"><a name="m_value-2">m_value/2</a></h3>
47<div class="spec">
48<p><tt>m_value(M::Source, Context) -&gt; term()</tt></p>
49</div><p>Transform a model value so that it can be formatted or piped through filters</p>
50
51<h3 class="function"><a name="search-2">search/2</a></h3>
52<div class="spec">
53<p><tt>search(SearchName::Search, Context) -&gt; #m_search_result{}</tt></p>
54</div><p>Perform a search, wrap the result in a m_search_result record</p>
55
56<h3 class="function"><a name="search_pager-2">search_pager/2</a></h3>
57<div class="spec">
58<p><tt>search_pager(SearchName::Search, Context) -&gt; #m_search_result{}</tt></p>
59</div><p>Perform a paged search, wrap the result in a m_search_result record</p>
60<hr>
61
62<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
63<p><i>Generated by EDoc, Aug 12 2011, 20:01:40.</i></p>
64</body>
65</html>