clickhouse-activerecord 0.1.0 → 0.1.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6cf84ba5f26b055c401f57ead0582ac4016f66b
|
4
|
+
data.tar.gz: 491d81569bfc86a70b5f084786046727097da075
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff8d1629cb46e3bbad4fc9c5f6d873a23e92950b0bb74c9a077795515557201eee2608ee5c2dd953b498e30e39f5f1ec5920e8e4c2c91d1db7c1e8b64d9fc109
|
7
|
+
data.tar.gz: a04fac4e14cfd16d935e18ee29cfb3bc733835d15592fb40354e7cf25c7cbca789713af48b63ac138b465ba971334038fa27cec0c8794830366684cbcdc645db
|
@@ -11,7 +11,12 @@ module ActiveRecord
|
|
11
11
|
# Type cast a value for schema dumping. This method is private, as we are
|
12
12
|
# hoping to remove it entirely.
|
13
13
|
def type_cast_for_schema(value) # :nodoc:
|
14
|
-
value
|
14
|
+
case value
|
15
|
+
when 'toDate(now()', 'CAST(now() AS Date)'
|
16
|
+
'now()'.inspect
|
17
|
+
else
|
18
|
+
value.inspect
|
19
|
+
end
|
15
20
|
end
|
16
21
|
|
17
22
|
end
|
data/lib/tasks/clickhouse.rake
CHANGED
@@ -3,11 +3,11 @@ namespace :clickhouse do
|
|
3
3
|
namespace :schema do
|
4
4
|
|
5
5
|
# todo not testing
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
desc 'Load database schema'
|
7
|
+
task load: :environment do
|
8
|
+
ActiveRecord::Base.establish_connection(:"#{Rails.env}_clickhouse")
|
9
|
+
load("#{Rails.root}/db/clickhouse_schema.rb")
|
10
|
+
end
|
11
11
|
|
12
12
|
desc 'Dump database schema'
|
13
13
|
task dump: :environment do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clickhouse-activerecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Odintsov
|
@@ -85,7 +85,7 @@ files:
|
|
85
85
|
- lib/active_record/connection_adapters/clickhouse/oid/date.rb
|
86
86
|
- lib/active_record/connection_adapters/clickhouse/oid/date_time.rb
|
87
87
|
- lib/active_record/connection_adapters/clickhouse_adapter.rb
|
88
|
-
- lib/clickhouse.rb
|
88
|
+
- lib/clickhouse-activerecord.rb
|
89
89
|
- lib/clickhouse/railtie.rb
|
90
90
|
- lib/tasks/clickhouse.rake
|
91
91
|
homepage: https://github.com/pnixx/clickhouse-activerecord
|