class Rasti::DB::TypeConverters::PostgresTypes::HStore
Constants
- DB_TYPE_REGEX
Public Class Methods
from_db(value)
click to toggle source
# File lib/rasti/db/type_converters/postgres_types/hstore.rb, line 23 def from_db(value) value.to_h end
from_db?(klass)
click to toggle source
# File lib/rasti/db/type_converters/postgres_types/hstore.rb, line 18 def from_db?(klass) defined?(Sequel::Postgres::HStore) && klass == Sequel::Postgres::HStore end
to_db(value, type)
click to toggle source
# File lib/rasti/db/type_converters/postgres_types/hstore.rb, line 14 def to_db(value, type) Sequel.hstore value end
to_db?(type)
click to toggle source
# File lib/rasti/db/type_converters/postgres_types/hstore.rb, line 10 def to_db?(type) !type.match(DB_TYPE_REGEX).nil? end