taco-db  0.1.0
Public Member Functions | List of all members
taco::datum_impl::DatumRefVarlenGetters< DatumImpl > Class Template Reference

#include <base/datum.h>

Inheritance diagram for taco::datum_impl::DatumRefVarlenGetters< DatumImpl >:
taco::datum_impl::NonVarlenGetters< DatumImpl >

Public Member Functions

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 DatumGetDatum () 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...
 
- Public Member Functions inherited from taco::datum_impl::NonVarlenGetters< DatumImpl >
constexpr const char * GetFixedlenBytes () const
 Return the pointer to the binary representation of a fixed-length datum that is passed by value. More...
 
constexpr bool GetBool () const
 Returns boolean value of a datum. More...
 
constexpr char GetChar () const
 Returns character value of a datum. More...
 
constexpr int8_t GetInt8 () const
 Returns 8-bit integer value of a datum. More...
 
constexpr uint8_t GetUInt8 () const
 Returns 8-bit unsigned integer value of a datum. More...
 
constexpr int16_t GetInt16 () const
 Returns 16-bit integer value of a datum. More...
 
constexpr uint16_t GetUInt16 () const
 Returns 16-bit unsigned integer value of a datum. More...
 
constexpr int32_t GetInt32 () const
 Returns 32-bit integer value of a datum. More...
 
constexpr uint32_t GetUInt32 () const
 Returns 32-bit unsigned integer value of a datum. More...
 
constexpr Oid GetOid () const
 Returns object identifier value of a datum. More...
 
constexpr int64_t GetInt64 () const
 Returns 64-bit integer value of a datum. More...
 
constexpr uint64_t GetUInt64 () const
 Returns 64-bit unsigned integer value of a datum. More...
 
constexpr float GetFloat () const
 Returns single-precision floating point value of a datum. More...
 
constexpr double GetDouble () const
 Returns double-precision floating point value of a datum. More...
 
constexpr void * GetPointer () const
 Returns pointer value of a datum. More...
 
template<class T >
constexpr T * GetPointerAs () const
 Returns the pointer value of a datum as const T*. More...
 

Additional Inherited Members

- Protected Member Functions inherited from taco::datum_impl::NonVarlenGetters< DatumImpl >
constexpr const DatumRepval () const
 

Member Function Documentation

◆ DeepCopy()

template<class DatumImpl >
Datum taco::datum_impl::DatumRefVarlenGetters< DatumImpl >::DeepCopy ( bool  isbyref) const
inline

Returns a new Datum that is a deep copy of the underlying datum.

The argument isbyref whether the underlying datum has a value that is passed by reference or by value. Currently variable-length values (which includes all variable-length types and certain fixed-length types that are not 1,2,4,8 bytes long) are always passed by reference, while fixed-length values (which are 1,2,3,8 bytes long) are always passed by value.

It is the caller's responsibility to correctly determine whether the underlying datum is passed by reference or by value. Usually, that is determined by the SysTable_Type::typbyref() of the type of value.

◆ GetDatum()

template<class DatumImpl >
constexpr Datum& taco::datum_impl::DatumRefVarlenGetters< DatumImpl >::GetDatum ( ) const
inlineconstexpr

Returns a reference to the underlying datum if this references one with a variable-length value.

Not valid if it stores a fixed-length value, in which case the value instead of the Datum pointer is stored in the DatumRef/NullableDatumRef.

◆ GetVarlenAsStringView()

template<class DatumImpl >
constexpr absl::string_view taco::datum_impl::DatumRefVarlenGetters< DatumImpl >::GetVarlenAsStringView ( ) const
inlineconstexpr

◆ GetVarlenBytes()

template<class DatumImpl >
constexpr const char* taco::datum_impl::DatumRefVarlenGetters< DatumImpl >::GetVarlenBytes ( ) const
inlineconstexpr

Returns the variable-length value of a datum as an array of bytes.

◆ GetVarlenSize()

template<class DatumImpl >
constexpr uint32_t taco::datum_impl::DatumRefVarlenGetters< DatumImpl >::GetVarlenSize ( ) const
inlineconstexpr

Returns the length of the variable-length value of a datum.


The documentation for this class was generated from the following file: