copied from activerecord
# File lib/database_cleaner/data_mapper/truncation.rb, line 26 def disable_referential_integrity old = select("SELECT @@FOREIGN_KEY_CHECKS;") begin execute("SET FOREIGN_KEY_CHECKS = 0;") yield ensure execute("SET FOREIGN_KEY_CHECKS = #{old};") end end
taken from github.com/godfat/dm-mapping/tree/master
# File lib/database_cleaner/data_mapper/truncation.rb, line 17 def storage_names(repository = :default) select 'SHOW TABLES' end
Generated with the Darkfish Rdoc Generator 2.