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

Factory class for generating table requirements. More...

#include <table_requirements.h>

Static Public Member Functions

static Result< std::vector< std::unique_ptr< TableRequirement > > > ForCreateTable (const std::vector< std::unique_ptr< TableUpdate > > &table_updates)
 Generate requirements for creating a new table.
 
static Result< std::vector< std::unique_ptr< TableRequirement > > > ForReplaceTable (const TableMetadata &base, const std::vector< std::unique_ptr< TableUpdate > > &table_updates)
 Generate requirements for replacing an existing table.
 
static Result< std::vector< std::unique_ptr< TableRequirement > > > ForUpdateTable (const TableMetadata &base, const std::vector< std::unique_ptr< TableUpdate > > &table_updates)
 Generate requirements for updating an existing table.
 
static Result< bool > IsCreate (const std::vector< std::unique_ptr< TableRequirement > > &requirements)
 Check if the requirements are for table creation.
 

Detailed Description

Factory class for generating table requirements.

This class analyzes a sequence of table updates and generates the appropriate table requirements to ensure safe concurrent modifications.

Member Function Documentation

◆ ForCreateTable()

Result< std::vector< std::unique_ptr< TableRequirement > > > iceberg::TableRequirements::ForCreateTable ( const std::vector< std::unique_ptr< TableUpdate > > &  table_updates)
static

Generate requirements for creating a new table.

For table creation, this requires that the table does not already exist.

Parameters
table_updatesThe list of table updates for table creation
Returns
A list of table requirements to validate before creation

◆ ForReplaceTable()

Result< std::vector< std::unique_ptr< TableRequirement > > > iceberg::TableRequirements::ForReplaceTable ( const TableMetadata base,
const std::vector< std::unique_ptr< TableUpdate > > &  table_updates 
)
static

Generate requirements for replacing an existing table.

For table replacement, this requires that the table UUID matches but allows more aggressive changes than a regular update.

Parameters
baseThe base table metadata
table_updatesThe list of table updates for replacement
Returns
A list of table requirements to validate before replacement

◆ ForUpdateTable()

Result< std::vector< std::unique_ptr< TableRequirement > > > iceberg::TableRequirements::ForUpdateTable ( const TableMetadata base,
const std::vector< std::unique_ptr< TableUpdate > > &  table_updates 
)
static

Generate requirements for updating an existing table.

For table updates, this generates requirements to ensure that key metadata properties haven't changed concurrently.

Parameters
baseThe base table metadata
table_updatesThe list of table updates
Returns
A list of table requirements to validate before update

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