Struct pg_async::PgResult [] [src]

pub struct PgResult {
    pub res: *mut PGresult,
    pub rows: u32,
    pub columns: u32,
}

Fields

Methods

impl PgResult
[src]

True if there are no rows in the result.

Number of rows.

PostgreSQL internal OID number of the column type.

Returns the column name associated with the given column number. Column numbers start at 0.

Iterator over result rows.

Converts a PostgreSQL query result into a JSON array of rows, [{$name: $value, ...}, ...].

Auto-unpack results.

#[derive(Deserialize)] struct Bar {id: i64}
impl Bar {
  fn load() -> Box<Future<Item=Vec<Bar>, Error=PgFutureErr>> {
    Box::new (PGA.execute ("SELECT id FROM bars") .and_then (|pr| pr[0].deserialize()))
  }
}

Trait Implementations

impl Sync for PgResult
[src]

impl Send for PgResult
[src]

impl Drop for PgResult
[src]

A method called when the value goes out of scope. Read more

impl Debug for PgResult
[src]

Formats the value using the given formatter.