quick_count 0.1.2.pre.1 → 0.1.2.pre.2

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: 065e672ffe033dc29178202180bd92aa49392f2f4e7adac035df5fa3610f9f11
4
- data.tar.gz: e6899dfe52b32fefc5ca800491ddc367736662da824e57c8c4dd7d2eb9282e64
3
+ metadata.gz: 438a66bd87229dd94820af384fc47b94ebc75d1648eec942aa0c9d840810cd2c
4
+ data.tar.gz: 9f89c4f42d931cab0ef6b84539f7850a2f0f36ddb373ea0d1d363cbd331392a2
5
5
  SHA512:
6
- metadata.gz: 68e5ba2385e63a7871cbbf1fb5b00106ec8e7b39dd4d3523504caeb06b1183d81d86e1e4cae4a2ce923bc680a3e0bc0759d0d602ff36c32de96f6d4773c85f46
7
- data.tar.gz: f3027961d2bbcfc2ab37ebbe5be729603dbd585f7511fb741f26f32213c27cfa7cdc64d8816469fde2f69686ae6a4ce94a7513aa0d57055ed4e60d14a51d2f94
6
+ metadata.gz: 6d8f36f586cc38b6637f0254dd306c586bb58216ea5dfa908d0572803a0ebd636fe40fad06d0bae6114f22c90c0472af79fcbc74177749010621530ed2c35cfa
7
+ data.tar.gz: 775faee06a5eac39fa5d311633dcd7ae263ec5396fa668f5bb0ae1f69d6006524481a5d6609625fc7ac4556943864f00988c1a07572eba0dce13b462996bb567
@@ -1,3 +1,3 @@
1
1
  module QuickCount
2
- VERSION = "0.1.2-1"
2
+ VERSION = "0.1.2-2"
3
3
  end
data/lib/quick_count.rb CHANGED
@@ -13,15 +13,15 @@ module QuickCount
13
13
  ::ActiveRecord::Relation.send :include, CountEstimate::ActiveRecord
14
14
  end
15
15
 
16
- def self.install(threshold: 500000, schema: 'public')
17
- ::ActiveRecord::Base.connection.execute(quick_count_sql(schema: schema, threshold: threshold))
18
- ::ActiveRecord::Base.connection.execute(count_estimate_sql(schema: schema))
16
+ def self.install(threshold: 500000, schema: 'public', connection: ::ActiveRecord::Base.connection)
17
+ connection.execute(quick_count_sql(schema: schema, threshold: threshold))
18
+ connection.execute(count_estimate_sql(schema: schema))
19
19
  end
20
20
 
21
- def self.uninstall(schema: 'public')
22
- ::ActiveRecord::Base.connection.execute("DROP FUNCTION IF EXISTS #{schema}.quick_count(text, bigint);")
23
- ::ActiveRecord::Base.connection.execute("DROP FUNCTION IF EXISTS #{schema}.quick_count(text);")
24
- ::ActiveRecord::Base.connection.execute("DROP FUNCTION IF EXISTS #{schema}.count_estimate(text);")
21
+ def self.uninstall(schema: 'public', connection: ::ActiveRecord::Base.connection)
22
+ connection.execute("DROP FUNCTION IF EXISTS #{schema}.quick_count(text, bigint);")
23
+ connection.execute("DROP FUNCTION IF EXISTS #{schema}.quick_count(text);")
24
+ connection.execute("DROP FUNCTION IF EXISTS #{schema}.count_estimate(text);")
25
25
  end
26
26
 
27
27
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quick_count
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.pre.1
4
+ version: 0.1.2.pre.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Stevens
@@ -157,8 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  - !ruby/object:Gem::Version
158
158
  version: 1.3.1
159
159
  requirements: []
160
- rubyforge_project:
161
- rubygems_version: 2.7.6.2
160
+ rubygems_version: 3.1.2
162
161
  signing_key:
163
162
  specification_version: 4
164
163
  summary: Quickly get an accurate count estimation for large tables.