提交 7a26a67b 编写于 作者: J John Aughey 提交者: Pratik Naik

Ensure SQLite adapters stores the config [#1947 state:resolved] [John Aughey, Pratik Naik]

Signed-off-by: NPratik Naik <pratiknaik@gmail.com>
上级 5e0f6214
......@@ -18,7 +18,7 @@ def self.sqlite3_connection(config) # :nodoc:
db.busy_timeout(config[:timeout]) unless config[:timeout].nil?
ConnectionAdapters::SQLite3Adapter.new(db, logger)
ConnectionAdapters::SQLite3Adapter.new(db, logger, config)
end
end
......
......@@ -17,9 +17,9 @@ def sqlite_connection(config) # :nodoc:
# "Downgrade" deprecated sqlite API
if SQLite.const_defined?(:Version)
ConnectionAdapters::SQLite2Adapter.new(db, logger)
ConnectionAdapters::SQLite2Adapter.new(db, logger, config)
else
ConnectionAdapters::DeprecatedSQLiteAdapter.new(db, logger)
ConnectionAdapters::DeprecatedSQLiteAdapter.new(db, logger, config)
end
end
end
......@@ -72,6 +72,11 @@ def binary_to_string(value)
#
# * <tt>:database</tt> - Path to the database file.
class SQLiteAdapter < AbstractAdapter
def initialize(connection, logger, config)
super(connection, logger)
@config = config
end
def adapter_name #:nodoc:
'SQLite'
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册