Class: RareMap::DatabaseProfile

Inherits:
Object
  • Object
show all
Defined in:
lib/rare_map/database_profile.rb

Overview

RareMap::DatabaseProfile defines all metadata of a database.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, connection, options = nil) ⇒ DatabaseProfile

Creates a DatabaseProfile.

Parameters:

  • the name of this DatabaseProfile

  • the connection config of this DatabaseProfile

  • (defaults to: nil)

    the Options of this DatabaseProfile



26
27
28
29
30
# File 'lib/rare_map/database_profile.rb', line 26

def initialize(name, connection, options = nil)
  @name, @connection = name, connection
  @options = options || Options.new
  @tables = []
end

Instance Attribute Details

#connectionHash (readonly)

Returns the connection config of this DatabaseProfile.

Returns:

  • the connection config of this DatabaseProfile



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/rare_map/database_profile.rb', line 16

class DatabaseProfile
  attr_reader :name, :connection, :options
  attr_accessor :schema, :tables
  
  # Creates a DatabaseProfile.
  #
  # @param [String] name the name of this DatabaseProfile
  # @param [Hash] connection the connection config of this DatabaseProfile
  # @param [Options] options the Options of this DatabaseProfile
  # @return [DatabaseProfile] a DatabaseProfile object
  def initialize(name, connection, options = nil)
    @name, @connection = name, connection
    @options = options || Options.new
    @tables = []
  end
end

#nameString (readonly)

Returns the name of this DatabaseProfile.

Returns:

  • the name of this DatabaseProfile



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/rare_map/database_profile.rb', line 16

class DatabaseProfile
  attr_reader :name, :connection, :options
  attr_accessor :schema, :tables
  
  # Creates a DatabaseProfile.
  #
  # @param [String] name the name of this DatabaseProfile
  # @param [Hash] connection the connection config of this DatabaseProfile
  # @param [Options] options the Options of this DatabaseProfile
  # @return [DatabaseProfile] a DatabaseProfile object
  def initialize(name, connection, options = nil)
    @name, @connection = name, connection
    @options = options || Options.new
    @tables = []
  end
end

#optionsOptions (readonly)

Returns the Options of this DatabaseProfile.

Returns:

  • the Options of this DatabaseProfile



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/rare_map/database_profile.rb', line 16

class DatabaseProfile
  attr_reader :name, :connection, :options
  attr_accessor :schema, :tables
  
  # Creates a DatabaseProfile.
  #
  # @param [String] name the name of this DatabaseProfile
  # @param [Hash] connection the connection config of this DatabaseProfile
  # @param [Options] options the Options of this DatabaseProfile
  # @return [DatabaseProfile] a DatabaseProfile object
  def initialize(name, connection, options = nil)
    @name, @connection = name, connection
    @options = options || Options.new
    @tables = []
  end
end

#schemaString

Returns the schema dump of this DatabaseProfile.

Returns:

  • the schema dump of this DatabaseProfile



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/rare_map/database_profile.rb', line 16

class DatabaseProfile
  attr_reader :name, :connection, :options
  attr_accessor :schema, :tables
  
  # Creates a DatabaseProfile.
  #
  # @param [String] name the name of this DatabaseProfile
  # @param [Hash] connection the connection config of this DatabaseProfile
  # @param [Options] options the Options of this DatabaseProfile
  # @return [DatabaseProfile] a DatabaseProfile object
  def initialize(name, connection, options = nil)
    @name, @connection = name, connection
    @options = options || Options.new
    @tables = []
  end
end

#tablesArray

Returns an Array of Table of this DatabaseProfile.

Returns:

  • an Array of Table of this DatabaseProfile



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/rare_map/database_profile.rb', line 16

class DatabaseProfile
  attr_reader :name, :connection, :options
  attr_accessor :schema, :tables
  
  # Creates a DatabaseProfile.
  #
  # @param [String] name the name of this DatabaseProfile
  # @param [Hash] connection the connection config of this DatabaseProfile
  # @param [Options] options the Options of this DatabaseProfile
  # @return [DatabaseProfile] a DatabaseProfile object
  def initialize(name, connection, options = nil)
    @name, @connection = name, connection
    @options = options || Options.new
    @tables = []
  end
end