12namespace Lightweight::SqlBackup
16using BackupValue = std::variant<std::monostate,
29 std::variant<std::monostate,
32 std::vector<std::string>,
33 std::vector<std::vector<uint8_t>>,
51 if constexpr (!std::is_same_v<std::decay_t<
decltype(v)>, std::monostate>)
81 virtual void WriteRow(std::span<BackupValue const> row) = 0;
86 virtual std::string
Flush() = 0;
Interface for reading backup chunks.
virtual bool ReadBatch(ColumnBatch &batch)=0
Interface for writing backup chunks.
virtual bool IsChunkFull() const =0
virtual void Clear()=0
Clears the internal buffer after a flush.
virtual std::string Flush()=0
virtual void WriteRow(std::span< BackupValue const > row)=0
Represents a batch of backup data in column-oriented format.
std::vector< std::vector< bool > > nullIndicators
Null indicators for each column, parallel to columns.
std::vector< ColumnData > columns
The column data arrays.
void Clear()
Clears the internal buffer after a flush and releases memory.
size_t rowCount
The number of rows in the batch.
std::variant< std::monostate, std::vector< int64_t >, std::vector< double >, std::vector< std::string >, std::vector< std::vector< uint8_t > >, std::vector< bool > > ColumnData
Type representing columnar data storage for a batch.