PageRenderTime 23ms CodeModel.GetById 16ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/modules/mod_tkvstore/m_tkvstore.html

https://code.google.com/p/zotonic/
HTML | 72 lines | 60 code | 12 blank | 0 comment | 0 complexity | 9aa40cdff23642d55e57499a9ac71b85 MD5 | raw file
 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 2<html>
 3<head>
 4<title>Module m_tkvstore</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_tkvstore</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>Simple store for key/value pairs.
13<p>Copyright Š 2010 Marc Worrell
14  Date: 2010-10-07
15 </p>
16
17<p><b>Behaviours:</b> <a href="gen_model.html"><tt>gen_model</tt></a>.</p>
18<p><b>Authors:</b> Marc Worrell (<a href="mailto:marc@worrell.nl"><tt>marc@worrell.nl</tt></a>).</p>
19
20<h2><a name="description">Description</a></h2>Simple store for key/value pairs
21<h2><a name="index">Function Index</a></h2>
22<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#delete-3">delete/3</a></td><td>Delete a value from the store.</td></tr>
23<tr><td valign="top"><a href="#get-3">get/3</a></td><td>Fetch a value from the store.</td></tr>
24<tr><td valign="top"><a href="#init-1">init/1</a></td><td>Ensure that the persistent table is present.</td></tr>
25<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>
26<tr><td valign="top"><a href="#m_to_list-2">m_to_list/2</a></td><td>Transform a value to a list, used for template loops.</td></tr>
27<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>
28<tr><td valign="top"><a href="#put-4">put/4</a></td><td>Put a value into the store.</td></tr>
29</table>
30
31<h2><a name="functions">Function Details</a></h2>
32
33<h3 class="function"><a name="delete-3">delete/3</a></h3>
34<div class="spec">
35<p><tt>delete(Type, Key, Context) -&gt; any()</tt></p>
36</div><p>Delete a value from the store</p>
37
38<h3 class="function"><a name="get-3">get/3</a></h3>
39<div class="spec">
40<p><tt>get(Type, Key, Context) -&gt; any()</tt></p>
41</div><p>Fetch a value from the store</p>
42
43<h3 class="function"><a name="init-1">init/1</a></h3>
44<div class="spec">
45<p><tt>init(Context) -&gt; any()</tt></p>
46</div><p>Ensure that the persistent table is present</p>
47
48<h3 class="function"><a name="m_find_value-3">m_find_value/3</a></h3>
49<div class="spec">
50<p><tt>m_find_value(Type::Key, M::Source, Context) -&gt; term()</tt></p>
51</div><p>Fetch the value for the key from a model source</p>
52
53<h3 class="function"><a name="m_to_list-2">m_to_list/2</a></h3>
54<div class="spec">
55<p><tt>m_to_list(X1::Source, Context) -&gt; list()</tt></p>
56</div><p>Transform a value to a list, used for template loops</p>
57
58<h3 class="function"><a name="m_value-2">m_value/2</a></h3>
59<div class="spec">
60<p><tt>m_value(M::Source, Context) -&gt; term()</tt></p>
61</div><p>Transform a model value so that it can be formatted or piped through filters</p>
62
63<h3 class="function"><a name="put-4">put/4</a></h3>
64<div class="spec">
65<p><tt>put(Type, Key, Data, Context) -&gt; any()</tt></p>
66</div><p>Put a value into the store</p>
67<hr>
68
69<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>
70<p><i>Generated by EDoc, Aug 12 2011, 19:36:12.</i></p>
71</body>
72</html>