pg_query 0.9.1 → 0.9.2

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: a377ed9d805e4f883bf28b2c4a7e05370e207bc1
4
- data.tar.gz: c84ec997bb2d9c677b5726af65b85c6fdc88140c
3
+ metadata.gz: 9955026734b3faafbbb4c86215fabf31534c1990
4
+ data.tar.gz: f9973176e535d11ce97ba8fc8abaadc0ad1379df
5
5
  SHA512:
6
- metadata.gz: 3755eaef3616e8b07e928cb6250e19564d9e6c048705cad6248829a8e6ef4caf44e4c88152d768c877bd3ad5fb80617ce51618ac3bdddaaf5c9abe87d5c28cfa
7
- data.tar.gz: 7814641e05dc71cb12897a2a58533d3b6ee8108003a79f350653d9134a21929549e390f11ad23952b1762c5632d0380350111d2e30f69e822a14a59d31bc147f
6
+ metadata.gz: 021873ba301dcb4f7bb95ca441d1b9e89e8a801e0a3238605b471c6b56e5682700ba5a67200ca1d053a0440b915302d5303a2732af5bfb86bb8d30206e61ae1c
7
+ data.tar.gz: c31a73ea3defcc37dc34e9d9d087cbfc8a72bdb27ca392bf6c0a407960996ae45e53d037347e35804bf7a911b340a441a6a40f8d46142e382e0731be1e71aa97
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.2 2016-05-03
4
+
5
+ * Fix issue with A_CONST string values in `.parsetree` compatibility layer (Fixes [#47](https://github.com/lfittl/pg_query/issues/47))
6
+
7
+
3
8
  ## 0.9.1 2016-04-20
4
9
 
5
10
  * Add support for Ruby 1.9 (Fixes [#44](https://github.com/lfittl/pg_query/issues/44))
@@ -64,6 +64,8 @@ class PgQuery
64
64
  filter_columns << [@aliases[table] || table, column]
65
65
  elsif next_item[NULL_TEST]
66
66
  condition_items << next_item[NULL_TEST]['arg']
67
+ elsif next_item[BOOLEAN_TEST]
68
+ condition_items << next_item[BOOLEAN_TEST]['arg']
67
69
  elsif next_item[FUNC_CALL]
68
70
  # FIXME: This should actually be extracted as a funccall and be compared with those indices
69
71
  condition_items += next_item[FUNC_CALL]['args'] if next_item[FUNC_CALL]['args']
@@ -106,8 +106,8 @@ class PgQuery
106
106
  node[A_CONST]['type'] = 'integer'
107
107
  node[A_CONST]['val'] = node[A_CONST]['val'][INTEGER]['ival']
108
108
  when STRING
109
- node[A_CONST]['type'] = 'integer'
110
- node[A_CONST]['val'] = node[A_CONST]['val'][STRING]['ival']
109
+ node[A_CONST]['type'] = 'string'
110
+ node[A_CONST]['val'] = node[A_CONST]['val'][STRING]['str']
111
111
  when FLOAT
112
112
  node[A_CONST]['type'] = 'float'
113
113
  node[A_CONST]['val'] = node[A_CONST]['val'][FLOAT]['str'].to_f
@@ -14,6 +14,7 @@ class PgQuery
14
14
  ALTER_TABLE_STMT = 'AlterTableStmt'.freeze
15
15
  BIT_STRING = 'BitString'.freeze
16
16
  BOOL_EXPR = 'BoolExpr'.freeze
17
+ BOOLEAN_TEST = 'BooleanTest'.freeze
17
18
  CASE_EXPR = 'CaseExpr'.freeze
18
19
  CASE_WHEN = 'CaseWhen'.freeze
19
20
  CHECK_POINT_STMT = 'CheckPointStmt'.freeze
@@ -1,3 +1,3 @@
1
1
  class PgQuery
2
- VERSION = '0.9.1'
2
+ VERSION = '0.9.2'
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.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Fittl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-21 00:00:00.000000000 Z
11
+ date: 2016-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  requirements: []
138
138
  rubyforge_project:
139
- rubygems_version: 2.4.5.1
139
+ rubygems_version: 2.5.1
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: PostgreSQL query parsing and normalization library