dynamoid 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +4 -0
- data/Gemfile +3 -2
- data/Gemfile.lock +40 -45
- data/README.markdown +55 -25
- data/Rakefile +31 -0
- data/VERSION +1 -1
- data/doc/Dynamoid.html +58 -42
- data/doc/Dynamoid/Adapter.html +666 -179
- data/doc/Dynamoid/Adapter/AwsSdk.html +752 -236
- data/doc/Dynamoid/Associations.html +28 -21
- data/doc/Dynamoid/Associations/Association.html +102 -49
- data/doc/Dynamoid/Associations/BelongsTo.html +28 -25
- data/doc/Dynamoid/Associations/ClassMethods.html +95 -52
- data/doc/Dynamoid/Associations/HasAndBelongsToMany.html +28 -25
- data/doc/Dynamoid/Associations/HasMany.html +28 -25
- data/doc/Dynamoid/Associations/HasOne.html +28 -25
- data/doc/Dynamoid/Associations/ManyAssociation.html +138 -94
- data/doc/Dynamoid/Associations/SingleAssociation.html +67 -38
- data/doc/Dynamoid/Components.html +60 -22
- data/doc/Dynamoid/Config.html +61 -44
- data/doc/Dynamoid/Config/Options.html +90 -61
- data/doc/Dynamoid/Criteria.html +28 -21
- data/doc/Dynamoid/Criteria/Chain.html +508 -100
- data/doc/Dynamoid/Criteria/ClassMethods.html +26 -19
- data/doc/Dynamoid/Dirty.html +424 -0
- data/doc/Dynamoid/Dirty/ClassMethods.html +174 -0
- data/doc/Dynamoid/Document.html +451 -84
- data/doc/Dynamoid/Document/ClassMethods.html +281 -102
- data/doc/Dynamoid/Errors.html +29 -22
- data/doc/Dynamoid/Errors/ConditionalCheckFailedException.html +141 -0
- data/doc/Dynamoid/Errors/DocumentNotValid.html +36 -25
- data/doc/Dynamoid/Errors/Error.html +27 -20
- data/doc/Dynamoid/Errors/InvalidField.html +27 -19
- data/doc/Dynamoid/Errors/InvalidQuery.html +131 -0
- data/doc/Dynamoid/Errors/MissingRangeKey.html +27 -19
- data/doc/Dynamoid/Fields.html +94 -77
- data/doc/Dynamoid/Fields/ClassMethods.html +166 -37
- data/doc/Dynamoid/Finders.html +28 -21
- data/doc/Dynamoid/Finders/ClassMethods.html +505 -78
- data/doc/Dynamoid/IdentityMap.html +492 -0
- data/doc/Dynamoid/IdentityMap/ClassMethods.html +534 -0
- data/doc/Dynamoid/Indexes.html +41 -28
- data/doc/Dynamoid/Indexes/ClassMethods.html +45 -29
- data/doc/Dynamoid/Indexes/Index.html +100 -62
- data/doc/Dynamoid/Middleware.html +115 -0
- data/doc/Dynamoid/Middleware/IdentityMap.html +264 -0
- data/doc/Dynamoid/Persistence.html +326 -85
- data/doc/Dynamoid/Persistence/ClassMethods.html +275 -109
- data/doc/Dynamoid/Validations.html +47 -31
- data/doc/_index.html +116 -71
- data/doc/class_list.html +13 -7
- data/doc/css/full_list.css +4 -2
- data/doc/css/style.css +60 -44
- data/doc/file.LICENSE.html +26 -19
- data/doc/file.README.html +152 -48
- data/doc/file_list.html +14 -8
- data/doc/frames.html +20 -5
- data/doc/index.html +152 -48
- data/doc/js/app.js +52 -43
- data/doc/js/full_list.js +14 -9
- data/doc/js/jquery.js +4 -16
- data/doc/method_list.html +446 -540
- data/doc/top-level-namespace.html +27 -20
- data/{Dynamoid.gemspec → dynamoid.gemspec} +21 -8
- data/lib/dynamoid/adapter.rb +11 -10
- data/lib/dynamoid/adapter/aws_sdk.rb +40 -19
- data/lib/dynamoid/components.rb +2 -1
- data/lib/dynamoid/criteria/chain.rb +29 -11
- data/lib/dynamoid/dirty.rb +6 -0
- data/lib/dynamoid/document.rb +34 -19
- data/lib/dynamoid/fields.rb +36 -30
- data/lib/dynamoid/finders.rb +7 -5
- data/lib/dynamoid/persistence.rb +37 -10
- data/spec/app/models/address.rb +2 -0
- data/spec/app/models/camel_case.rb +10 -0
- data/spec/app/models/car.rb +6 -0
- data/spec/app/models/nuclear_submarine.rb +5 -0
- data/spec/app/models/subscription.rb +2 -2
- data/spec/app/models/vehicle.rb +7 -0
- data/spec/dynamoid/adapter/aws_sdk_spec.rb +20 -11
- data/spec/dynamoid/adapter_spec.rb +67 -82
- data/spec/dynamoid/associations/association_spec.rb +30 -30
- data/spec/dynamoid/criteria/chain_spec.rb +56 -9
- data/spec/dynamoid/criteria_spec.rb +3 -0
- data/spec/dynamoid/dirty_spec.rb +8 -0
- data/spec/dynamoid/document_spec.rb +109 -47
- data/spec/dynamoid/fields_spec.rb +32 -3
- data/spec/dynamoid/finders_spec.rb +12 -0
- data/spec/dynamoid/persistence_spec.rb +73 -8
- data/spec/spec_helper.rb +1 -0
- data/spec/support/with_partitioning.rb +15 -0
- metadata +22 -9
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>
|
|
7
|
+
Module: Dynamoid::Dirty::ClassMethods
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.8.6.1
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
|
19
|
+
relpath = '../../';
|
|
20
|
+
framesUrl = "../../frames.html#!" + escape(window.location.href);
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
|
25
|
+
|
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<div id="header">
|
|
32
|
+
<div id="menu">
|
|
33
|
+
|
|
34
|
+
<a href="../../_index.html">Index (C)</a> »
|
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Dynamoid.html" title="Dynamoid (module)">Dynamoid</a></span></span> » <span class='title'><span class='object_link'><a href="../Dirty.html" title="Dynamoid::Dirty (module)">Dirty</a></span></span>
|
|
36
|
+
»
|
|
37
|
+
<span class="title">ClassMethods</span>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div id="search">
|
|
44
|
+
|
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
|
46
|
+
href="../../class_list.html">
|
|
47
|
+
Class List
|
|
48
|
+
</a>
|
|
49
|
+
|
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
|
51
|
+
href="../../method_list.html">
|
|
52
|
+
Method List
|
|
53
|
+
</a>
|
|
54
|
+
|
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
|
56
|
+
href="../../file_list.html">
|
|
57
|
+
File List
|
|
58
|
+
</a>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
<div class="clear"></div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<iframe id="search_frame"></iframe>
|
|
65
|
+
|
|
66
|
+
<div id="content"><h1>Module: Dynamoid::Dirty::ClassMethods
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</h1>
|
|
71
|
+
|
|
72
|
+
<dl class="box">
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
<dt class="r1 last">Defined in:</dt>
|
|
82
|
+
<dd class="r1 last">lib/dynamoid/dirty.rb</dd>
|
|
83
|
+
|
|
84
|
+
</dl>
|
|
85
|
+
<div class="clear"></div>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
<h2>
|
|
96
|
+
Instance Method Summary
|
|
97
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
98
|
+
</h2>
|
|
99
|
+
|
|
100
|
+
<ul class="summary">
|
|
101
|
+
|
|
102
|
+
<li class="public ">
|
|
103
|
+
<span class="summary_signature">
|
|
104
|
+
|
|
105
|
+
<a href="#from_database-instance_method" title="#from_database (instance method)">- (Object) <strong>from_database</strong> </a>
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
</span>
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
120
|
+
|
|
121
|
+
</li>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
</ul>
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
<div id="instance_method_details" class="method_details_list">
|
|
130
|
+
<h2>Instance Method Details</h2>
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
<div class="method_details first">
|
|
134
|
+
<h3 class="signature first" id="from_database-instance_method">
|
|
135
|
+
|
|
136
|
+
- (<tt>Object</tt>) <strong>from_database</strong>
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
</h3><table class="source_code">
|
|
143
|
+
<tr>
|
|
144
|
+
<td>
|
|
145
|
+
<pre class="lines">
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
7
|
|
149
|
+
8
|
|
150
|
+
9</pre>
|
|
151
|
+
</td>
|
|
152
|
+
<td>
|
|
153
|
+
<pre class="code"><span class="info file"># File 'lib/dynamoid/dirty.rb', line 7</span>
|
|
154
|
+
|
|
155
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_from_database'>from_database</span><span class='lparen'>(</span><span class='op'>*</span><span class='rparen'>)</span>
|
|
156
|
+
<span class='kw'>super</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_d'>d</span><span class='op'>|</span> <span class='id identifier rubyid_d'>d</span><span class='period'>.</span><span class='id identifier rubyid_changed_attributes'>changed_attributes</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span> <span class='rbrace'>}</span>
|
|
157
|
+
<span class='kw'>end</span></pre>
|
|
158
|
+
</td>
|
|
159
|
+
</tr>
|
|
160
|
+
</table>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<div id="footer">
|
|
168
|
+
Generated on Thu Jun 27 21:59:09 2013 by
|
|
169
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
170
|
+
0.8.6.1 (ruby-1.9.3).
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
</body>
|
|
174
|
+
</html>
|
data/doc/Dynamoid/Document.html
CHANGED
|
@@ -6,19 +6,21 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Dynamoid::Document
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.
|
|
9
|
+
— Documentation by YARD 0.8.6.1
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
|
16
16
|
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
|
19
|
+
relpath = '../';
|
|
20
|
+
framesUrl = "../frames.html#!" + escape(window.location.href);
|
|
20
21
|
</script>
|
|
21
22
|
|
|
23
|
+
|
|
22
24
|
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
23
25
|
|
|
24
26
|
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
@@ -26,36 +28,41 @@
|
|
|
26
28
|
|
|
27
29
|
</head>
|
|
28
30
|
<body>
|
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
31
|
<div id="header">
|
|
34
32
|
<div id="menu">
|
|
35
33
|
|
|
36
|
-
<a href="../_index.html">Index (D)</a> »
|
|
34
|
+
<a href="../_index.html">Index (D)</a> »
|
|
37
35
|
<span class='title'><span class='object_link'><a href="../Dynamoid.html" title="Dynamoid (module)">Dynamoid</a></span></span>
|
|
38
36
|
»
|
|
39
37
|
<span class="title">Document</span>
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
|
|
42
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
43
41
|
</div>
|
|
44
42
|
|
|
45
43
|
<div id="search">
|
|
46
44
|
|
|
47
|
-
<a
|
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
|
46
|
+
href="../class_list.html">
|
|
47
|
+
Class List
|
|
48
|
+
</a>
|
|
48
49
|
|
|
49
|
-
<a
|
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
|
51
|
+
href="../method_list.html">
|
|
52
|
+
Method List
|
|
53
|
+
</a>
|
|
50
54
|
|
|
51
|
-
<a
|
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
|
56
|
+
href="../file_list.html">
|
|
57
|
+
File List
|
|
58
|
+
</a>
|
|
52
59
|
|
|
53
60
|
</div>
|
|
54
61
|
<div class="clear"></div>
|
|
55
62
|
</div>
|
|
56
|
-
|
|
63
|
+
|
|
57
64
|
<iframe id="search_frame"></iframe>
|
|
58
|
-
|
|
65
|
+
|
|
59
66
|
<div id="content"><h1>Module: Dynamoid::Document
|
|
60
67
|
|
|
61
68
|
|
|
@@ -98,11 +105,11 @@ the database as documents.</p>
|
|
|
98
105
|
|
|
99
106
|
</div><h2>Defined Under Namespace</h2>
|
|
100
107
|
<p class="children">
|
|
101
|
-
|
|
108
|
+
|
|
102
109
|
|
|
103
110
|
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Document/ClassMethods.html" title="Dynamoid::Document::ClassMethods (module)">ClassMethods</a></span>
|
|
104
111
|
|
|
105
|
-
|
|
112
|
+
|
|
106
113
|
|
|
107
114
|
|
|
108
115
|
</p>
|
|
@@ -145,11 +152,56 @@ the database as documents.</p>
|
|
|
145
152
|
|
|
146
153
|
|
|
147
154
|
|
|
155
|
+
|
|
148
156
|
|
|
149
157
|
|
|
150
158
|
<span class="summary_desc"><div class='inline'><p>An object is equal to another object if their ids are equal.</p>
|
|
151
159
|
</div></span>
|
|
152
160
|
|
|
161
|
+
</li>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
<li class="public ">
|
|
165
|
+
<span class="summary_signature">
|
|
166
|
+
|
|
167
|
+
<a href="#eql%3F-instance_method" title="#eql? (instance method)">- (Boolean) <strong>eql?</strong>(other) </a>
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
</span>
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
182
|
+
|
|
183
|
+
</li>
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
<li class="public ">
|
|
187
|
+
<span class="summary_signature">
|
|
188
|
+
|
|
189
|
+
<a href="#hash-instance_method" title="#hash (instance method)">- (Object) <strong>hash</strong> </a>
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
</span>
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
204
|
+
|
|
153
205
|
</li>
|
|
154
206
|
|
|
155
207
|
|
|
@@ -167,6 +219,7 @@ the database as documents.</p>
|
|
|
167
219
|
|
|
168
220
|
|
|
169
221
|
|
|
222
|
+
|
|
170
223
|
|
|
171
224
|
|
|
172
225
|
<span class="summary_desc"><div class='inline'><p>Return an object's hash key, regardless of what it might be called to the object.</p>
|
|
@@ -178,7 +231,7 @@ the database as documents.</p>
|
|
|
178
231
|
<li class="public ">
|
|
179
232
|
<span class="summary_signature">
|
|
180
233
|
|
|
181
|
-
<a href="#hash_key%3D-instance_method" title="#hash_key= (instance method)">- (Object) <strong>hash_key=</strong>(
|
|
234
|
+
<a href="#hash_key%3D-instance_method" title="#hash_key= (instance method)">- (Object) <strong>hash_key=</strong>(value) </a>
|
|
182
235
|
|
|
183
236
|
|
|
184
237
|
|
|
@@ -189,6 +242,7 @@ the database as documents.</p>
|
|
|
189
242
|
|
|
190
243
|
|
|
191
244
|
|
|
245
|
+
|
|
192
246
|
|
|
193
247
|
|
|
194
248
|
<span class="summary_desc"><div class='inline'><p>Assign an object's hash key, regardless of what it might be called to the object.</p>
|
|
@@ -211,11 +265,78 @@ the database as documents.</p>
|
|
|
211
265
|
|
|
212
266
|
|
|
213
267
|
|
|
268
|
+
|
|
214
269
|
|
|
215
270
|
|
|
216
271
|
<span class="summary_desc"><div class='inline'><p>Initialize a new object.</p>
|
|
217
272
|
</div></span>
|
|
218
273
|
|
|
274
|
+
</li>
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
<li class="public ">
|
|
278
|
+
<span class="summary_signature">
|
|
279
|
+
|
|
280
|
+
<a href="#load-instance_method" title="#load (instance method)">- (Object) <strong>load</strong>(attrs) </a>
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
</span>
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
295
|
+
|
|
296
|
+
</li>
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
<li class="public ">
|
|
300
|
+
<span class="summary_signature">
|
|
301
|
+
|
|
302
|
+
<a href="#range_value-instance_method" title="#range_value (instance method)">- (Object) <strong>range_value</strong> </a>
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
</span>
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
317
|
+
|
|
318
|
+
</li>
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
<li class="public ">
|
|
322
|
+
<span class="summary_signature">
|
|
323
|
+
|
|
324
|
+
<a href="#range_value%3D-instance_method" title="#range_value= (instance method)">- (Object) <strong>range_value=</strong>(value) </a>
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
</span>
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
339
|
+
|
|
219
340
|
</li>
|
|
220
341
|
|
|
221
342
|
|
|
@@ -233,9 +354,10 @@ the database as documents.</p>
|
|
|
233
354
|
|
|
234
355
|
|
|
235
356
|
|
|
357
|
+
|
|
236
358
|
|
|
237
359
|
|
|
238
|
-
<span class="summary_desc"><div class='inline'><p>Reload an object from the database -- if you suspect the object has changed in the datastore and you need those
|
|
360
|
+
<span class="summary_desc"><div class='inline'><p>Reload an object from the database -- if you suspect the object has changed in the datastore and you need those
|
|
239
361
|
changes to be reflected immediately, you would call this method.</p>
|
|
240
362
|
</div></span>
|
|
241
363
|
|
|
@@ -260,6 +382,33 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
260
382
|
|
|
261
383
|
|
|
262
384
|
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Dirty.html" title="Dynamoid::Dirty (module)">Dirty</a></span></h3>
|
|
388
|
+
<p class="inherited"><span class='object_link'><a href="Dirty.html#clear_changes-instance_method" title="Dynamoid::Dirty#clear_changes (method)">#clear_changes</a></span>, <span class='object_link'><a href="Dirty.html#save-instance_method" title="Dynamoid::Dirty#save (method)">#save</a></span>, <span class='object_link'><a href="Dirty.html#update%21-instance_method" title="Dynamoid::Dirty#update! (method)">#update!</a></span>, <span class='object_link'><a href="Dirty.html#write_attribute-instance_method" title="Dynamoid::Dirty#write_attribute (method)">#write_attribute</a></span></p>
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="IdentityMap.html" title="Dynamoid::IdentityMap (module)">IdentityMap</a></span></h3>
|
|
401
|
+
<p class="inherited"><span class='object_link'><a href="IdentityMap.html#clear-class_method" title="Dynamoid::IdentityMap.clear (method)">clear</a></span>, <span class='object_link'><a href="IdentityMap.html#delete-instance_method" title="Dynamoid::IdentityMap#delete (method)">#delete</a></span>, <span class='object_link'><a href="IdentityMap.html#identity_map-instance_method" title="Dynamoid::IdentityMap#identity_map (method)">#identity_map</a></span>, <span class='object_link'><a href="IdentityMap.html#identity_map_key-instance_method" title="Dynamoid::IdentityMap#identity_map_key (method)">#identity_map_key</a></span>, <span class='object_link'><a href="IdentityMap.html#models-class_method" title="Dynamoid::IdentityMap.models (method)">models</a></span>, <span class='object_link'><a href="IdentityMap.html#save-instance_method" title="Dynamoid::IdentityMap#save (method)">#save</a></span></p>
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
263
412
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Validations.html" title="Dynamoid::Validations (module)">Validations</a></span></h3>
|
|
264
413
|
<p class="inherited"><span class='object_link'><a href="Validations.html#save-instance_method" title="Dynamoid::Validations#save (method)">#save</a></span>, <span class='object_link'><a href="Validations.html#save%21-instance_method" title="Dynamoid::Validations#save! (method)">#save!</a></span>, <span class='object_link'><a href="Validations.html#valid%3F-instance_method" title="Dynamoid::Validations#valid? (method)">#valid?</a></span></p>
|
|
265
414
|
|
|
@@ -286,13 +435,17 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
286
435
|
|
|
287
436
|
|
|
288
437
|
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
|
|
289
442
|
|
|
290
443
|
|
|
291
444
|
|
|
292
445
|
|
|
293
446
|
|
|
294
447
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Persistence.html" title="Dynamoid::Persistence (module)">Persistence</a></span></h3>
|
|
295
|
-
<p class="inherited"><span class='object_link'><a href="Persistence.html#delete-instance_method" title="Dynamoid::Persistence#delete (method)">#delete</a></span>, <span class='object_link'><a href="Persistence.html#destroy-instance_method" title="Dynamoid::Persistence#destroy (method)">#destroy</a></span>, <span class='object_link'><a href="Persistence.html#dump-instance_method" title="Dynamoid::Persistence#dump (method)">#dump</a></span>, <span class='object_link'><a href="Persistence.html#persisted%3F-instance_method" title="Dynamoid::Persistence#persisted? (method)">#persisted?</a></span>, <span class='object_link'><a href="Persistence.html#save-instance_method" title="Dynamoid::Persistence#save (method)">#save</a></span></p>
|
|
448
|
+
<p class="inherited"><span class='object_link'><a href="Persistence.html#delete-instance_method" title="Dynamoid::Persistence#delete (method)">#delete</a></span>, <span class='object_link'><a href="Persistence.html#destroy-instance_method" title="Dynamoid::Persistence#destroy (method)">#destroy</a></span>, <span class='object_link'><a href="Persistence.html#dump-instance_method" title="Dynamoid::Persistence#dump (method)">#dump</a></span>, <span class='object_link'><a href="Persistence.html#persisted%3F-instance_method" title="Dynamoid::Persistence#persisted? (method)">#persisted?</a></span>, <span class='object_link'><a href="Persistence.html#save-instance_method" title="Dynamoid::Persistence#save (method)">#save</a></span>, <span class='object_link'><a href="Persistence.html#touch-instance_method" title="Dynamoid::Persistence#touch (method)">#touch</a></span>, <span class='object_link'><a href="Persistence.html#update-instance_method" title="Dynamoid::Persistence#update (method)">#update</a></span>, <span class='object_link'><a href="Persistence.html#update%21-instance_method" title="Dynamoid::Persistence#update! (method)">#update!</a></span></p>
|
|
296
449
|
|
|
297
450
|
|
|
298
451
|
|
|
@@ -302,6 +455,7 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
302
455
|
|
|
303
456
|
|
|
304
457
|
|
|
458
|
+
|
|
305
459
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Indexes.html" title="Dynamoid::Indexes (module)">Indexes</a></span></h3>
|
|
306
460
|
<p class="inherited"><span class='object_link'><a href="Indexes.html#delete_indexes-instance_method" title="Dynamoid::Indexes#delete_indexes (method)">#delete_indexes</a></span>, <span class='object_link'><a href="Indexes.html#save_indexes-instance_method" title="Dynamoid::Indexes#save_indexes (method)">#save_indexes</a></span></p>
|
|
307
461
|
|
|
@@ -313,6 +467,7 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
313
467
|
|
|
314
468
|
|
|
315
469
|
|
|
470
|
+
|
|
316
471
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Fields.html" title="Dynamoid::Fields (module)">Fields</a></span></h3>
|
|
317
472
|
<p class="inherited"><span class='object_link'><a href="Fields.html#read_attribute-instance_method" title="Dynamoid::Fields#read_attribute (method)">#read_attribute</a></span>, <span class='object_link'><a href="Fields.html#update_attribute-instance_method" title="Dynamoid::Fields#update_attribute (method)">#update_attribute</a></span>, <span class='object_link'><a href="Fields.html#update_attributes-instance_method" title="Dynamoid::Fields#update_attributes (method)">#update_attributes</a></span>, <span class='object_link'><a href="Fields.html#write_attribute-instance_method" title="Dynamoid::Fields#write_attribute (method)">#write_attribute</a></span></p>
|
|
318
473
|
|
|
@@ -324,20 +479,21 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
324
479
|
|
|
325
480
|
|
|
326
481
|
|
|
327
|
-
|
|
328
482
|
|
|
329
483
|
<div id="instance_method_details" class="method_details_list">
|
|
330
484
|
<h2>Instance Method Details</h2>
|
|
331
|
-
|
|
485
|
+
|
|
332
486
|
|
|
333
487
|
<div class="method_details first">
|
|
334
|
-
<
|
|
488
|
+
<h3 class="signature first" id="==-instance_method">
|
|
335
489
|
|
|
336
490
|
- (<tt>Object</tt>) <strong>==</strong>(other)
|
|
337
491
|
|
|
338
492
|
|
|
339
493
|
|
|
340
|
-
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
</h3><div class="docstring">
|
|
341
497
|
<div class="discussion">
|
|
342
498
|
<p>An object is equal to another object if their ids are equal.</p>
|
|
343
499
|
|
|
@@ -346,7 +502,7 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
346
502
|
</div>
|
|
347
503
|
<div class="tags">
|
|
348
504
|
|
|
349
|
-
<
|
|
505
|
+
<p class="tag_title">Since:</p>
|
|
350
506
|
<ul class="since">
|
|
351
507
|
|
|
352
508
|
<li>
|
|
@@ -368,17 +524,25 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
368
524
|
<pre class="lines">
|
|
369
525
|
|
|
370
526
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
527
|
+
139
|
|
528
|
+
140
|
|
529
|
+
141
|
|
530
|
+
142
|
|
531
|
+
143
|
|
532
|
+
144
|
|
533
|
+
145
|
|
534
|
+
146</pre>
|
|
375
535
|
</td>
|
|
376
536
|
<td>
|
|
377
|
-
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line
|
|
537
|
+
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 139</span>
|
|
378
538
|
|
|
379
539
|
<span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
|
380
|
-
<span class='kw'>
|
|
381
|
-
|
|
540
|
+
<span class='kw'>if</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_identity_map_on?'>identity_map_on?</span>
|
|
541
|
+
<span class='kw'>super</span>
|
|
542
|
+
<span class='kw'>else</span>
|
|
543
|
+
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
|
544
|
+
<span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Dynamoid</span><span class='op'>::</span><span class='const'>Document</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_hash_key'>hash_key</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_hash_key'>hash_key</span> <span class='op'>&&</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_range_value'>range_value</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_range_value'>range_value</span>
|
|
545
|
+
<span class='kw'>end</span>
|
|
382
546
|
<span class='kw'>end</span></pre>
|
|
383
547
|
</td>
|
|
384
548
|
</tr>
|
|
@@ -386,13 +550,97 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
386
550
|
</div>
|
|
387
551
|
|
|
388
552
|
<div class="method_details ">
|
|
389
|
-
<
|
|
553
|
+
<h3 class="signature " id="eql?-instance_method">
|
|
554
|
+
|
|
555
|
+
- (<tt>Boolean</tt>) <strong>eql?</strong>(other)
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
</h3><div class="docstring">
|
|
562
|
+
<div class="discussion">
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
</div>
|
|
566
|
+
</div>
|
|
567
|
+
<div class="tags">
|
|
568
|
+
|
|
569
|
+
<p class="tag_title">Returns:</p>
|
|
570
|
+
<ul class="return">
|
|
571
|
+
|
|
572
|
+
<li>
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
</li>
|
|
580
|
+
|
|
581
|
+
</ul>
|
|
582
|
+
|
|
583
|
+
</div><table class="source_code">
|
|
584
|
+
<tr>
|
|
585
|
+
<td>
|
|
586
|
+
<pre class="lines">
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
148
|
|
590
|
+
149
|
|
591
|
+
150</pre>
|
|
592
|
+
</td>
|
|
593
|
+
<td>
|
|
594
|
+
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 148</span>
|
|
595
|
+
|
|
596
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_eql?'>eql?</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
|
597
|
+
<span class='kw'>self</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span>
|
|
598
|
+
<span class='kw'>end</span></pre>
|
|
599
|
+
</td>
|
|
600
|
+
</tr>
|
|
601
|
+
</table>
|
|
602
|
+
</div>
|
|
603
|
+
|
|
604
|
+
<div class="method_details ">
|
|
605
|
+
<h3 class="signature " id="hash-instance_method">
|
|
606
|
+
|
|
607
|
+
- (<tt>Object</tt>) <strong>hash</strong>
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
</h3><table class="source_code">
|
|
614
|
+
<tr>
|
|
615
|
+
<td>
|
|
616
|
+
<pre class="lines">
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
152
|
|
620
|
+
153
|
|
621
|
+
154</pre>
|
|
622
|
+
</td>
|
|
623
|
+
<td>
|
|
624
|
+
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 152</span>
|
|
625
|
+
|
|
626
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_hash'>hash</span>
|
|
627
|
+
<span class='id identifier rubyid_hash_key'>hash_key</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</span> <span class='op'>^</span> <span class='id identifier rubyid_range_value'>range_value</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</span>
|
|
628
|
+
<span class='kw'>end</span></pre>
|
|
629
|
+
</td>
|
|
630
|
+
</tr>
|
|
631
|
+
</table>
|
|
632
|
+
</div>
|
|
633
|
+
|
|
634
|
+
<div class="method_details ">
|
|
635
|
+
<h3 class="signature " id="hash_key-instance_method">
|
|
390
636
|
|
|
391
637
|
- (<tt>Object</tt>) <strong>hash_key</strong>
|
|
392
638
|
|
|
393
639
|
|
|
394
640
|
|
|
395
|
-
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
</h3><div class="docstring">
|
|
396
644
|
<div class="discussion">
|
|
397
645
|
<p>Return an object's hash key, regardless of what it might be called to the object.</p>
|
|
398
646
|
|
|
@@ -401,7 +649,7 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
401
649
|
</div>
|
|
402
650
|
<div class="tags">
|
|
403
651
|
|
|
404
|
-
<
|
|
652
|
+
<p class="tag_title">Since:</p>
|
|
405
653
|
<ul class="since">
|
|
406
654
|
|
|
407
655
|
<li>
|
|
@@ -423,12 +671,12 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
423
671
|
<pre class="lines">
|
|
424
672
|
|
|
425
673
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
674
|
+
172
|
|
675
|
+
173
|
|
676
|
+
174</pre>
|
|
429
677
|
</td>
|
|
430
678
|
<td>
|
|
431
|
-
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line
|
|
679
|
+
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 172</span>
|
|
432
680
|
|
|
433
681
|
<span class='kw'>def</span> <span class='id identifier rubyid_hash_key'>hash_key</span>
|
|
434
682
|
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</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_hash_key'>hash_key</span><span class='rparen'>)</span>
|
|
@@ -439,13 +687,15 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
439
687
|
</div>
|
|
440
688
|
|
|
441
689
|
<div class="method_details ">
|
|
442
|
-
<
|
|
690
|
+
<h3 class="signature " id="hash_key=-instance_method">
|
|
691
|
+
|
|
692
|
+
- (<tt>Object</tt>) <strong>hash_key=</strong>(value)
|
|
443
693
|
|
|
444
|
-
|
|
694
|
+
|
|
445
695
|
|
|
446
696
|
|
|
447
697
|
|
|
448
|
-
</
|
|
698
|
+
</h3><div class="docstring">
|
|
449
699
|
<div class="discussion">
|
|
450
700
|
<p>Assign an object's hash key, regardless of what it might be called to the object.</p>
|
|
451
701
|
|
|
@@ -454,7 +704,7 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
454
704
|
</div>
|
|
455
705
|
<div class="tags">
|
|
456
706
|
|
|
457
|
-
<
|
|
707
|
+
<p class="tag_title">Since:</p>
|
|
458
708
|
<ul class="since">
|
|
459
709
|
|
|
460
710
|
<li>
|
|
@@ -476,15 +726,15 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
476
726
|
<pre class="lines">
|
|
477
727
|
|
|
478
728
|
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
729
|
+
179
|
|
730
|
+
180
|
|
731
|
+
181</pre>
|
|
482
732
|
</td>
|
|
483
733
|
<td>
|
|
484
|
-
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line
|
|
734
|
+
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 179</span>
|
|
485
735
|
|
|
486
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_hash_key='>hash_key=</span><span class='lparen'>(</span><span class='id identifier
|
|
487
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</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_hash_key'>hash_key</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='
|
|
736
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_hash_key='>hash_key=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
|
737
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</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_hash_key'>hash_key</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
|
488
738
|
<span class='kw'>end</span></pre>
|
|
489
739
|
</td>
|
|
490
740
|
</tr>
|
|
@@ -492,13 +742,15 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
492
742
|
</div>
|
|
493
743
|
|
|
494
744
|
<div class="method_details ">
|
|
495
|
-
<
|
|
745
|
+
<h3 class="signature " id="initialize-instance_method">
|
|
496
746
|
|
|
497
747
|
- (<tt><span class='object_link'><a href="" title="Dynamoid::Document (module)">Dynamoid::Document</a></span></tt>) <strong>initialize</strong>(attrs = {})
|
|
498
748
|
|
|
499
749
|
|
|
500
750
|
|
|
501
|
-
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
</h3><div class="docstring">
|
|
502
754
|
<div class="discussion">
|
|
503
755
|
<p>Initialize a new object.</p>
|
|
504
756
|
|
|
@@ -506,7 +758,7 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
506
758
|
</div>
|
|
507
759
|
</div>
|
|
508
760
|
<div class="tags">
|
|
509
|
-
<
|
|
761
|
+
<p class="tag_title">Parameters:</p>
|
|
510
762
|
<ul class="param">
|
|
511
763
|
|
|
512
764
|
<li>
|
|
@@ -528,7 +780,24 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
528
780
|
|
|
529
781
|
</ul>
|
|
530
782
|
|
|
531
|
-
<
|
|
783
|
+
<p class="tag_title">Returns:</p>
|
|
784
|
+
<ul class="return">
|
|
785
|
+
|
|
786
|
+
<li>
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Dynamoid::Document (module)">Dynamoid::Document</a></span></tt>)</span>
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
—
|
|
794
|
+
<div class='inline'><p>the new document</p>
|
|
795
|
+
</div>
|
|
796
|
+
|
|
797
|
+
</li>
|
|
798
|
+
|
|
799
|
+
</ul>
|
|
800
|
+
<p class="tag_title">Since:</p>
|
|
532
801
|
<ul class="since">
|
|
533
802
|
|
|
534
803
|
<li>
|
|
@@ -550,26 +819,56 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
550
819
|
<pre class="lines">
|
|
551
820
|
|
|
552
821
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
822
|
+
122
|
|
823
|
+
123
|
|
824
|
+
124
|
|
825
|
+
125
|
|
826
|
+
126
|
|
827
|
+
127
|
|
828
|
+
128
|
|
829
|
+
129
|
|
830
|
+
130</pre>
|
|
562
831
|
</td>
|
|
563
832
|
<td>
|
|
564
|
-
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line
|
|
833
|
+
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 122</span>
|
|
565
834
|
|
|
566
835
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_attrs'>attrs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
567
|
-
<span class='
|
|
836
|
+
<span class='id identifier rubyid_run_callbacks'>run_callbacks</span> <span class='symbol'>:initialize</span> <span class='kw'>do</span>
|
|
837
|
+
<span class='ivar'>@new_record</span> <span class='op'>=</span> <span class='kw'>true</span>
|
|
838
|
+
<span class='ivar'>@attributes</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
|
839
|
+
<span class='ivar'>@associations</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
|
840
|
+
|
|
841
|
+
<span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_attrs'>attrs</span><span class='rparen'>)</span>
|
|
842
|
+
<span class='kw'>end</span>
|
|
843
|
+
<span class='kw'>end</span></pre>
|
|
844
|
+
</td>
|
|
845
|
+
</tr>
|
|
846
|
+
</table>
|
|
847
|
+
</div>
|
|
848
|
+
|
|
849
|
+
<div class="method_details ">
|
|
850
|
+
<h3 class="signature " id="load-instance_method">
|
|
851
|
+
|
|
852
|
+
- (<tt>Object</tt>) <strong>load</strong>(attrs)
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
|
|
568
857
|
|
|
569
|
-
|
|
570
|
-
<
|
|
571
|
-
|
|
858
|
+
</h3><table class="source_code">
|
|
859
|
+
<tr>
|
|
860
|
+
<td>
|
|
861
|
+
<pre class="lines">
|
|
862
|
+
|
|
863
|
+
|
|
864
|
+
132
|
|
865
|
+
133
|
|
866
|
+
134</pre>
|
|
867
|
+
</td>
|
|
868
|
+
<td>
|
|
869
|
+
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 132</span>
|
|
572
870
|
|
|
871
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_attrs'>attrs</span><span class='rparen'>)</span>
|
|
573
872
|
<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_undump'>undump</span><span class='lparen'>(</span><span class='id identifier rubyid_attrs'>attrs</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span> <span class='id identifier rubyid_send'>send</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span> <span class='rbrace'>}</span>
|
|
574
873
|
<span class='kw'>end</span></pre>
|
|
575
874
|
</td>
|
|
@@ -578,23 +877,89 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
578
877
|
</div>
|
|
579
878
|
|
|
580
879
|
<div class="method_details ">
|
|
581
|
-
<
|
|
880
|
+
<h3 class="signature " id="range_value-instance_method">
|
|
881
|
+
|
|
882
|
+
- (<tt>Object</tt>) <strong>range_value</strong>
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
</h3><table class="source_code">
|
|
889
|
+
<tr>
|
|
890
|
+
<td>
|
|
891
|
+
<pre class="lines">
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
183
|
|
895
|
+
184
|
|
896
|
+
185
|
|
897
|
+
186
|
|
898
|
+
187</pre>
|
|
899
|
+
</td>
|
|
900
|
+
<td>
|
|
901
|
+
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 183</span>
|
|
902
|
+
|
|
903
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_range_value'>range_value</span>
|
|
904
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_range_key'>range_key</span> <span class='op'>=</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_range_key'>range_key</span>
|
|
905
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_range_key'>range_key</span><span class='rparen'>)</span>
|
|
906
|
+
<span class='kw'>end</span>
|
|
907
|
+
<span class='kw'>end</span></pre>
|
|
908
|
+
</td>
|
|
909
|
+
</tr>
|
|
910
|
+
</table>
|
|
911
|
+
</div>
|
|
912
|
+
|
|
913
|
+
<div class="method_details ">
|
|
914
|
+
<h3 class="signature " id="range_value=-instance_method">
|
|
915
|
+
|
|
916
|
+
- (<tt>Object</tt>) <strong>range_value=</strong>(value)
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
|
|
922
|
+
</h3><table class="source_code">
|
|
923
|
+
<tr>
|
|
924
|
+
<td>
|
|
925
|
+
<pre class="lines">
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
189
|
|
929
|
+
190
|
|
930
|
+
191</pre>
|
|
931
|
+
</td>
|
|
932
|
+
<td>
|
|
933
|
+
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 189</span>
|
|
934
|
+
|
|
935
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_range_value='>range_value=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
|
936
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</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_range_key'>range_key</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
|
937
|
+
<span class='kw'>end</span></pre>
|
|
938
|
+
</td>
|
|
939
|
+
</tr>
|
|
940
|
+
</table>
|
|
941
|
+
</div>
|
|
942
|
+
|
|
943
|
+
<div class="method_details ">
|
|
944
|
+
<h3 class="signature " id="reload-instance_method">
|
|
582
945
|
|
|
583
946
|
- (<tt><span class='object_link'><a href="" title="Dynamoid::Document (module)">Dynamoid::Document</a></span></tt>) <strong>reload</strong>
|
|
584
947
|
|
|
585
948
|
|
|
586
949
|
|
|
587
|
-
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
</h3><div class="docstring">
|
|
588
953
|
<div class="discussion">
|
|
589
|
-
<p>Reload an object from the database -- if you suspect the object has changed in the datastore and you need those
|
|
590
|
-
changes to be reflected immediately, you would call this method.</p>
|
|
954
|
+
<p>Reload an object from the database -- if you suspect the object has changed in the datastore and you need those
|
|
955
|
+
changes to be reflected immediately, you would call this method. This is a consistent read.</p>
|
|
591
956
|
|
|
592
957
|
|
|
593
958
|
</div>
|
|
594
959
|
</div>
|
|
595
960
|
<div class="tags">
|
|
596
961
|
|
|
597
|
-
<
|
|
962
|
+
<p class="tag_title">Returns:</p>
|
|
598
963
|
<ul class="return">
|
|
599
964
|
|
|
600
965
|
<li>
|
|
@@ -611,7 +976,7 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
611
976
|
</li>
|
|
612
977
|
|
|
613
978
|
</ul>
|
|
614
|
-
<
|
|
979
|
+
<p class="tag_title">Since:</p>
|
|
615
980
|
<ul class="since">
|
|
616
981
|
|
|
617
982
|
<li>
|
|
@@ -633,17 +998,19 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
633
998
|
<pre class="lines">
|
|
634
999
|
|
|
635
1000
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
1001
|
+
162
|
|
1002
|
+
163
|
|
1003
|
+
164
|
|
1004
|
+
165
|
|
1005
|
+
166
|
|
1006
|
+
167</pre>
|
|
641
1007
|
</td>
|
|
642
1008
|
<td>
|
|
643
|
-
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line
|
|
1009
|
+
<pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 162</span>
|
|
644
1010
|
|
|
645
1011
|
<span class='kw'>def</span> <span class='id identifier rubyid_reload'>reload</span>
|
|
646
|
-
<span class='
|
|
1012
|
+
<span class='id identifier rubyid_range_key_value'>range_key_value</span> <span class='op'>=</span> <span class='id identifier rubyid_range_value'>range_value</span> <span class='op'>?</span> <span class='id identifier rubyid_dumped_range_value'>dumped_range_value</span> <span class='op'>:</span> <span class='kw'>nil</span>
|
|
1013
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</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_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_hash_key'>hash_key</span><span class='comma'>,</span> <span class='symbol'>:range_key</span> <span class='op'>=></span> <span class='id identifier rubyid_range_key_value'>range_key_value</span><span class='comma'>,</span> <span class='symbol'>:consistent_read</span> <span class='op'>=></span> <span class='kw'>true</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_attributes'>attributes</span>
|
|
647
1014
|
<span class='ivar'>@associations</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:reset</span><span class='rparen'>)</span>
|
|
648
1015
|
<span class='kw'>self</span>
|
|
649
1016
|
<span class='kw'>end</span></pre>
|
|
@@ -655,11 +1022,11 @@ changes to be reflected immediately, you would call this method.</p>
|
|
|
655
1022
|
</div>
|
|
656
1023
|
|
|
657
1024
|
</div>
|
|
658
|
-
|
|
1025
|
+
|
|
659
1026
|
<div id="footer">
|
|
660
|
-
Generated on Thu
|
|
1027
|
+
Generated on Thu Jun 27 21:59:11 2013 by
|
|
661
1028
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
662
|
-
0.
|
|
1029
|
+
0.8.6.1 (ruby-1.9.3).
|
|
663
1030
|
</div>
|
|
664
1031
|
|
|
665
1032
|
</body>
|