|
iceberg-cpp
|
Sets the current snapshot directly or by rolling back. More...
#include <set_snapshot.h>
Public Member Functions | |
| SetSnapshot & | SetCurrentSnapshot (int64_t snapshot_id) |
| Sets the table's current state to a specific Snapshot identified by id. | |
| SetSnapshot & | RollbackToTime (int64_t timestamp_ms) |
| Rolls back the table's state to the last Snapshot before the given timestamp. | |
| SetSnapshot & | RollbackTo (int64_t snapshot_id) |
| Rollback table's state to a specific Snapshot identified by id. | |
| Kind | kind () const final |
| Return the kind of this pending update. | |
| bool | IsRetryable () const override |
| Whether this update can be retried after a commit conflict. | |
| Result< int64_t > | Apply () |
| Apply the pending changes and return the target snapshot ID. | |
Public Member Functions inherited from iceberg::PendingUpdate | |
| virtual Status | Commit () |
| Apply the pending changes and commit. | |
| virtual Status | Finalize (Result< const TableMetadata * > commit_result) |
| Finalize the pending update. | |
| PendingUpdate (const PendingUpdate &)=delete | |
| PendingUpdate & | operator= (const PendingUpdate &)=delete |
| PendingUpdate (PendingUpdate &&) noexcept=default | |
| PendingUpdate & | operator= (PendingUpdate &&) noexcept=default |
Public Member Functions inherited from iceberg::ErrorCollector | |
| ErrorCollector (ErrorCollector &&)=default | |
| ErrorCollector & | operator= (ErrorCollector &&)=default |
| ErrorCollector (const ErrorCollector &)=default | |
| ErrorCollector & | operator= (const ErrorCollector &)=default |
| template<typename... Args> | |
| auto & | AddError (this auto &self, ErrorKind kind, const std::format_string< Args... > fmt, Args &&... args) |
| Add a specific error and return reference to derived class. | |
| auto & | AddError (this auto &self, Error err) |
| Add an existing error object and return reference to derived class. | |
| auto & | AddError (this auto &self, std::unexpected< Error > err) |
| Add an unexpected result's error and return reference to derived class. | |
| bool | has_errors () const |
| Check if any errors have been collected. | |
| size_t | error_count () const |
| Get the number of errors collected. | |
| Status | CheckErrors () const |
| Check for accumulated errors and return them if any exist. | |
| void | ClearErrors () |
| Clear all accumulated errors. | |
| const std::vector< Error > & | errors () const |
| Get read-only access to all collected errors. | |
Static Public Member Functions | |
| static Result< std::shared_ptr< SetSnapshot > > | Make (std::shared_ptr< TransactionContext > ctx) |
Additional Inherited Members | |
Public Types inherited from iceberg::PendingUpdate | |
| enum class | Kind : uint8_t { kExpireSnapshots , kSetSnapshot , kUpdateLocation , kUpdatePartitionSpec , kUpdatePartitionStatistics , kUpdateProperties , kUpdateSchema , kUpdateSnapshot , kUpdateSnapshotReference , kUpdateSortOrder , kUpdateStatistics } |
Protected Member Functions inherited from iceberg::PendingUpdate | |
| PendingUpdate (std::shared_ptr< TransactionContext > ctx) | |
| const TableMetadata & | base () const |
Protected Attributes inherited from iceberg::PendingUpdate | |
| std::shared_ptr< TransactionContext > | ctx_ |
Protected Attributes inherited from iceberg::ErrorCollector | |
| std::vector< Error > | errors_ |
Sets the current snapshot directly or by rolling back.
|
inlineoverridevirtual |
Whether this update can be retried after a commit conflict.
Implements iceberg::PendingUpdate.
|
inlinefinalvirtual |
Return the kind of this pending update.
Implements iceberg::PendingUpdate.