Namespace

Module

Class

Methods

Constants

DATABASES = %w( mysql trilogy postgresql sqlite3 )

Class Public methods

all()

📝 Source code
# File railties/lib/rails/generators/database.rb, line 19
        def all
          @all ||= [
            MySQL.new,
            PostgreSQL.new,
            MariaDB.new,
            SQLite3.new,
          ]
        end
🔎 See on GitHub

build(database_name)

📝 Source code
# 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
🔎 See on GitHub

Instance Public methods

base_package()

📝 Source code
# File railties/lib/rails/generators/database.rb, line 49
      def base_package
        raise NotImplementedError
      end
🔎 See on GitHub

build_package()

📝 Source code
# File railties/lib/rails/generators/database.rb, line 53
      def build_package
        raise NotImplementedError
      end
🔎 See on GitHub

feature()

📝 Source code
# File railties/lib/rails/generators/database.rb, line 60
      def feature
        return unless feature_name

        { feature_name => {} }
      end
🔎 See on GitHub

feature_name()

📝 Source code
# File railties/lib/rails/generators/database.rb, line 41
      def feature_name
        raise NotImplementedError
      end
🔎 See on GitHub

gem()

📝 Source code
# File railties/lib/rails/generators/database.rb, line 45
      def gem
        raise NotImplementedError
      end
🔎 See on GitHub

host()

📝 Source code
# File railties/lib/rails/generators/database.rb, line 58
      def host; end
🔎 See on GitHub

name()

📝 Source code
# File railties/lib/rails/generators/database.rb, line 29
      def name
        raise NotImplementedError
      end
🔎 See on GitHub

port()

📝 Source code
# File railties/lib/rails/generators/database.rb, line 37
      def port
        raise NotImplementedError
      end
🔎 See on GitHub

service()

📝 Source code
# File railties/lib/rails/generators/database.rb, line 33
      def service
        raise NotImplementedError
      end
🔎 See on GitHub

socket()

📝 Source code
# File railties/lib/rails/generators/database.rb, line 57
      def socket; end
🔎 See on GitHub

volume()

📝 Source code
# File railties/lib/rails/generators/database.rb, line 66
      def volume
        return unless service

        "#{name}-data"
      end
🔎 See on GitHub