Class: Hanami::CLI::Commands::App::DB::Utils::Sqlite Private

Inherits:
Database
  • Object
show all
Defined in:
lib/hanami/cli/commands/app/db/utils/sqlite.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.

Since:

  • 2.0.0

Constant Summary

Constants inherited from Database

Database::SCHEME_MAP

Instance Attribute Summary

Attributes inherited from Database

#app, #config

Instance Method Summary collapse

Methods inherited from Database

[], #applied_migrations, #connection, #gateway, #initialize, #migrator, #name, #rom_config, #root_path, #run_migrations

Constructor Details

This class inherits a constructor from Hanami::CLI::Commands::App::DB::Utils::Database

Instance Method Details

#create_commandObject

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:

  • 2.0.0



14
15
16
17
# File 'lib/hanami/cli/commands/app/db/utils/sqlite.rb', line 14

def create_command
  rom_config
  true
end

#drop_commandObject

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:

  • 2.0.0



20
21
22
23
# File 'lib/hanami/cli/commands/app/db/utils/sqlite.rb', line 20

def drop_command
  file_path.unlink
  true
end

#dump_commandObject

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.

Raises:

Since:

  • 2.0.0



26
27
28
# File 'lib/hanami/cli/commands/app/db/utils/sqlite.rb', line 26

def dump_command
  raise Hanami::CLI::NotImplementedError
end

#file_pathObject

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:

  • 2.0.0



36
37
38
# File 'lib/hanami/cli/commands/app/db/utils/sqlite.rb', line 36

def file_path
  @file_path ||= Pathname("#{root_path}#{config.uri.path}").realpath
end

#load_commandObject

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.

Raises:

Since:

  • 2.0.0



31
32
33
# File 'lib/hanami/cli/commands/app/db/utils/sqlite.rb', line 31

def load_command
  raise Hanami::CLI::NotImplementedError
end