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
82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/arjdbc/jdbc/connection.rb', line 82 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 ::ActiveRecord::JDBCError.new("The driver encountered an unknown error: #{e}").tap { |err| err.errno = 0 err.sql_exception = e } end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
72 73 74 |
# File 'lib/arjdbc/jdbc/connection.rb', line 72 def adapter @adapter end |
#connection_factory ⇒ Object (readonly)
Returns the value of attribute connection_factory.
72 73 74 |
# File 'lib/arjdbc/jdbc/connection.rb', line 72 def connection_factory @connection_factory end |
Instance Method Details
#active? ⇒ Boolean
122 123 124 |
# File 'lib/arjdbc/jdbc/connection.rb', line 122 def active? @connection end |
#jndi_connection? ⇒ Boolean
118 119 120 |
# File 'lib/arjdbc/jdbc/connection.rb', line 118 def jndi_connection? @jndi_connection end |