json-arel 0.2 → 0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/json_arel.rb +5 -1
  3. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9076d0b1c225fb523e2ebfa93ee57d12f982a16c
4
- data.tar.gz: a656c6a47d815c91af6bb7e2d0476c6e47d0f69e
3
+ metadata.gz: 79c4eec81c11f27b854c5303d7a9b8cb405f74e5
4
+ data.tar.gz: b0481bdc4e0dd43642c36a9f6c571847bf947b40
5
5
  SHA512:
6
- metadata.gz: d067b42c8b7959de4e2afdf28d97844e3d8b18cc479fac98157d1f54148a6c66469210bb54c1d14caaabd9fc743123811f40a82459cac90fff2f00345790a1bc
7
- data.tar.gz: 3725926ae20e2b0da6416845f1a55067fd0d859945bb5c69ff40cff49340cea7a62da5d7577084afc3017570aab501582f0d46120138999b90b8e10a72d0c2d4
6
+ metadata.gz: eff5a36a1487459456feb564dd24e52e1e78cebf87b5349fe9cfa4c1c253ea541e1876920dd15be2d986a16dfd7ad78e6371a5387fa28ab720880c09cac755d7
7
+ data.tar.gz: ab2657d21a67f5853c42ef2c60b754c0d6cfcdcdf5b98f2e6118e5e9820a1f01d760119a2b2b348d351afd1d9dcf94450eaca664480306c60f14cc3d95aa77a8
data/lib/json_arel.rb CHANGED
@@ -50,7 +50,11 @@ module JSONArel
50
50
  end
51
51
 
52
52
  # Evaluate.
53
- table = table.where(node['where']) if node['where'].length > 0
53
+ if node['where'].length > 0
54
+ node['where'].each do |condition|
55
+ table = table.where(condition)
56
+ end
57
+ end
54
58
  expr = table.project(node['fields'])
55
59
 
56
60
  # TODO: support JOIN
metadata CHANGED
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-arel
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Omar Bohsali
8
+ - Jonathan Warrick
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
@@ -40,5 +41,5 @@ rubyforge_project:
40
41
  rubygems_version: 2.2.2
41
42
  signing_key:
42
43
  specification_version: 4
43
- summary: Convert JSON into SQL queries.
44
+ summary: Convert JSON into SQL queries using arel.
44
45
  test_files: []