Class: DBI::DBD::Pg::PgExecutor

Inherits:
Object
  • Object
show all
Defined in:
lib/dbd/pg/exec.rb

Overview

Convenience adaptor to hide details command execution API calls. See PgExecutorAsync subclass

Direct Known Subclasses

PgExecutorAsync

Instance Method Summary collapse

Constructor Details

#initialize(pg_conn) ⇒ PgExecutor

Returns a new instance of PgExecutor.



6
7
8
# File 'lib/dbd/pg/exec.rb', line 6

def initialize(pg_conn)
    @pg_conn = pg_conn
end

Instance Method Details

#exec(sql, parameters = nil) ⇒ Object



10
11
12
# File 'lib/dbd/pg/exec.rb', line 10

def exec(sql, parameters = nil)
    @pg_conn.exec(sql, parameters)
end

#exec_prepared(stmt_name, parameters = nil) ⇒ Object



14
15
16
# File 'lib/dbd/pg/exec.rb', line 14

def exec_prepared(stmt_name, parameters = nil)
    @pg_conn.exec_prepared(stmt_name, parameters)
end

#prepare(stmt_name, sql) ⇒ Object



18
19
20
# File 'lib/dbd/pg/exec.rb', line 18

def prepare(stmt_name, sql)
    @pg_conn.prepare(stmt_name, sql)
end