class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
Public Instance Methods
native_database_types_with_hstore()
click to toggle source
# File lib/padrino-hstore/activerecord.rb, line 133 def native_database_types_with_hstore native_database_types_without_hstore.merge({:hstore => { :name => "hstore" }}) end
quote_with_hstore(value, column = nil)
click to toggle source
Quotes correctly a hstore column value.
# File lib/padrino-hstore/activerecord.rb, line 138 def quote_with_hstore(value, column = nil) if value && column && column.sql_type == 'hstore' raise HstoreTypeMismatch, "#{column.name} must have a Hash or a valid hstore value (#{value})" unless value.kind_of?(Hash) || value.valid_hstore? return quote_without_hstore(value.to_hstore, column) end quote_without_hstore(value,column) end