clickhouse-activerecord 0.4.4 → 0.4.5

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: 1cf76e043406ab83146104d257da665657dc9905b6517ea02956f9034ae52ebf
4
- data.tar.gz: 21da146747adec65a6e61bd09dc1ded2be7fd025ecea23736d0985708bafa70b
3
+ metadata.gz: 44a359e720da3f43b923698d6df95231f003768e160fe625ace18ec442469f50
4
+ data.tar.gz: edd7a9cebc8e1b1f16a1e5a44bafdde4bca4697d88336c7b00961109f6062756
5
5
  SHA512:
6
- metadata.gz: bee84efbe4e210107575a1121a4adc8df4da2f85349abfec2f27c964917a7655438b01cceed36d83fe49f2f70e8f0d8ba32f7e92bb26b5ac5beceddf5243e626
7
- data.tar.gz: bb1576674cbec042f2f2d949a6e35e8ce4ce22615a0bb0aac2d0ee56b35e200cdb28d72a31010e1143c95b47d397821568e709aa6fdd3c0ee9f8f76605de356c
6
+ metadata.gz: 9c049f566c462602f61c883aa1fb11a2fef92806ae687e2550be21a995dcb0f6b4b0dc9cd197b30aa2918ef72b9c9db892d0eb62db8f5861db1e8c5eb498d114
7
+ data.tar.gz: 83dbd6124dcd48b85bd941510f747f08ebea868d65bbecfc6133a52d8fe40b2392906ee883179d3b5f644e2531801b225f56d9bd31377391b905fcf490b327f0
@@ -156,6 +156,8 @@ module ActiveRecord
156
156
  when "true".freeze, "false".freeze
157
157
  default
158
158
  # Object identifier types
159
+ when "''"
160
+ ''
159
161
  when /\A-?\d+\z/
160
162
  $1
161
163
  else
@@ -85,13 +85,15 @@ HEADER
85
85
  tbl.puts ", force: :cascade do |t|"
86
86
 
87
87
  # then dump all non-primary key columns
88
- columns.each do |column|
89
- raise StandardError, "Unknown type '#{column.sql_type}' for column '#{column.name}'" unless @connection.valid_type?(column.type)
90
- next if column.name == pk
91
- type, colspec = column_spec(column)
92
- tbl.print " t.#{type} #{column.name.inspect}"
93
- tbl.print ", #{format_colspec(colspec)}" if colspec.present?
94
- tbl.puts
88
+ if simple || !match
89
+ columns.each do |column|
90
+ raise StandardError, "Unknown type '#{column.sql_type}' for column '#{column.name}'" unless @connection.valid_type?(column.type)
91
+ next if column.name == pk
92
+ type, colspec = column_spec(column)
93
+ tbl.print " t.#{type} #{column.name.inspect}"
94
+ tbl.print ", #{format_colspec(colspec)}" if colspec.present?
95
+ tbl.puts
96
+ end
95
97
  end
96
98
 
97
99
  indexes_in_create(table, tbl)
@@ -1,3 +1,3 @@
1
1
  module ClickhouseActiverecord
2
- VERSION = '0.4.4'
2
+ VERSION = '0.4.5'
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.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Odintsov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-23 00:00:00.000000000 Z
11
+ date: 2020-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler