|
iceberg-cpp
|
Context for generating table requirements. More...
#include <table_requirements.h>
Public Member Functions | |
| TableUpdateContext (const TableMetadata *base, bool is_replace) | |
| Construct a context for requirement generation. | |
| TableUpdateContext (const TableUpdateContext &)=delete | |
| TableUpdateContext & | operator= (const TableUpdateContext &)=delete |
| TableUpdateContext (TableUpdateContext &&) noexcept=default | |
| void | AddRequirement (std::unique_ptr< TableRequirement > requirement) |
| Add a requirement to the list. | |
| const TableMetadata * | base () const |
| Get the base table metadata. | |
| bool | is_replace () const |
| Check if this is a replace operation. | |
| Result< std::vector< std::unique_ptr< TableRequirement > > > | Build () |
| Build and return the list of requirements. | |
| void | RequireLastAssignedFieldIdUnchanged () |
| Require that the last assigned field ID remains unchanged. | |
| void | RequireCurrentSchemaIdUnchanged () |
| Require that the current schema ID remains unchanged. | |
| void | RequireLastAssignedPartitionIdUnchanged () |
| Require that the last assigned partition ID remains unchanged. | |
| void | RequireDefaultSpecIdUnchanged () |
| Require that the default spec ID remains unchanged. | |
| void | RequireDefaultSortOrderIdUnchanged () |
| Require that the default sort order ID remains unchanged. | |
| void | RequireNoBranchesChanged () |
| Require that no branches have been changed. | |
| bool | AddChangedRef (const std::string &ref_name) |
| Track a changed ref and return whether it was newly added. | |
Context for generating table requirements.
This context is passed to each TableUpdate's GenerateRequirements method and maintains state about what requirements have already been added to avoid duplicates.
|
inline |
Construct a context for requirement generation.
| base | The base table metadata (maybe nullptr for table creation) |
| is_replace | Whether this is a replace operation (more permissive) |
| bool iceberg::TableUpdateContext::AddChangedRef | ( | const std::string & | ref_name | ) |
Track a changed ref and return whether it was newly added.
| ref_name | The name of the ref being changed |