iceberg-cpp
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
iceberg::MappedFields Class Reference

A list of field mappings for child field of structs, maps, and lists. More...

#include <name_mapping.h>

Public Member Functions

std::optional< MappedFieldConstRef > Field (int32_t id) const
 Get the field for a given field ID.
 
std::optional< int32_t > Id (std::string_view name) const
 Get the field ID for a given field name.
 
size_t Size () const
 Get the number of field mappings.
 
std::span< const MappedFieldfields () const
 Get the list of field mappings.
 

Static Public Member Functions

static std::unique_ptr< MappedFieldsMake (std::vector< MappedField > fields)
 Create a new MappedFields instance.
 

Friends

ICEBERG_EXPORT friend bool operator== (const MappedFields &lhs, const MappedFields &rhs)
 

Detailed Description

A list of field mappings for child field of structs, maps, and lists.

Member Function Documentation

◆ Field()

std::optional< MappedFieldConstRef > iceberg::MappedFields::Field ( int32_t  id) const

Get the field for a given field ID.

Parameters
[in]idThe ID of the field.
Returns
The field for the given field ID.

◆ Id()

std::optional< int32_t > iceberg::MappedFields::Id ( std::string_view  name) const

Get the field ID for a given field name.

Parameters
[in]nameThe name of the field.
Returns
The field ID of the field.

◆ Make()

std::unique_ptr< MappedFields > iceberg::MappedFields::Make ( std::vector< MappedField fields)
static

Create a new MappedFields instance.

Parameters
[in]fieldsThe list of field mappings.
Returns
A new MappedFields instance.

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