query_reviewer 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/query_reviewer/mysql_adapter_extensions.rb +8 -4
- metadata +8 -7
- checksums.yaml +0 -7
@@ -17,14 +17,18 @@ module QueryReviewer
|
|
17
17
|
result
|
18
18
|
end
|
19
19
|
|
20
|
-
def insert_with_review(
|
21
|
-
|
20
|
+
def insert_with_review(arg1, *otherargs)
|
21
|
+
# arg1 is sql for rails 3.0 & 3.1, arel for newer versions
|
22
|
+
|
23
|
+
rails30 = Rails::VERSION::MAJOR == 3 && [0,1].include?(Rails::VERSION::MINOR)
|
24
|
+
sql = arg1 if rails30
|
25
|
+
bind_params = otherargs[4] || [] unless rails30
|
22
26
|
|
23
27
|
t1 = Time.now
|
24
|
-
result = insert_without_review(
|
28
|
+
result = insert_without_review(arg1, *otherargs)
|
25
29
|
t2 = Time.now
|
26
30
|
|
27
|
-
sql = to_sql(
|
31
|
+
sql = to_sql(arg1, bind_params) unless rails30
|
28
32
|
create_or_add_query_to_query_reviewer!(sql, nil, t2 - t1, nil, "INSERT")
|
29
33
|
|
30
34
|
result
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: query_reviewer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- dsboulder, nesquena
|
@@ -51,27 +52,27 @@ files:
|
|
51
52
|
homepage: https://github.com/nesquena/query_reviewer
|
52
53
|
licenses:
|
53
54
|
- MIT
|
54
|
-
metadata: {}
|
55
55
|
post_install_message:
|
56
56
|
rdoc_options: []
|
57
57
|
require_paths:
|
58
58
|
- lib
|
59
59
|
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
none: false
|
60
61
|
requirements:
|
61
|
-
- - '>='
|
62
|
+
- - ! '>='
|
62
63
|
- !ruby/object:Gem::Version
|
63
64
|
version: '0'
|
64
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
65
67
|
requirements:
|
66
|
-
- - '>='
|
68
|
+
- - ! '>='
|
67
69
|
- !ruby/object:Gem::Version
|
68
70
|
version: '0'
|
69
71
|
requirements: []
|
70
72
|
rubyforge_project:
|
71
|
-
rubygems_version:
|
73
|
+
rubygems_version: 1.8.25
|
72
74
|
signing_key:
|
73
|
-
specification_version:
|
75
|
+
specification_version: 3
|
74
76
|
summary: Runs explain before each select query and displays results in an overlayed
|
75
77
|
div
|
76
78
|
test_files: []
|
77
|
-
has_rdoc:
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: db2bd2cc8799878cc6bbe81bfa33b94b6a996a11
|
4
|
-
data.tar.gz: a0ecf4b731cc62a2d144409e91a79169be15ea55
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: ac85b1a1314434076462ba5bd39875a0996c08e15ceb5d6f8ee457f76dc1c5f01b1196e03e7a6332fac310ba1bf54cf425aafd6db267d509bb63d9bb098d42a9
|
7
|
-
data.tar.gz: a3bb9fedc76ffeed1171a1a7069c749b08b4cc1452454661c044e00cce6ac3b6ff355be232ba6ba4e1d50501f60ddcb66ef415fa101e480cca7441f6d5dfd5b9
|