![]() |
mutable
A Database System for Research and Fast Prototyping
|
Helper struct as proxy to access a hash table entry. More...
#include <WasmAlgo.hpp>
Public Types | |
using | value_t = std::variant< std::monostate #define ADD_TYPE(TYPE) SQL_TYPES_SCALAR(ADD_TYPE) > |
Public Member Functions | |
the_entry ()=default | |
the_entry (const the_entry &)=delete | |
the_entry (the_entry &&)=default | |
~the_entry () | |
operator the_entry< true > () | |
| |
bool | empty () const |
| |
bool | has (const Schema::Identifier &id) const |
| |
template<sql_type T> | |
void | add (Schema::Identifier id, the_reference< T, IsConst > &&ref) |
| |
value_t | extract (const Schema::Identifier &id) |
| |
template<sql_type T> | |
the_reference< T, IsConst > | extract (const Schema::Identifier &id) |
| |
value_t | get (const Schema::Identifier &id) const |
| |
template<sql_type T> | |
the_reference< T, IsConst > | get (const Schema::Identifier &id) const |
| |
Private Member Functions | |
the_entry (std::unordered_multimap< Schema::Identifier, typename the_entry< not IsConst >::value_t > refs) | |
| |
Static Private Member Functions | |
static void | discard (value_t &ref) |
| |
Private Attributes | |
std::unordered_multimap< Schema::Identifier, value_t > | refs_ |
| |
Friends | |
struct | HashTable |
Helper struct as proxy to access a hash table entry.
Definition at line 368 of file WasmAlgo.hpp.
using m::wasm::HashTable::the_entry< IsConst >::value_t = std::variant< std::monostate #define ADD_TYPE(TYPE) SQL_TYPES_SCALAR(ADD_TYPE) > |
Definition at line 372 of file WasmAlgo.hpp.
|
default |
|
delete |
|
default |
|
inlineprivate |
constructs an entry from references of the opposite const-ness
Definition at line 400 of file WasmAlgo.hpp.
References M_unreachable, m::wasm::HashTable::the_entry< IsConst >::refs_, and m::T().
|
inline |
Definition at line 422 of file WasmAlgo.hpp.
References m::wasm::HashTable::discard(), and m::wasm::HashTable::the_entry< IsConst >::refs_.
|
inline |
Adds a mapping from identifier
id
to referenceref
.
Definition at line 438 of file WasmAlgo.hpp.
References m::wasm::HashTable::the_entry< IsConst >::refs_.
Referenced by m::wasm::ChainedHashTable< IsGlobal >::entry(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::entry(), m::wasm::ChainedHashTable< IsGlobal >::value_entry(), and m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::value_entry().
|
inlinestaticprivate |
Discards the held reference of
ref
.
Definition at line 381 of file WasmAlgo.hpp.
References M_unreachable.
|
inline |
Returns
true
iffthis
does not contain any references.
Definition at line 431 of file WasmAlgo.hpp.
References m::wasm::HashTable::the_entry< IsConst >::refs_.
|
inline |
Returns the moved entry for identifier
id
.
Definition at line 443 of file WasmAlgo.hpp.
References M_insist, and m::wasm::HashTable::the_entry< IsConst >::refs_.
Referenced by m::wasm::HashBasedGroupJoin::execute().
|
inline |
Returns the moved entry for identifier
id
.
Definition at line 451 of file WasmAlgo.hpp.
References M_insist, and m::wasm::HashTable::the_entry< IsConst >::refs_.
|
inline |
Returns the copied entry for identifier
id
.
Definition at line 462 of file WasmAlgo.hpp.
References M_insist, M_unreachable, and m::wasm::HashTable::the_entry< IsConst >::refs_.
Referenced by m::wasm::ChainedHashTable< IsGlobal >::entry(), m::wasm::HashBasedGrouping::execute(), m::wasm::HashBasedGroupJoin::execute(), and m::wasm::ChainedHashTable< IsGlobal >::value_entry().
|
inline |
Returns the copied entry for identifier
id
.
Definition at line 473 of file WasmAlgo.hpp.
|
inline |
Returns
true
iffthis
contains identifierid
.
Definition at line 434 of file WasmAlgo.hpp.
References m::wasm::HashTable::the_entry< IsConst >::refs_.
|
inline |
Converts a non-const entry to a const entry. The former entry is moved, i.e. must not be used afterwards.
Definition at line 428 of file WasmAlgo.hpp.
References m::wasm::HashTable::the_entry< IsConst >::refs_, and m::wasm::HashTable::the_entry< true >.
Definition at line 370 of file WasmAlgo.hpp.
|
private |
maps
Schema::Identifier
s tothe_reference<T, IsConst>
s that reference the stored expression, allows for duplicates similar toSchema
Definition at line 391 of file WasmAlgo.hpp.
Referenced by m::wasm::HashTable::the_entry< IsConst >::add(), m::wasm::HashTable::the_entry< IsConst >::empty(), m::wasm::HashTable::the_entry< IsConst >::extract(), m::wasm::HashTable::the_entry< IsConst >::get(), m::wasm::HashTable::the_entry< IsConst >::has(), m::wasm::HashTable::the_entry< IsConst >::operator the_entry< true >(), m::wasm::HashTable::the_entry< IsConst >::the_entry(), and m::wasm::HashTable::the_entry< IsConst >::~the_entry().