![]() |
mutable
A Database System for Research and Fast Prototyping
|
Binds Schema::Identifier
s to Expr<T>
s.
More...
#include <WasmUtil.hpp>
Public Member Functions | |
Environment ()=default | |
Environment (const Environment &)=delete | |
Environment (Environment &&)=default | |
~Environment () | |
bool | has (const Schema::Identifier &id) const |
Returns true iff this Environment contains id . | |
bool | has_addr (const Schema::Identifier &id) const |
Returns true iff this Environment contains the address of id . | |
template<sql_type T> | |
bool | is (const Schema::Identifier &id) const |
Returns true iff the entry for identifier id has sql_type | |
template<sql_addr_type T> | |
bool | is_addr (Schema::Identifier id) const |
Returns true iff the address entry for identifier id has sql_addr_type | |
bool | empty () const |
Returns true iff this Environment is empty. | |
void | clear () |
Clears this Environment . | |
template<sql_type T> | |
void | add (Schema::Identifier id, T &&expr) |
| |
void | add (Schema::Identifier id, SQL_t &&expr) |
| |
template<sql_addr_type T> | |
void | add_addr (Schema::Identifier id, T &&expr) |
| |
void | add_addr (Schema::Identifier id, SQL_addr_t &&expr) |
| |
void | add (const Environment &other) |
| |
void | add (Environment &&other) |
| |
SQL_t | extract (const Schema::Identifier &id) |
| |
template<sql_type T> | |
T | extract (const Schema::Identifier &id) |
| |
SQL_addr_t | extract_addr (const Schema::Identifier &id) |
| |
template<sql_addr_type T> | |
T | extract_addr (const Schema::Identifier &id) |
| |
SQL_t | get (const Schema::Identifier &id) const |
| |
template<sql_type T> | |
T | get (const Schema::Identifier &id) const |
| |
SQL_addr_t | get_addr (const Schema::Identifier &id) const |
| |
template<sql_addr_type T> | |
T | get_addr (const Schema::Identifier &id) const |
| |
SQL_t | operator[] (const Schema::Identifier &id) const |
| |
template<typename T > requires requires (ExprCompiler C, T &&t) { C.compile(std::forward<T>(t)); } | |
auto | compile (T &&t) const |
| |
template<typename T , typename U > requires requires (ExprCompiler C, U &&u) { C.compile<T>(std::forward<U>(u)); } | |
auto | compile (U &&u) const |
| |
bool | predicated () const |
| |
void | add_predicate (SQL_boolean_t &&pred) |
| |
template<sql_boolean_type T> | |
void | add_predicate (T &&pred) |
| |
void | add_predicate (const cnf::CNF &cnf) |
| |
SQL_boolean_t | extract_predicate () |
| |
template<sql_boolean_type T> | |
T | extract_predicate () |
| |
SQL_boolean_t | get_predicate () const |
| |
template<sql_boolean_type T> | |
T | get_predicate () const |
| |
void | dump (std::ostream &out) const |
void | dump () const |
Private Attributes | |
std::unordered_map< Schema::Identifier, SQL_t > | exprs_ |
| |
std::unordered_map< Schema::Identifier, SQL_addr_t > | expr_addrs_ |
| |
SQL_boolean_t | predicate_ |
| |
Binds Schema::Identifier
s to Expr<T>
s.
Definition at line 562 of file WasmUtil.hpp.
|
default |
|
delete |
|
default |
|
inline |
Definition at line 577 of file WasmUtil.hpp.
References m::wasm::discard(), expr_addrs_, and exprs_.
|
inline |
Copies all entries of
other
intothis
.
Definition at line 642 of file WasmUtil.hpp.
References add(), add_addr(), expr_addrs_, exprs_, and M_unreachable.
|
inline |
Moves all entries of
other
intothis
.
Definition at line 657 of file WasmUtil.hpp.
References M_insist.
|
inline |
Adds a mapping from
id
toexpr
.
Definition at line 624 of file WasmUtil.hpp.
References exprs_, M_insist, and m::wasm::res.
|
inline |
Adds a mapping from
id
toexpr
.
Definition at line 619 of file WasmUtil.hpp.
References exprs_, M_insist, and m::wasm::res.
Referenced by add(), m::wasm::Aggregation::execute(), m::wasm::OrderedGrouping::execute(), m::wasm::Projection::execute(), and m::wasm::buffer_swap_proxy_t< IsGlobal >::operator()().
|
inline |
Adds a address mapping from
id
toexpr
.
Definition at line 636 of file WasmUtil.hpp.
References expr_addrs_, M_insist, and m::wasm::res.
|
inline |
Adds a address mapping from
id
toexpr
.
Definition at line 631 of file WasmUtil.hpp.
References expr_addrs_, M_insist, and m::wasm::res.
Referenced by add().
|
inline |
Adds the predicate compiled from the
cnf::CNF
cnf
to the predication predicate.
Definition at line 776 of file WasmUtil.hpp.
References add_predicate(), and compile().
Referenced by add_predicate().
|
inline |
Adds the predicate
pred
to the predication predicate.
Definition at line 759 of file WasmUtil.hpp.
References M_unreachable, and m::T().
Referenced by m::wasm::Filter< Predicated >::execute(), m::wasm::Projection::execute(), m::wasm::ChainedHashTable< IsGlobal >::for_each_in_equal_range(), and m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::for_each_in_equal_range().
|
inline |
Adds the predicate
pred
to the predication predicate.
Definition at line 767 of file WasmUtil.hpp.
References m::wasm::and, predicate_, and predicated().
|
inline |
Clears this Environment
.
Definition at line 608 of file WasmUtil.hpp.
References m::wasm::discard(), expr_addrs_, and exprs_.
|
inline |
Compile
t
by delegating compilation to anExprCompiler
forthis
Environment
.
Definition at line 742 of file WasmUtil.hpp.
References m::wasm::ExprCompiler::compile().
Referenced by add_predicate(), and m::wasm::LazyDisjunctiveFilter::execute().
|
inline |
Compile
t
by delegating compilation to anExprCompiler
forthis
Environment
.
Definition at line 749 of file WasmUtil.hpp.
References m::wasm::ExprCompiler::compile(), and m::T().
void Environment::dump | ( | ) | const |
M_LCOV_EXCL_START void Environment::dump | ( | std::ostream & | out | ) | const |
Definition at line 522 of file WasmUtil.cpp.
References expr_addrs_, and exprs_.
|
inline |
Returns true
iff this Environment
is empty.
Definition at line 605 of file WasmUtil.hpp.
References m::wasm::and, expr_addrs_, and exprs_.
|
inline |
Returns the moved entry for identifier
id
.
Definition at line 665 of file WasmUtil.hpp.
|
inline |
Returns the moved entry for identifier
id
.
Definition at line 673 of file WasmUtil.hpp.
|
inline |
Returns the moved address entry for identifier
id
.
Definition at line 682 of file WasmUtil.hpp.
References expr_addrs_, and M_insist.
|
inline |
Returns the moved address entry for identifier
id
.
Definition at line 690 of file WasmUtil.hpp.
References expr_addrs_, M_insist, and m::T().
|
inline |
Returns the moved current predication predicate.
Definition at line 779 of file WasmUtil.hpp.
References M_insist, predicate_, and predicated().
Referenced by m::wasm::Aggregation::execute().
|
inline |
Returns the moved current predication predicate.
Definition at line 787 of file WasmUtil.hpp.
References M_insist, predicate_, predicated(), and m::T().
|
inline |
Returns the copied entry for identifier
id
.
Definition at line 699 of file WasmUtil.hpp.
References exprs_, M_insist, and M_unreachable.
Referenced by m::wasm::Aggregation::execute(), m::wasm::HashBasedGroupJoin::execute(), m::wasm::SimpleHashJoin< UniqueBuild, Predicated >::execute(), m::wasm::ExprCompiler::operator()(), m::wasm::buffer_swap_proxy_t< IsGlobal >::operator()(), and operator[]().
|
inline |
Returns the copied entry for identifier
id
.
Definition at line 709 of file WasmUtil.hpp.
|
inline |
Returns the copied address entry for identifier
id
.
Definition at line 717 of file WasmUtil.hpp.
References expr_addrs_, M_insist, and M_unreachable.
|
inline |
Returns the copied address entry for identifier
id
.
Definition at line 727 of file WasmUtil.hpp.
References expr_addrs_, M_insist, and m::T().
|
inline |
Returns the copied current predication predicate.
Definition at line 797 of file WasmUtil.hpp.
References M_unreachable, and predicate_.
|
inline |
Returns the copied current predication predicate.
Definition at line 807 of file WasmUtil.hpp.
References M_insist, predicate_, predicated(), and m::T().
|
inline |
Returns true
iff this Environment
contains id
.
Definition at line 587 of file WasmUtil.hpp.
References exprs_.
Referenced by m::wasm::Projection::execute().
|
inline |
Returns true
iff this Environment
contains the address of id
.
Definition at line 589 of file WasmUtil.hpp.
References expr_addrs_.
|
inline |
Returns true
iff the entry for identifier id
has sql_type
T. |
Definition at line 592 of file WasmUtil.hpp.
|
inline |
Returns true
iff the address entry for identifier id
has sql_addr_type
T. |
Definition at line 599 of file WasmUtil.hpp.
References expr_addrs_, and M_insist.
|
inline |
Returns the copied entry for identifier
id
.
Definition at line 735 of file WasmUtil.hpp.
References get().
|
inline |
Returns
true
iffthis
Environment
uses predication.
Definition at line 756 of file WasmUtil.hpp.
References predicate_.
Referenced by add_predicate(), extract_predicate(), and get_predicate().
|
private |
maps
Schema::Identifier
s toPtr<Expr<T>>
s that evaluate to the address of the current expression
Definition at line 568 of file WasmUtil.hpp.
Referenced by add(), add_addr(), clear(), dump(), empty(), extract_addr(), get_addr(), has_addr(), is_addr(), and ~Environment().
|
private |
maps
Schema::Identifier
s toExpr<T>
s that evaluate to the current expression
Definition at line 566 of file WasmUtil.hpp.
Referenced by add(), clear(), dump(), empty(), extract(), get(), has(), is(), and ~Environment().
|
private |
optional predicate if predication is used
Definition at line 570 of file WasmUtil.hpp.
Referenced by add_predicate(), extract_predicate(), get_predicate(), and predicated().