activerecord-analyze 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/activerecord-analyze/main.rb +9 -7
- data/lib/activerecord-analyze/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09f3c691a676a55f45059cbfd0e12161e42f7ab87acdc834c1f496a2ceae1c1f'
|
4
|
+
data.tar.gz: c83a3d1bb42bdbbb82ca80f00acc55d420de1c7589660f8fd72f103f19aca0c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96e5ba8e107b9d005f59e6ffe3ff0925b872c753b51ef9deee505919d415e3165a67d5bfe1cffa6f29dbd34eb6726e65f93f14d52389bcdd736edc636c25d0e5
|
7
|
+
data.tar.gz: 957325a0f295e28c76689b504a92a4d0aa636965f6a71326004c3662256aef769ca24bf75bd81a823d2fd3281b9f49d805e0a63dedda3bc5c392f7790cfd0cde
|
@@ -6,17 +6,19 @@ module ActiveRecord
|
|
6
6
|
format_sql = if fmt = opts[:format].presence
|
7
7
|
case fmt
|
8
8
|
when :json
|
9
|
-
"FORMAT JSON,"
|
9
|
+
"FORMAT JSON, "
|
10
10
|
when :hash
|
11
|
-
"FORMAT JSON,"
|
11
|
+
"FORMAT JSON, "
|
12
12
|
when :pretty_json
|
13
|
-
"FORMAT JSON,"
|
13
|
+
"FORMAT JSON, "
|
14
14
|
when :yaml
|
15
|
-
"FORMAT YAML,"
|
15
|
+
"FORMAT YAML, "
|
16
16
|
when :text
|
17
|
-
"FORMAT TEXT,"
|
17
|
+
"FORMAT TEXT, "
|
18
18
|
when :xml
|
19
|
-
"FORMAT XML,"
|
19
|
+
"FORMAT XML, "
|
20
|
+
else
|
21
|
+
""
|
20
22
|
end
|
21
23
|
end
|
22
24
|
|
@@ -50,7 +52,7 @@ module ActiveRecord
|
|
50
52
|
"ANALYZE"
|
51
53
|
end
|
52
54
|
|
53
|
-
opts_sql = "(#{format_sql}
|
55
|
+
opts_sql = "(#{format_sql}#{analyze_sql}#{verbose_sql}#{costs_sql}#{settings_sql}#{buffers_sql}#{timing_sql}#{summary_sql})"
|
54
56
|
.strip.gsub(/\s+/, " ")
|
55
57
|
.gsub(/\(\s?\s?\s?,/, "(")
|
56
58
|
.gsub(/\s,\s/, " ")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-analyze
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawurb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|