Class: PerconaMigrator::DSN
- Inherits:
-
Object
- Object
- PerconaMigrator::DSN
- Defined in:
- lib/percona_migrator/dsn.rb
Overview
Represents the ‘DSN’ argument of Percona’s pt-online-schema-change See www.percona.com/doc/percona-toolkit/2.0/pt-online-schema-change.html#dsn-options
Instance Method Summary collapse
-
#initialize(database, table_name) ⇒ DSN
constructor
Constructor.
-
#to_s ⇒ Object
Returns the pt-online-schema-change DSN string.
Constructor Details
#initialize(database, table_name) ⇒ DSN
Constructor
11 12 13 14 |
# File 'lib/percona_migrator/dsn.rb', line 11 def initialize(database, table_name) @database = database @table_name = table_name end |
Instance Method Details
#to_s ⇒ Object
Returns the pt-online-schema-change DSN string. See www.percona.com/doc/percona-toolkit/2.0/pt-online-schema-change.html#dsn-options
18 19 20 |
# File 'lib/percona_migrator/dsn.rb', line 18 def to_s "D=#{database},t=#{table_name}" end |