clickhouse-activerecord 0.3.11 → 0.3.12

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: 03776772df850312a0cb6994a9797aee37fdf537eb8839d53e358fe78924b844
4
- data.tar.gz: b97fce3acd8c2f8b06cc50bd262c96db6d7355ff1317d4cab5e6271999f38098
3
+ metadata.gz: 50dff8ae7219e2f3a04ee530331d19ca0b61396437723819891c1d8b41f0692d
4
+ data.tar.gz: 75d50e8e2f32fa84f990bc15da6177082b7a0b0d5a508cba822b3c3afbc60c41
5
5
  SHA512:
6
- metadata.gz: '0580fd619a922e91c09173d86c9a207a334d66e88d3876da2838f6ea7e3db92925b289591f8b15cb624ff7f7e5098aa9790c26f7a6ff475b537f2efd27b79fb7'
7
- data.tar.gz: 6dc95a06b6b0a079985b9863d41a5f1611ad479dd922449d7a612ec757b513b568d570c9272b80428398934aa958b5eecfb5c43ee4432667d5b938b5338e0319
6
+ metadata.gz: ebdeb04ba96eb81eb76efdbd09580b51719656136de38b973cea267bc1405dba03cd417058df1909b9bd1e4279c97d845292947de251792f94fc9f0b30cf65cb
7
+ data.tar.gz: 3a0b0feda885ab74f54f6d61b78ff02efed20d403b0bc4bff99b83ee811d4988e8620c92a84e549bc70e0ccb93c662e665a562bb51d49b5ed552bc850c076696
@@ -17,6 +17,8 @@ module ActiveRecord
17
17
  def exec_query(sql, name = nil, binds = [], prepare: false)
18
18
  result = do_execute(sql, name)
19
19
  ActiveRecord::Result.new(result['meta'].map { |m| m['name'] }, result['data'])
20
+ rescue StandartError => _e
21
+ raise ActiveRecord::ActiveRecordError, "Response: #{result}"
20
22
  end
21
23
 
22
24
  def exec_update(_sql, _name = nil, _binds = [])
@@ -79,6 +81,8 @@ module ActiveRecord
79
81
  raise ActiveRecord::ActiveRecordError,
80
82
  "Response code: #{res.code}:\n#{res.body}"
81
83
  end
84
+ rescue JSON::ParserError
85
+ res.body
82
86
  end
83
87
 
84
88
  def log_with_debug(sql, name = nil)
@@ -1,3 +1,3 @@
1
1
  module ClickhouseActiverecord
2
- VERSION = '0.3.11'
2
+ VERSION = '0.3.12'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clickhouse-activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.11
4
+ version: 0.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Odintsov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-17 00:00:00.000000000 Z
11
+ date: 2020-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler