[][src]Trait diesel::row::NamedRow

pub trait NamedRow<'a, DB: Backend>: Row<'a, DB> {
    fn get<'b, ST, T>(&self, column_name: &'b str) -> Result<T>
    where
        T: FromSql<ST, DB>
; }

Represents a row of a SQL query, where the values are accessed by name rather than by index.

This trait is used by implementations of QueryableByName

Required methods

fn get<'b, ST, T>(&self, column_name: &'b str) -> Result<T> where
    T: FromSql<ST, DB>, 

Retrieve and deserialize a single value from the query

Note that ST must be the exact type of the value with that name in the query. The compiler will not be able to verify that you have provided the correct type. If there is a mismatch, you may receive an incorrect value, or a runtime error.

If two or more fields in the query have the given name, the result of this function is undefined.

Loading content...

Implementors

impl<'a, R, DB> NamedRow<'a, DB> for R where
    R: Row<'a, DB>,
    DB: Backend
[src]

Loading content...