Method: Sequel::Postgres::HStore::DatabaseMethods#bound_variable_arg

Defined in:
lib/sequel/extensions/pg_hstore.rb

#bound_variable_arg(arg, conn) ⇒ Object

Handle hstores in bound variables

[View source]

145
146
147
148
149
150
151
152
153
154
# File 'lib/sequel/extensions/pg_hstore.rb', line 145

def bound_variable_arg(arg, conn)
  case arg
  when HStore
    arg.unquoted_literal
  when Hash
    HStore.new(arg).unquoted_literal
  else
    super
  end
end