Sha256: d0fc4805e28ac33c144aaf88826689e5b96282e248b46b63ea205e490bf765f0
Contents?: true
Size: 712 Bytes
Versions: 3
Compression:
Stored size: 712 Bytes
Contents
module Legion module Data module Connections class JDBC attr_accessor :connection def initialize Legion::Logging.debug('Connecting to MySQL with JBDC Connector') connection_string = build_connection_string @connection = Sequel.connect(connection_string, max_connetions: @args[:max_connections]) Legion::Logging.info("Legion is connected to database #{args[:database]}") end def build_connection_string set = Legion::Settings[:data][:mysql] con_string = "jdbc:mysql://#{set[:host]}/#{set[:database]}?user=#{set[:user]}&password=#{set[:password]}" con_string end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
legion-data-0.2.0 | lib/legion/data/connections/jdbc.rb |
legion-data-0.1.1 | lib/legion/data/connections/jdbc.rb |
legion-data-0.1.0 | lib/legion/data/connections/jdbc.rb |