提交 93f8bd15 编写于 作者: M Michael Koziarski

Provide access to the underlying database connection with...

Provide access to the underlying database connection with Adapter#raw_connection, allows the use of db-specific methods such as postgresql's lo_* . Closes #2090


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3914 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 7fdab444
*SVN*
* Remove broken attempts at handling columns with a a default of 'now()' in the postgresql adapter. #2257 [Koz]
* Provide access to the underlying database connection through Adapter#raw_connection. Enables the use of db-specific methods without complicating the adapters. #2090 [Koz]
* Remove broken attempts at handling columns with a default of 'now()' in the postgresql adapter. #2257 [Koz]
* Added connection#current_database that'll return of the current database (only works in MySQL, SQL Server, and Oracle so far -- please help implement for the rest of the adapters) #3663 [Tom ward]
......
......@@ -87,6 +87,13 @@ def verify!(timeout)
end
end
# Provides access to the underlying database connection. Useful for
# when you need to call a proprietary method such as postgresql's lo_*
# methods
def raw_connection
@connection
end
protected
def log(sql, name)
if block_given?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册