simple-sql 0.2.4 → 0.2.5

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
  SHA1:
3
- metadata.gz: a5270d094e23d8a741261e52ea988e374eebce20
4
- data.tar.gz: fe1e8d720d9ba38ef2624659604489e80be6d43d
3
+ metadata.gz: 5cf881401ca767b7857ef63d6d04e9ce2e62185e
4
+ data.tar.gz: 875aa241218c6bb2c0fd6a1b6c00d55f602d30f8
5
5
  SHA512:
6
- metadata.gz: 77e35bc50ffd15f6b3be34b0f26324d0459175e885b98be98117ba1d99281115a1c8fb23d45bef9522683dfd0f6e2bc5c7136ee548ee00351182a4fff6759ba0
7
- data.tar.gz: 59be29865d6a0e133d27724c2a81ad8340e4f839157be9969ab9139f3540fdeefa06881fb735ce417b5985f451014515356242eb2592b42a0b2c8702bf07d60f
6
+ metadata.gz: 64cf973e6c9878b5a55bb8fb7ffeb00e4fe888bd3dc59afa94ecf891243b99d90ef0f24a610406c2abcfc4f1fad6cfd5d2746380e4f7dd1d9e7de66f9f2725d9
7
+ data.tar.gz: d5a1602a9ed6b52f3a291ffacc0a2cbad045757856e983d5c8bced572eae95a198f139779ecfa97a7dcc406cb09e7f644bca5a588849e76ca72a6edb7e63b668
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple-sql (0.2.4)
4
+ simple-sql (0.2.5)
5
5
  pg (~> 0.20)
6
6
  pg_array_parser (~> 0)
7
7
 
data/README.md CHANGED
@@ -122,6 +122,13 @@ transactions, so you might be able to rollback from inside a nested transaction)
122
122
 
123
123
  When connecting via `Simple::SQL.connect!` we do not support the same level of nesting support (yet). You can still nest transactions, but raising an error terminates *all* current transactions.
124
124
 
125
+ ## Logging
126
+
127
+ `simple-sql` builds a logger which logs all queries. The logger, by default, is
128
+ created to write to STDERR; to get another logger use code like
129
+
130
+ Simple::SQL.logger = Rails.logger
131
+
125
132
  ## Bugs and Limitations
126
133
 
127
134
  ### 1. Multiple connections
data/lib/simple/sql.rb CHANGED
@@ -88,7 +88,7 @@ module Simple
88
88
  end
89
89
 
90
90
  extend Forwardable
91
- delegate :transaction => :connection
91
+ delegate [:transaction, :wait_for_notify] => :connection
92
92
 
93
93
  private
94
94
 
@@ -16,7 +16,7 @@ module Simple::SQL::Connection
16
16
  end
17
17
 
18
18
  extend Forwardable
19
- delegate %w(exec_params exec escape) => :@raw_connection
19
+ delegate %w(exec_params exec escape wait_for_notify) => :@raw_connection
20
20
 
21
21
  def transaction(&block)
22
22
  raise ArgumentError, "Implementation missing for #transaction"
@@ -25,6 +25,7 @@ module Simple::SQL::Decoder
25
25
  when :integer then Integer(s)
26
26
  when :bigint then Integer(s)
27
27
  when :numeric then Float(s)
28
+ when :"double precision" then Float(s)
28
29
  when :'integer[]' then s.scan(/-?\d+/).map { |part| Integer(part) }
29
30
  when :"character varying[]" then parse_pg_array(s)
30
31
  when :"text[]" then parse_pg_array(s)
@@ -1,5 +1,5 @@
1
1
  module Simple
2
2
  module SQL
3
- VERSION = "0.2.4"
3
+ VERSION = "0.2.5"
4
4
  end
5
5
  end
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.2.4
4
+ version: 0.2.5
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: 2018-01-31 00:00:00.000000000 Z
12
+ date: 2018-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pg_array_parser