|
| | DatumRef (const Datum &d) |
| |
| | DatumRef (const DatumRef &)=default |
| |
| DatumRef & | operator= (const DatumRef &)=default |
| |
| constexpr bool | isnull () const |
| |
| constexpr 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...
|
| |
| 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...
|
| |
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.