clickhouse-activerecord 0.5.10 → 0.5.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: e172255ef4610b0db49f84dea36cdd85951fc4ea596f1cbe7b63c62e9c9b2633
4
- data.tar.gz: ec85d89e0274006250466bd8a96654d30eb6614512c4d0d0bee80dcf08285a20
3
+ metadata.gz: 324c3a376214e1c201b3f5dd052c971a1eb7330033960db2eb10a2671f13d187
4
+ data.tar.gz: 36f71acd4ef651b78d23771f1620b488e0f963576af8ef11890b7c0d83d8c1c2
5
5
  SHA512:
6
- metadata.gz: 5130aef7dc279582f73ca91fbd0be7f80cf7200d241b17ab747e356762a9a21d5060f2f10995762a29ba5c46942bda17643937a7f849b28da58214998e85462d
7
- data.tar.gz: '00096694c1b25b72e1f45c1f0160714eceb0c1f0c101206a9e4bc0cb4abadc825c24665f68ad4bcc7950b07553ffbceaa809830df5b35c7c3043ae9acb969ce6'
6
+ metadata.gz: a1f13b9879af1ca6ef2d6a8dcce1ceb09a4b342659ae4cf7389d47ec41e7b608000f2d1810503996dafa38a3ff84bee901d8d0ec8c413e3086ac99d71c8f5618
7
+ data.tar.gz: 43ccc8f02a079bf62569bf0977f1ff45306166a61d30feaa817ddd253732a0426728e9926adeb36c31fcae807ff4b26e969de8b2fe8154952cbd8656e29f3f8d
data/CHANGELOG.md CHANGED
@@ -1,6 +1,8 @@
1
- ### Version 0.5.8 (Oct 25, 2021)
1
+ ### Version 0.5.10 (Jun 22, 2022)
2
2
 
3
- * Added support rails 7
3
+ * Fixes to create_table method (#70)
4
+ * Added support for rails 7 (#65)
5
+ * Use ClickHouse default KeepAlive timeout of 10 seconds (#67)
4
6
 
5
7
  ### Version 0.5.6 (Oct 25, 2021)
6
8
 
@@ -6,8 +6,8 @@ module ActiveRecord
6
6
  module ConnectionAdapters
7
7
  module Clickhouse
8
8
  module SchemaStatements
9
- def execute(sql, name = nil)
10
- do_execute(sql, name)
9
+ def execute(sql, name = nil, settings: {})
10
+ do_execute(sql, name, settings: settings)
11
11
  end
12
12
 
13
13
  def exec_insert(sql, name, _binds, _pk = nil, _sequence_name = nil)
@@ -383,7 +383,13 @@ module ActiveRecord
383
383
  end
384
384
 
385
385
  def apply_cluster(sql)
386
- cluster ? "#{sql} ON CLUSTER #{cluster}" : sql
386
+ if cluster
387
+ normalized_cluster_name = cluster.start_with?('{') ? "'#{cluster}'" : cluster
388
+
389
+ "#{sql} ON CLUSTER #{normalized_cluster_name}"
390
+ else
391
+ sql
392
+ end
387
393
  end
388
394
 
389
395
  def supports_insert_on_duplicate_skip?
@@ -10,7 +10,7 @@ module ClickhouseActiverecord
10
10
 
11
11
  version_options = connection.internal_string_options_for_primary_key
12
12
  table_options = {
13
- id: false, options: 'ReplacingMergeTree(ver) PARTITION BY version ORDER BY (version)', if_not_exists: true
13
+ id: false, options: 'ReplacingMergeTree(ver) ORDER BY (version)', if_not_exists: true
14
14
  }
15
15
  full_config = connection.instance_variable_get(:@full_config) || {}
16
16
 
@@ -1,3 +1,3 @@
1
1
  module ClickhouseActiverecord
2
- VERSION = '0.5.10'
2
+ VERSION = '0.5.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.5.10
4
+ version: 0.5.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: 2022-06-22 00:00:00.000000000 Z
11
+ date: 2023-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  requirements: []
154
- rubygems_version: 3.0.3
154
+ rubygems_version: 3.0.3.1
155
155
  signing_key:
156
156
  specification_version: 4
157
157
  summary: ClickHouse ActiveRecord