Class: Rails::Generators::Database
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Classes:
| |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | Object |
Defined in: | railties/lib/rails/generators/database.rb |
Constant Summary
-
DATABASES =
# File 'railties/lib/rails/generators/database.rb', line 6%w( mysql trilogy postgresql sqlite3 )
Class Method Summary
Instance Method Summary
Class Method Details
.all
[ GitHub ]# File 'railties/lib/rails/generators/database.rb', line 19
def all @all ||= [ MySQL.new, PostgreSQL.new, MariaDB.new, SQLite3.new, ] end
.build(database_name)
[ GitHub ]# File 'railties/lib/rails/generators/database.rb', line 9
def build(database_name) case database_name when "mysql" then MySQL.new when "postgresql" then PostgreSQL.new when "trilogy" then MariaDB.new when "sqlite3" then SQLite3.new else Null.new end end
Instance Method Details
#base_package
# File 'railties/lib/rails/generators/database.rb', line 49
def base_package raise NotImplementedError end
#build_package
# File 'railties/lib/rails/generators/database.rb', line 53
def build_package raise NotImplementedError end
#feature
[ GitHub ]# File 'railties/lib/rails/generators/database.rb', line 60
def feature return unless feature_name { feature_name => {} } end
#feature_name
# File 'railties/lib/rails/generators/database.rb', line 41
def feature_name raise NotImplementedError end
#gem
# File 'railties/lib/rails/generators/database.rb', line 45
def gem raise NotImplementedError end
#host
[ GitHub ]# File 'railties/lib/rails/generators/database.rb', line 58
def host; end
#name
# File 'railties/lib/rails/generators/database.rb', line 29
def name raise NotImplementedError end
#port
# File 'railties/lib/rails/generators/database.rb', line 37
def port raise NotImplementedError end
#service
# File 'railties/lib/rails/generators/database.rb', line 33
def service raise NotImplementedError end
#socket
[ GitHub ]# File 'railties/lib/rails/generators/database.rb', line 57
def socket; end