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

- (PgExecutor) initialize(pg_conn)

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

- (Object) exec(sql, parameters = nil)



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

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

- (Object) exec_prepared(stmt_name, parameters = nil)



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

- (Object) prepare(stmt_name, sql)



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

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