<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> Module: Dynamoid::Indexes — Documentation by YARD 0.7.5 </title> <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" /> <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" /> <script type="text/javascript" charset="utf-8"> relpath = '..'; if (relpath != '') relpath += '/'; </script> <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> <script type="text/javascript" charset="utf-8" src="../js/app.js"></script> </head> <body> <script type="text/javascript" charset="utf-8"> if (window.top.frames.main) document.body.className = 'frames'; </script> <div id="header"> <div id="menu"> <a href="../_index.html">Index (I)</a> » <span class='title'><span class='object_link'><a href="../Dynamoid.html" title="Dynamoid (module)">Dynamoid</a></span></span> » <span class="title">Indexes</span> <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> </div> <div id="search"> <a id="class_list_link" href="#">Class List</a> <a id="method_list_link" href="#">Method List</a> <a id="file_list_link" href="#">File List</a> </div> <div class="clear"></div> </div> <iframe id="search_frame"></iframe> <div id="content"><h1>Module: Dynamoid::Indexes </h1> <dl class="box"> <dt class="r1">Extended by:</dt> <dd class="r1">ActiveSupport::Concern</dd> <dt class="r2">Included in:</dt> <dd class="r2"><span class='object_link'><a href="Components.html" title="Dynamoid::Components (module)">Components</a></span></dd> <dt class="r1 last">Defined in:</dt> <dd class="r1 last">lib/dynamoid/indexes.rb<span class="defines">,<br /> lib/dynamoid/indexes/index.rb</span> </dd> </dl> <div class="clear"></div> <h2>Overview</h2><div class="docstring"> <div class="discussion"> <p>Indexes are quick ways of performing queries by anything other than id in DynamoDB. They are denormalized tables; that is, data is duplicated in the initial table (where the object is saved) and the index table (where we perform indexing).</p> </div> </div> <div class="tags"> </div><h2>Defined Under Namespace</h2> <p class="children"> <strong class="modules">Modules:</strong> <span class='object_link'><a href="Indexes/ClassMethods.html" title="Dynamoid::Indexes::ClassMethods (module)">ClassMethods</a></span> <strong class="classes">Classes:</strong> <span class='object_link'><a href="Indexes/Index.html" title="Dynamoid::Indexes::Index (class)">Index</a></span> </p> <h2> Instance Method Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small> </h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#delete_indexes-instance_method" title="#delete_indexes (instance method)">- (Object) <strong>delete_indexes</strong> </a> </span> <span class="summary_desc"><div class='inline'><p>Callback for an object to delete itself from each of a class' indexes.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#save_indexes-instance_method" title="#save_indexes (instance method)">- (Object) <strong>save_indexes</strong> </a> </span> <span class="summary_desc"><div class='inline'><p>Callback for an object to save itself to each of a class' indexes.</p> </div></span> </li> </ul> <div id="instance_method_details" class="method_details_list"> <h2>Instance Method Details</h2> <div class="method_details first"> <p class="signature first" id="delete_indexes-instance_method"> - (<tt>Object</tt>) <strong>delete_indexes</strong> </p><div class="docstring"> <div class="discussion"> <p>Callback for an object to delete itself from each of a class' indexes.</p> </div> </div> <div class="tags"> <h3>Since:</h3> <ul class="since"> <li> <div class='inline'><p>0.2.0</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 62 63 64 65 66</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/dynamoid/indexes.rb', line 62</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete_indexes'>delete_indexes</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_indexes'>indexes</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='op'>|</span> <span class='id identifier rubyid_index'>index</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>end</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <p class="signature " id="save_indexes-instance_method"> - (<tt>Object</tt>) <strong>save_indexes</strong> </p><div class="docstring"> <div class="discussion"> <p>Callback for an object to save itself to each of a class' indexes.</p> </div> </div> <div class="tags"> <h3>Since:</h3> <ul class="since"> <li> <div class='inline'><p>0.2.0</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 53 54 55 56 57</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/dynamoid/indexes.rb', line 53</span> <span class='kw'>def</span> <span class='id identifier rubyid_save_indexes'>save_indexes</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_indexes'>indexes</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='op'>|</span> <span class='id identifier rubyid_index'>index</span><span class='period'>.</span><span class='id identifier rubyid_save'>save</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>end</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> </div> <div id="footer"> Generated on Thu Apr 26 01:26:24 2012 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.7.5 (ruby-1.9.3). </div> </body> </html>