Class: Simple::SQL::Connection::PgConnection

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_connectionObject (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