Module: Simple::SQL::Connection::ActiveRecordConnection

Extended by:
Forwardable, ActiveRecordConnection, Simple::SQL::ConnectionAdapter
Included in:
ActiveRecordConnection
Defined in:
lib/simple/sql/connection.rb

Constant Summary

Constants included from Simple::SQL::ConnectionAdapter

Simple::SQL::ConnectionAdapter::Logging, Simple::SQL::ConnectionAdapter::Scope

Instance Method Summary collapse

Methods included from Simple::SQL::ConnectionAdapter

all, ask, each, exec, locked, print, resolve_type

Instance Method Details

#connectionObject



65
66
67
# File 'lib/simple/sql/connection.rb', line 65

def connection
  ActiveRecord::Base.connection
end

#disconnect!Object



59
60
61
62
63
# File 'lib/simple/sql/connection.rb', line 59

def disconnect!
  # This doesn't really disconnect. We hope ActiveRecord puts the connection
  # back into the connection pool instead.
  @raw_connection = nil
end

#raw_connectionObject



55
56
57
# File 'lib/simple/sql/connection.rb', line 55

def raw_connection
  ActiveRecord::Base.connection.raw_connection
end