Class: ActiveRecord::ConnectionAdapters::JdbcConnection
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::JdbcConnection
- Includes:
- ConfigHelper
- Defined in:
- lib/arjdbc/jdbc/connection.rb
Defined Under Namespace
Modules: ConfigHelper
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#connection_factory ⇒ Object
readonly
Returns the value of attribute connection_factory.
Attributes included from ConfigHelper
Instance Method Summary collapse
- #active? ⇒ Boolean
-
#initialize(config) ⇒ JdbcConnection
constructor
individual adapter.
- #jndi_connection? ⇒ Boolean
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
#adapter ⇒ Object
Returns the value of attribute adapter.
74 75 76 |
# File 'lib/arjdbc/jdbc/connection.rb', line 74 def adapter @adapter end |
#connection_factory ⇒ Object (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
120 121 122 |
# File 'lib/arjdbc/jdbc/connection.rb', line 120 def active? @connection end |
#jndi_connection? ⇒ Boolean
116 117 118 |
# File 'lib/arjdbc/jdbc/connection.rb', line 116 def jndi_connection? @jndi_connection end |