Class: Simple::SQL::Connection::PgConnection
- Inherits:
-
Object
- Object
- Simple::SQL::Connection::PgConnection
- Extended by:
- Forwardable
- Includes:
- Simple::SQL::ConnectionAdapter, SimpleTransactions
- Defined in:
- lib/simple/sql/connection.rb
Overview
A PgConnection object is built around a raw connection. It includes the ConnectionAdapter, which implements ask, all, + friends, and also includes a quiet simplistic Transaction implementation
Constant Summary
Constants included from Simple::SQL::ConnectionAdapter
Simple::SQL::ConnectionAdapter::Decoder, Simple::SQL::ConnectionAdapter::Encoder, Simple::SQL::ConnectionAdapter::Logging, Simple::SQL::ConnectionAdapter::Scope
Instance Attribute Summary collapse
-
#raw_connection ⇒ Object
readonly
Returns the value of attribute raw_connection.
Instance Method Summary collapse
-
#initialize(raw_connection) ⇒ PgConnection
constructor
A new instance of PgConnection.
Methods included from SimpleTransactions
#transaction, #tx_nesting_level, #tx_nesting_level=
Methods included from Simple::SQL::ConnectionAdapter
#all, #ask, #exec, #resolve_type
Constructor Details
#initialize(raw_connection) ⇒ PgConnection
Returns a new instance of PgConnection.
17 18 19 |
# File 'lib/simple/sql/connection.rb', line 17 def initialize(raw_connection) @raw_connection = raw_connection end |
Instance Attribute Details
#raw_connection ⇒ Object (readonly)
Returns the value of attribute raw_connection.
15 16 17 |
# File 'lib/simple/sql/connection.rb', line 15 def raw_connection @raw_connection end |