module Sequel::Postgres::HStore::DatabaseMethods

  1. lib/sequel/extensions/pg_hstore.rb
Parent: HStore

Methods

Public Class

  1. extended

Public Instance

  1. bound_variable_arg

Public Class methods

extended (db)
[show source]
# File lib/sequel/extensions/pg_hstore.rb, line 141
def self.extended(db)
  db.instance_eval do
    add_named_conversion_procs(conversion_procs, :hstore=>PG_NAMED_TYPES[:hstore])
    @schema_type_classes[:hstore] = HStore
  end
end

Public Instance methods

bound_variable_arg (arg, conn)

Handle hstores in bound variables

[show source]
# File lib/sequel/extensions/pg_hstore.rb, line 149
def bound_variable_arg(arg, conn)
  case arg
  when HStore
    arg.unquoted_literal
  when Hash
    HStore.new(arg).unquoted_literal
  else
    super
  end
end