Class: ActiveRecord::ConnectionAdapters::JdbcConnection

Inherits:
Object
  • Object
show all
Includes:
ConfigHelper
Defined in:
lib/arjdbc/jdbc/connection.rb

Defined Under Namespace

Modules: ConfigHelper

Instance Attribute Summary collapse

Attributes included from ConfigHelper

#config

Instance Method Summary collapse

Methods included from ConfigHelper

#configure_connection, #configure_jdbc, #configure_jndi, #configure_url

Constructor Details

#initialize(config) ⇒ JdbcConnection

individual adapter. My guess is that if we loaded two adapters of different types then this is used as a base to be tweaked by each adapter to create @native_database_types



84
85
86
87
88
89
90
91
92
93
94
# File 'lib/arjdbc/jdbc/connection.rb', line 84

def initialize(config)
  self.config = config
  configure_connection
  connection # force the connection to load
  set_native_database_types
  @stmts = {}
rescue ::ActiveRecord::ActiveRecordError
  raise
rescue Exception => e
  raise "The driver encountered an unknown error: #{e}"
end

Instance Attribute Details

#adapterObject

Returns the value of attribute adapter.



74
75
76
# File 'lib/arjdbc/jdbc/connection.rb', line 74

def adapter
  @adapter
end

#connection_factoryObject (readonly)

Returns the value of attribute connection_factory.



74
75
76
# File 'lib/arjdbc/jdbc/connection.rb', line 74

def connection_factory
  @connection_factory
end

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


120
121
122
# File 'lib/arjdbc/jdbc/connection.rb', line 120

def active?
  @connection
end

#jndi_connection?Boolean

Returns:

  • (Boolean)


116
117
118
# File 'lib/arjdbc/jdbc/connection.rb', line 116

def jndi_connection?
  @jndi_connection
end