Class: ActiveRecord::ConnectionAdapters::Mysql2Adapter
- Inherits:
-
MYSQL2_ADAPTER_PARENT
- Object
- ActiveRecord::ConnectionAdapters::Mysql2Adapter
- Defined in:
- lib/database_cleaner/active_record/deletion.rb,
lib/database_cleaner/active_record/truncation.rb
Instance Method Summary collapse
Instance Method Details
#delete_table(table_name) ⇒ Object
19 20 21 |
# File 'lib/database_cleaner/active_record/deletion.rb', line 19 def delete_table(table_name) execute("DELETE FROM #{quote_table_name(table_name)};") end |
#truncate_table(table_name) ⇒ Object
51 52 53 |
# File 'lib/database_cleaner/active_record/truncation.rb', line 51 def truncate_table(table_name) execute("TRUNCATE TABLE #{quote_table_name(table_name)};") end |