![]() |
mutable
A Database System for Research and Fast Prototyping
|
#include <Tuple.hpp>
Public Member Functions | |
Tuple (const Schema &S) | |
Create a fresh Tuple with enough memory allocated to store all attributes of S . | |
Tuple (std::vector< const Type * > types) | |
Tuple () | |
Tuple (const Tuple &)=delete | |
Tuple (Tuple &&other) | |
~Tuple () | |
Tuple & | operator= (const Tuple &)=delete |
Tuple & | operator= (Tuple &&other) |
bool | is_null (std::size_t idx) const |
Returns true iff the Value at index idx is NULL . | |
void | null (std::size_t idx) |
Sets the Value at index idx to NULL . | |
void | clear () |
Sets all Value s of this Tuple to NULL . | |
void | not_null (std::size_t idx) |
Sets the Value at index idx to not-NULL . | |
void | set (std::size_t idx, Value val) |
Assigns the Value val to this Tuple at index idx and clears the respective NULL bit. | |
void | set (std::size_t idx, Value val, bool is_null) |
Assigns the Value val to this Tuple at index idx and sets the respective NULL bit to is_null . | |
Value & | operator[] (std::size_t idx) |
Returns a reference to the Value at index idx . | |
const Value & | operator[] (std::size_t idx) const |
Returns the Value at index idx . | |
Value & | get (std::size_t idx) |
Returns a reference to the Value at index idx . | |
const Value & | get (std::size_t idx) const |
Returns a reference to the Value at index idx . | |
void | insert (const Tuple &other, std::size_t pos, std::size_t len) |
Inserts the Tuple other of length len into this Tuple starting at index pos . | |
Tuple | clone (const Schema &S) const |
Create a clone of this Tuple interpreted using the Schema S . | |
M_LCOV_EXCL_STOP bool | operator== (const Tuple &other) const |
bool | operator!= (const Tuple &other) const |
void | print (std::ostream &out, const Schema &schema) const |
Print this Tuple using the given schema . | |
void | dump (std::ostream &out) const |
void | dump () const |
Private Attributes | |
Value * | values_ = nullptr |
the Value s in this Tuple | |
SmallBitset | null_mask_ = SmallBitset(-1UL) |
a bit mask for the NULL values; 1 represents NULL | |
Friends | |
void | swap (Tuple &first, Tuple &second) |
M_LCOV_EXCL_START friend std::ostream & | operator<< (std::ostream &out, const Tuple &tup) |
|
explicit |
|
explicit |
|
delete |
|
inline |
|
inline |
Sets all Value
s of this Tuple
to NULL
.
Definition at line 231 of file Tuple.hpp.
Referenced by m::wasm::detail::read_result_set().
Create a clone of this Tuple
interpreted using the Schema
S
.
Definition at line 124 of file Tuple.cpp.
References not_null(), m::Schema::num_entries(), and set().
void Tuple::dump | ( | ) | const |
|
inline |
Returns a reference to the Value
at index idx
.
Must not be NULL
.
Definition at line 263 of file Tuple.hpp.
References INBOUNDS, and M_insist.
Referenced by m::idx::ArrayIndex< Key >::bulkload(), and operator==().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets the Value
at index idx
to NULL
.
Definition at line 225 of file Tuple.hpp.
References INBOUNDS.
Referenced by m::DSVReader::operator()(), and m::StackMachine::operator()().
|
inline |
|
inline |
Definition at line 302 of file Tuple.hpp.
References get(), and null_mask_.
|
inline |
|
inline |
M_LCOV_EXCL_START void Tuple::print | ( | std::ostream & | out, |
const Schema & | schema | ||
) | const |
Print this Tuple
using the given schema
.
Definition at line 139 of file Tuple.cpp.
References is_null(), m::Schema::num_entries(), m::Value::print(), and values_.
|
inline |
Assigns the Value
val
to this Tuple
at index idx
and clears the respective NULL
bit.
Definition at line 240 of file Tuple.hpp.
References INBOUNDS.
Referenced by clone(), m::InsertRecords::execute(), m::DSVReader::operator()(), m::StackMachine::operator()(), and m::wasm::detail::read_result_set().
|
inline |
|
friend |
|
private |
a bit mask for the NULL
values; 1
represents NULL
Definition at line 195 of file Tuple.hpp.
Referenced by std::hash< m::Tuple >::operator()(), and operator==().
|
private |