Class: ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Date

Inherits:
Type
  • Object
show all
Defined in:
lib/arjdbc/postgresql/base/oid.rb

Instance Method Summary collapse

Methods inherited from Type

#infinity, #simplified_type

Instance Method Details

#typeObject



238
# File 'lib/arjdbc/postgresql/base/oid.rb', line 238

def type; :date; end

#type_cast(value) ⇒ Object



240
241
242
243
244
245
246
# File 'lib/arjdbc/postgresql/base/oid.rb', line 240

def type_cast(value)
  return if value.nil?

  # FIXME: probably we can improve this since we know it is PG
  # specific
  ConnectionAdapters::Column.value_to_date value
end