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

### Methods

call_sproc execute

### Public Instance methods

call_sproc(name, opts={}, &block)

Support stored procedures on MySQL

[Source]

        # File lib/sequel/adapters/shared/mysql_prepared_statements.rb, line 10
    10:         def call_sproc(name, opts={}, &block)
    11:           args = opts[:args] || []
    12:           execute("CALL #{name}#{args.empty? ? '()' : literal(args)}", opts.merge(:sproc=>false), &block)
    13:         end

execute(sql, opts={}, &block)

Executes the given SQL using an available connection, yielding the connection if the block is given.

[Source]

        # File lib/sequel/adapters/shared/mysql_prepared_statements.rb, line 17
    17:         def execute(sql, opts={}, &block)
    18:           if opts[:sproc]
    19:             call_sproc(sql, opts, &block)
    20:           elsif sql.is_a?(Symbol)
    21:             execute_prepared_statement(sql, opts, &block)
    22:           else
    23:             synchronize(opts[:server]){|conn| _execute(conn, sql, opts, &block)}
    24:           end
    25:         end

[Validate]