命名空间
- 模块 Rails::Generators::Database::MariaDB
- 模块 Rails::Generators::Database::MySQL
- 类 Rails::Generators::Database::MariaDBMySQL2
- 类 Rails::Generators::Database::MariaDBTrilogy
- 类 Rails::Generators::Database::MySQL2
- 类 Rails::Generators::Database::Null
- 类 Rails::Generators::Database::PostgreSQL
- 类 Rails::Generators::Database::SQLite3
- 类 Rails::Generators::Database::Trilogy
方法
- A
- B
- F
- G
- H
- N
- P
- S
- T
- V
常量
DATABASES | = | %w( mysql trilogy postgresql sqlite3 mariadb-mysql mariadb-trilogy ) |
类公共方法
all() 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/generators/database.rb, line 84 def all @all ||= [ MySQL2.new, PostgreSQL.new, SQLite3.new, MariaDBMySQL2.new, MariaDBTrilogy.new ] end
build(database_name) 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/generators/database.rb, line 72 def build(database_name) case database_name when "mysql" then MySQL2.new when "postgresql" then PostgreSQL.new when "trilogy" then Trilogy.new when "sqlite3" then SQLite3.new when "mariadb-mysql" then MariaDBMySQL2.new when "mariadb-trilogy" then MariaDBTrilogy.new else Null.new end end
实例公共方法
base_package() 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/generators/database.rb, line 119 def base_package raise NotImplementedError end
build_package() 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/generators/database.rb, line 123 def build_package raise NotImplementedError end
feature() 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/generators/database.rb, line 130 def feature return unless feature_name { feature_name => {} } end
feature_name() 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/generators/database.rb, line 111 def feature_name raise NotImplementedError end
gem() 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/generators/database.rb, line 115 def gem raise NotImplementedError end
host() 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/generators/database.rb, line 128 def host; end
name() 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/generators/database.rb, line 95 def name raise NotImplementedError end
port() 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/generators/database.rb, line 107 def port raise NotImplementedError end
service() 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/generators/database.rb, line 103 def service raise NotImplementedError end
socket() 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/generators/database.rb, line 127 def socket; end
template() 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/generators/database.rb, line 99 def template raise NotImplementedError end
volume() 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/generators/database.rb, line 136 def volume return unless service "#{name}-data" end