Class: ClickHouse::Type::ArrayType
- Defined in:
- lib/click_house/type/array_type.rb
Instance Attribute Summary collapse
- 
  
    
      #subtype  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute subtype. 
Instance Method Summary collapse
- #cast(value) ⇒ Object
- 
  
    
      #initialize(subtype)  ⇒ ArrayType 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of ArrayType. 
- #serialize(array, *argv) ⇒ Object
Constructor Details
#initialize(subtype) ⇒ ArrayType
Returns a new instance of ArrayType.
| 8 9 10 | # File 'lib/click_house/type/array_type.rb', line 8 def initialize(subtype) @subtype = subtype end | 
Instance Attribute Details
#subtype ⇒ Object (readonly)
Returns the value of attribute subtype.
| 6 7 8 | # File 'lib/click_house/type/array_type.rb', line 6 def subtype @subtype end | 
Instance Method Details
#cast(value) ⇒ Object
| 12 13 14 | # File 'lib/click_house/type/array_type.rb', line 12 def cast(value, *) value end | 
#serialize(array, *argv) ⇒ Object
| 16 17 18 19 20 21 22 | # File 'lib/click_house/type/array_type.rb', line 16 def serialize(array, *argv) return unless array.is_a?(Array) array.map do |value| subtype.serialize(value, *argv) end end |