Skip to content

Commit 450359d

Browse files
committed
Re-include ARJDBC statement caching
1 parent c156643 commit 450359d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/arjdbc/abstract/statement_cache.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def initialize(*args) # (connection, logger, config)
2424

2525
# Only say we support the statement cache if we are using prepared statements
2626
# and have a max number of statements defined
27-
statement_limit = self.class.type_cast_config_to_integer(config[:statement_limit])
27+
statement_limit = self.class.type_cast_config_to_integer(@config[:statement_limit])
2828
@jdbc_statement_cache_enabled = prepared_statements && (statement_limit.nil? || statement_limit > 0)
2929

3030
@statements = StatementPool.new(statement_limit) # AR (5.0) expects this to be stored as @statements

lib/arjdbc/mysql/adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Mysql2Adapter < AbstractMysqlAdapter
2828
include ArJdbc::Abstract::ConnectionManagement
2929
include ArJdbc::Abstract::DatabaseStatements
3030
# NOTE: do not include MySQL::DatabaseStatements
31-
# include ArJdbc::Abstract::StatementCache
31+
include ArJdbc::Abstract::StatementCache
3232
include ArJdbc::Abstract::TransactionSupport
3333

3434
include ArJdbc::MySQL

lib/arjdbc/postgresql/adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ class PostgreSQLAdapter < AbstractAdapter
749749
include ArJdbc::Abstract::Core
750750
include ArJdbc::Abstract::ConnectionManagement
751751
include ArJdbc::Abstract::DatabaseStatements
752-
# include ArJdbc::Abstract::StatementCache
752+
include ArJdbc::Abstract::StatementCache
753753
include ArJdbc::Abstract::TransactionSupport
754754
include ArJdbc::PostgreSQL
755755

0 commit comments

Comments
 (0)