Class: CassandraCQL::Types::FloatType
- Inherits:
-
AbstractType
- Object
- AbstractType
- CassandraCQL::Types::FloatType
- Defined in:
- lib/cassandra-cql/types/float_type.rb
Class Method Summary collapse
Class Method Details
.cast(value) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/cassandra-cql/types/float_type.rb', line 20 def self.cast(value) # Do not return nil, this should be an error raise if value.empty? value.unpack('g')[0] rescue raise Error::CastException.new("Unable to convert bytes to float", value) end |