module Sequel::Oracle::Dataset::ArgumentMapper
Oracle
already supports named bind arguments, so use directly.
Protected Instance Methods
Source
# File lib/sequel/adapters/oracle.rb 342 def map_to_prepared_args(bind_vars) 343 prepared_args.map{|v, t| [bind_vars[v], t]} 344 end
Return a hash with the same values as the given hash, but with the keys converted to strings.
Private Instance Methods
Source
# File lib/sequel/adapters/oracle.rb 350 def prepared_arg(k) 351 y, type = k.to_s.split("__", 2) 352 prepared_args << [y.to_sym, type] 353 i = prepared_args.length 354 LiteralString.new(":#{i}") 355 end
Oracle
uses a : before the name of the argument for named arguments.
Source
# File lib/sequel/adapters/oracle.rb 363 def subselect_sql_append(sql, ds) 364 if !supports_fetch_next_rows? && ds.opts[:prepared_args].equal?(@opts[:prepared_args]) 365 orig_subselect_sql_append(sql, ds) 366 else 367 super 368 end 369 end
Avoid infinite recursion on Oracle
<12 for datasets with limits (which are implemented via subqueries). If the given dataset’s prepared args are the same object as current dataset’s, call the standard Sequel::Dataset#subselect_sql_append
method, instead of calling super (which will call prepared_sql and result in infinite recursion).
Calls superclass method