module Sequel::Postgres::Dataset::ArgumentMapper

PostgreSQL specific argument mapper used for mapping the named argument hash to a array with numbered arguments. Only used with the pg driver.

Protected Instance Methods

map_to_prepared_args(hash) click to toggle source

An array of bound variable values for this query, in the correct order.

    # File lib/sequel/adapters/postgres.rb
714 def map_to_prepared_args(hash)
715   prepared_args.map{|k| hash[k.to_sym]}
716 end

Private Instance Methods

prepared_arg(k) click to toggle source
    # File lib/sequel/adapters/postgres.rb
720 def prepared_arg(k)
721   y = k
722   if i = prepared_args.index(y)
723     i += 1
724   else
725     prepared_args << y
726     i = prepared_args.length
727   end
728   LiteralString.new("#{prepared_arg_placeholder}#{i}")
729 end