Class: ClickHouse::Definition::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/click_house/definition/column.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) {|_self| ... } ⇒ Column

Returns a new instance of Column.

Yields:

  • (_self)

Yield Parameters:


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

#defaultObject

Returns the value of attribute default


10
11
12
# File 'lib/click_house/definition/column.rb', line 10

def default
  @default
end

#extensionsObject

Returns the value of attribute extensions


9
10
11
# File 'lib/click_house/definition/column.rb', line 9

def extensions
  @extensions
end

#materializedObject

Returns the value of attribute materialized


11
12
13
# File 'lib/click_house/definition/column.rb', line 11

def materialized
  @materialized
end

#nameObject

Returns the value of attribute name


6
7
8
# File 'lib/click_house/definition/column.rb', line 6

def name
  @name
end

#nullableObject

Returns the value of attribute nullable


8
9
10
# File 'lib/click_house/definition/column.rb', line 8

def nullable
  @nullable
end

#ttlObject

Returns the value of attribute ttl


12
13
14
# File 'lib/click_house/definition/column.rb', line 12

def ttl
  @ttl
end

#typeObject

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_sObject


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