Exception: ClickhouseRuby::TypeCastError
- Defined in:
- lib/clickhouse_ruby/errors.rb
Overview
Type conversion errors Raised when there are issues converting between Ruby and ClickHouse types
Instance Attribute Summary collapse
-
#from_type ⇒ String?
readonly
The source type.
-
#to_type ⇒ String?
readonly
The target type.
-
#value ⇒ Object?
readonly
The value that couldn’t be converted.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message = nil, from_type: nil, to_type: nil, value: nil) ⇒ TypeCastError
constructor
A new instance of TypeCastError.
Constructor Details
#initialize(message = nil, from_type: nil, to_type: nil, value: nil) ⇒ TypeCastError
Returns a new instance of TypeCastError.
103 104 105 106 107 108 |
# File 'lib/clickhouse_ruby/errors.rb', line 103 def initialize( = nil, from_type: nil, to_type: nil, value: nil) @from_type = from_type @to_type = to_type @value = value super() end |
Instance Attribute Details
#from_type ⇒ String? (readonly)
Returns the source type.
91 92 93 |
# File 'lib/clickhouse_ruby/errors.rb', line 91 def from_type @from_type end |
#to_type ⇒ String? (readonly)
Returns the target type.
94 95 96 |
# File 'lib/clickhouse_ruby/errors.rb', line 94 def to_type @to_type end |
#value ⇒ Object? (readonly)
Returns the value that couldn’t be converted.
97 98 99 |
# File 'lib/clickhouse_ruby/errors.rb', line 97 def value @value end |