Skip to main content

HasOneQuery

Trait HasOneQuery 

Source
pub trait HasOneQuery<Target> {
    // Provided method
    fn has_one(&self) -> Result<Option<Target>, RecordError>
       where Self: Record + Serialize + HasOneAssociation<Target>,
             Target: Querying,
             <Target::Entity as EntityTrait>::Column: ColumnTrait + Iterable { ... }
}
Expand description

Query helper generated for has_one! associations.

Provided Methods§

Source

fn has_one(&self) -> Result<Option<Target>, RecordError>
where Self: Record + Serialize + HasOneAssociation<Target>, Target: Querying, <Target::Entity as EntityTrait>::Column: ColumnTrait + Iterable,

Loads the singular associated record for the receiver.

Implementors§