pg_query 0.13.2 → 0.13.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: 7581a181058d0429e35143026aa4cde939af9920
4
- data.tar.gz: 9dad6882888ad1a1631e6119263383613452df54
3
+ metadata.gz: 41868b21a2b7a440970f576289d910e0830f4bce
4
+ data.tar.gz: af57e55f9d2db4f4fa3e6e4a4284c4896b3b221b
5
5
  SHA512:
6
- metadata.gz: bf7a6b92484148b7431f83e4c9a7474825b3fd510d640210fb5fd7eb90bd761bb97dbd2ce4f8d0731bbb59c29158c5a147190eb098f31e17eb03691f3c322da7
7
- data.tar.gz: e9418cbb97645d2b7ea861773b5e0ea6f5712183b28165985e5240f26e8335bff1a6c49d396c741c77380430069fb7edfbaeeff64575b49abdc333eba0451b4e
6
+ metadata.gz: 2443cf93ee2cdeacf5b9231049ed8503d902d73d779b3873fba7cc2ad8bd17d95ae7a39ad90dae652adfc4e432e8973c02b7d78c7a529156a2a1739dc918f2da
7
+ data.tar.gz: 35306d9dc32a1812fb8a902de034626e82e9bf7fd2369473a3718b13e4aea14fa671ae8d34df22e9c4550d0b21f8835c36be937a40a0af07e6c0a343adb08326
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.3 2017-09-04
4
+
5
+ * Fix table detection for SELECTs that have sub-SELECTs without FROM clause [#69](https://github.com/lfittl/pg_query/issues/69)
6
+
7
+
3
8
  ## 0.13.2 2017-08-10
4
9
 
5
10
  * Support table detection in sub-SELECTs in JOINs [#68](https://github.com/lfittl/pg_query/pull/65) [@seanmdick](https://github.com/seanmdick)
@@ -204,7 +204,8 @@ class PgQuery
204
204
  when RANGE_SUBSELECT
205
205
  from_clause_items << { item: next_item[:item][RANGE_SUBSELECT]['subquery'], type: next_item[:type] }
206
206
  when SELECT_STMT
207
- from_clause_items += next_item[:item][SELECT_STMT]['fromClause'].map { |r| { item: r, type: next_item[:type] } }
207
+ from_clause = next_item[:item][SELECT_STMT][FROM_CLAUSE_FIELD]
208
+ from_clause_items += from_clause.map { |r| { item: r, type: next_item[:type] } } if from_clause
208
209
  end
209
210
  end
210
211
 
@@ -1,3 +1,3 @@
1
1
  class PgQuery
2
- VERSION = '0.13.2'.freeze
2
+ VERSION = '0.13.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_query
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.2
4
+ version: 0.13.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Fittl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-10 00:00:00.000000000 Z
11
+ date: 2017-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  version: '0'
143
143
  requirements: []
144
144
  rubyforge_project:
145
- rubygems_version: 2.6.11
145
+ rubygems_version: 2.5.1
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: PostgreSQL query parsing and normalization library