clickhouse-activerecord 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/clickhouse-activerecord.gemspec +1 -1
- data/lib/active_record/connection_adapters/clickhouse/schema_creation.rb +1 -1
- data/lib/active_record/connection_adapters/clickhouse_adapter.rb +1 -0
- data/lib/arel/nodes/using.rb +6 -0
- data/lib/arel/visitors/clickhouse.rb +6 -0
- data/lib/clickhouse-activerecord/version.rb +1 -1
- data/lib/core_extensions/arel/select_manager.rb +5 -0
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74728f97bde396aae27436dd6b7ec8d57ec172e818122f9094d994583c92781f
|
4
|
+
data.tar.gz: 64e08f74a95d755338b489b32f2aade49685b6b604a3d02d2f232ca9f24b7b23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 959c753aaf61bcef02dd336953d1bd88bc0d2d3762bc5f96e3816699685c809da2f4ad7646201570892a12fad32760a80d69ff6292b172fb6e9c518c13dc622d
|
7
|
+
data.tar.gz: e7ee279cf5dc1b8168448f8c657550e2cb418121da1ef58c1d53989f8a7cc678527fcb7678cc0ba903d9e5d9e108450c9da28d03ba0e6d9364738d1c2f60e414
|
data/README.md
CHANGED
@@ -183,6 +183,10 @@ Action.where(date: Date.current).final.limit(10)
|
|
183
183
|
Action.settings(optimize_read_in_order: 1).where(date: Date.current).limit(10)
|
184
184
|
# Clickhouse Action Load (10.3ms) SELECT actions.* FROM actions FINAL WHERE actions.date = '2017-11-29' LIMIT 10 SETTINGS optimize_read_in_order = 1
|
185
185
|
#=> #<ActiveRecord::Relation [#<Action *** >]>
|
186
|
+
|
187
|
+
User.joins(:actions).using(:group_id)
|
188
|
+
# Clickhouse User Load (10.3ms) SELECT users.* FROM users INNER JOIN actions USING group_id
|
189
|
+
#=> #<ActiveRecord::Relation [#<Action *** >]>
|
186
190
|
```
|
187
191
|
|
188
192
|
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
26
|
spec.add_runtime_dependency 'bundler', '>= 1.13.4'
|
27
|
-
spec.add_runtime_dependency 'activerecord', '>= 5.2'
|
27
|
+
spec.add_runtime_dependency 'activerecord', '>= 5.2', '< 7'
|
28
28
|
|
29
29
|
spec.add_development_dependency 'rake', '~> 13.0'
|
30
30
|
spec.add_development_dependency 'rspec', '~> 3.4'
|
@@ -125,7 +125,7 @@ module ActiveRecord
|
|
125
125
|
end
|
126
126
|
|
127
127
|
def current_database
|
128
|
-
if ActiveRecord::version >= Gem::Version.new('6')
|
128
|
+
if ActiveRecord::version >= Gem::Version.new('6.1')
|
129
129
|
ActiveRecord::Base.connection_db_config.database
|
130
130
|
else
|
131
131
|
ActiveRecord::Base.connection_config[:database]
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'arel/visitors/clickhouse'
|
4
4
|
require 'arel/nodes/settings'
|
5
|
+
require 'arel/nodes/using'
|
5
6
|
require 'clickhouse-activerecord/migration'
|
6
7
|
require 'active_record/connection_adapters/clickhouse/oid/array'
|
7
8
|
require 'active_record/connection_adapters/clickhouse/oid/date'
|
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.
|
4
|
+
version: 0.6.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: 2023-
|
11
|
+
date: 2023-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -31,6 +31,9 @@ dependencies:
|
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '5.2'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '7'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -38,6 +41,9 @@ dependencies:
|
|
38
41
|
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '5.2'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '7'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: rake
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,6 +114,7 @@ files:
|
|
108
114
|
- lib/active_record/connection_adapters/clickhouse/schema_statements.rb
|
109
115
|
- lib/active_record/connection_adapters/clickhouse_adapter.rb
|
110
116
|
- lib/arel/nodes/settings.rb
|
117
|
+
- lib/arel/nodes/using.rb
|
111
118
|
- lib/arel/visitors/clickhouse.rb
|
112
119
|
- lib/clickhouse-activerecord.rb
|
113
120
|
- lib/clickhouse-activerecord/migration.rb
|