niceql 0.1.22 → 0.1.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/niceql.rb +3 -3
- data/lib/niceql/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: 1dfcafe0d0be8d92b64b06342910568796ddc264a914a930e8bd183ace83f1e9
|
4
|
+
data.tar.gz: 19b896ec5e2e36c637f3bd7cff237cfff26581c211702d640e7fcd5a782832a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e801df8dd07905db21ff697b7961a10d80a67895ad1f5cf991e68f11e24fc1942fa9d7a196a3a9a30cb4b992d002a38daef19deb1e235c7f5baeadd72e167065
|
7
|
+
data.tar.gz: 3b4e129aa6a0b49178c809239feb346a454e50da6cd8d930a4b465b16a29078ae23df99d14c9b90536671c3475af9e31f3f24de7535626ac4919f03bbe4cddd3
|
data/CHANGELOG.md
CHANGED
data/lib/niceql.rb
CHANGED
@@ -35,7 +35,7 @@ module Niceql
|
|
35
35
|
|
36
36
|
module Prettifier
|
37
37
|
INLINE_VERBS = %w(WITH ASC (IN\s) COALESCE AS WHEN THEN ELSE END AND UNION ALL ON DISTINCT INTERSECT EXCEPT EXISTS NOT COUNT ROUND CAST).join('| ')
|
38
|
-
NEW_LINE_VERBS = 'SELECT|FROM|WHERE|CASE|ORDER BY|LIMIT|GROUP BY|(RIGHT |LEFT )*(INNER |OUTER )*JOIN
|
38
|
+
NEW_LINE_VERBS = 'SELECT|FROM|WHERE|CASE|ORDER BY|LIMIT|GROUP BY|(RIGHT |LEFT )*(INNER |OUTER )*JOIN( LATERAL)*|HAVING|OFFSET|UPDATE'
|
39
39
|
POSSIBLE_INLINER = /(ORDER BY|CASE)/
|
40
40
|
VERBS = "#{NEW_LINE_VERBS}|#{INLINE_VERBS}"
|
41
41
|
STRINGS = /("[^"]+")|('[^']+')/
|
@@ -229,7 +229,7 @@ module Niceql
|
|
229
229
|
|
230
230
|
module ErrorExt
|
231
231
|
def to_s
|
232
|
-
if Niceql.config.prettify_pg_errors && ActiveRecord::Base.
|
232
|
+
if Niceql.config.prettify_pg_errors && ActiveRecord::Base.connection_config['adapter'] == 'postgresql'
|
233
233
|
Prettifier.prettify_err(super)
|
234
234
|
else
|
235
235
|
super
|
@@ -250,7 +250,7 @@ module Niceql
|
|
250
250
|
self.indentation_base = 2
|
251
251
|
self.open_bracket_is_newliner = false
|
252
252
|
self.prettify_active_record_log_output = false
|
253
|
-
self.prettify_pg_errors = defined? ::ActiveRecord::Base && ActiveRecord::Base.
|
253
|
+
self.prettify_pg_errors = defined? ::ActiveRecord::Base && ActiveRecord::Base.connection_config['adapter'] == 'postgresql'
|
254
254
|
end
|
255
255
|
end
|
256
256
|
|
data/lib/niceql/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: niceql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alekseyl
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|