Sha256: 4e8f29157fb82e68110d02cfc7d1d6ddeeadd0c5daa78b796ca3acc6862806a0

Contents?: true

Size: 706 Bytes

Versions: 1

Compression:

Stored size: 706 Bytes

Contents

require 'mobility/backends/sequel/pg_hash'

module Mobility
  module Backends
=begin

Implements the {Mobility::Backends::Hstore} backend for Sequel models.

@see Mobility::Backends::Sequel::HashValued

=end
    module Sequel
      class Hstore < PgHash
        require 'mobility/backends/sequel/hstore/query_methods'

        # @!group Backend Accessors
        # @!macro backend_reader
        # @!method read(locale, **options)

        # @!group Backend Accessors
        # @!macro backend_writer
        def write(locale, value, options = {})
          super(locale, value && value.to_s, options)
        end
        # @!endgroup

        setup_query_methods(QueryMethods)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mobility-0.6.0 lib/mobility/backends/sequel/hstore.rb