Struct pg_async::PgRow
[−]
[src]
pub struct PgRow<'a>(_, _);
Methods
impl<'a> PgRow<'a>[src]
fn is_null(&self, column: u32) -> bool
True if the value is NULL.
fn ftype(&self, column: u32) -> Oid
PostgreSQL internal OID number of the column type.
fn fname(&'a self, column: u32) -> Result<&'a str, Utf8Error>
Returns the column name associated with the given column number. Column numbers start at 0.
fn num(&self) -> u32
Return this row's number withing the result.
fn len(&self) -> u32
Returns the number of columns in the row. Row numbers start at 0.
fn col(&self, column: u32) -> &'a [u8]
Returns an empty array if the value is NULL.
fn col_str(&self, column: u32) -> Result<&'a str, Utf8Error>
Returns an empty string if the value is NULL.
fn bytea(&self, column: u32) -> Vec<u8>
Binary data unescaped from a bytea column.
fn col_json(&self, column: u32, name: &str) -> Result<Json, PgFutureErr>
Converts the column into JSON.
column- The number of the column which value is to be converted to JSON. 0-based.name- The name of the column. To make the errors more verbose if they'd happen.
fn to_json(&self) -> Result<Json, PgFutureErr>
Converts the row into JSON, {$name: $value, ...}.