Struct pg_async::PgRow

source ·
pub struct PgRow<'a>(_, _);

Implementations

True if the value is NULL.

  • column - The number of the column which value is to be tested with PQgetisnull. 0-based.

PostgreSQL internal OID number of the column type.

  • column - The number of the column which type is to be retrieved with PQftype. 0-based.

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

  • column - The number of the column. 0-based.

Return this row’s number withing the result.

Returns the number of columns in the row. Row numbers start at 0.

Get the byte slice of a value in the given column.

Returns an empty array if the value is NULL.

  • column - The column number. 0-based.

Tries to get an UTF-8 slice of a value in the given column.

Returns an empty string if the value is NULL.

  • column - The column number. 0-based.

Binary data unescaped from a bytea column.

  • column - The column number. 0-based.

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.

Auto-unpack the column value.

Converts the row into JSON, {$name: $value, …}.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.