Module: Sequel::MySQL::PreparedStatements::DatasetMethods::CallableStatementMethods

Defined in:
lib/sequel/adapters/utils/mysql_prepared_statements.rb

Overview

Methods to add to MySQL prepared statement calls without using a real database prepared statement and bound variables.

Instance Method Summary collapse

Instance Method Details

#subselect_sql_append(sql, ds) ⇒ Object

Extend given dataset with this module so subselects inside subselects in prepared statements work.



38
39
40
41
42
43
44
# File 'lib/sequel/adapters/utils/mysql_prepared_statements.rb', line 38

def subselect_sql_append(sql, ds)
  ps = ds.to_prepared_statement(:select).clone(:append_sql => sql)
  ps.extend(CallableStatementMethods)
  ps = ps.bind(@opts[:bind_vars]) if @opts[:bind_vars]
  ps.prepared_args = prepared_args
  ps.prepared_sql
end