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
675 def map_to_prepared_args(hash)
676   prepared_args.map{|k| hash[k.to_sym]}
677 end

Private Instance Methods

prepared_arg(k) click to toggle source
    # File lib/sequel/adapters/postgres.rb
681 def prepared_arg(k)
682   y = k
683   if i = prepared_args.index(y)
684     i += 1
685   else
686     prepared_args << y
687     i = prepared_args.length
688   end
689   LiteralString.new("#{prepared_arg_placeholder}#{i}")
690 end