module Sequel::Dataset::EmulatePreparedStatementMethods

  1. lib/sequel/dataset/prepared_statements.rb

Prepared statements emulation support for adapters that don’t support native prepared statements. Uses a placeholder literalizer to hold the prepared sql with the ability to interpolate arguments to prepare the final SQL string.

Methods

Public Instance

  1. run

Included modules

  1. UnnumberedArgumentMapper

Public Instance methods

run(&block)
[show source]
    # File lib/sequel/dataset/prepared_statements.rb
275 def run(&block)
276   if @opts[:prepared_sql_frags]
277     sql = literal(Sequel::SQL::PlaceholderLiteralString.new(@opts[:prepared_sql_frags], @opts[:bind_arguments], false))
278     clone(:prepared_sql_frags=>nil, :sql=>sql, :prepared_sql=>sql).run(&block)
279   else
280     super
281   end
282 end