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
671 def map_to_prepared_args(hash)
672   prepared_args.map{|k| hash[k.to_sym]}
673 end

Private Instance Methods

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