diff options
author | Michael Koziarski <michael@koziarski.com> | 2006-03-18 05:03:34 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2006-03-18 05:03:34 +0000 |
commit | 93f8bd15a11d5292885d585669a61a7364d1a1b0 (patch) | |
tree | 2147970254406829d1fe3d8a968800778d905c68 /activerecord/lib/active_record | |
parent | 7fdab4446a91824b16ebf52d35dc9c6854276aac (diff) | |
download | rails-93f8bd15a11d5292885d585669a61a7364d1a1b0.tar.gz rails-93f8bd15a11d5292885d585669a61a7364d1a1b0.tar.bz2 rails-93f8bd15a11d5292885d585669a61a7364d1a1b0.zip |
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
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-x | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index a52d7f4fb0..4eea7e5434 100755 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -86,6 +86,13 @@ module ActiveRecord @last_verification = now 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) |