postgres_ext 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/lib/postgres_ext/arel/visitors/to_sql.rb +1 -1
- data/lib/postgres_ext/version.rb +1 -1
- data/spec/queries/sanity_spec.rb +6 -13
- metadata +4 -4
data/CHANGELOG.md
CHANGED
data/lib/postgres_ext/version.rb
CHANGED
data/spec/queries/sanity_spec.rb
CHANGED
@@ -1,23 +1,16 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe 'Ensure that we don\'t stomp on Active Record\'s queries' do
|
4
|
-
let!(:adapter) { ActiveRecord::Base.connection }
|
5
|
-
|
6
|
-
before do
|
7
|
-
adapter.create_table :sanity_tests, :force => true do |t|
|
8
|
-
t.string :tags, :array => true
|
9
|
-
t.integer :tag_ids, :array => true
|
10
|
-
end
|
11
|
-
|
12
|
-
class SanityTest < ActiveRecord::Base
|
13
|
-
attr_accessible :tags, :tags_ids
|
14
|
-
end
|
15
|
-
end
|
16
4
|
describe '.where' do
|
17
5
|
it 'generates IN clauses for non array columns' do
|
18
|
-
query =
|
6
|
+
query = Person.where(:id => [1,2,3]).to_sql
|
19
7
|
|
20
8
|
query.should match /IN \(1, 2, 3\)/
|
21
9
|
end
|
10
|
+
it 'generates IN clauses for non array columns' do
|
11
|
+
query = Person.where(:id => []).to_sql
|
12
|
+
|
13
|
+
query.should match /IN \(NULL\)/
|
14
|
+
end
|
22
15
|
end
|
23
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postgres_ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -237,7 +237,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
237
237
|
version: '0'
|
238
238
|
segments:
|
239
239
|
- 0
|
240
|
-
hash:
|
240
|
+
hash: 3137999377489191858
|
241
241
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
242
242
|
none: false
|
243
243
|
requirements:
|
@@ -246,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
246
|
version: '0'
|
247
247
|
segments:
|
248
248
|
- 0
|
249
|
-
hash:
|
249
|
+
hash: 3137999377489191858
|
250
250
|
requirements: []
|
251
251
|
rubyforge_project:
|
252
252
|
rubygems_version: 1.8.23
|