clickhouse-activerecord 1.6.2 → 1.6.3
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: 5bfabbcebb77881c7199f5895b1c3e4a7066c2eddaeec138432434f0a754fb70
|
|
4
|
+
data.tar.gz: a17ff604e9b01015f4a100f1e83267aad340c847541f8aeb0467d083afeb789a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 266b0794fe05ec58183b61cb7b7e8cefd99b44ce7fbc8a92810651f897dff514df09b48f16e8d50cdd394d7f00833039094caaf671c7e322a1a3b44c470b05df
|
|
7
|
+
data.tar.gz: afb3f2a22842ea4caef138ab206e73151fe237f89fa136c0fb2f4b1b160ff9e5594b4045224f8ab0c46512e1fe158eaf35cd698a66f4ff9d1542c69baebf9fa8
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -238,7 +238,7 @@ Action.with(ActionView.select(Arel.sql('min(date)')) => :min_date).where(Arel.sq
|
|
|
238
238
|
### Streaming request
|
|
239
239
|
|
|
240
240
|
```ruby
|
|
241
|
-
path = Action.connection.
|
|
241
|
+
path = Action.connection.execute_to_file(Action.where(date: Date.current), format: 'CSVWithNames')
|
|
242
242
|
# Clickhouse Stream (10.3ms) SELECT actions.* FROM actions WHERE actions.date = '2017-11-29'
|
|
243
243
|
file = File.open(path)
|
|
244
244
|
```
|
|
@@ -53,8 +53,9 @@ module ActiveRecord
|
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
|
|
56
|
-
#
|
|
57
|
-
|
|
56
|
+
# Execute an SQL query and save the result to a file in stream mode
|
|
57
|
+
# @return [String]
|
|
58
|
+
def execute_to_file(sql, name = nil, format: @response_format, settings: {})
|
|
58
59
|
with_response_format(format) do
|
|
59
60
|
log(sql, [adapter_name, 'Stream', name].compact.join(' ')) do
|
|
60
61
|
statement = Statement.new(sql, format: @response_format)
|
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: 1.6.
|
|
4
|
+
version: 1.6.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sergey Odintsov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-02-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|