Class: Lotus::CliSubCommands::DB Private

Inherits:
Thor
  • Object
show all
Defined in:
lib/lotus/cli_sub_commands/db.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

A set of subcommands related to DB

It is run with:

`bundle exec lotus db`

Since:

  • 0.6.0

Instance Method Summary collapse

Instance Method Details

#applyObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.6.0



62
63
64
65
66
67
68
69
70
# File 'lib/lotus/cli_sub_commands/db.rb', line 62

def apply
  if options[:help]
    invoke :help, ['apply']
  else
    assert_development_environment!
    require 'lotus/commands/db/apply'
    Lotus::Commands::DB::Apply.new(options).start
  end
end

#console(name = nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.6.0



16
17
18
19
20
21
22
23
# File 'lib/lotus/cli_sub_commands/db.rb', line 16

def console(name = nil)
  if options[:help]
    invoke :help, ['console']
  else
    require 'lotus/commands/db/console'
    Lotus::Commands::DB::Console.new(options, name).start
  end
end

#createObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.6.0



27
28
29
30
31
32
33
34
35
# File 'lib/lotus/cli_sub_commands/db.rb', line 27

def create
  if options[:help]
    invoke :help, ['create']
  else
    assert_allowed_environment!
    require 'lotus/commands/db/create'
    Lotus::Commands::DB::Create.new(options).start
  end
end

#dropObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.6.0



39
40
41
42
43
44
45
46
47
# File 'lib/lotus/cli_sub_commands/db.rb', line 39

def drop
  if options[:help]
    invoke :help, ['drop']
  else
    assert_allowed_environment!
    require 'lotus/commands/db/drop'
    Lotus::Commands::DB::Drop.new(options).start
  end
end

#migrate(version = nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.6.0



51
52
53
54
55
56
57
58
# File 'lib/lotus/cli_sub_commands/db.rb', line 51

def migrate(version = nil)
  if options[:help]
    invoke :help, ['migrate']
  else
    require 'lotus/commands/db/migrate'
    Lotus::Commands::DB::Migrate.new(options, version).start
  end
end

#prepareObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.6.0



74
75
76
77
78
79
80
81
82
# File 'lib/lotus/cli_sub_commands/db.rb', line 74

def prepare
  if options[:help]
    invoke :help, ['prepare']
  else
    assert_allowed_environment!
    require 'lotus/commands/db/prepare'
    Lotus::Commands::DB::Prepare.new(options).start
  end
end

#versionObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.6.0



88
89
90
91
92
93
94
95
# File 'lib/lotus/cli_sub_commands/db.rb', line 88

def version
  if options[:help]
    invoke :help, ['version']
  else
    require 'lotus/commands/db/version'
    Lotus::Commands::DB::Version.new(options).start
  end
end