slyce 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/slyce +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86b46697d15f638424f3369939a12f962a5daa1a9614bb1cf98cb34c8b8d2519
|
4
|
+
data.tar.gz: 9361896529ecaf43baef50da66e2cf41600cc42a110b3af5b97bc53e81270ef5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4bd3c648d559ee5f0d7395c09e0836f3d309a1a99729f9d5fdd0d1441ccd8954dc0275e13b0de35d471a51f3c7b64bcfefa6cf0120c53a3ad2b9eef92e09d76
|
7
|
+
data.tar.gz: f2100f83caa2d1b116b0cc934841ce450208dc38dcf370242a788b563feb6ac84a4499e24a691e210425eca4c7102daaa1f4a45833e05617120b9de7b9d41cdf
|
data/bin/slyce
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
STDOUT.sync = true
|
4
4
|
|
5
|
-
VERSION="0.5.
|
5
|
+
VERSION="0.5.2"
|
6
6
|
|
7
7
|
require "bundler/setup"
|
8
8
|
require "mysql2"
|
@@ -42,6 +42,7 @@ end
|
|
42
42
|
|
43
43
|
def display(name, data, show, uniq, tots)
|
44
44
|
seen = data.inject(0) {|seen, coun| seen += coun[0] }
|
45
|
+
rows = [data.size, seen].min
|
45
46
|
wide = tots.to_s.size
|
46
47
|
fill = " " * wide
|
47
48
|
line = "=" * name.size
|
@@ -49,7 +50,7 @@ def display(name, data, show, uniq, tots)
|
|
49
50
|
puts "\n#{fill} #{name}\n#{fill} #{line}\n"
|
50
51
|
data.each {|cnt, val| puts "%*d %s" % [wide, cnt, val || "NULL"] }
|
51
52
|
puts "#{fill} -----\n"
|
52
|
-
puts "%*d shown (top #{
|
53
|
+
puts "%*d shown (top #{rows})" % [wide, rows] if show
|
53
54
|
puts "%*d total (all #{uniq})" % [wide, tots]
|
54
55
|
end
|
55
56
|
|
@@ -82,7 +83,7 @@ keep.each do |name|
|
|
82
83
|
|
83
84
|
uniq = conn.query(<<~"").to_a[0][0]
|
84
85
|
select
|
85
|
-
count(distinct(`#{name}
|
86
|
+
count(distinct(ifnull(`#{name}`,0)))
|
86
87
|
from
|
87
88
|
`#{tabl}`
|
88
89
|
|