Module: Pakyow::Data::Adapters::Sql::Migrator::AdapterMethods::Mysql Private

Defined in:
lib/pakyow/data/adapters/sql/migrator/adapter_methods.rb

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.globalize_connection_opts!(connection_opts) ⇒ 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.



23
24
25
26
# File 'lib/pakyow/data/adapters/sql/migrator/adapter_methods.rb', line 23

def self.globalize_connection_opts!(connection_opts)
  connection_opts[:initial] = Sql.build_opts(path: connection_opts[:path])
  connection_opts[:path] = nil
end

Instance Method Details

#create!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.



11
12
13
14
15
# File 'lib/pakyow/data/adapters/sql/migrator/adapter_methods.rb', line 11

def create!
  handle_error do
    @connection.adapter.connection.run("CREATE DATABASE `#{database}`")
  end
end

#drop!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.



17
18
19
20
21
# File 'lib/pakyow/data/adapters/sql/migrator/adapter_methods.rb', line 17

def drop!
  handle_error do
    @connection.adapter.connection.run("DROP DATABASE `#{database}`")
  end
end