clickhouse-activerecord 0.6.1 → 0.6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f67a26e07ac1e077b8966dfb82626a2a4778d8060d07cedc4a93b2681a7dcfb3
|
4
|
+
data.tar.gz: 2ef8add7034b493f2353a45af727646beac80a02989a8a198f2283e130cfa5be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b5553336901a311c54f5ff449ada535060437dda68800acd5ee1781f6a46debde48294957dff568114657985a0475e7dc1c12bb54c6dba92f211416348d0ac4
|
7
|
+
data.tar.gz: b1eb6866cd5882c545fe9bec44cc8d587edb051ec1dd259822a7a5c2ff45c21cffbfae7cc59a22bfb262544c718a69821702f663972ef4987cfd1b92cbb0a22b
|
@@ -60,7 +60,9 @@ module ActiveRecord
|
|
60
60
|
|
61
61
|
def do_system_execute(sql, name = nil)
|
62
62
|
log_with_debug(sql, "#{adapter_name} #{name}") do
|
63
|
-
res = @
|
63
|
+
res = @lock.synchronize do
|
64
|
+
@connection.post("/?#{@config.to_param}", "#{sql} FORMAT JSONCompact", 'User-Agent' => "Clickhouse ActiveRecord #{ClickhouseActiverecord::VERSION}")
|
65
|
+
end
|
64
66
|
|
65
67
|
process_response(res)
|
66
68
|
end
|
@@ -70,7 +72,9 @@ module ActiveRecord
|
|
70
72
|
log(sql, "#{adapter_name} #{name}") do
|
71
73
|
formatted_sql = apply_format(sql, format)
|
72
74
|
request_params = @config || {}
|
73
|
-
res = @
|
75
|
+
res = @lock.synchronize do
|
76
|
+
@connection.post("/?#{request_params.merge(settings).to_param}", formatted_sql, 'User-Agent' => "Clickhouse ActiveRecord #{ClickhouseActiverecord::VERSION}")
|
77
|
+
end
|
74
78
|
|
75
79
|
process_response(res)
|
76
80
|
end
|
@@ -334,7 +334,13 @@ module ActiveRecord
|
|
334
334
|
end
|
335
335
|
|
336
336
|
def drop_table(table_name, options = {}) # :nodoc:
|
337
|
-
|
337
|
+
query = "DROP TABLE"
|
338
|
+
query = "#{query} IF EXISTS " if options[:if_exists]
|
339
|
+
query = "#{query} #{quote_table_name(table_name)}"
|
340
|
+
query = apply_cluster(query)
|
341
|
+
query = "#{query} SYNC" if options[:sync]
|
342
|
+
|
343
|
+
do_execute(query)
|
338
344
|
|
339
345
|
if options[:with_distributed]
|
340
346
|
distributed_table_name = options.delete(:with_distributed)
|
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.6.1
|
4
|
+
version: 0.6.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Odintsov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
- !ruby/object:Gem::Version
|
149
149
|
version: '0'
|
150
150
|
requirements: []
|
151
|
-
rubygems_version: 3.
|
151
|
+
rubygems_version: 3.3.7
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: ClickHouse ActiveRecord
|