Class: ClickHouse::Definition::Column
- Inherits:
-
Object
- Object
- ClickHouse::Definition::Column
- Defined in:
- lib/click_house/definition/column.rb
Instance Attribute Summary collapse
-
#default ⇒ Object
Returns the value of attribute default.
-
#extensions ⇒ Object
Returns the value of attribute extensions.
-
#materialized ⇒ Object
Returns the value of attribute materialized.
-
#name ⇒ Object
Returns the value of attribute name.
-
#nullable ⇒ Object
Returns the value of attribute nullable.
-
#ttl ⇒ Object
Returns the value of attribute ttl.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(params = {}) {|_self| ... } ⇒ Column
constructor
A new instance of Column.
- #to_s ⇒ Object
Constructor Details
#initialize(params = {}) {|_self| ... } ⇒ Column
Returns a new instance of Column.
14 15 16 17 |
# File 'lib/click_house/definition/column.rb', line 14 def initialize(params = {}) params.each { |k, v| public_send("#{k}=", v) } yield(self) if block_given? end |
Instance Attribute Details
#default ⇒ Object
Returns the value of attribute default.
10 11 12 |
# File 'lib/click_house/definition/column.rb', line 10 def default @default end |
#extensions ⇒ Object
Returns the value of attribute extensions.
9 10 11 |
# File 'lib/click_house/definition/column.rb', line 9 def extensions @extensions end |
#materialized ⇒ Object
Returns the value of attribute materialized.
11 12 13 |
# File 'lib/click_house/definition/column.rb', line 11 def materialized @materialized end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/click_house/definition/column.rb', line 6 def name @name end |
#nullable ⇒ Object
Returns the value of attribute nullable.
8 9 10 |
# File 'lib/click_house/definition/column.rb', line 8 def nullable @nullable end |
#ttl ⇒ Object
Returns the value of attribute ttl.
12 13 14 |
# File 'lib/click_house/definition/column.rb', line 12 def ttl @ttl end |
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/click_house/definition/column.rb', line 7 def type @type end |
Instance Method Details
#to_s ⇒ Object
19 20 21 |
# File 'lib/click_house/definition/column.rb', line 19 def to_s nullable ? "#{name} Nullable(#{extension_type}) #{opts}" : "#{name} #{extension_type} #{opts}" end |