/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. <h1>Module m_tkvstore</h1>
  11. <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.
  12. <p>Copyright Š 2010 Marc Worrell
  13. Date: 2010-10-07
  14. </p>
  15. <p><b>Behaviours:</b> <a href="gen_model.html"><tt>gen_model</tt></a>.</p>
  16. <p><b>Authors:</b> Marc Worrell (<a href="mailto:marc@worrell.nl"><tt>marc@worrell.nl</tt></a>).</p>
  17. <h2><a name="description">Description</a></h2>Simple store for key/value pairs
  18. <h2><a name="index">Function Index</a></h2>
  19. <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>
  20. <tr><td valign="top"><a href="#get-3">get/3</a></td><td>Fetch a value from the store.</td></tr>
  21. <tr><td valign="top"><a href="#init-1">init/1</a></td><td>Ensure that the persistent table is present.</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 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="#put-4">put/4</a></td><td>Put a value into the store.</td></tr>
  26. </table>
  27. <h2><a name="functions">Function Details</a></h2>
  28. <h3 class="function"><a name="delete-3">delete/3</a></h3>
  29. <div class="spec">
  30. <p><tt>delete(Type, Key, Context) -&gt; any()</tt></p>
  31. </div><p>Delete a value from the store</p>
  32. <h3 class="function"><a name="get-3">get/3</a></h3>
  33. <div class="spec">
  34. <p><tt>get(Type, Key, Context) -&gt; any()</tt></p>
  35. </div><p>Fetch a value from the store</p>
  36. <h3 class="function"><a name="init-1">init/1</a></h3>
  37. <div class="spec">
  38. <p><tt>init(Context) -&gt; any()</tt></p>
  39. </div><p>Ensure that the persistent table is present</p>
  40. <h3 class="function"><a name="m_find_value-3">m_find_value/3</a></h3>
  41. <div class="spec">
  42. <p><tt>m_find_value(Type::Key, M::Source, Context) -&gt; term()</tt></p>
  43. </div><p>Fetch the value for the key from a model source</p>
  44. <h3 class="function"><a name="m_to_list-2">m_to_list/2</a></h3>
  45. <div class="spec">
  46. <p><tt>m_to_list(X1::Source, Context) -&gt; list()</tt></p>
  47. </div><p>Transform a value to a list, used for template loops</p>
  48. <h3 class="function"><a name="m_value-2">m_value/2</a></h3>
  49. <div class="spec">
  50. <p><tt>m_value(M::Source, Context) -&gt; term()</tt></p>
  51. </div><p>Transform a model value so that it can be formatted or piped through filters</p>
  52. <h3 class="function"><a name="put-4">put/4</a></h3>
  53. <div class="spec">
  54. <p><tt>put(Type, Key, Data, Context) -&gt; any()</tt></p>
  55. </div><p>Put a value into the store</p>
  56. <hr>
  57. <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>
  58. <p><i>Generated by EDoc, Aug 12 2011, 19:36:12.</i></p>
  59. </body>
  60. </html>