Class: ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Timestamp

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

Instance Method Summary collapse

Methods inherited from Type

#infinity

Instance Method Details

#simplified_type(sql_type) ⇒ Object



224
225
226
# File 'lib/arjdbc/postgresql/base/oid.rb', line 224

def simplified_type(sql_type)
  :datetime
end

#typeObject



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

def type; :timestamp; end

#type_cast(value) ⇒ Object



228
229
230
231
232
233
234
# File 'lib/arjdbc/postgresql/base/oid.rb', line 228

def type_cast(value)
  return if value.nil?

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