mini_sql 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/mini_sql/connection.rb +10 -0
- data/lib/mini_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: e3897b303ad7bfbcd8e892ae599ece87b6124af5e8fbe497e961d320a2f71375
|
4
|
+
data.tar.gz: 8ce1ca1561b98fa9763811d0d4ba719bb5310c691494857ae430daa0779a632b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95839fd2df00baf38ba432b05c8c61a9baf067edc193d00e4b7808a8bd4ee15168971d435943ffda04326ea4bec6ab4af324c7135eea2fa5f426d0ecdb357038
|
7
|
+
data.tar.gz: b7c0be1a8ef4b394543edb0ef80b0103d224b1aa47462a17b81c83e0449e47bd419878805fbcd3de3c53d83c68fc171527aae8e70d27840edfa6705afe1325e7
|
data/Gemfile.lock
CHANGED
data/lib/mini_sql/connection.rb
CHANGED
@@ -14,6 +14,8 @@ module MiniSql
|
|
14
14
|
map = PG::BasicTypeMapForResults.new(conn)
|
15
15
|
map.add_coder(MiniSql::Coders::NumericCoder.new(name: "numeric", oid: 1700, format: 0))
|
16
16
|
map.add_coder(MiniSql::Coders::IPAddrCoder.new(name: "inet", oid: 869, format: 0))
|
17
|
+
map.add_coder(MiniSql::Coders::IPAddrCoder.new(name: "cidr", oid: 650, format: 0))
|
18
|
+
map.add_coder(PG::TextDecoder::String.new(name: "tsvector", oid: 3614, format: 0))
|
17
19
|
end
|
18
20
|
end
|
19
21
|
|
@@ -74,6 +76,14 @@ module MiniSql
|
|
74
76
|
result.clear if result
|
75
77
|
end
|
76
78
|
|
79
|
+
def query_hash(sql, *params)
|
80
|
+
result = run(sql, params)
|
81
|
+
result.type_map = @type_map
|
82
|
+
result.to_a
|
83
|
+
ensure
|
84
|
+
result.clear
|
85
|
+
end
|
86
|
+
|
77
87
|
def build(sql)
|
78
88
|
Builder.new(self, sql)
|
79
89
|
end
|
data/lib/mini_sql/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mini_sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|