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.
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, line 249 def map_to_prepared_args(bind_vars) prepared_args.map{|v| bind_vars[v]} end
Associates the argument with name k with the next position in the output array.
# File lib/sequel/dataset/prepared_statements.rb, line 257 def prepared_arg(k) prepared_args << k prepared_arg_placeholder end
Always assume there is a prepared arg in the argument mapper.
# File lib/sequel/dataset/prepared_statements.rb, line 263 def prepared_arg?(k) true end