Module | Sequel::MySQL::PreparedStatements::DatasetMethods
In: | lib/sequel/adapters/shared/mysql_prepared_statements.rb

### Methods

call prepare

### Included Modules

Sequel::Dataset::StoredProcedures

### Classes and Modules

Module Sequel::MySQL::PreparedStatements::DatasetMethods::CallableStatementMethods
Module Sequel::MySQL::PreparedStatements::DatasetMethods::PreparedStatementMethods
Module Sequel::MySQL::PreparedStatements::DatasetMethods::StoredProcedureMethods

### Public Instance methods

call(type, bind_arguments={}, *values, &block)

MySQL is different in that it supports prepared statements but not bound variables outside of prepared statements. The default implementation breaks the use of subselects in prepared statements, so extend the temporary prepared statement that this creates with a module that fixes it.

[Source]

         # File lib/sequel/adapters/shared/mysql_prepared_statements.rb, line 127
    127:         def call(type, bind_arguments={}, *values, &block)
    128:           ps = to_prepared_statement(type, values)
    129:           ps.extend(CallableStatementMethods)
    130:           ps.call(bind_arguments, &block)
    131:         end

prepare(type, name=nil, *values)

Store the given type of prepared statement in the associated database with the given name.

[Source]

         # File lib/sequel/adapters/shared/mysql_prepared_statements.rb, line 135
    135:         def prepare(type, name=nil, *values)
    136:           ps = to_prepared_statement(type, values)
    137:           ps.extend(PreparedStatementMethods)
    138:           if name
    139:             ps.prepared_statement_name = name
    140:             db.set_prepared_statement(name, ps)
    141:           end
    142:           ps
    143:         end

[Validate]