Class: Cequel::Type::Decimal
Overview
‘decimal` columns store decimal numeric values
Instance Method Summary collapse
Methods inherited from Base
#compatible_types, #cql_aliases, #cql_name, #internal_name, #internal_names, #to_s
Instance Method Details
#cast(value) ⇒ Object
284 285 286 |
# File 'lib/cequel/type.rb', line 284 def cast(value) value.is_a?(BigDecimal) ? value : BigDecimal.new(value, 0) end |