simple-sql 0.4.30 → 0.4.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple/sql/formatting.rb +3 -1
- data/lib/simple/sql/reflection.rb +5 -1
- data/lib/simple/sql/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: f10fbb016a81d94094c3429a8b553b0da428f40d509b96e523eb1ac79982fdbb
|
4
|
+
data.tar.gz: 1b691b4e59e0c7d34d5912dacf80c58240bb0ce3733e78741f5e932f8f1409c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d33441657dc0cf4565bb313045949ead6d5b1dd22c14058fe10558b48b83a12c6e0dcdac5991c4859c43ab553f9e6e3d4b9dfc9ef1ac5358dbabbd04cc90513
|
7
|
+
data.tar.gz: 14965623e2f4541e3862b950ce4b6439c2a219ac7be9ffe3b720cc3f73d09a9c5629908e29b85a8860835d7c21ca641b618d4f1aece8f1704391b62a47262933
|
@@ -3,6 +3,8 @@ module Simple
|
|
3
3
|
module Formatting
|
4
4
|
extend self
|
5
5
|
|
6
|
+
MAX_LENGTH = 500
|
7
|
+
|
6
8
|
def format(sql, *args)
|
7
9
|
sql = format_sql(sql)
|
8
10
|
|
@@ -10,7 +12,7 @@ module Simple
|
|
10
12
|
|
11
13
|
args = args.map(&:inspect).join(", ")
|
12
14
|
sql += " w/args: #{args}"
|
13
|
-
sql = sql[0,
|
15
|
+
sql = sql[0, (MAX_LENGTH - 3)] + "..." if sql.length > MAX_LENGTH
|
14
16
|
sql
|
15
17
|
end
|
16
18
|
|
@@ -83,8 +83,12 @@ module Simple
|
|
83
83
|
|
84
84
|
public
|
85
85
|
|
86
|
+
def looked_up_pg_classes
|
87
|
+
@looked_up_pg_classes ||= Hash.new { |hsh, key| hsh[key] = _lookup_pg_class(key) }
|
88
|
+
end
|
89
|
+
|
86
90
|
def lookup_pg_class(oid)
|
87
|
-
|
91
|
+
looked_up_pg_classes[oid]
|
88
92
|
end
|
89
93
|
|
90
94
|
private
|
data/lib/simple/sql/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- radiospiel
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-01-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pg_array_parser
|