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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '00878f2e4f4b73c65e00aa20314193a4cd6626ff1cd43aa41d28aba5ccaa3d2f'
4
- data.tar.gz: 48a868434abfc2aad3da5b5d40e74fca0763a0b712e43f4a606b0d8401329ac4
3
+ metadata.gz: e3897b303ad7bfbcd8e892ae599ece87b6124af5e8fbe497e961d320a2f71375
4
+ data.tar.gz: 8ce1ca1561b98fa9763811d0d4ba719bb5310c691494857ae430daa0779a632b
5
5
  SHA512:
6
- metadata.gz: 9d25ce207be807b6b73d97df610a4a2a52ec442a2b3505709000ee551c9ccafc0a8131e05fc4f9320c6230d644137615fad2ca5138ce5d88590d9fa6f7400bf6
7
- data.tar.gz: bc007f60d567966b17fae84e6b5b5275b39a8f6dde1e25ab2f7302a241f16cbf8397f10ab1ad365adacba6e60355f311c6b234dbff19b76f9f038dc10c919505
6
+ metadata.gz: 95839fd2df00baf38ba432b05c8c61a9baf067edc193d00e4b7808a8bd4ee15168971d435943ffda04326ea4bec6ab4af324c7135eea2fa5f426d0ecdb357038
7
+ data.tar.gz: b7c0be1a8ef4b394543edb0ef80b0103d224b1aa47462a17b81c83e0449e47bd419878805fbcd3de3c53d83c68fc171527aae8e70d27840edfa6705afe1325e7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mini_sql (0.1.3)
4
+ mini_sql (0.1.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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
@@ -1,3 +1,3 @@
1
1
  module MiniSql
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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.3
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-18 00:00:00.000000000 Z
11
+ date: 2018-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler