Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::MemoryQueryProvider< T, Q, Filter, Compare > Class Template Referencefinal

Explicit in-memory provider using the bounded local transform, with rejection recovery. Evaluates synchronously on UI. Use a delayed provider for work that must leave UI. Callback captures must own immutable storage; callbacks cannot retain borrowed arguments. More...

#include <model_query.hpp>

Inheritance diagram for portals::MemoryQueryProvider< T, Q, Filter, Compare >:
portals::MemoryQueryProvider< T, Q, Filter, Compare >portals::MemoryQueryProvider< T, Q, Filter, Compare > portals::QueryProvider< T, Q >

Public Member Functions

 MemoryQueryProvider (Filter filter, Compare compare)
 Own domain callbacks.
void start (QueryRequest< T, Q > request) override
 Evaluate and queue the exact query; retain a rejected notification for retry.
std::expected< void, SchedulerError > retry () override
 Retry the same result after queue rejection; closed/cancelled retained work is discarded.
Public Member Functions inherited from portals::QueryProvider< T, Q >
virtual ~QueryProvider ()=default
 Reclaim provider resources on UI; outstanding worker tokens remain independently owned.

Detailed Description

template<std::copy_constructible T, class Q, class Filter, class Compare>
class portals::MemoryQueryProvider< T, Q, Filter, Compare >

Explicit in-memory provider using the bounded local transform, with rejection recovery. Evaluates synchronously on UI. Use a delayed provider for work that must leave UI. Callback captures must own immutable storage; callbacks cannot retain borrowed arguments.

Template Parameters
TCopy-constructible immutable domain row satisfying snapshot ownership.
QOwning immutable domain criteria.
FilterCallable bool(const T&, const Q&) selecting rows.
CompareStrict weak ordering callable bool(const T&, const T&, const Q&).

Constructor & Destructor Documentation

◆ MemoryQueryProvider()

template<std::copy_constructible T, class Q, class Filter, class Compare>
portals::MemoryQueryProvider< T, Q, Filter, Compare >::MemoryQueryProvider ( Filter filter,
Compare compare )
inline

Own domain callbacks.

Parameters
filterBounded row predicate, invoked by the local transform.
compareBounded strict weak ordering, invoked by the local transform.

Member Function Documentation

◆ retry()

template<std::copy_constructible T, class Q, class Filter, class Compare>
std::expected< void, SchedulerError > portals::MemoryQueryProvider< T, Q, Filter, Compare >::retry ( )
inlineoverridevirtual

Retry the same result after queue rejection; closed/cancelled retained work is discarded.

Returns
Success or original scheduler rejection; no evaluation is repeated.

Reimplemented from portals::QueryProvider< T, Q >.

◆ start()

template<std::copy_constructible T, class Q, class Filter, class Compare>
void portals::MemoryQueryProvider< T, Q, Filter, Compare >::start ( QueryRequest< T, Q > request)
inlineoverridevirtual

Evaluate and queue the exact query; retain a rejected notification for retry.

Parameters
requestOwning query token; a superseded retained notification is discarded.

Implements portals::QueryProvider< T, Q >.


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