A query at run time (spec 5 §5): a key over the scope, an entry of the session's cache, latest wins.
More...
#include <interpreter.hpp>
|
| | QueryRuntime (QueryDecl const &decl, RtScope &scope, ModelAlias *alias) |
| | A query of scope, not yet started.
|
|
| QueryRuntime (QueryRuntime const &)=delete |
|
QueryRuntime & | operator= (QueryRuntime const &)=delete |
|
| QueryRuntime (QueryRuntime &&)=delete |
|
QueryRuntime & | operator= (QueryRuntime &&)=delete |
| | ~QueryRuntime () |
| | Stops its timers and releases its entry.
|
| void | start () |
| | Starts it: makes its key and the Effect that follows it, and its refresh timer.
|
| Value | value () const |
| | The value: the entry's, kept from the previous key while the new one has none. A tracked read.
|
| bool | pending () const |
| | Whether a request is in flight or waiting out its debounce. A tracked read.
|
| Value | error () const |
| | The failure's text, null when none. A tracked read.
|
| Value | errorKind () const |
| | The failure's kind, null when none. A tracked read.
|
| bool | settled () const |
| | Whether the query has a value or a failure for its current key, or is idle. A tracked read, for a boundary.
|
| void | refetch () |
| | Refetches the current key now, ending a debounce wait.
|
| void | refetchCurrent () |
| | Fetches the key its body has now, inside the batch that changed the body: switches to that key's entry when it differs from the current one, and fetches the current one otherwise. A backend switch uses it, so a body onBackendChange changed is fetched once, with what the recovery set, and the old key is not fetched first.
|
| void | invalidate () |
| | Marks its entry stale and refetches it.
|
| void | detach () |
| | Forgets its entry without releasing it: the session dropped the cache.
|
| std::shared_ptr< CacheEntry > const & | entry () const |
| | The current entry. A tracked read.
|
| QueryDecl const & | decl () const noexcept |
| | The declaration.
|
| std::string const & | typeId () const noexcept |
| | The model type.
|
| std::shared_ptr< ModelChannel > | channel () const |
| | The channel its alias is bound to now.
|
A query at run time (spec 5 §5): a key over the scope, an entry of the session's cache, latest wins.
Definition at line 1902 of file interpreter.hpp.
◆ QueryRuntime()
A query of scope, not yet started.
- Parameters
-
| decl | The declaration. |
| scope | The scope. |
| alias | The model alias it goes through. |
Definition at line 3538 of file interpreter.hpp.
◆ ~QueryRuntime()
| morph::ui::detail::QueryRuntime::~QueryRuntime |
( |
| ) |
|
|
inline |
◆ start()
| void morph::ui::detail::QueryRuntime::start |
( |
| ) |
|
|
inline |
Starts it: makes its key and the Effect that follows it, and its refresh timer.
Definition at line 3561 of file interpreter.hpp.
◆ value()
| Value morph::ui::detail::QueryRuntime::value |
( |
| ) |
const |
|
inlinenodiscard |
The value: the entry's, kept from the previous key while the new one has none. A tracked read.
- Returns
- It.
Definition at line 3690 of file interpreter.hpp.
◆ pending()
| bool morph::ui::detail::QueryRuntime::pending |
( |
| ) |
const |
|
inlinenodiscard |
Whether a request is in flight or waiting out its debounce. A tracked read.
- Returns
- It.
Definition at line 3703 of file interpreter.hpp.
◆ error()
| Value morph::ui::detail::QueryRuntime::error |
( |
| ) |
const |
|
inlinenodiscard |
The failure's text, null when none. A tracked read.
- Returns
- It.
Definition at line 3711 of file interpreter.hpp.
◆ errorKind()
| Value morph::ui::detail::QueryRuntime::errorKind |
( |
| ) |
const |
|
inlinenodiscard |
The failure's kind, null when none. A tracked read.
- Returns
- It.
Definition at line 3719 of file interpreter.hpp.
◆ settled()
| bool morph::ui::detail::QueryRuntime::settled |
( |
| ) |
const |
|
inlinenodiscard |
Whether the query has a value or a failure for its current key, or is idle. A tracked read, for a boundary.
- Returns
- It.
Definition at line 3727 of file interpreter.hpp.
◆ refetch()
| void morph::ui::detail::QueryRuntime::refetch |
( |
| ) |
|
|
inline |
Refetches the current key now, ending a debounce wait.
Definition at line 3655 of file interpreter.hpp.
◆ refetchCurrent()
| void morph::ui::detail::QueryRuntime::refetchCurrent |
( |
| ) |
|
|
inline |
Fetches the key its body has now, inside the batch that changed the body: switches to that key's entry when it differs from the current one, and fetches the current one otherwise. A backend switch uses it, so a body onBackendChange changed is fetched once, with what the recovery set, and the old key is not fetched first.
Definition at line 3671 of file interpreter.hpp.
◆ invalidate()
| void morph::ui::detail::QueryRuntime::invalidate |
( |
| ) |
|
|
inline |
◆ detach()
| void morph::ui::detail::QueryRuntime::detach |
( |
| ) |
|
|
inline |
Forgets its entry without releasing it: the session dropped the cache.
Definition at line 1960 of file interpreter.hpp.
◆ entry()
| std::shared_ptr< CacheEntry > const & morph::ui::detail::QueryRuntime::entry |
( |
| ) |
const |
|
inlinenodiscard |
The current entry. A tracked read.
- Returns
- It, or nullptr while idle.
Definition at line 1968 of file interpreter.hpp.
◆ decl()
| QueryDecl const & morph::ui::detail::QueryRuntime::decl |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ typeId()
| std::string const & morph::ui::detail::QueryRuntime::typeId |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ channel()
| std::shared_ptr< ModelChannel > morph::ui::detail::QueryRuntime::channel |
( |
| ) |
const |
|
inlinenodiscard |
The channel its alias is bound to now.
- Returns
- It, or nullptr while the alias is unbound.
Definition at line 3558 of file interpreter.hpp.
The documentation for this class was generated from the following file: