Files
scylladb/tools/json_writer.hh
Avi Kivity f3eade2f62 treewide: relicense to ScyllaDB-Source-Available-1.0
Drop the AGPL license in favor of a source-available license.
See the blog post [1] for details.

[1] https://www.scylladb.com/2024/12/18/why-were-moving-to-a-source-available-license/
2024-12-18 17:45:13 +02:00

38 lines
1.0 KiB
C++

/*
* Copyright (C) 2022-present ScyllaDB
*/
/*
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
*/
#pragma once
#include "mutation/json.hh"
#include "sstables/sstables.hh"
namespace tools {
class mutation_fragment_stream_json_writer {
mutation_json::mutation_partition_json_writer _writer;
bool _clustering_array_created;
private:
void write(const clustering_row& cr);
void write(const range_tombstone_change& rtc);
public:
explicit mutation_fragment_stream_json_writer(const schema& s, std::ostream& os = std::cout)
: _writer(s, os) {}
mutation_json::json_writer& writer() { return _writer.writer(); }
void start_stream();
void start_sstable(const sstables::sstable* const sst);
void start_partition(const partition_start& ps);
void partition_element(const static_row& sr);
void partition_element(const clustering_row& cr);
void partition_element(const range_tombstone_change& rtc);
void end_partition();
void end_sstable();
void end_stream();
};
} // namespace tools