Module: Sequel::MySQL::Dataset::CallableStatementMethods

Defined in:
lib/sequel/lib/sequel/adapters/mysql.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(ds) ⇒ Object

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


257
258
259
260
261
262
# File 'lib/sequel/lib/sequel/adapters/mysql.rb', line 257

def subselect_sql(ds)
  ps = ds.to_prepared_statement(:select)
  ps.extend(CallableStatementMethods)
  ps.prepared_args = prepared_args
  ps.prepared_sql
end