Class: Cequel::Type::Date
Overview
‘date` columns store dates.
Instance Method Summary collapse
Methods inherited from Base
#compatible_types, #cql_aliases, #cql_name, #internal_name, #to_s
Instance Method Details
#cast(value) ⇒ Object
415 416 417 418 419 420 |
# File 'lib/cequel/type.rb', line 415 def cast(value) if value.is_a?(::String) then ::Date.parse(value) elsif value.respond_to?(:to_date) then value.to_date else ::Date.parse(value.to_s) end end |
#internal_names ⇒ Object
411 412 413 |
# File 'lib/cequel/type.rb', line 411 def internal_names ['org.apache.cassandra.db.marshal.DateType'] end |