simple-sql 0.5.35 → 0.5.36

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: 0b6a39a5150718d4ebd5526cdd8b0647e9740c2665b773eb09d7fb628635b61d
4
- data.tar.gz: 23a1ca7c2f038d6a54de9c8d2ce57cf8c36449cf9e51cc707247f1198244031a
3
+ metadata.gz: a5185777df8efad3d0d17334a70d30b35551f4abd7adf0fded3549dd2d1b1325
4
+ data.tar.gz: e34ee800440259bfbe8ef88f9f70fb1675dee4a91e441c162a8bdc6313e5d88f
5
5
  SHA512:
6
- metadata.gz: ee190d57adc21f5db218a2898740d1dbb43139621873bce77c1d31a9432b158a4ef9cefbd03f41b7b834a537faa6d96d258a9e7fa35df49ced1711a2a18d8359
7
- data.tar.gz: d88531b52001784cf314c41ee7b993d496a552d6c3e47617ff56a0e758f7dd4ea7241a7b1e449c4678af202bcf7192b71f8a2c031cb06b929327d96e4b9d4941
6
+ metadata.gz: 9b03b9f204d9bd0e87e0c349f1f2ab962bc94101f14ab33cb2522c0287861e801ddca3cd98e97f4317716df7a07a054f6acf26837309f18bc14b8a50f95eac4a
7
+ data.tar.gz: 5eb4fe4c83ca847aef2263251b56f95b3ea450c15abc1e8289ed92bbcaaaa5d5d8a3683814c009c2dd4928d679a4072d10717a616e3cbac2978d59f2d2f453e8
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.35
1
+ 0.5.36
@@ -49,8 +49,12 @@ class Simple::SQL::Connection::Scope
49
49
  end
50
50
 
51
51
  def count_by_estimate(sql_fragment)
52
- sql = order_by(nil).to_sql(pagination: false)
52
+ return count_by(sql_fragment)
53
+
54
+ # The code below runs an estimate on the effort to count by a group. This is currently
55
+ # disabled (see https://issues.mediafellows.com/issues/75237).
53
56
 
57
+ sql = order_by(nil).to_sql(pagination: false)
54
58
  cost = @connection.estimate_cost "SELECT COUNT(*) FROM (#{sql}) sq GROUP BY #{sql_fragment}", *args
55
59
 
56
60
  return count_by(sql_fragment) if cost < 10_000
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.35
4
+ version: 0.5.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - radiospiel
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-03-18 00:00:00.000000000 Z
12
+ date: 2021-04-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pg_array_parser