Class: CPRuntime::MySql2Client
- Inherits:
-
Object
- Object
- CPRuntime::MySql2Client
- Includes:
- CPRuntime
- Defined in:
- lib/cpruntime/mysql2client.rb,
lib/cpruntime/mysql2client.rb
Constant Summary
Constants included from CPRuntime
Instance Method Summary collapse
Methods included from CPRuntime
#credential_map, #getHosts, refreshDedicatedServiceJsonDoc, service_json_doc, service_json_doc=
Instance Method Details
#create_from_svc(hostname) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/cpruntime/mysql2client.rb', line 11 def create_from_svc(hostname) m = credential_map("mysql") c = m[hostname] p c client = Mysql2::Client.new(:host => c.host,:username => c.username,:password=>c.password,:database=>c.db,:port=>c.port) end |