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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/query_helper/sql_manipulator.rb +1 -1
- data/lib/query_helper/sql_parser.rb +4 -0
- data/lib/query_helper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6393029fea1bbf5dcc2e0c724689a7a9eada99b0bcba65896ddfcb4704442130
|
4
|
+
data.tar.gz: a988a611a54efa8ea34080294b92c278bb5dbc3cf59e3598b1e7a3668f87343c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c9a16cf6b3706de8eede885b7301d433b2317ea8bb1136d4386d7248c11dd06851d51d9ba6bd3536382b37103ed22554ce757ddb63ea85f6af43e62dcbc6650
|
7
|
+
data.tar.gz: b6f5bf13fee17da7f195a6ff4e38afe68020379782ada889514654c769014ec41dc31ca7eafc743299dac5cf729cc27c842c7b72cb5ce55984dc3bb9548666f2
|
data/Gemfile.lock
CHANGED
@@ -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.
|
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
|
data/lib/query_helper/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2022-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|