Sha256: d5aeb4babd23c3e801c5d6879d91d4301f82d66c20bc02a693c7e1a10d5e1c60

Contents?: true

Size: 505 Bytes

Versions: 13

Compression:

Stored size: 505 Bytes

Contents

module Rasti
  module DB
    module TypeConverters
      module PostgresTypes
        class HStore

          class << self

            def column_type_regex
              /^hstore$/
            end

            def to_db(value, sub_type)
              Sequel.hstore value
            end

            def db_classes
              [Sequel::Postgres::HStore]
            end

            def from_db(object)
              object.to_h
            end

          end

        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rasti-db-2.3.0 lib/rasti/db/type_converters/postgres_types/hstore.rb
rasti-db-2.2.0 lib/rasti/db/type_converters/postgres_types/hstore.rb
rasti-db-2.1.0 lib/rasti/db/type_converters/postgres_types/hstore.rb
rasti-db-2.0.1 lib/rasti/db/type_converters/postgres_types/hstore.rb
rasti-db-2.0.0 lib/rasti/db/type_converters/postgres_types/hstore.rb
rasti-db-1.5.0 lib/rasti/db/type_converters/postgres_types/hstore.rb
rasti-db-1.4.0 lib/rasti/db/type_converters/postgres_types/hstore.rb
rasti-db-1.3.1 lib/rasti/db/type_converters/postgres_types/hstore.rb
rasti-db-1.3.0 lib/rasti/db/type_converters/postgres_types/hstore.rb
rasti-db-1.2.0 lib/rasti/db/type_converters/postgres_types/hstore.rb
rasti-db-1.1.1 lib/rasti/db/type_converters/postgres_types/hstore.rb
rasti-db-1.1.0 lib/rasti/db/type_converters/postgres_types/hstore.rb
rasti-db-1.0.0 lib/rasti/db/type_converters/postgres_types/hstore.rb