arel 2.0.8.beta.20110131120940 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +8 -1
- data/lib/arel.rb +1 -1
- data/lib/arel/predications.rb +2 -0
- data/test/attributes/test_attribute.rb +16 -0
- metadata +9 -13
data/History.txt
CHANGED
data/lib/arel.rb
CHANGED
data/lib/arel/predications.rb
CHANGED
@@ -163,6 +163,7 @@ module Arel
|
|
163
163
|
private
|
164
164
|
|
165
165
|
def grouping_any method_id, others
|
166
|
+
others = others.dup
|
166
167
|
first = send method_id, others.shift
|
167
168
|
|
168
169
|
Nodes::Grouping.new others.inject(first) { |memo,expr|
|
@@ -171,6 +172,7 @@ module Arel
|
|
171
172
|
end
|
172
173
|
|
173
174
|
def grouping_all method_id, others
|
175
|
+
others = others.dup
|
174
176
|
first = send method_id, others.shift
|
175
177
|
|
176
178
|
Nodes::Grouping.new others.inject(first) { |memo,expr|
|
@@ -366,6 +366,14 @@ module Arel
|
|
366
366
|
SELECT "users"."id" FROM "users" WHERE ("users"."id" = 1 OR "users"."id" = 2)
|
367
367
|
}
|
368
368
|
end
|
369
|
+
|
370
|
+
it 'should not eat input' do
|
371
|
+
relation = Table.new(:users)
|
372
|
+
mgr = relation.project relation[:id]
|
373
|
+
values = [1,2]
|
374
|
+
mgr.where relation[:id].eq_any(values)
|
375
|
+
values.must_equal [1,2]
|
376
|
+
end
|
369
377
|
end
|
370
378
|
|
371
379
|
describe '#eq_all' do
|
@@ -382,6 +390,14 @@ module Arel
|
|
382
390
|
SELECT "users"."id" FROM "users" WHERE ("users"."id" = 1 AND "users"."id" = 2)
|
383
391
|
}
|
384
392
|
end
|
393
|
+
|
394
|
+
it 'should not eat input' do
|
395
|
+
relation = Table.new(:users)
|
396
|
+
mgr = relation.project relation[:id]
|
397
|
+
values = [1,2]
|
398
|
+
mgr.where relation[:id].eq_all(values)
|
399
|
+
values.must_equal [1,2]
|
400
|
+
end
|
385
401
|
end
|
386
402
|
|
387
403
|
describe '#matches' do
|
metadata
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 31
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
9
|
- 8
|
10
|
-
|
11
|
-
- 20110131120940
|
12
|
-
version: 2.0.8.beta.20110131120940
|
10
|
+
version: 2.0.8
|
13
11
|
platform: ruby
|
14
12
|
authors:
|
15
13
|
- Aaron Patterson
|
@@ -20,7 +18,7 @@ autorequire:
|
|
20
18
|
bindir: bin
|
21
19
|
cert_chain: []
|
22
20
|
|
23
|
-
date: 2011-
|
21
|
+
date: 2011-02-08 00:00:00 -08:00
|
24
22
|
default_executable:
|
25
23
|
dependencies:
|
26
24
|
- !ruby/object:Gem::Dependency
|
@@ -249,18 +247,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
249
247
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
250
248
|
none: false
|
251
249
|
requirements:
|
252
|
-
- - "
|
250
|
+
- - ">="
|
253
251
|
- !ruby/object:Gem::Version
|
254
|
-
hash:
|
252
|
+
hash: 3
|
255
253
|
segments:
|
256
|
-
-
|
257
|
-
|
258
|
-
- 1
|
259
|
-
version: 1.3.1
|
254
|
+
- 0
|
255
|
+
version: "0"
|
260
256
|
requirements: []
|
261
257
|
|
262
258
|
rubyforge_project: arel
|
263
|
-
rubygems_version: 1.
|
259
|
+
rubygems_version: 1.5.0
|
264
260
|
signing_key:
|
265
261
|
specification_version: 3
|
266
262
|
summary: Arel is a Relational Algebra for Ruby
|