Class: ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Hstore

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

#accessorObject



311
312
313
# File 'lib/arjdbc/postgresql/base/oid.rb', line 311

def accessor
  ActiveRecord::Store::StringKeyedHashAccessor
end

#typeObject



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

def type; :hstore end

#type_cast(value) ⇒ Object



305
306
307
308
309
# File 'lib/arjdbc/postgresql/base/oid.rb', line 305

def type_cast(value)
  return if value.nil?

  ConnectionAdapters::PostgreSQLColumn.string_to_hstore value
end

#type_cast_for_write(value) ⇒ Object



301
302
303
# File 'lib/arjdbc/postgresql/base/oid.rb', line 301

def type_cast_for_write(value)
  ConnectionAdapters::PostgreSQLColumn.hstore_to_string value
end