Class: Connectator::Sybase::Connection

Inherits:
Base::Connection show all
Includes:
UsingDBIProxy
Defined in:
lib/connectator/sybase/connection.rb

Instance Attribute Summary

Attributes inherited from Base::Connection

#error

Instance Method Summary collapse

Methods inherited from Base::Connection

#connection_params, #method_missing, #ping?, #valid?, #valid_system_connection?

Constructor Details

#initialize(opts = {}) ⇒ Connection

Returns a new instance of Connection.



6
7
8
9
10
11
# File 'lib/connectator/sybase/connection.rb', line 6

def initialize(opts = {})
  connection_params.driver      = 'FreeTDS' 
  connection_params.tds_version = opts[:tds_version] || '5.0'
  connection_params.database    = opts[:database]    || 'master'
  super(opts)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Connectator::Base::Connection

Instance Method Details

#connection_stringObject



13
14
15
# File 'lib/connectator/sybase/connection.rb', line 13

def connection_string
  "DBI:ODBC:#{connection_params_list}"
end