Class: ClickHouse::Type::NullableType

Inherits:
BaseType
  • Object
show all
Defined in:
lib/click_house/type/nullable_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subtype) ⇒ NullableType

Returns a new instance of NullableType.



8
9
10
# File 'lib/click_house/type/nullable_type.rb', line 8

def initialize(subtype)
  @subtype = subtype
end

Instance Attribute Details

#subtypeObject (readonly)

Returns the value of attribute subtype.



6
7
8
# File 'lib/click_house/type/nullable_type.rb', line 6

def subtype
  @subtype
end

Instance Method Details

#cast(*argv) ⇒ Object



12
13
14
# File 'lib/click_house/type/nullable_type.rb', line 12

def cast(*argv)
  subtype.cast(*argv) unless argv.first.nil?
end

#serialize(*argv) ⇒ Object



16
17
18
# File 'lib/click_house/type/nullable_type.rb', line 16

def serialize(*argv)
  subtype.serialize(*argv) unless argv.first.nil?
end