directiverecord 0.1.28 → 0.1.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +4 -0
- data/VERSION +1 -1
- data/lib/directive_record/query/sql.rb +2 -11
- data/lib/directive_record/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bfe5ca92925fd12668d8679e9a93f5db099f29f
|
4
|
+
data.tar.gz: b77c4c85e6ecd7ab12b3cf3dbb685ef29bb7f74e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dd096afe893a680a35ebe1132f046cf6bee6c5f335a83f43c844ebe0c7a5b699dc1672615f1c7f264e31ca6f11ca1eeeeb67627cd2f11f9672b9d2d2476edae
|
7
|
+
data.tar.gz: c215ece54c252766a1ef0163bca6d135549752947bbbb2dd8f66df5f96b84592f2c0f8ab73a0c260959b7dc2d71c547f2468defca5c87283f99a3a6605d56f07
|
data/CHANGELOG.rdoc
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
= DirectiveRecord CHANGELOG
|
2
2
|
|
3
|
+
== Version 0.1.29 (August 17, 2015)
|
4
|
+
|
5
|
+
* Not normalizing select option again after having encountered new calculated columns in the GROUP BY statement, instead just register the alias
|
6
|
+
|
3
7
|
== Version 0.1.28 (August 13, 2015)
|
4
8
|
|
5
9
|
* Corrected handling HAVING statements for “virtual columns” defined in the GROUP BY
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.29
|
@@ -237,25 +237,19 @@ SQL
|
|
237
237
|
end
|
238
238
|
|
239
239
|
def normalize_group_by!(options)
|
240
|
-
normalize_select = false
|
241
|
-
|
242
240
|
options[:group_by].collect! do |x|
|
243
241
|
if x.match(/^(.*?) AS (\w+)$/)
|
244
242
|
if options[:select].any?{|x| x.include?("#{$1} AS ")}
|
245
243
|
$1
|
246
244
|
else
|
247
245
|
options[:select] << x
|
248
|
-
|
246
|
+
options[:aliases][$1] = $2
|
249
247
|
$2
|
250
248
|
end
|
251
249
|
else
|
252
250
|
x
|
253
251
|
end
|
254
252
|
end if options[:group_by]
|
255
|
-
|
256
|
-
if normalize_select
|
257
|
-
normalize_select!(options)
|
258
|
-
end
|
259
253
|
end
|
260
254
|
|
261
255
|
def normalize_where!(options)
|
@@ -276,10 +270,7 @@ SQL
|
|
276
270
|
options[:aggregated].merge!(opts[:aggregated])
|
277
271
|
false
|
278
272
|
else
|
279
|
-
!(
|
280
|
-
(aliases[path] || path).match(/\b(count|sum|min|max|avg)\(/i) ||
|
281
|
-
aliases.include?(path)
|
282
|
-
)
|
273
|
+
!(aliases.include?(path) || path.match(/\b(count|sum|min|max|avg)\(/i))
|
283
274
|
end
|
284
275
|
end
|
285
276
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: directiverecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Engel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|