module Sequel::Dataset::UnnumberedArgumentMapper
Default implementation for an argument mapper that uses unnumbered SQL
placeholder arguments. Keeps track of which arguments have been used, and allows arguments to be used more than once.
Protected Instance Methods
map_to_prepared_args(bind_vars)
click to toggle source
Returns a single output array mapping the values of the input hash. Keys in the input hash that are used more than once in the query have multiple entries in the output array.
# File lib/sequel/dataset/prepared_statements.rb 267 def map_to_prepared_args(bind_vars) 268 prepared_args.map{|v| bind_vars[v]} 269 end
Private Instance Methods
prepared_arg(k)
click to toggle source
Associates the argument with name k with the next position in the output array.
# File lib/sequel/dataset/prepared_statements.rb 275 def prepared_arg(k) 276 prepared_args << k 277 prepared_arg_placeholder 278 end