Class: Osmer::Target::Pg::Connection
- Inherits:
-
Struct
- Object
- Struct
- Osmer::Target::Pg::Connection
- Defined in:
- lib/osmer/target/pg.rb
Instance Method Summary collapse
- #close ⇒ Object
- #exec(q, *args) ⇒ Object
-
#initialize(*args) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(*args) ⇒ Connection
Returns a new instance of Connection.
45 46 47 48 |
# File 'lib/osmer/target/pg.rb', line 45 def initialize(*args) super @conn = PG.connect end |
Instance Method Details
#close ⇒ Object
55 56 57 |
# File 'lib/osmer/target/pg.rb', line 55 def close @conn.close end |
#exec(q, *args) ⇒ Object
50 51 52 53 |
# File 'lib/osmer/target/pg.rb', line 50 def exec(q, *args) puts " #{q}" @conn.exec q, *args end |