Class: ActiveRecord::Tasks::FirebirdDatabaseTasks

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/tasks/firebird_database_tasks.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ FirebirdDatabaseTasks

Returns a new instance of FirebirdDatabaseTasks.



6
7
8
9
# File 'lib/active_record/tasks/firebird_database_tasks.rb', line 6

def initialize(configuration)
  ActiveSupport::Deprecation.warn "This database tasks were deprecated, because this tasks should be served by the 3rd party adapter."
  @configuration = configuration
end

Instance Method Details

#charsetObject



24
25
26
# File 'lib/active_record/tasks/firebird_database_tasks.rb', line 24

def charset
  $stderr.puts 'sorry, your database adapter is not supported yet, feel free to submit a patch'
end

#createObject



11
12
13
# File 'lib/active_record/tasks/firebird_database_tasks.rb', line 11

def create
  $stderr.puts 'sorry, your database adapter is not supported yet, feel free to submit a patch'
end

#dropObject



15
16
17
# File 'lib/active_record/tasks/firebird_database_tasks.rb', line 15

def drop
  $stderr.puts 'sorry, your database adapter is not supported yet, feel free to submit a patch'
end

#purgeObject



19
20
21
22
# File 'lib/active_record/tasks/firebird_database_tasks.rb', line 19

def purge
  establish_connection(:test)
  connection.recreate_database!
end

#structure_dump(filename) ⇒ Object



28
29
30
31
32
# File 'lib/active_record/tasks/firebird_database_tasks.rb', line 28

def structure_dump(filename)
  set_firebird_env(configuration)
  db_string = firebird_db_string(configuration)
  Kernel.system "isql -a #{db_string} > #{filename}"
end

#structure_load(filename) ⇒ Object



34
35
36
37
38
# File 'lib/active_record/tasks/firebird_database_tasks.rb', line 34

def structure_load(filename)
  set_firebird_env(configuration)
  db_string = firebird_db_string(configuration)
  Kernel.system "isql -i #{filename} #{db_string}"
end