querier 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/querier.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de1729ce8cc885a52a8a5892e79d2a4e4008b48d95d5a821c2f985bc5925abf9
|
4
|
+
data.tar.gz: 0db5814a6b46ecd4d73f766763d1f82347c2fecf3075c0f1c3218d6870b4cfa9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3384fe46ceb0cbfbd19e15caa51d4e8bb14e77e2565d4db001f773d6fb2d8ac1a88f53ede1527f150ae3d916a50d41e7ac7aed789ca59f72b58a9f0f1871c8f
|
7
|
+
data.tar.gz: 343e400b47d07e0e8e55be4b025fbca6c3e672e01ece56ab3bd6c13061eb9e1597d27dfe70c36ebeb17904efcc2676a4ee7f90ffc921f1f63b9799755f5af88d
|
data/README.md
CHANGED
data/lib/querier.rb
CHANGED
@@ -50,7 +50,7 @@ class Querier
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def field_group_and_count(field_name:, sort_element_index: nil, reverse_sort: true)
|
53
|
-
count_result =
|
53
|
+
count_result = cached_result(format: :open_struct).group_by(&field_name).map { |k, v| [k, v.count] }
|
54
54
|
|
55
55
|
unless sort_element_index.nil?
|
56
56
|
count_result = count_result.sort_by { |el| el[sort_element_index] }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: querier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gedean Dias
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Active Record queries with variable number of params
|
14
14
|
email: gedean.dias@gmail.com
|
@@ -37,7 +37,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
37
37
|
- !ruby/object:Gem::Version
|
38
38
|
version: '0'
|
39
39
|
requirements: []
|
40
|
-
rubygems_version: 3.2.
|
40
|
+
rubygems_version: 3.2.25
|
41
41
|
signing_key:
|
42
42
|
specification_version: 4
|
43
43
|
summary: Active Record Querier
|