logical_query_parser 0.3.0 → 0.3.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
  SHA256:
3
- metadata.gz: c2a48abdb3c711d5984f63d4ff56d8d492e5c674a306833472435c64e2180d41
4
- data.tar.gz: 85f5476c26e88e6f0cc5465eb46bbf62a7ac0b2a9bfa84183fd2a93cee0aef9b
3
+ metadata.gz: f5f35cb942ce106b76c221515c541fe5000984951951027aed0c65bbaaeda661
4
+ data.tar.gz: 106c7a62724f8133aec5ee701c36944fffb3d7f7dd5cdf56a0513d880b347c58
5
5
  SHA512:
6
- metadata.gz: 95909ee34ce7e60993844d69a96c6ef683a470b44113cd49c4045ceb7f6cfb0d6081731c2e13e7a699c7584f2d4efbfd368cff549291481b8471bb6d594b09ff
7
- data.tar.gz: 1319eab5cf8dd32f8760cacb5ac0211b8c3d2330e95dc3426325e9bc7f0767b9d477c0c4b75e82061e5126117bf70ffe729252dae3de06dc04e0041b051215d3
6
+ metadata.gz: 1d1009c089fe2d3ff11c825980a60a6268fbddde922539b11cbe16b65072b538d549976a5ef143a2a38ebdd8f1d24fec5fdd480787dd3768f1a1b1a5e3c7496b
7
+ data.tar.gz: 9bd7e88f599ed9ae61f145de30f6d699b9a0428a80c8e81b60c3ce192d00c606485a5b0f49bda7642beddec5ad01b412fe04fc6bfb5a12bb43d9aeb3f1a572e9
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.3.1
4
+
5
+ * Fix to support array of columns.
6
+
3
7
  ## 0.3.0
4
8
 
5
9
  * Support searching with associations.
@@ -14,13 +14,13 @@ module LogicalQueryParser
14
14
 
15
15
  def search(query, relations, *options)
16
16
  relations = relations.all if relations.respond_to?(:all)
17
- assoc = resolve_assocs(relations.klass, options)
17
+ assoc = resolve_assocs(relations.klass, *options)
18
18
  sql = new.parse(query).to_sql(model: relations.klass, columns: assoc.column_mapping)
19
19
  relations.joins(assoc.structure).where(sql)
20
20
  end
21
21
 
22
- def resolve_assocs(klass, options)
23
- AssocResolver.new(klass).run(options)
22
+ def resolve_assocs(klass, *options)
23
+ AssocResolver.new(klass).run(*options)
24
24
  end
25
25
 
26
26
  def walk_tree(node, &block)
@@ -1,3 +1,3 @@
1
1
  module LogicalQueryParser
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logical_query_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshikazu Kaneta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-05 00:00:00.000000000 Z
11
+ date: 2019-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: treetop