Class: Rails::Sequel::Storage::Mysql

Inherits:
Rails::Sequel::Storage show all
Defined in:
lib/sequel-rails/storage.rb

Direct Known Subclasses

Mysql2

Instance Attribute Summary

Attributes inherited from Rails::Sequel::Storage

#config

Instance Method Summary collapse

Methods inherited from Rails::Sequel::Storage

#charset, #create, create_all, create_environment, #database, #drop, drop_all, drop_environment, #host, #initialize, new, #owner, #password, #port, #username

Constructor Details

This class inherits a constructor from Rails::Sequel::Storage

Instance Method Details

#_createObject



132
133
134
# File 'lib/sequel-rails/storage.rb', line 132

def _create
  execute("CREATE DATABASE IF NOT EXISTS `#{database}` DEFAULT CHARACTER SET #{charset} DEFAULT COLLATE #{collation}")
end

#_dropObject



136
137
138
# File 'lib/sequel-rails/storage.rb', line 136

def _drop
  execute("DROP DATABASE IF EXISTS `#{database}`")
end