Trait diesel::row::Field

source ·
pub trait Field<'a, DB: Backend> {
    // Required methods
    fn field_name(&self) -> Option<&str>;
    fn value(&self) -> Option<DB::RawValue<'_>>;

    // Provided method
    fn is_null(&self) -> bool { ... }
}
Expand description

Represents a single field in a database row.

This trait allows retrieving information on the name of the colum and on the value of the field.

Required Methods§

source

fn field_name(&self) -> Option<&str>

The name of the current field

Returns None if it’s an unnamed field

source

fn value(&self) -> Option<DB::RawValue<'_>>

Get the value representing the current field in the raw representation as it is transmitted by the database

Provided Methods§

source

fn is_null(&self) -> bool

Checks whether this field is null or not.

Implementors§