Class: ClickHouse::Type::FixedStringType
- Inherits:
-
BaseType
- Object
- BaseType
- ClickHouse::Type::FixedStringType
show all
- Defined in:
- lib/click_house/type/fixed_string_type.rb
Instance Method Summary
collapse
Methods inherited from BaseType
#cast_each, #container?, #ddl?, #map?, #serialize_each, #tuple?
Instance Method Details
#cast(value, _limit = nil) ⇒ Object
6
7
8
|
# File 'lib/click_house/type/fixed_string_type.rb', line 6
def cast(value, _limit = nil)
value.to_s
end
|
#serialize(value, limit = nil) ⇒ Object
10
11
12
|
# File 'lib/click_house/type/fixed_string_type.rb', line 10
def serialize(value, limit = nil)
value[0..(limit ? limit.pred : -1)] unless value.nil?
end
|