composite_primary_keys 1.0.10 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Rakefile +1 -1
- data/lib/composite_primary_keys/association_preload.rb +3 -3
- data/lib/composite_primary_keys/version.rb +2 -2
- data/test/plugins/pagination.rb +2 -2
- data/tmp/test.db +0 -0
- data/website/index.html +123 -236
- data/website/index.txt +5 -11
- data/website/version-raw.js +3 -3
- data/website/version.js +3 -3
- metadata +14 -4
data/History.txt
CHANGED
data/Rakefile
CHANGED
@@ -52,7 +52,7 @@ hoe = Hoe.new(GEM_NAME, VERS) do |p|
|
|
52
52
|
|
53
53
|
# == Optional
|
54
54
|
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
55
|
-
p.extra_deps = [['activerecord', '>= 2.1.
|
55
|
+
p.extra_deps = [['activerecord', '>= 2.1.2']] #An array of rubygem dependencies.
|
56
56
|
#p.spec_extras - A hash of extra values to set in the gemspec.
|
57
57
|
end
|
58
58
|
|
@@ -30,7 +30,7 @@ module CompositePrimaryKeys
|
|
30
30
|
parent_record_id = reflection.primary_key_name
|
31
31
|
end
|
32
32
|
|
33
|
-
conditions.first << append_conditions(
|
33
|
+
conditions.first << append_conditions(reflection, preload_options)
|
34
34
|
|
35
35
|
associated_records = reflection.klass.find(:all,
|
36
36
|
:conditions => conditions,
|
@@ -146,7 +146,7 @@ module CompositePrimaryKeys
|
|
146
146
|
conditions = ["#{table_name}.#{connection.quote_column_name(primary_key)} IN (?)", id_map.keys.uniq]
|
147
147
|
end
|
148
148
|
|
149
|
-
conditions.first << append_conditions(
|
149
|
+
conditions.first << append_conditions(reflection, preload_options)
|
150
150
|
|
151
151
|
associated_records = klass.find(:all,
|
152
152
|
:conditions => conditions,
|
@@ -208,7 +208,7 @@ module CompositePrimaryKeys
|
|
208
208
|
end
|
209
209
|
end
|
210
210
|
|
211
|
-
conditions.first << append_conditions(
|
211
|
+
conditions.first << append_conditions(reflection, preload_options)
|
212
212
|
|
213
213
|
reflection.klass.find(:all,
|
214
214
|
:select => (preload_options[:select] || options[:select] || "#{table_name}.*"),
|
data/test/plugins/pagination.rb
CHANGED
@@ -97,8 +97,8 @@ module ActionController
|
|
97
97
|
"Unknown options: #{unknown_option_keys.join(', ')}" unless
|
98
98
|
unknown_option_keys.empty?
|
99
99
|
|
100
|
-
options[:singular_name] ||= Inflector.singularize(collection_id.to_s)
|
101
|
-
options[:class_name] ||= Inflector.camelize(options[:singular_name])
|
100
|
+
options[:singular_name] ||= ActiveSupport::Inflector.singularize(collection_id.to_s)
|
101
|
+
options[:class_name] ||= ActiveSupport::Inflector.camelize(options[:singular_name])
|
102
102
|
end
|
103
103
|
|
104
104
|
# Returns a paginator and a collection of Active Record model instances
|
data/tmp/test.db
CHANGED
Binary file
|
data/website/index.html
CHANGED
@@ -33,270 +33,157 @@
|
|
33
33
|
<h1>Composite Primary Keys</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/compositekeys"; return false'>
|
35
35
|
Get Version
|
36
|
-
<a href="http://rubyforge.org/projects/compositekeys" class="numbers">1.0
|
36
|
+
<a href="http://rubyforge.org/projects/compositekeys" class="numbers">1.1.0</a>
|
37
37
|
</div>
|
38
|
-
<h1
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
<h2>What</h2>
|
45
|
-
|
46
|
-
|
47
|
-
<p>Ruby on Rails does not support composite primary keys. This free software is an extension
|
38
|
+
<h1>&#x2192; Ruby on Rails</h1>
|
39
|
+
<h1>&#x2192; ActiveRecords</h1>
|
40
|
+
<h2>What</h2>
|
41
|
+
<p>Ruby on Rails does not support composite primary keys. This free software is an extension <br />
|
48
42
|
to the database layer of Rails – <a href="http://wiki.rubyonrails.com/rails/pages/ActiveRecord">ActiveRecords</a> – to support composite primary keys as transparently as possible.</p>
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
<p><pre class="syntax"><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">composite_primary_keys</span></pre></p>
|
58
|
-
|
59
|
-
|
60
|
-
<p>Rails: Add the following to the bottom of your <code>environment.rb</code> file</p>
|
61
|
-
|
62
|
-
|
63
|
-
<p><pre class="syntax"><span class="ident">require</span> <span class="punct">'</span><span class="string">composite_primary_keys</span><span class="punct">'</span></pre></p>
|
64
|
-
|
65
|
-
|
66
|
-
<p>Ruby scripts: Add the following to the top of your script</p>
|
67
|
-
|
68
|
-
|
69
|
-
<p><pre class="syntax"><span class="ident">require</span> <span class="punct">'</span><span class="string">rubygems</span><span class="punct">'</span>
|
43
|
+
<p>Any Ruby script using ActiveRecords can use Composite Primary Keys with this library.</p>
|
44
|
+
<h2>Installing</h2>
|
45
|
+
<p><pre class="syntax"><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">composite_primary_keys</span></pre></p>
|
46
|
+
<p>Rails: Add the following to the bottom of your <code>environment.rb</code> file</p>
|
47
|
+
<p><pre class="syntax"><span class="ident">require</span> <span class="punct">'</span><span class="string">composite_primary_keys</span><span class="punct">'</span></pre></p>
|
48
|
+
<p>Ruby scripts: Add the following to the top of your script</p>
|
49
|
+
<p><pre class="syntax"><span class="ident">require</span> <span class="punct">'</span><span class="string">rubygems</span><span class="punct">'</span>
|
70
50
|
<span class="ident">require</span> <span class="punct">'</span><span class="string">composite_primary_keys</span><span class="punct">'</span></pre></p>
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
<p>A model with composite primary keys would look like…</p>
|
77
|
-
|
78
|
-
|
79
|
-
<p><pre class="syntax"><span class="keyword">class </span><span class="class">Membership</span> <span class="punct"><</span> <span class="constant">ActiveRecord</span><span class="punct">::</span><span class="constant">Base</span>
|
51
|
+
<h2>The basics</h2>
|
52
|
+
<p>A model with composite primary keys would look like…</p>
|
53
|
+
<p><pre class="syntax"><span class="keyword">class </span><span class="class">Membership</span> <span class="punct"><</span> <span class="constant">ActiveRecord</span><span class="punct">::</span><span class="constant">Base</span>
|
80
54
|
<span class="comment"># set_primary_keys *keys - turns on composite key functionality</span>
|
81
55
|
<span class="ident">set_primary_keys</span> <span class="symbol">:user_id</span><span class="punct">,</span> <span class="symbol">:group_id</span>
|
82
56
|
<span class="ident">belongs_to</span> <span class="symbol">:user</span>
|
83
57
|
<span class="ident">belongs_to</span> <span class="symbol">:group</span>
|
84
58
|
<span class="ident">has_many</span> <span class="symbol">:statuses</span><span class="punct">,</span> <span class="symbol">:class_name</span> <span class="punct">=></span> <span class="punct">'</span><span class="string">MembershipStatus</span><span class="punct">',</span> <span class="symbol">:foreign_key</span> <span class="punct">=></span> <span class="punct">[</span><span class="symbol">:user_id</span><span class="punct">,</span> <span class="symbol">:group_id</span><span class="punct">]</span>
|
85
59
|
<span class="keyword">end</span></pre></p>
|
86
|
-
|
87
|
-
|
88
|
-
<p>A model associated with a composite key model would be defined like…</p>
|
89
|
-
|
90
|
-
|
91
|
-
<p><pre class="syntax"><span class="keyword">class </span><span class="class">MembershipStatus</span> <span class="punct"><</span> <span class="constant">ActiveRecord</span><span class="punct">::</span><span class="constant">Base</span>
|
60
|
+
<p>A model associated with a composite key model would be defined like…</p>
|
61
|
+
<p><pre class="syntax"><span class="keyword">class </span><span class="class">MembershipStatus</span> <span class="punct"><</span> <span class="constant">ActiveRecord</span><span class="punct">::</span><span class="constant">Base</span>
|
92
62
|
<span class="ident">belongs_to</span> <span class="symbol">:membership</span><span class="punct">,</span> <span class="symbol">:foreign_key</span> <span class="punct">=></span> <span class="punct">[</span><span class="symbol">:user_id</span><span class="punct">,</span> <span class="symbol">:group_id</span><span class="punct">]</span>
|
93
63
|
<span class="keyword">end</span></pre></p>
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
<h2>Demonstration of usage</h2>
|
100
|
-
|
101
|
-
|
102
|
-
<p>Once you’ve created your models to specify composite primary keys (such as the Membership class) and associations (such as MembershipStatus#membership), you can uses them like any normal model with associations.</p>
|
103
|
-
|
104
|
-
|
105
|
-
<p>But first, lets check out our primary keys.</p>
|
106
|
-
|
107
|
-
|
108
|
-
<p><pre class="syntax"><span class="constant">MembershipStatus</span><span class="punct">.</span><span class="ident">primary_key</span> <span class="comment"># => "id" # normal single key</span>
|
64
|
+
<p>That is, associations can include composite keys too. Nice.</p>
|
65
|
+
<h2>Demonstration of usage</h2>
|
66
|
+
<p>Once you’ve created your models to specify composite primary keys (such as the Membership class) and associations (such as MembershipStatus#membership), you can uses them like any normal model with associations.</p>
|
67
|
+
<p>But first, lets check out our primary keys.</p>
|
68
|
+
<p><pre class="syntax"><span class="constant">MembershipStatus</span><span class="punct">.</span><span class="ident">primary_key</span> <span class="comment"># => "id" # normal single key</span>
|
109
69
|
<span class="constant">Membership</span><span class="punct">.</span><span class="ident">primary_key</span> <span class="comment"># => [:user_id, :group_id] # composite keys</span>
|
110
70
|
<span class="constant">Membership</span><span class="punct">.</span><span class="ident">primary_key</span><span class="punct">.</span><span class="ident">to_s</span> <span class="comment"># => "user_id,group_id"</span></pre></p>
|
111
|
-
|
112
|
-
|
113
|
-
<p>Now we want to be able to find instances using the same syntax we always use for ActiveRecords…</p>
|
114
|
-
|
115
|
-
|
116
|
-
<p><pre class="syntax"><span class="constant">MembershipStatus</span><span class="punct">.</span><span class="ident">find</span><span class="punct">(</span><span class="number">1</span><span class="punct">)</span> <span class="comment"># single id returns single instance</span>
|
71
|
+
<p>Now we want to be able to find instances using the same syntax we always use for ActiveRecords…</p>
|
72
|
+
<p><pre class="syntax"><span class="constant">MembershipStatus</span><span class="punct">.</span><span class="ident">find</span><span class="punct">(</span><span class="number">1</span><span class="punct">)</span> <span class="comment"># single id returns single instance</span>
|
117
73
|
<span class="punct">=></span> <span class="punct"><</span><span class="constant">MembershipStatus</span><span class="punct">:</span><span class="number">0x392a8c8</span> <span class="attribute">@attributes</span><span class="punct">={"</span><span class="string">id</span><span class="punct">"=>"</span><span class="string">1</span><span class="punct">",</span> <span class="punct">"</span><span class="string">status</span><span class="punct">"=>"</span><span class="string">Active</span><span class="punct">"}></span>
|
118
74
|
<span class="constant">Membership</span><span class="punct">.</span><span class="ident">find</span><span class="punct">(</span><span class="number">1</span><span class="punct">,</span><span class="number">1</span><span class="punct">)</span> <span class="comment"># composite ids returns single instance</span>
|
119
75
|
<span class="punct">=></span> <span class="punct"><</span><span class="constant">Membership</span><span class="punct">:</span><span class="number">0x39218b0</span> <span class="attribute">@attributes</span><span class="punct">={"</span><span class="string">user_id</span><span class="punct">"=>"</span><span class="string">1</span><span class="punct">",</span> <span class="punct">"</span><span class="string">group_id</span><span class="punct">"=>"</span><span class="string">1</span><span class="punct">"}></span></pre></p>
|
120
|
-
|
121
|
-
|
122
|
-
<p>Using <a href="http://www.rubyonrails.org">Ruby on Rails</a>? You’ll want to your url_for helpers
|
76
|
+
<p>Using <a href="http://www.rubyonrails.org">Ruby on Rails</a>? You’ll want to your url_for helpers<br />
|
123
77
|
to convert composite keys into strings and back again…</p>
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
<p>And then use the string id within your controller to find the object again</p>
|
130
|
-
|
131
|
-
|
132
|
-
<p><pre class="syntax"><span class="ident">params</span><span class="punct">[</span><span class="symbol">:id</span><span class="punct">]</span> <span class="comment"># => '1,1'</span>
|
78
|
+
<p><pre class="syntax"><span class="constant">Membership</span><span class="punct">.</span><span class="ident">find</span><span class="punct">(</span><span class="symbol">:first</span><span class="punct">).</span><span class="ident">to_param</span> <span class="comment"># => "1,1"</span></pre></p>
|
79
|
+
<p>And then use the string id within your controller to find the object again</p>
|
80
|
+
<p><pre class="syntax"><span class="ident">params</span><span class="punct">[</span><span class="symbol">:id</span><span class="punct">]</span> <span class="comment"># => '1,1'</span>
|
133
81
|
<span class="constant">Membership</span><span class="punct">.</span><span class="ident">find</span><span class="punct">(</span><span class="ident">params</span><span class="punct">[</span><span class="symbol">:id</span><span class="punct">])</span>
|
134
82
|
<span class="punct">=></span> <span class="punct"><</span><span class="constant">Membership</span><span class="punct">:</span><span class="number">0x3904288</span> <span class="attribute">@attributes</span><span class="punct">={"</span><span class="string">user_id</span><span class="punct">"=>"</span><span class="string">1</span><span class="punct">",</span> <span class="punct">"</span><span class="string">group_id</span><span class="punct">"=>"</span><span class="string">1</span><span class="punct">"}></span></pre></p>
|
135
|
-
|
136
|
-
|
137
|
-
<p>That is, an ActiveRecord supporting composite keys behaves transparently
|
83
|
+
<p>That is, an ActiveRecord supporting composite keys behaves transparently<br />
|
138
84
|
throughout your application. Just like a normal ActiveRecord.</p>
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
<h3>Pass a list of composite ids to the <code>#find</code> method</h3>
|
145
|
-
|
146
|
-
|
147
|
-
<p><pre class="syntax"><span class="constant">Membership</span><span class="punct">.</span><span class="ident">find</span> <span class="punct">[</span><span class="number">1</span><span class="punct">,</span><span class="number">1</span><span class="punct">],</span> <span class="punct">[</span><span class="number">2</span><span class="punct">,</span><span class="number">1</span><span class="punct">]</span>
|
85
|
+
<h2>Other tricks</h2>
|
86
|
+
<h3>Pass a list of composite ids to the <code>#find</code> method</h3>
|
87
|
+
<p><pre class="syntax"><span class="constant">Membership</span><span class="punct">.</span><span class="ident">find</span> <span class="punct">[</span><span class="number">1</span><span class="punct">,</span><span class="number">1</span><span class="punct">],</span> <span class="punct">[</span><span class="number">2</span><span class="punct">,</span><span class="number">1</span><span class="punct">]</span>
|
148
88
|
<span class="punct">=></span> <span class="punct">[</span>
|
149
89
|
<span class="punct"><</span><span class="constant">Membership</span><span class="punct">:</span><span class="number">0x394ade8</span> <span class="attribute">@attributes</span><span class="punct">={"</span><span class="string">user_id</span><span class="punct">"=>"</span><span class="string">1</span><span class="punct">",</span> <span class="punct">"</span><span class="string">group_id</span><span class="punct">"=>"</span><span class="string">1</span><span class="punct">"}>,</span>
|
150
90
|
<span class="punct"><</span><span class="constant">Membership</span><span class="punct">:</span><span class="number">0x394ada0</span> <span class="attribute">@attributes</span><span class="punct">={"</span><span class="string">user_id</span><span class="punct">"=>"</span><span class="string">2</span><span class="punct">",</span> <span class="punct">"</span><span class="string">group_id</span><span class="punct">"=>"</span><span class="string">1</span><span class="punct">"}></span>
|
151
91
|
<span class="punct">]</span></pre></p>
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
<p><pre class="syntax"><span class="constant">MembershipStatus</span><span class="punct">.</span><span class="ident">find</span><span class="punct">(</span><span class="symbol">:first</span><span class="punct">).</span><span class="ident">memberships</span><span class="punct">.</span><span class="ident">count</span> <span class="comment"># => 1</span></pre></p>
|
158
|
-
|
159
|
-
|
160
|
-
<h3>Routes with Rails</h3>
|
161
|
-
|
162
|
-
|
163
|
-
<p>From Pete Sumskas:</p>
|
164
|
-
|
165
|
-
|
92
|
+
<p>Perform <code>#count</code> operations</p>
|
93
|
+
<p><pre class="syntax"><span class="constant">MembershipStatus</span><span class="punct">.</span><span class="ident">find</span><span class="punct">(</span><span class="symbol">:first</span><span class="punct">).</span><span class="ident">memberships</span><span class="punct">.</span><span class="ident">count</span> <span class="comment"># => 1</span></pre></p>
|
94
|
+
<h3>Routes with Rails</h3>
|
95
|
+
<p>From Pete Sumskas:</p>
|
166
96
|
<blockquote>
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
to my <code>route.rb</code> file.
|
182
|
-
|
97
|
+
<p>I ran into one problem that I didn’t see mentioned on <a href="http://groups.google.com/group/compositekeys">this list</a> – <br />
|
98
|
+
and I didn’t see any information about what I should do to address it in the<br />
|
99
|
+
documentation (might have missed it).</p>
|
100
|
+
<p>The problem was that the urls being generated for a ‘show’ action (for<br />
|
101
|
+
example) had a syntax like:<br />
|
102
|
+
<br />
|
103
|
+
<pre>/controller/show/123000,Bu70</pre></p>
|
104
|
+
<p>for a two-field composite PK. The default routing would not match that,<br />
|
105
|
+
so after working out how to do the routing I added:<br />
|
106
|
+
<br />
|
107
|
+
<pre class="syntax"><span class="ident">map</span><span class="punct">.</span><span class="ident">connect</span> <span class="punct">'</span><span class="string">:controller/:action/:id</span><span class="punct">',</span> <span class="symbol">:id</span> <span class="punct">=></span> <span class="punct">/</span><span class="regex"><span class="escape">\w</span>+(,<span class="escape">\w</span>+)*</span><span class="punct">/</span></pre><br />
|
108
|
+
<br />
|
109
|
+
to my <code>route.rb</code> file.</p>
|
183
110
|
</blockquote>
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
<
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
<
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
</
|
200
|
-
<
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
</
|
205
|
-
<
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
</
|
210
|
-
<
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
</
|
215
|
-
<
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
</
|
220
|
-
<
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
</
|
225
|
-
<
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
</
|
230
|
-
<
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
</
|
235
|
-
<
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
</
|
240
|
-
<
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
<td>frontbase </td>
|
247
|
-
<td><span class=unknown>???</span> (<a href="mailto:compositekeys@googlegroups.com?subject=Help+with+Frontbase">I can help</a>)</td>
|
248
|
-
<td><span class=unknown>???</span> (<a href="mailto:compositekeys@googlegroups.com?subject=Frontbase+is+working">Yes!</a> or <a href="mailto:compositekeys@googlegroups.com?subject=Frontbase+is+failing">No…</a>)</td>
|
249
|
-
</tr>
|
250
|
-
</table>
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
<h3>Thanks go to…</h3>
|
256
|
-
|
257
|
-
|
258
|
-
<p><strong>Darrin Holst</strong> – for Oracle unit tests and calculations support</p>
|
259
|
-
|
260
|
-
|
261
|
-
<h2>Dr Nic’s Blog</h2>
|
262
|
-
|
263
|
-
|
264
|
-
<p><a href="http://www.drnicwilliams.com">http://www.drnicwilliams.com</a> – for future announcements and
|
111
|
+
<p><a name="dbs"></a></p>
|
112
|
+
<h2>Which databases?</h2>
|
113
|
+
<p>A suite of unit tests have been run on the following databases supported by ActiveRecord:</p>
|
114
|
+
<table>
|
115
|
+
<tr>
|
116
|
+
<th>Database</th>
|
117
|
+
<th>Test Success</th>
|
118
|
+
<th>User feedback</th>
|
119
|
+
</tr>
|
120
|
+
<tr>
|
121
|
+
<td>mysql </td>
|
122
|
+
<td><span class=success><span class="caps">YES</span></span></td>
|
123
|
+
<td><span class=success><span class="caps">YES</span></span> (<a href="mailto:compositekeys@googlegroups.com?subject=Mysql+is+working">Yes!</a> or <a href="mailto:compositekeys@googlegroups.com?subject=Mysql+is+failing">No…</a>)</td>
|
124
|
+
</tr>
|
125
|
+
<tr>
|
126
|
+
<td>sqlite3 </td>
|
127
|
+
<td><span class=success><span class="caps">YES</span></span></td>
|
128
|
+
<td><span class=success><span class="caps">YES</span></span> (<a href="mailto:compositekeys@googlegroups.com?subject=Sqlite3+is+working">Yes!</a> or <a href="mailto:compositekeys@googlegroups.com?subject=Sqlite3+is+failing">No…</a>)</td>
|
129
|
+
</tr>
|
130
|
+
<tr>
|
131
|
+
<td>postgresql</td>
|
132
|
+
<td><span class=success><span class="caps">YES</span></span></td>
|
133
|
+
<td><span class=success><span class="caps">YES</span></span> (<a href="mailto:compositekeys@googlegroups.com?subject=Postgresql+is+working">Yes!</a> or <a href="mailto:compositekeys@googlegroups.com?subject=Postgresql+is+failing">No…</a>)</td>
|
134
|
+
</tr>
|
135
|
+
<tr>
|
136
|
+
<td>oracle </td>
|
137
|
+
<td><span class=success><span class="caps">YES</span></span></td>
|
138
|
+
<td><span class=success><span class="caps">YES</span></span> (<a href="mailto:compositekeys@googlegroups.com?subject=Oracle+is+working">Yes!</a> or <a href="mailto:compositekeys@googlegroups.com?subject=Oracle+is+failing">No…</a>)</td>
|
139
|
+
</tr>
|
140
|
+
<tr>
|
141
|
+
<td>sqlserver </td>
|
142
|
+
<td><span class=unknown>???</span> (<a href="mailto:compositekeys@googlegroups.com?subject=Help+with+SQLServer">I can help</a>)</td>
|
143
|
+
<td><span class=unknown>???</span> (<a href="mailto:compositekeys@googlegroups.com?subject=SQLServer+is+working">Yes!</a> or <a href="mailto:compositekeys@googlegroups.com?subject=SQLServer+is+failing">No…</a>)</td>
|
144
|
+
</tr>
|
145
|
+
<tr>
|
146
|
+
<td>db2 </td>
|
147
|
+
<td><span class=unknown>???</span> (<a href="mailto:compositekeys@googlegroups.com?subject=Help+with+DB2">I can help</a>)</td>
|
148
|
+
<td><span class=unknown>???</span> (<a href="mailto:compositekeys@googlegroups.com?subject=DB2+is+working">Yes!</a> or <a href="mailto:compositekeys@googlegroups.com?subject=DB2+is+failing">No…</a>)</td>
|
149
|
+
</tr>
|
150
|
+
<tr>
|
151
|
+
<td>firebird </td>
|
152
|
+
<td><span class=unknown>???</span> (<a href="mailto:compositekeys@googlegroups.com?subject=Help+with+Firebird">I can help</a>)</td>
|
153
|
+
<td><span class=unknown>???</span> (<a href="mailto:compositekeys@googlegroups.com?subject=Firebird+is+working">Yes!</a> or <a href="mailto:compositekeys@googlegroups.com?subject=Firebird+is+failing">No…</a>)</td>
|
154
|
+
</tr>
|
155
|
+
<tr>
|
156
|
+
<td>sybase </td>
|
157
|
+
<td><span class=unknown>???</span> (<a href="mailto:compositekeys@googlegroups.com?subject=Help+with+Sybase">I can help</a>)</td>
|
158
|
+
<td><span class=unknown>???</span> (<a href="mailto:compositekeys@googlegroups.com?subject=Sybase+is+working">Yes!</a> or <a href="mailto:compositekeys@googlegroups.com?subject=Sybase+is+failing">No…</a>)</td>
|
159
|
+
</tr>
|
160
|
+
<tr>
|
161
|
+
<td>openbase </td>
|
162
|
+
<td><span class=unknown>???</span> (<a href="mailto:compositekeys@googlegroups.com?subject=Help+with+Openbase">I can help</a>)</td>
|
163
|
+
<td><span class=unknown>???</span> (<a href="mailto:compositekeys@googlegroups.com?subject=Openbase+is+working">Yes!</a> or <a href="mailto:compositekeys@googlegroups.com?subject=Openbase+is+failing">No…</a>)</td>
|
164
|
+
</tr>
|
165
|
+
<tr>
|
166
|
+
<td>frontbase </td>
|
167
|
+
<td><span class=unknown>???</span> (<a href="mailto:compositekeys@googlegroups.com?subject=Help+with+Frontbase">I can help</a>)</td>
|
168
|
+
<td><span class=unknown>???</span> (<a href="mailto:compositekeys@googlegroups.com?subject=Frontbase+is+working">Yes!</a> or <a href="mailto:compositekeys@googlegroups.com?subject=Frontbase+is+failing">No…</a>)</td>
|
169
|
+
</tr>
|
170
|
+
</table>
|
171
|
+
<h2>Dr Nic’s Blog</h2>
|
172
|
+
<p><a href="http://www.drnicwilliams.com">http://www.drnicwilliams.com</a> – for future announcements and<br />
|
265
173
|
other stories and things.</p>
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
|
278
|
-
|
279
|
-
|
280
|
-
<p>The source for this project is available via git. You can <a href="http://github.com/drnic/composite_primary_keys/tree/master">browse and/or fork the source</a>, or to clone the project locally:</p>
|
281
|
-
|
282
|
-
|
283
|
-
<pre>git clone git://github.com/drnic/composite_primary_keys.git</pre>
|
284
|
-
|
285
|
-
<p>The original Subversion repository is <code>svn://rubyforge.org/var/svn/compositekeys/trunk</code> for anonymous access.</p>
|
286
|
-
|
287
|
-
|
288
|
-
<h2>Licence</h2>
|
289
|
-
|
290
|
-
|
291
|
-
<p>This code is free to use under the terms of the <span class="caps">MIT</span> licence.</p>
|
292
|
-
|
293
|
-
|
294
|
-
<h2>Contact</h2>
|
295
|
-
|
296
|
-
|
297
|
-
<p>Comments are welcome. Send an email to <a href="mailto:drnicwilliams@gmail.com">Dr Nic Williams</a>.</p>
|
174
|
+
<h2>Forum</h2>
|
175
|
+
<p><a href="http://groups.google.com/group/compositekeys">http://groups.google.com/group/compositekeys</a></p>
|
176
|
+
<h2>How to submit patches</h2>
|
177
|
+
<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
|
178
|
+
<p>The source for this project is available via git. You can <a href="http://github.com/drnic/composite_primary_keys/tree/master">browse and/or fork the source</a>, or to clone the project locally:<br />
|
179
|
+
<br />
|
180
|
+
<pre>git clone git://github.com/drnic/composite_primary_keys.git</pre></p>
|
181
|
+
<h2>Licence</h2>
|
182
|
+
<p>This code is free to use under the terms of the <span class="caps">MIT</span> licence.</p>
|
183
|
+
<h2>Contact</h2>
|
184
|
+
<p>Comments are welcome. Send an email to <a href="mailto:drnicwilliams@gmail.com">Dr Nic Williams</a>.</p>
|
298
185
|
<p class="coda">
|
299
|
-
<a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>,
|
186
|
+
<a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 25th October 2008<br>
|
300
187
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
301
188
|
</p>
|
302
189
|
</div>
|
data/website/index.txt
CHANGED
@@ -120,11 +120,11 @@ h2. Which databases?
|
|
120
120
|
|
121
121
|
A suite of unit tests have been run on the following databases supported by ActiveRecord:
|
122
122
|
|
123
|
-
|_.Database|_.Test Success|_.User feedback
|
124
|
-
|mysql |<span class=success>YES</span>|<span class=
|
125
|
-
|sqlite3 |<span class=success>YES</span
|
126
|
-
|postgresql|<span class=success>YES</span
|
127
|
-
|oracle |<span class=success>YES</span
|
123
|
+
|_.Database|_.Test Success|_.User feedback|
|
124
|
+
|mysql |<span class=success>YES</span>|<span class=success>YES</span> ("Yes!":mailto:compositekeys@googlegroups.com?subject=Mysql+is+working or "No...":mailto:compositekeys@googlegroups.com?subject=Mysql+is+failing)|
|
125
|
+
|sqlite3 |<span class=success>YES</span>|<span class=success>YES</span> ("Yes!":mailto:compositekeys@googlegroups.com?subject=Sqlite3+is+working or "No...":mailto:compositekeys@googlegroups.com?subject=Sqlite3+is+failing)|
|
126
|
+
|postgresql|<span class=success>YES</span>|<span class=success>YES</span> ("Yes!":mailto:compositekeys@googlegroups.com?subject=Postgresql+is+working or "No...":mailto:compositekeys@googlegroups.com?subject=Postgresql+is+failing)|
|
127
|
+
|oracle |<span class=success>YES</span>|<span class=success>YES</span> ("Yes!":mailto:compositekeys@googlegroups.com?subject=Oracle+is+working or "No...":mailto:compositekeys@googlegroups.com?subject=Oracle+is+failing)|
|
128
128
|
|sqlserver |<span class=unknown>???</span> ("I can help":mailto:compositekeys@googlegroups.com?subject=Help+with+SQLServer)|<span class=unknown>???</span> ("Yes!":mailto:compositekeys@googlegroups.com?subject=SQLServer+is+working or "No...":mailto:compositekeys@googlegroups.com?subject=SQLServer+is+failing)|
|
129
129
|
|db2 |<span class=unknown>???</span> ("I can help":mailto:compositekeys@googlegroups.com?subject=Help+with+DB2)|<span class=unknown>???</span> ("Yes!":mailto:compositekeys@googlegroups.com?subject=DB2+is+working or "No...":mailto:compositekeys@googlegroups.com?subject=DB2+is+failing)|
|
130
130
|
|firebird |<span class=unknown>???</span> ("I can help":mailto:compositekeys@googlegroups.com?subject=Help+with+Firebird)|<span class=unknown>???</span> ("Yes!":mailto:compositekeys@googlegroups.com?subject=Firebird+is+working or "No...":mailto:compositekeys@googlegroups.com?subject=Firebird+is+failing)|
|
@@ -132,10 +132,6 @@ A suite of unit tests have been run on the following databases supported by Acti
|
|
132
132
|
|openbase |<span class=unknown>???</span> ("I can help":mailto:compositekeys@googlegroups.com?subject=Help+with+Openbase)|<span class=unknown>???</span> ("Yes!":mailto:compositekeys@googlegroups.com?subject=Openbase+is+working or "No...":mailto:compositekeys@googlegroups.com?subject=Openbase+is+failing)|
|
133
133
|
|frontbase |<span class=unknown>???</span> ("I can help":mailto:compositekeys@googlegroups.com?subject=Help+with+Frontbase)|<span class=unknown>???</span> ("Yes!":mailto:compositekeys@googlegroups.com?subject=Frontbase+is+working or "No...":mailto:compositekeys@googlegroups.com?subject=Frontbase+is+failing)|
|
134
134
|
|
135
|
-
h3. Thanks go to...
|
136
|
-
|
137
|
-
*Darrin Holst* - for Oracle unit tests and calculations support
|
138
|
-
|
139
135
|
h2. Dr Nic's Blog
|
140
136
|
|
141
137
|
"http://www.drnicwilliams.com":http://www.drnicwilliams.com - for future announcements and
|
@@ -154,8 +150,6 @@ The source for this project is available via git. You can "browse and/or fork th
|
|
154
150
|
|
155
151
|
<pre>git clone git://github.com/drnic/composite_primary_keys.git</pre>
|
156
152
|
|
157
|
-
The original Subversion repository is <code>svn://rubyforge.org/var/svn/compositekeys/trunk</code> for anonymous access.
|
158
|
-
|
159
153
|
h2. Licence
|
160
154
|
|
161
155
|
This code is free to use under the terms of the MIT licence.
|
data/website/version-raw.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
// Announcement JS file
|
2
|
-
var version = "1.0
|
3
|
-
MagicAnnouncement.show('compositekeys', version);
|
1
|
+
// Announcement JS file
|
2
|
+
var version = "1.1.0";
|
3
|
+
MagicAnnouncement.show('compositekeys', version);
|
data/website/version.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
// Version JS file
|
2
|
-
var version = "1.0
|
1
|
+
// Version JS file
|
2
|
+
var version = "1.1.0";
|
3
3
|
|
4
|
-
document.write(" - " + version);
|
4
|
+
document.write(" - " + version);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: composite_primary_keys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dr Nic Williams
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-10-
|
12
|
+
date: 2008-10-29 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,17 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 2.1.
|
23
|
+
version: 2.1.2
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: hoe
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.8.2
|
24
34
|
version:
|
25
35
|
description: Composite key support for ActiveRecords
|
26
36
|
email: drnicwilliams@gmail.com
|
@@ -182,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
192
|
requirements: []
|
183
193
|
|
184
194
|
rubyforge_project: compositekeys
|
185
|
-
rubygems_version: 1.
|
195
|
+
rubygems_version: 1.3.0
|
186
196
|
signing_key:
|
187
197
|
specification_version: 2
|
188
198
|
summary: Composite key support for ActiveRecords
|