Lightweight 0.20261105.1
Loading...
Searching...
No Matches
Lightweight::SqlBackup::TableRestoreReport Struct Reference

Bounded failure report for one table. More...

#include <SqlBackup.hpp>

Public Member Functions

bool HasFailures () const noexcept
 
std::uint64_t NulledCellCount () const noexcept
 
std::string FailureSummary () const
 

Public Attributes

std::string tableName
 Name of the table.
 
std::uint64_t failedRowCount {}
 
std::vector< FailedRowRange > failedRowRanges
 Ranges of failed rows, capped at MaxReportedRowRanges.
 
std::uint64_t rowsBeyondRangeCap {}
 Failed rows not represented in failedRowRanges because the cap was reached.
 
std::vector< FailureReason > reasons
 Distinct failure reasons, capped at MaxReportedReasons.
 
std::uint64_t occurrencesBeyondReasonCap {}
 Failures not represented in reasons because the cap was reached.
 
std::vector< ColumnValueFailures > valueFailures
 Per-column value conversion failures.
 
std::optional< std::string > tableFailure
 Set if the whole table failed; holds the first reason.
 
std::uint64_t unreadableChunks {}
 Number of chunks of this table that could not be read.
 

Detailed Description

Bounded failure report for one table.

Definition at line 490 of file SqlBackup.hpp.

Member Function Documentation

◆ HasFailures()

bool Lightweight::SqlBackup::TableRestoreReport::HasFailures ( ) const
inlinenoexcept
Returns
true if anything failed for this table.

Definition at line 514 of file SqlBackup.hpp.

References failedRowCount, failedRowRanges, tableFailure, unreadableChunks, and valueFailures.

◆ NulledCellCount()

std::uint64_t Lightweight::SqlBackup::TableRestoreReport::NulledCellCount ( ) const
inlinenoexcept
Returns
The number of cells of this table restored as NULL, over all columns.

Definition at line 521 of file SqlBackup.hpp.

References valueFailures.

Referenced by FailureSummary().

◆ FailureSummary()

std::string Lightweight::SqlBackup::TableRestoreReport::FailureSummary ( ) const
inline
Returns
The one-line summary of this table's failures, "<n> rows failed, <m> cells set to NULL" ("1 row failed", "1 cell set to NULL" for a count of 1).

Definition at line 531 of file SqlBackup.hpp.

References failedRowCount, and NulledCellCount().

Member Data Documentation

◆ tableName

std::string Lightweight::SqlBackup::TableRestoreReport::tableName

Name of the table.

Definition at line 493 of file SqlBackup.hpp.

◆ failedRowCount

std::uint64_t Lightweight::SqlBackup::TableRestoreReport::failedRowCount {}

Total number of rows that failed to restore. For a table that failed as a whole, the rows of the archive that did not reach the target; that is 0 if the archive does not know the table's row count, while tableFailure is still set.

Definition at line 497 of file SqlBackup.hpp.

Referenced by FailureSummary(), and HasFailures().

◆ failedRowRanges

std::vector<FailedRowRange> Lightweight::SqlBackup::TableRestoreReport::failedRowRanges

Ranges of failed rows, capped at MaxReportedRowRanges.

Definition at line 499 of file SqlBackup.hpp.

Referenced by HasFailures().

◆ rowsBeyondRangeCap

std::uint64_t Lightweight::SqlBackup::TableRestoreReport::rowsBeyondRangeCap {}

Failed rows not represented in failedRowRanges because the cap was reached.

Definition at line 501 of file SqlBackup.hpp.

◆ reasons

std::vector<FailureReason> Lightweight::SqlBackup::TableRestoreReport::reasons

Distinct failure reasons, capped at MaxReportedReasons.

Definition at line 503 of file SqlBackup.hpp.

◆ occurrencesBeyondReasonCap

std::uint64_t Lightweight::SqlBackup::TableRestoreReport::occurrencesBeyondReasonCap {}

Failures not represented in reasons because the cap was reached.

Definition at line 505 of file SqlBackup.hpp.

◆ valueFailures

std::vector<ColumnValueFailures> Lightweight::SqlBackup::TableRestoreReport::valueFailures

Per-column value conversion failures.

Definition at line 507 of file SqlBackup.hpp.

Referenced by HasFailures(), and NulledCellCount().

◆ tableFailure

std::optional<std::string> Lightweight::SqlBackup::TableRestoreReport::tableFailure

Set if the whole table failed; holds the first reason.

Definition at line 509 of file SqlBackup.hpp.

Referenced by HasFailures().

◆ unreadableChunks

std::uint64_t Lightweight::SqlBackup::TableRestoreReport::unreadableChunks {}

Number of chunks of this table that could not be read.

Definition at line 511 of file SqlBackup.hpp.

Referenced by HasFailures().


The documentation for this struct was generated from the following file: