Class: ShopifyTransporter::Exporters::Magento::SQL
- Inherits:
-
Object
- Object
- ShopifyTransporter::Exporters::Magento::SQL
- Defined in:
- lib/shopify_transporter/exporters/magento/sql.rb
Instance Method Summary collapse
- #connect ⇒ Object
-
#initialize(database: '', host: '', port: 3306, user: '', password: '') ⇒ SQL
constructor
A new instance of SQL.
Constructor Details
#initialize(database: '', host: '', port: 3306, user: '', password: '') ⇒ SQL
Returns a new instance of SQL.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/shopify_transporter/exporters/magento/sql.rb', line 8 def initialize( database: '', host: '', port: 3306, user: '', password: '' ) @database = database @host = host @port = port @user = user @password = password end |
Instance Method Details
#connect ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/shopify_transporter/exporters/magento/sql.rb', line 23 def connect Sequel.connect( adapter: :mysql2, user: @user, password: @password, host: @host, port: @port, database: @database ) do |connection| yield connection end end |