Method: ActiveRecord::ConnectionAdapters::MySQL::DatabaseStatements#exec_delete
- Defined in:
- lib/active_record/connection_adapters/mysql/database_statements.rb
#exec_delete(sql, name = nil, binds = []) ⇒ Object Also known as: exec_update
75 76 77 78 79 80 81 82 83 |
# File 'lib/active_record/connection_adapters/mysql/database_statements.rb', line 75 def exec_delete(sql, name = nil, binds = []) if without_prepared_statement?(binds) @lock.synchronize do execute_and_free(sql, name) { @connection.affected_rows } end else exec_stmt_and_free(sql, name, binds) { |stmt| stmt.affected_rows } end end |