module Sequel::Postgres::HStore::DatabaseMethods

Public Class Methods

extended(db) click to toggle source
    # File lib/sequel/extensions/pg_hstore.rb
137 def self.extended(db)
138   db.instance_exec do
139     add_named_conversion_proc(:hstore, &HStore.method(:parse))
140     @schema_type_classes[:hstore] = HStore
141   end
142 end

Public Instance Methods

bound_variable_arg(arg, conn) click to toggle source

Handle hstores in bound variables

Calls superclass method
    # File lib/sequel/extensions/pg_hstore.rb
145 def bound_variable_arg(arg, conn)
146   case arg
147   when HStore
148     arg.unquoted_literal
149   when Hash
150     HStore.new(arg).unquoted_literal
151   else
152     super
153   end
154 end