Class: ActiveRecord::ConnectionAdapters::MysqlAdapter
- Inherits:
-
MYSQL_ADAPTER_PARENT
- Object
- ActiveRecord::ConnectionAdapters::MysqlAdapter
- 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
13 14 15 |
# File 'lib/database_cleaner/active_record/deletion.rb', line 13 def delete_table(table_name) execute("DELETE FROM #{quote_table_name(table_name)};") end |
#truncate_table(table_name) ⇒ Object
45 46 47 |
# File 'lib/database_cleaner/active_record/truncation.rb', line 45 def truncate_table(table_name) execute("TRUNCATE TABLE #{quote_table_name(table_name)};") end |