Lightweight 0.20260921.0
Loading...
Searching...
No Matches
Lightweight::HasMany< OtherRecord, TheInverseSelector >::Loader Struct Reference

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

#include <HasMany.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.
 

Public Attributes

std::function< RelationResult< size_t >()> count {}
 Counts the records without loading them.
 
std::function< RelationResult< ReferencedRecordList >()> all {}
 Loads all records.
 
std::function< RelationResult< void >(std::function< void(ReferencedRecord const &)>)> each {}
 Streams the records to a callback.
 

Detailed Description

template<typename OtherRecord, auto TheInverseSelector = AutoDetectRelation>
struct Lightweight::HasMany< OtherRecord, TheInverseSelector >::Loader

Carries the deferred loads, installed by the DataMapper.

Definition at line 175 of file HasMany.hpp.

Member Function Documentation

◆ operator<=>()

template<typename OtherRecord , auto TheInverseSelector = AutoDetectRelation>
std::weak_ordering Lightweight::HasMany< OtherRecord, TheInverseSelector >::Loader::operator<=> ( Loader const &  ) const
inlinenoexcept

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

Definition at line 185 of file HasMany.hpp.

Member Data Documentation

◆ count

template<typename OtherRecord , auto TheInverseSelector = AutoDetectRelation>
std::function<RelationResult<size_t>()> Lightweight::HasMany< OtherRecord, TheInverseSelector >::Loader::count {}

Counts the records without loading them.

Definition at line 178 of file HasMany.hpp.

◆ all

template<typename OtherRecord , auto TheInverseSelector = AutoDetectRelation>
std::function<RelationResult<ReferencedRecordList>()> Lightweight::HasMany< OtherRecord, TheInverseSelector >::Loader::all {}

Loads all records.

Definition at line 180 of file HasMany.hpp.

◆ each

template<typename OtherRecord , auto TheInverseSelector = AutoDetectRelation>
std::function<RelationResult<void>(std::function<void(ReferencedRecord const&)>)> Lightweight::HasMany< OtherRecord, TheInverseSelector >::Loader::each {}

Streams the records to a callback.

Definition at line 182 of file HasMany.hpp.


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