Class: RareMap::DatabaseProfile
- Inherits:
-
Object
- Object
- RareMap::DatabaseProfile
- Defined in:
- lib/rare_map/database_profile.rb
Overview
RareMap::DatabaseProfile defines all metadata of a database.
Instance Attribute Summary collapse
-
#connection ⇒ Hash
readonly
The connection config of this DatabaseProfile.
-
#name ⇒ String
readonly
The name of this DatabaseProfile.
-
#options ⇒ Options
readonly
The Options of this DatabaseProfile.
-
#schema ⇒ String
The schema dump of this DatabaseProfile.
-
#tables ⇒ Array
An Array of Table of this DatabaseProfile.
Instance Method Summary collapse
-
#initialize(name, connection, options = nil) ⇒ DatabaseProfile
constructor
Creates a DatabaseProfile.
Constructor Details
#initialize(name, connection, options = nil) ⇒ DatabaseProfile
Creates a DatabaseProfile.
26 27 28 29 30 |
# File 'lib/rare_map/database_profile.rb', line 26 def initialize(name, connection, = nil) @name, @connection = name, connection = || Options.new @tables = [] end |
Instance Attribute Details
#connection ⇒ Hash (readonly)
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, = nil) @name, @connection = name, connection = || Options.new @tables = [] end end |
#name ⇒ String (readonly)
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, = nil) @name, @connection = name, connection = || Options.new @tables = [] end end |
#options ⇒ Options (readonly)
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, = nil) @name, @connection = name, connection = || Options.new @tables = [] end end |
#schema ⇒ String
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, = nil) @name, @connection = name, connection = || Options.new @tables = [] end end |
#tables ⇒ Array
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, = nil) @name, @connection = name, connection = || Options.new @tables = [] end end |