torque-postgresql 0.2.2 → 0.2.3

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: 6422949dcd6390bea82ed290528491efd5b0effe
4
- data.tar.gz: 797f069fd9b3a3207e39abfc781fc9c816ef3e72
3
+ metadata.gz: 817639c325ea9e6295c7896a68e3e96c7b4db9a5
4
+ data.tar.gz: 7df01edb6d749ff202e18df38a74484ea6be8b9b
5
5
  SHA512:
6
- metadata.gz: cf0c65ecca84216b3cf185fbeb4b5c4ef15de3a1e793a9071bf47e37dc0467ee6278ad4caba2db041874b39a3164689f3daa34b012055f38b82d52818ac3f487
7
- data.tar.gz: 76d427aa302b392caa4552107f23252acb6c18608de0692b607f407e56c2fe5bba6a07fce2688708c702cd42c4b97e167bb331ab1098064a55c1b876975edc8e
6
+ metadata.gz: 8e3a5f82a6972e5b52e8450224443644bf586024d262df711f351cc853313facad3d273483e22076a866b39406af6968df3c4d6ed35529b59ffc5a06ac14db3b
7
+ data.tar.gz: f74a703d96af485d4784af11e63f181f028934b75b23937b20c114b15935b6e712ecff6c389e45023a3af7d5674c801d3349e6c356feb790b6ee9ece6940516b
@@ -81,7 +81,7 @@ module Torque
81
81
  # You can even choose the +category+ filter
82
82
  def user_defined_types(category = nil)
83
83
  category_condition = "AND typtype = '#{category}'" unless category.nil?
84
- select_all(<<-SQL).rows.to_h
84
+ select_all(<<-SQL, 'SCHEMA').rows.to_h
85
85
  SELECT t.typname AS name,
86
86
  CASE t.typtype
87
87
  WHEN 'e' THEN 'enum'
@@ -104,7 +104,7 @@ module Torque
104
104
 
105
105
  # Get the list of inherited tables associated with their parent tables
106
106
  def inherited_tables
107
- tables = select_all(<<-SQL).rows
107
+ tables = query(<<-SQL, 'SCHEMA')
108
108
  SELECT child.relname AS table_name,
109
109
  array_agg(parent.relname) AS inheritances
110
110
  FROM pg_inherits
@@ -68,7 +68,7 @@ module Torque
68
68
 
69
69
  # Returns all values that an enum type can have.
70
70
  def enum_values(name)
71
- select_values("SELECT unnest(enum_range(NULL::#{name}))")
71
+ select_values("SELECT unnest(enum_range(NULL::#{name}))", 'SCHEMA')
72
72
  end
73
73
 
74
74
  # Rewrite the method that creates tables to easily accept extra options
@@ -23,7 +23,7 @@ module Torque
23
23
  # Find or create the class that will handle statement
24
24
  def lookup(name, base)
25
25
  const = name.to_s.camelize << '_' << self.name.demodulize
26
- return base.const_get(const) if base.const_defined?(const)
26
+ return base.const_get(const, false) if base.const_defined?(const, false)
27
27
  base.const_set(const, Class.new(AuxiliaryStatement))
28
28
  end
29
29
 
@@ -1,5 +1,5 @@
1
1
  module Torque
2
2
  module PostgreSQL
3
- VERSION = '0.2.2'
3
+ VERSION = '0.2.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torque-postgresql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Silva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-25 00:00:00.000000000 Z
11
+ date: 2018-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails