Class: DBI::DBD::Pg::PgExecutorAsync

### Home Classes Methods

### In Files

- lib/dbd/pg/exec.rb

### Parent

DBI::DBD::Pg::PgExecutor

### Methods

- #exec
- #exec_prepared
- #prepare

### Files

- ChangeLog
- LICENSE
- README

### Class/Module Index

Quicksearch

- DBI
- DBI::DBD
- DBI::DBD::Pg
- DBI::DBD::Pg::Database
- DBI::DBD::Pg::Driver
- DBI::DBD::Pg::PgExecutor
- DBI::DBD::Pg::PgExecutorAsync
- DBI::DBD::Pg::Statement
- DBI::DBD::Pg::Statement::DummyQuoter
- DBI::DBD::Pg::Tuples
- DBI::DBD::Pg::Type
- DBI::DBD::Pg::Type::Array
- DBI::DBD::Pg::Type::ByteA

No matching classes.

# DBI::DBD::Pg::PgExecutorAsync

Asynchronous implementation of PgExecutor, useful for 'green thread' implementations (e.g., MRI <= 1.8.x) which would otherwise suspend other threads while awaiting query results.

### Public Instance Methods

exec(sql, parameters = nil) click to toggle source

    # File lib/dbd/pg/exec.rb, line 31
    def exec(sql, parameters = nil)
        @pg_conn.async_exec(sql, parameters)
    end

exec_prepared(stmt_name, parameters = nil) click to toggle source

    # File lib/dbd/pg/exec.rb, line 35
    def exec_prepared(stmt_name, parameters = nil)
        @pg_conn.send_query_prepared(stmt_name, parameters)
        @pg_conn.block()
        @pg_conn.get_last_result()
    end

prepare(stmt_name, sql) click to toggle source

    # File lib/dbd/pg/exec.rb, line 41
    def prepare(stmt_name, sql)
        @pg_conn.send_prepare(stmt_name, sql)
        @pg_conn.block()
        @pg_conn.get_last_result()
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.