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, exec, resolve_type

Instance Method Details

#connectionObject



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

def connection
  ActiveRecord::Base.connection
end

#disconnect!Object



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

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



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

def raw_connection
  ActiveRecord::Base.connection.raw_connection
end