Lightweight 0.20260921.0
Loading...
Searching...
No Matches
Lightweight::CompositeForeignKey< Connections >::Loader Struct Reference

Carries the deferred load, installed by the DataMapper. More...

#include <CompositeForeignKey.hpp>

Public Member Functions

std::weak_ordering operator<=> (Loader const &) const noexcept
 Loaders carry no comparable state of their own, so any two are considered equivalent.
 
bool operator== (Loader const &) const noexcept
 

Public Attributes

std::function< RelationResult< std::shared_ptr< ReferencedRecord > >()> loadReference {}
 Loads the referenced record: RelationError::NotFound when none exists.
 

Detailed Description

template<ConnectionType... Connections>
struct Lightweight::CompositeForeignKey< Connections >::Loader

Carries the deferred load, installed by the DataMapper.

Definition at line 397 of file CompositeForeignKey.hpp.

Member Function Documentation

◆ operator<=>()

template<ConnectionType... Connections>
std::weak_ordering Lightweight::CompositeForeignKey< Connections >::Loader::operator<=> ( Loader const &  ) const
inlinenoexcept

Loaders carry no comparable state of their own, so any two are considered equivalent.

Definition at line 403 of file CompositeForeignKey.hpp.

◆ operator==()

template<ConnectionType... Connections>
bool Lightweight::CompositeForeignKey< Connections >::Loader::operator== ( Loader const &  ) const
inlinenoexcept

Loaders carry no comparable state of their own, so any two compare equal.

A defaulted == on the enclosing class does not derive equality from a member's <=> - each member needs its own viable ==, or the default is silently deleted. See HasMany::Loader for the same shape (there, without this operator; equal by convention since it holds none of the relation's state).

Definition at line 414 of file CompositeForeignKey.hpp.

Member Data Documentation

◆ loadReference

template<ConnectionType... Connections>
std::function<RelationResult<std::shared_ptr<ReferencedRecord> >()> Lightweight::CompositeForeignKey< Connections >::Loader::loadReference {}

Loads the referenced record: RelationError::NotFound when none exists.

Definition at line 400 of file CompositeForeignKey.hpp.

Referenced by Lightweight::CompositeForeignKey< Connections >::operator==().


The documentation for this struct was generated from the following file: