fast_count 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/fast_count/extensions.rb +4 -0
- data/lib/fast_count/version.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: 7b13d77aeaaa7eccb6e556661aa157c0116925cb176aede5aeb35ef07e047c93
|
4
|
+
data.tar.gz: 967179160b1af55eae2f2898a2626be8ad46e914fc6c311e792f8af438c4481d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7b2b3069004e30077649ae0dc5e9547ae69d8115180b3005560fa676c3c9ab8b81c70ee03817f44b8e7944e2a34c484bd4d748c517a5951bba88def7f6a27f5
|
7
|
+
data.tar.gz: 0f76f37f959cd2c60f57bd5d9f43b40694a6e3d7a022b39b2e33fc9bce4c7389c6b37117e05e80681f97cebb028eb596643cc8a771893104f196cc1b41962634
|
data/CHANGELOG.md
CHANGED
@@ -31,6 +31,10 @@ module FastCount
|
|
31
31
|
# User.fast_distinct_count(column: :company_id)
|
32
32
|
#
|
33
33
|
def fast_distinct_count(column:)
|
34
|
+
if column.to_s == primary_key
|
35
|
+
raise "Use `#fast_count` when counting primary keys."
|
36
|
+
end
|
37
|
+
|
34
38
|
adapter = Adapters.for_connection(connection)
|
35
39
|
adapter.fast_distinct_count(table_name, column)
|
36
40
|
end
|
data/lib/fast_count/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fast_count
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fatkodima
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-08-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0'
|
68
68
|
requirements: []
|
69
|
-
rubygems_version: 3.4.
|
69
|
+
rubygems_version: 3.4.19
|
70
70
|
signing_key:
|
71
71
|
specification_version: 4
|
72
72
|
summary: Quickly get a count estimation for large tables.
|