query_helper 0.2.28 → 0.2.29

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: c635a27696eb10b152787a3b66132760bf79e3b2e695037bf6dcc2b06b39e9b9
4
- data.tar.gz: bfc80f15f647d447a6115423308368c39a2f034938731eb94f91d23a7f4c1f53
3
+ metadata.gz: 6393029fea1bbf5dcc2e0c724689a7a9eada99b0bcba65896ddfcb4704442130
4
+ data.tar.gz: a988a611a54efa8ea34080294b92c278bb5dbc3cf59e3598b1e7a3668f87343c
5
5
  SHA512:
6
- metadata.gz: d61105466f4cadc1b111ed38afd7e764c3d3fde76fb4db786029654516fb893df43ccf02e2b6f07693dd118ceabbc15ffa9281b2c1c7dbc388091a4f65b9e300
7
- data.tar.gz: b3c6b12c6594e1a3f068ce0d1de484f3e49bc53e1da5c99c6b7c68b27fc9c1f90e334e653b711281f0d93334a2ee95dc666d1d620a17de67ca378117e3e4c806
6
+ metadata.gz: 8c9a16cf6b3706de8eede885b7301d433b2317ea8bb1136d4386d7248c11dd06851d51d9ba6bd3536382b37103ed22554ce757ddb63ea85f6af43e62dcbc6650
7
+ data.tar.gz: b6f5bf13fee17da7f195a6ff4e38afe68020379782ada889514654c769014ec41dc31ca7eafc743299dac5cf729cc27c842c7b72cb5ce55984dc3bb9548666f2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- query_helper (0.2.28)
4
+ query_helper (0.2.29)
5
5
  activerecord (> 5)
6
6
  activesupport (> 5)
7
7
  sqlite3
@@ -83,7 +83,7 @@ class QueryHelper
83
83
 
84
84
  begin_string = @parser.qualify_included? ? "and" : "qualify"
85
85
  filter_string = @qualify_clauses.join(" and ")
86
- @sql.insert(@parser.insert_where_index, " #{begin_string} #{filter_string} ")
86
+ @sql.insert(@parser.insert_qualify_index, " #{begin_string} #{filter_string} ")
87
87
  end
88
88
 
89
89
  def qualify_clause_applicable?
@@ -117,6 +117,10 @@ class QueryHelper
117
117
  group_by_index() || order_by_index() || limit_index() || @sql.length
118
118
  end
119
119
 
120
+ def insert_qualify_index
121
+ order_by_index() || limit_index() || @sql.length
122
+ end
123
+
120
124
  def insert_having_index
121
125
  # raise InvalidQueryError.new("Cannot calculate insert_having_index because the query has no group by clause") unless group_by_included?
122
126
  order_by_index() || limit_index() || @sql.length
@@ -1,3 +1,3 @@
1
1
  class QueryHelper
2
- VERSION = "0.2.28"
2
+ VERSION = "0.2.29"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.28
4
+ version: 0.2.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan McDaniel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-05 00:00:00.000000000 Z
11
+ date: 2022-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler