niceql 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/niceql/version.rb +1 -1
- data/lib/niceql.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ae74ab563688b94a264e8c45e2a3e5c3dece293
|
4
|
+
data.tar.gz: 0e5a2483d97b90b1e70b08111c4147a9fb0fd7ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 770ae4357fac9c7e89ac576310ae6ee27fb2253d68b38de97d3c5056b8ca20f1a57c8922e99d3811b0d1bc2175dd19b9334424e3f96a15115b6de35715ec2be3
|
7
|
+
data.tar.gz: 6120635b333b050f4ea1f4bd2a7942bcb97a3f569ca4d78c3eb9cc016cd50b7f11d91c1c9c6f44b3eee5639c3bf7898365cb476097d9232fda06afbc6e792ae8
|
data/README.md
CHANGED
@@ -59,7 +59,7 @@ Or install it yourself as:
|
|
59
59
|
#=> FROM ( VALUES(1), (2) ) AS tmp
|
60
60
|
|
61
61
|
# rails combines err with query, so don't forget to do it yourself
|
62
|
-
# to get real nice result you should execute on your DB
|
62
|
+
# to get real nice result you should executeprettified version (i.e. execute( prettified_sql ) !) of query on your DB!
|
63
63
|
# otherwise you will not get such a nice output
|
64
64
|
|
65
65
|
puts Niceql::Prettifier.prettify_pg_err(<<-ERR )
|
data/lib/niceql/version.rb
CHANGED
data/lib/niceql.rb
CHANGED
@@ -52,7 +52,7 @@ module Niceql
|
|
52
52
|
|
53
53
|
def self.prettify_pg_err(err)
|
54
54
|
err_line_num = err[/LINE \d+/][5..-1].to_i
|
55
|
-
start_sql_line = err.lines[3][/HINT/] ? 4 : 3
|
55
|
+
start_sql_line = err.lines[3][/HINT|DETAIL/] ? 4 : 3
|
56
56
|
err_body = err.lines[start_sql_line..-1]
|
57
57
|
err_line = StringColorize.colorize_err( err_body[err_line_num-1] )
|
58
58
|
|