Parent

Files

Class/Module Index [+]

Quicksearch

ArJdbc::Tasks::H2DatabaseTasks

Protected Instance Methods

delete_database_files(config) click to toggle source

@override

# File lib/arjdbc/tasks/h2_database_tasks.rb, line 21
def delete_database_files(config)
  return unless db_base = database_base_name(config)
  for suffix in [ '.h2,db', '.mv.db', '.lock.db', '.trace.db' ]
    db_file = "#{db_base}#{suffix}"
    File.delete(db_file) if File.exist?(db_file)
  end
end
do_drop_database(config) click to toggle source

@override

# File lib/arjdbc/tasks/h2_database_tasks.rb, line 10
def do_drop_database(config)
  # ActiveRecord::JDBCError: org.h2.jdbc.JdbcSQLException:
  # Database is already closed (to disable automatic closing at VM
  # shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-170]:
  # SHUTDOWN COMPACT
  #
  # connection.shutdown
  connection.drop_database resolve_database(config)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.