Class: ElasticsearchRecord::Tasks::ElasticsearchDatabaseTasks

Inherits:
Object
  • Object
show all
Defined in:
lib/elasticsearch_record/tasks/elasticsearch_database_tasks.rb

Instance Method Summary collapse

Constructor Details

#initialize(db_config) ⇒ ElasticsearchDatabaseTasks

Returns a new instance of ElasticsearchDatabaseTasks.



8
9
10
# File 'lib/elasticsearch_record/tasks/elasticsearch_database_tasks.rb', line 8

def initialize(db_config)
  @db_config = db_config
end

Instance Method Details

#createObject



12
13
14
15
# File 'lib/elasticsearch_record/tasks/elasticsearch_database_tasks.rb', line 12

def create
  # 'create' database / cluster is not supported
  nil
end

#dropObject



17
18
19
20
# File 'lib/elasticsearch_record/tasks/elasticsearch_database_tasks.rb', line 17

def drop
  # 'drop' database / cluster is not supported
  nil
end

#purgeObject



22
23
24
25
# File 'lib/elasticsearch_record/tasks/elasticsearch_database_tasks.rb', line 22

def purge
  create
  drop
end

#structure_dumpObject



27
28
29
30
# File 'lib/elasticsearch_record/tasks/elasticsearch_database_tasks.rb', line 27

def structure_dump(*)
  $stdout.puts "\n>>> 'structure_dump' elasticsearch is not supported and will be ignored!"
  nil
end

#structure_loadObject



32
33
34
35
# File 'lib/elasticsearch_record/tasks/elasticsearch_database_tasks.rb', line 32

def structure_load(*)
  $stdout.puts "\n>>> 'structure_load' elasticsearch is not supported and will be ignored!"
  nil
end