Conversion utilities for primitive types.
More...
#include <conversions.h>
|
| static Result< std::vector< uint8_t > > | ToBytes (const PrimitiveType &type, const Literal::Value &value) |
| | Serializes a raw literal value into a byte vector according to its type.
|
| |
| static Result< std::vector< uint8_t > > | ToBytes (const Literal &literal) |
| | Serializes a complete Literal object into a byte vector.
|
| |
| static Result< Literal::Value > | FromBytes (const PrimitiveType &type, std::span< const uint8_t > data) |
| | Deserializes a span of bytes into a raw literal value based on the given type.
|
| |
| static Result< Literal > | FromBytes (std::shared_ptr< PrimitiveType > type, std::span< const uint8_t > data) |
| | Deserializes a span of bytes into a complete Literal object.
|
| |
Conversion utilities for primitive types.
◆ FromBytes() [1/2]
| Result< Literal::Value > iceberg::Conversions::FromBytes |
( |
const PrimitiveType & |
type, |
|
|
std::span< const uint8_t > |
data |
|
) |
| |
|
static |
Deserializes a span of bytes into a raw literal value based on the given type.
- Parameters
-
| type | The target primitive type to interpret the bytes as. |
| data | A std::span of bytes representing the serialized value. |
- Returns
- A Result containing the deserialized value.
◆ FromBytes() [2/2]
| Result< Literal > iceberg::Conversions::FromBytes |
( |
std::shared_ptr< PrimitiveType > |
type, |
|
|
std::span< const uint8_t > |
data |
|
) |
| |
|
static |
Deserializes a span of bytes into a complete Literal object.
- Parameters
-
| type | A shared pointer to the target primitive type. |
| data | A std::span of bytes representing the serialized value. |
- Returns
- A Result containing the deserialized value.
◆ ToBytes() [1/2]
| Result< std::vector< uint8_t > > iceberg::Conversions::ToBytes |
( |
const Literal & |
literal | ) |
|
|
static |
Serializes a complete Literal object into a byte vector.
- Parameters
-
| literal | The Literal object to serialize. |
- Returns
- A Result containing the serialized value.
◆ ToBytes() [2/2]
| Result< std::vector< uint8_t > > iceberg::Conversions::ToBytes |
( |
const PrimitiveType & |
type, |
|
|
const Literal::Value & |
value |
|
) |
| |
|
static |
Serializes a raw literal value into a byte vector according to its type.
- Parameters
-
| type | The primitive type of the value. |
| value | The std::variant holding the raw literal value to serialize. |
- Returns
- A Result containing the serialized value.
The documentation for this class was generated from the following files: