postgres_ext 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4fb1baea00022bce72d77b44835d7468bad8b5c3
4
- data.tar.gz: beee8834d070b830cc100f1f76485888e9a7e655
3
+ metadata.gz: e108225b5ff194b97925399e805c0ab81ee95db6
4
+ data.tar.gz: cad4d50e3d7b19566eabdf8841d1e206a13cbadf
5
5
  SHA512:
6
- metadata.gz: 626ff8558284671aa255caa67e79e1570f01ab481c18ba7fd3a48d782ef6a6e9b805676bf26c2fb4f8b3d160bf382fcfbd006b565056e4d5395be7e34e49300f
7
- data.tar.gz: 3bd135a3456d19ad3719f93d676551d24f367baa8711a91eec08bdb93e0f43db4e229da7cfacfcbc05c09bf3fb73d716337bb80f91cd68cabeb3c0724a1f318f
6
+ metadata.gz: ede479c5b324e86d4c11a7427275a98871742052ebf55a30ebe67f1e332781db30b62ba791a59b271f0d72890c0ba8d9b281ca7c699654ef62f29271b060f160
7
+ data.tar.gz: 5e7c698daacf2ecc3c5752d963add7ae9e596aff4602d92b4a1c2919d35f0660fe55a6a4e3f4d2f2ce731b72c2b153edfcdddd864e129d59c8081623bb198046
@@ -3,7 +3,7 @@ class CTEProxy
3
3
  include ActiveRecord::Sanitization::ClassMethods
4
4
  include ActiveRecord::Reflection::ClassMethods
5
5
 
6
- attr_accessor :reflections
6
+ attr_accessor :reflections, :current_scope
7
7
  attr_reader :connection, :arel_table
8
8
 
9
9
  def initialize(name, model)
@@ -29,5 +29,12 @@ class CTEProxy
29
29
  def columns_hash
30
30
  @model.columns_hash
31
31
  end
32
- end
33
32
 
33
+ def primary_key
34
+ @model.primary_key
35
+ end
36
+
37
+ def instantiate(record, column_types = {})
38
+ @model.instantiate(record, column_types)
39
+ end
40
+ end
@@ -1,3 +1,3 @@
1
1
  module PostgresExt
2
- VERSION = '2.1.0'
2
+ VERSION = '2.1.1'
3
3
  end
@@ -30,6 +30,7 @@ describe 'Common Table Expression queries' do
30
30
  people = Person.from_cte('lucky_number_seven', Person.where(lucky_number: 7))
31
31
 
32
32
  people.count.should eq 3
33
+ people.first.lucky_number.should eq 7
33
34
  end
34
35
  end
35
36
  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: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan McClain