ocean-dynamo 0.3.11 → 0.3.12
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.
- checksums.yaml +4 -4
- data/README.rdoc +30 -5
- data/lib/ocean-dynamo/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78c329fb34c6009e6168abc0d4a8f8bd5a973de4
|
4
|
+
data.tar.gz: 0acc91468d0d8a3a7773dd1dde5f63d3c330381e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26850203ac5c1f3665bce77a2c14c33990e0355a84cc10163bd3275d56d9afcf33d03a0e766b7e3679e36aabd385311e1a5373da74f6543e1f7191f05f953b5a
|
7
|
+
data.tar.gz: 810d9c6bab90781479716dccb02cd9390576ceedc06f883f16d155ea97f839323ff42a7ca3f83e0c208ce4ce86e369898a83b59c3f12befde20d2e7726e64f52
|
data/README.rdoc
CHANGED
@@ -25,7 +25,7 @@ task of switching from SQL to no-SQL much easier.
|
|
25
25
|
Thanks to its structural similarity to ActiveRecord, OceanDynamo works with FactoryGirl.
|
26
26
|
To facilitate testing, future versions will keep track of and delete instances after tests.
|
27
27
|
|
28
|
-
OceanDynamo uses primary
|
28
|
+
OceanDynamo uses primary indices to retrieve related table items,
|
29
29
|
which means it will scale without limits.
|
30
30
|
|
31
31
|
=== Example
|
@@ -85,6 +85,29 @@ Also, dynamo_schema takes args and many options. Here's the full syntax:
|
|
85
85
|
...
|
86
86
|
end
|
87
87
|
|
88
|
+
The following example shows how to set up a belongs_to relation:
|
89
|
+
|
90
|
+
class Parent < OceanDynamo::Base
|
91
|
+
dynamo_schema do
|
92
|
+
attribute :this
|
93
|
+
attribute :that
|
94
|
+
attribute :the_other
|
95
|
+
end
|
96
|
+
#has_many :children -- coming soon
|
97
|
+
end
|
98
|
+
|
99
|
+
|
100
|
+
class Child < OceanDynamo::Base
|
101
|
+
dynamo_schema(:uuid) do
|
102
|
+
attribute :foo
|
103
|
+
attribute :bar
|
104
|
+
attribute :baz
|
105
|
+
end
|
106
|
+
belongs_to :parent
|
107
|
+
end
|
108
|
+
|
109
|
+
The +belongs_to+ declaration must follow after the +dynamo_schema+ attribute block.
|
110
|
+
|
88
111
|
|
89
112
|
=== Current State
|
90
113
|
|
@@ -99,9 +122,9 @@ parameters.
|
|
99
122
|
follow very soon (probably today).
|
100
123
|
|
101
124
|
Restrictions for +belongs_to+ tables:
|
102
|
-
*
|
103
|
-
*
|
104
|
-
*
|
125
|
+
* The hash key must be specified and must not be +:id+.
|
126
|
+
* The range key must not be specified at all.
|
127
|
+
* +belongs_to+ can be specified only once in each class.
|
105
128
|
|
106
129
|
These restrictions allow OceanDynamo to implement the +has_many+ / +belongs_to+
|
107
130
|
relation in a very efficient and massively scalable way.
|
@@ -138,7 +161,9 @@ reduced complexity.
|
|
138
161
|
=== Future milestones
|
139
162
|
|
140
163
|
After the +has_many+ / +belongs_to+ association, the +has_and_belongs_to_many+ assocation
|
141
|
-
will be implemented.
|
164
|
+
will be implemented.
|
165
|
+
|
166
|
+
A generator to install the <tt>config/aws.yml</tt> file.
|
142
167
|
|
143
168
|
OceanDynamo will use association proxies to achieve the same kind of
|
144
169
|
interface as ActiveRecord, e.g.: <code>blog_entry.comments.build(body: "Cool!").save!</code>
|
data/lib/ocean-dynamo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocean-dynamo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Bengtson
|
@@ -149,10 +149,10 @@ description: "== OceanDynamo\n\nOceanDynamo is a massively scalable Amazon Dynam
|
|
149
149
|
without sacrificing scalability. This makes the \ntask of switching from SQL to
|
150
150
|
no-SQL much easier.\n\nThanks to its structural similarity to ActiveRecord, OceanDynamo
|
151
151
|
works with FactoryGirl.\nTo facilitate testing, future versions will keep track
|
152
|
-
of and delete instances after tests.\n\nOceanDynamo uses primary
|
153
|
-
|
154
|
-
|
155
|
-
|
152
|
+
of and delete instances after tests.\n\nOceanDynamo uses primary indices to retrieve
|
153
|
+
related table items, \nwhich means it will scale without limits.\n\nSee also Ocean,
|
154
|
+
a Rails framework for creating highly scalable SOAs in the cloud, in which\nocean-dynamo
|
155
|
+
is used as a central component: http://wiki.oceanframework.net"
|
156
156
|
email:
|
157
157
|
- peter@peterbengtson.com
|
158
158
|
executables: []
|