Class: CassandraCQL::Types::DecimalType
- Inherits:
-
AbstractType
- Object
- AbstractType
- CassandraCQL::Types::DecimalType
- Defined in:
- lib/cassandra-cql/types/decimal_type.rb
Class Method Summary collapse
Class Method Details
.cast(value) ⇒ Object
20 21 22 |
# File 'lib/cassandra-cql/types/decimal_type.rb', line 20 def self.cast(value) BigDecimal.new(bytes_to_int(value[4..-1]).to_s) * BigDecimal.new('10')**(bytes_to_int(value[0..3])*-1) end |