taco-db
0.1.0
|
A DatumRef object is a read-only reference to an C++ object of a supported runtime type. More...
#include <base/datum.h>
Public Member Functions | |
DatumRef (const Datum &d) | |
DatumRef (const DatumRef &)=default | |
DatumRef & | operator= (const DatumRef &)=default |
constexpr bool | isnull () const |
![]() | |
constexpr const char * | GetVarlenBytes () const |
Returns the variable-length value of a datum as an array of bytes. More... | |
constexpr uint32_t | GetVarlenSize () const |
Returns the length of the variable-length value of a datum. More... | |
constexpr absl::string_view | GetVarlenAsStringView () const |
constexpr Datum & | GetDatum () const |
Returns a reference to the underlying datum if this references one with a variable-length value. More... | |
Datum | DeepCopy (bool isbyref) const |
Returns a new Datum that is a deep copy of the underlying datum. More... | |
Protected Member Functions | |
DatumRef (datum_impl::DatumRep val) | |
Protected Attributes | |
datum_impl::DatumRep | m_val |
Friends | |
class | datum_impl::NonVarlenGetters< DatumRef > |
class | NullableDatumRef |
A DatumRef object is a read-only reference to an C++ object of a supported runtime type.
There is an implicit conversion from a Datum to DatumRef so that one may use a Datum variable where it needs a DatumRef. The object referenced by a DatumRef is always assumed to be non-null.
DatumRef makes a copy of the actual value stored in its referencing Datum unless the value is variable length with the length field (i.e., the pointer to a null-terminated string still get copied into a DatumRef). In the case that the value is a variable length field, DatumRef stores a pointer to the referencing Datum, which requires an additional indirection when read. Note that the nullness of the referencing Datum is always ignored, even if we store a pointer here.
|
inline |
|
default |
|
inlineprotected |
|
inlineconstexpr |
|
friend |
|
friend |
|
protected |